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
TODO Autogenerated method stub
@Override public void windowClosing(WindowEvent e) { System.out.println("触发windowClosing事件"); Object[] options = { "确定", "取消" }; int result = JOptionPane.showOptionDialog(null, "确定退出本窗口?", "提示", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); if(result == 0){ DownloadView.this.dispose();//关闭窗体 if(restListener!=null)restListener.close(); } }
{ "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
but what if year and month are not in format???
private static String generateDateString(int year, int month, int dayOfMonth){ //Add one to month b/c Android is zero-based while SimpleDateFormatter is not month++; String yearString = String.format(Locale.getDefault(), "%04d", year); String monthString = String.format(Locale.getDefault(), "%02d", month); String dayOfMonthString = String.format(Locale.getDefault(), "%02d", dayOfMonth); String result = yearString + "." + monthString + "." + dayOfMonthString; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test public void Year_2__month__day()\t\t\t\t\t\t\t{tst_date_(\"03/31/2001\"\t\t\t\t, \"2001-03-31\");}", "@Test public void Year_0__month__day()\t\t\t\t\t\t\t{tst_date_(\"2001-03-31\"\t\t\t\t, \"2001-03-31\");}", "@Test public void Month_name_1__day__year__guess()\t\t\t\t{tst_date_(\"02 Mar 01\"\t\t\t\t, \"2001-03-02\");}", "@Test public void Day_1__month__year()\t\t\t\t\t\t\t{tst_date_(\"03-31-02\"\t\t\t\t, \"2002-03-31\");}", "public static void main(String[] args) {\n\t\tMonthDay month=MonthDay.now();\n\t\tLocalDate d=month.atYear(2015);\n\t\tSystem.out.println(d);\n\t\tMonthDay m=MonthDay.parse(\"--02-29\");\n\t\tboolean b=m.isValidYear(2019);\n\t\tSystem.out.println(b);\n\t\tlong n= month.get(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(\"month of the year is:\"+n);\n\t\tValueRange r1=month.range(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(r1);\n\t\tValueRange r2=month.range(ChronoField.DAY_OF_MONTH);\n\t\tSystem.out.println(r2);\n\n\t}", "@Test public void Month_name_1__day__year()\t\t\t\t\t{tst_date_(\"2 Mar 2001\"\t\t\t\t, \"2001-03-02\");}", "@Test public void Month_name_1__year__day()\t\t\t\t\t{tst_date_(\"2001 Mar 02\"\t\t\t, \"2001-03-02\");}", "public static String getDate(String year, String month) {\n\t\treturn \"t.posted = \\\"\" + year + \"-\" + month + \"-01 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-02 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-03 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-04 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-05 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-06 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-07 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-08 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-09 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-10 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-11 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-12 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-13 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-14 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-15 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-16 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-17 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-18 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-19 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-20 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-21 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-22 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-23 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-24 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-25 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-26 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-27 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-28 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-29 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-30 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-31 00:00:00\\\" \\r\\n\";\n\t}", "@Test public void Month_name_0__day__year__bad_day()\t\t\t{tst_date_(\"Mar 32 2001\"\t\t\t, \"Invalid day: 32\");}", "public void setString (String s) { //set method\n full_Date = s;\n if(!isValidDate(full_Date)) throw new IllegalArgumentException(\"Invalid Date Format!\");\n\n Year = Integer.parseInt(full_Date.substring(0,3));\n Month = Integer.parseInt(full_Date.substring(4,5));\n Day = Integer.parseInt(full_Date.substring(6,7));\n\n \n}", "int getYear();", "java.lang.String getStartDateYYYY();", "private void setYearMonthDay(String fvtime) {\n\t\tString cleanStr = fvtime.replaceAll(\"^ca\\\\. \", \"\");\n\t\tcleanStr = cleanStr.replaceAll(\"\\\\?$\", \"\");\n\t\tString[] parts = cleanStr.split(\"/\");\n\t\tif (parts.length == 1) {\n\t\t\tyear = Integer.parseInt(parts[0]);\n\t\t} else if (parts.length == 2) {\n\t\t\tmonth = Integer.parseInt(parts[0]);\n\t\t\tyear = Integer.parseInt(parts[1]);\n\t\t} else if (parts.length == 3) {\n\t\t\tmonth = Integer.parseInt(parts[0]);\n\t\t\tday = Integer.parseInt(parts[1]);\n\t\t\tyear = Integer.parseInt(parts[2]);\n//\t\t\t\t\t// extract day part...\n//\t\t\t\t\t// 1949-03-04T21:45:00Z -> 1949, 03, 04T21:45:00Z\n//\t\t\t\t\tString[] dayParts = parts[parts.length-3].split(\"T\");\n//\t\t\t\t\tday = Integer.parseInt(dayParts[0]);\n\t\t}\n\t}", "public int MagicDate(){\n return month = day = year = 1;\n \n }", "public BirthYearMonth(@NotNull String year, @NotNull String month) throws IllegalArgumentException {\n this(Integer.parseInt(year,10), Integer.parseInt(month,10));\n }", "java.lang.String getEndDateYYYY();", "public String getYear(){\n return rssData.getDate().split(\"/\")[2];\n }", "private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}", "Year createYear();", "private void parseMonthYearFromString(MonthYear my, String toParse) {\n String[] results = toParse.split(\" \");\n System.out.println(results[0]);\n System.out.println(results[1]);\n\n for(int i=0;i<MONTHS.length;i++) {\n if(results[0].equals(MONTHS[i])) {\n my.setMonth(i + 1);\n break;\n }\n }\n\n my.setYear(Integer.parseInt(results[1]));\n }", "public void parseDateTextFieldHelper() {\n\t\tyear = Integer.parseInt(textFieldDate.getText().substring(0, 4));\n\t\tmonth = Integer.parseInt(textFieldDate.getText().substring(5, 7));\n\t\tdayOfMonth = Integer.parseInt(textFieldDate.getText().substring(8, 10));\n\t}", "public String getOnlyYear(String date, String pattern) {\r\n\t\tString year;\r\n\t\tDateTimeFormatter formatter = DateTimeFormat.forPattern(pattern);\r\n\t\tLocalDate localDate = formatter.parseLocalDate(date);\r\n\t\tyear = localDate.yearOfCentury().getAsText();\r\n\t\tif(year.length()==1) year = \"0\"+year;\r\n\t\treturn year;\r\n\t}", "protected final void normalise()\n {\n // yyyy, mm, dd must be set at this point\n if ( isValid(yyyy,mm,dd) ) return;\n else if ( mm > 12 )\n {\n yyyy += (mm-1) / 12;\n mm = ((mm-1) % 12) + 1;\n if ( isValid(yyyy,mm,dd) ) return;\n }\n else if ( mm <= 0 )\n {\n // Java's definition of modulus means we need to handle negatives as a special case.\n yyyy -= -mm / 12 + 1;\n mm = 12 - (-mm % 12);\n if ( isValid(yyyy,mm,dd) ) return;\n }\n if ( isValid(yyyy,mm,01) )\n {\n int olddd = dd;\n dd = 1;\n toOrdinal();\n ordinal += olddd - 1;\n toGregorian();\n if ( isValid(yyyy,mm,dd) ) return;\n }\n\n throw new IllegalArgumentException(\"date cannot be normalised: \"\n + yyyy + \"/\" + mm + \"/\" + dd);\n\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectYear() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/1700\");\r\n }", "@Test\n\tpublic void parseDateTextFieldYearTest() {\n\t\tassertEquals(2016,\n\t\t\t\tInteger.parseInt(textFieldDate.getText().substring(0, 4)));\n\t}", "public String asMonthYear() {\n return new SimpleDateFormat(\"MM/yyyy\").format(expiredAfter);\n\t}", "public void inputTempForYear() {\n\t\t\n\t\tfor (int i=0; i<12; i++)\n\t\t\tinputTempForMonth(i);\n\t}", "public static String getYearAndMonth(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy,MM\"); //EX 2016,02\r\n return df.format(date);\r\n }", "public static void main(String[] args) throws ParseException {\n\n\t\tString startPattern = \"MMM yyyy\";\n\n\t\tString endPattern = \"MM-dd-yyyy\";\n\n\t\tString str = formateDate(\"mar 2019\", startPattern, endPattern);\n\t\tSystem.out.println(str);\n\n\t}", "public final int getYYYY()\n {\n return yyyy;\n }", "private static String getYearMonth() {\n LocalDate oneMonthAgo = LocalDate.now().minusMonths(1);\n return oneMonthAgo.getYear() + String.format(\"%02d\", oneMonthAgo.getMonth().getValue());\n }", "public abstract String reportLeapYear(int year);", "public static String getYearMonthFormat(String strFormat) {\n String yearMonthFormat = \"\";\n String etemp = \"\";\n String regex = \".*[^a-zA-Z0-9]\";\n int epos = strFormat.lastIndexOf(\"d\");\n\n if (epos + 1 < strFormat.length()) {\n etemp = strFormat.substring(epos + 1, epos + 2);\n }\n\n yearMonthFormat = strFormat.replaceAll(\"d\", \"\");\n yearMonthFormat = yearMonthFormat.replaceAll(\"m\", \"M\");\n\n if (etemp.length() > 0)\n yearMonthFormat = yearMonthFormat.replaceFirst(etemp, \"\");\n\n if (yearMonthFormat.matches(regex)) {\n yearMonthFormat = yearMonthFormat.substring(0, yearMonthFormat.length() - 1);\n if (yearMonthFormat.matches(regex)) {\n yearMonthFormat = yearMonthFormat.substring(0, yearMonthFormat.length() - 1);\n }\n }\n return yearMonthFormat;\n }", "public Date(String month, int year) {\n\t\t\tthis.weekday = 0;\n\t\t\tthis.day = 0;\n\t\t\tthis.month = notEmpty(month);\n\t\t\tthis.year = zeroOrMore(year);\n\t\t}", "protected static int getYear(String dateTime) {\n int year = Integer.parseInt(dateTime.substring(1, 3));\n return year >= 90 && year <= 99 ? 1900 + year : 2000 + year;\n }", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "public boolean isMonth(String input){\r\n if(!isInteger(input)) return false;\r\n int month = Integer.parseInt(input);\r\n if(12 < month) return false;\r\n return true;\r\n }", "private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }", "private int getPublishingYear(String date) {\n String[] splitArray = date.split(\"-\");\n\n return Integer.parseInt(splitArray[splitArray.length - 1]);\n }", "private String getYear(String date) {\n String year = \"N/A\";\n if (date != null && !date.equals(\"\")) {\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date movieDate = null;\n try {\n movieDate = parser.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Calendar cal = Calendar.getInstance();\n cal.setTime(movieDate);\n year = \"\" + cal.get(Calendar.YEAR);\n }\n return year;\n }", "@JsonCreator\n public BirthYearMonth(\n @JsonProperty(\"year\") @JsonPropertyDescription(\"4-digit year\") int year,\n @JsonProperty(\"month\") @JsonPropertyDescription(\"1-2-digit month from 1-12\") int month\n ) {\n AgeUtil.checkYear(year);\n if (month<1 || month>12) throw new IllegalArgumentException(\"Month must be 1-12 but was: \"+month+\"!\");\n this.year = year;\n this.month = month;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"请输入年份:\");\r\n\t\tint year = sc.nextInt();\r\n\t\tif(year <= 0) { //判断输入的年份是否正确\r\n\t\t\tSystem.out.println(\"请正确输入年份!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"请输入月份:\");\r\n\t\tint month = sc.nextInt();\r\n\t\tif(month <= 0 || month > 12) {\t//判断输入的月份是否正确\r\n\t\t\tSystem.out.println(\"请正确输入月份!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"请输入号数:\");\r\n\t\tint day = sc.nextInt();\r\n\t\tif(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\t//判断输入的号数是否正确\r\n\t\t\tif(day < 1 || day > 31) {\r\n\t\t\t\tSystem.out.println(\"请正确输入号数!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}else if(month == 4 || month == 6 || month == 9 || month == 11) {\r\n\t\t\tif(day < 1 || day > 30) {\r\n\t\t\t\tSystem.out.println(\"请正确输入号数!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif((year%4 == 0 && year%100 != 0) || year%400 == 0) {\r\n\t\t\tif(month == 2) {\r\n\t\t\t\tif(day < 1 || day > 29) {\r\n\t\t\t\t\tSystem.out.println(\"请正确输入号数!\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tif(month == 2) {\r\n\t\t\t\tif(day < 1 || day > 28) {\r\n\t\t\t\t\tSystem.out.println(\"请正确输入号数!\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif((year%4 == 0 && year%100 != 0) || year%400 == 0) {//判断为闰年时\r\n\t\t\tif(month >= 3) {\t//闰年月份大于等于3时,天数加1\r\n\t\t\t\tSystem.out.println(\"这天是本年的第\" + (sumday(month,day)+1) + \"天。\");\r\n\t\t\t}else {\t//闰年的前两个月\r\n\t\t\t\tSystem.out.println(\"这天是本年的第\" + sumday(month,day) + \"天。\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {//为平年时\r\n\t\t\tSystem.out.println(\"这天是本年的第\" + sumday(month,day) + \"天。\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t LocalDate ldt = LocalDate.of(2016,12,21);\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MMM-dd\");\n DateTimeFormatter format1 = DateTimeFormatter.ofPattern(\"YYYY-mmm-dd\");\n System.out.println(ldt.format(format));\n System.out.println(ldt.format(format1));\n\t}", "private static String getDate() {\n Scanner input = new Scanner(System.in);\n\n String monthName = input.next();\n int month = monthNum(monthName);\n int day = input.nextInt();\n String date = \"'2010-\" + month + \"-\" + day + \"'\";\n return date;\n }", "@Test\n\tvoid teststringtoint(){\n\t\tCalendar cal=Calendar.getInstance();\n\t\tint m=cal.get(Calendar.MONTH);\n\t\tint d=cal.get(Calendar.DATE);\n\t\tSystem.out.println(\"m==\"+m+\" d==\"+d);\n\t}", "public String asYear() {\n \treturn new SimpleDateFormat(\"yyyy\").format(expiredAfter);\n }", "public boolean isYearMonthDuration() {\n return false;\n }", "boolean checkNumberFormat (String birthDate){\r\n for (int i = 0; i < birthDate.length(); i++) {\r\n if ((birthDate.charAt(i) < 48 && birthDate.charAt(i) != 32 \r\n && birthDate.charAt(i) != 10) \r\n || birthDate.charAt(i) > 57){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }", "public String getYear()\r\n {\r\n return year;\r\n }", "public void m3() {\n\t\t\r\n\t\tLocalDate dob = LocalDate.parse(\"1991::09::17\",DateTimeFormatter.BASIC_ISO_DATE);\r\n\tSystem.out.println(dob);\r\n\t}", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "public int getDocumentYear();", "@Test\n public void test_getMonth_by_full_string() throws AppException {\n assertEquals(getMonth(\"January\"),1);\n assertEquals(getMonth(\"October\"),10);\n assertEquals(getMonth(\"SePtember\"),9);\n assertEquals(getMonth(\"february\"),2);\n }", "public final native double setFullYear(int year, int month) /*-{\n this.setFullYear(year, month);\n return this.getTime();\n }-*/;", "@Test\n public void toStringOk(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.toString(),\"1 january 1970\");\n }", "public static final String convertMonth(String monthSlashYear) {\r\n \tString[] monthYear = monthSlashYear.split(\"/\");\r\n \tString month = monthYear[0];\r\n \tString year = monthYear[1];\r\n \treturn getEnMonth(month) + \" \" + year;\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectMonth() {\r\n SimpleDate d1 = new SimpleDate(\"-3/1/1700\");\r\n }", "Integer getTenYear();", "public int getLastMonthOfYear (int year)\n {\n return 12;\n }", "public static String monthToString(int month){\r\n\r\n if(month == 1) {return \"jan\"}\r\n else if(month == 2) {return \"feb\"}\r\n else if(month == 3) {return \"mar\"}\r\n else if(month == 4) {return \"apl\"}\r\n else if(month == 5) {return \"may\"}\r\n else if(month == 6) {return \"jun\"}\r\n else if(month == 7) {return \"jul\"}\r\n else if(month == 8) {return \"aug\"}\r\n else if(month == 9) {return \"sep\"}\r\n else if(month == 10) {return \"oct\"}\r\n else if(month == 11) {return \"nov\"}\r\n else if (month == 12) {return \"dec\"}\r\n else {}\r\n return \"broken\";\r\n\r\n}", "public int getYear() { return year; }", "public int getYear() { return year; }", "@Test\n public void test_getMonth_by_short_string() throws AppException {\n assertEquals(getMonth(\"DEC\"),12);\n assertEquals(getMonth(\"feb\"),2);\n assertEquals(getMonth(\"SeP\"),9);\n assertEquals(getMonth(\"Jan\"),1);\n }", "Integer getTHunYear();", "private static double toFullYear(double year) {\n if (-1 < year && year < 100) {\n return 1900 + (int) year;\n }\n return year;\n }", "private int getYearFromHeader(String labelname) \r\n\t{\n\t\tString substringgetfirstthree = labelname;\r\n String getactualmonth = substringgetfirstthree.replaceAll(\"[^0-9]\", \"\").trim();\r\n String getnum = getactualmonth;\r\n return Integer.parseInt(getactualmonth);\r\n\t\t\r\n\t}", "@Test\n\tpublic void testDate4() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36161);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 2);\n\t\t\t// month is 0 indexed, so Jan is 0\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "public static String create(int year, int month, int date) {\r\n\t\tCalendar dateTime = createCalendar(year, month, date);\r\n\t\treturn YYYY_MM_DD_FORMATTER.format(dateTime.getTime());\r\n\t}", "private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }", "@Override\n public String getCurrentMonthAndYear() {\n\n setLogString(\"Get Month and year\", true, CustomLogLevel.HIGH);\n final String currentMonth = getElement(getDriver(), By.className(SAVINGS_MONTH),\n TINY_TIMEOUT).getText();\n setLogString(\"Current Month and Year: \" + currentMonth, true, CustomLogLevel.HIGH);\n return currentMonth.substring(currentMonth.indexOf(\"-\") + 1, currentMonth.length()).trim();\n }", "@Test public void Mdy_at_y_slash()\t\t\t\t\t\t\t\t{tst_date_(\"1/2/70\"\t\t\t\t\t, \"1970-01-02\");}", "private int[] getMonthDayYearIndexes(String pattern) {\n int[] result = new int[3];\n\n final String filteredPattern = pattern.replaceAll(\"'.*?'\", \"\");\n\n final int dayIndex = filteredPattern.indexOf('d');\n final int monthMIndex = filteredPattern.indexOf(\"M\");\n final int monthIndex = (monthMIndex != -1) ? monthMIndex : filteredPattern.indexOf(\"L\");\n final int yearIndex = filteredPattern.indexOf(\"y\");\n\n if (yearIndex < monthIndex) {\n result[YEAR_INDEX] = 0;\n\n if (monthIndex < dayIndex) {\n result[MONTH_INDEX] = 1;\n result[DAY_INDEX] = 2;\n } else {\n result[MONTH_INDEX] = 2;\n result[DAY_INDEX] = 1;\n }\n } else {\n result[YEAR_INDEX] = 2;\n\n if (monthIndex < dayIndex) {\n result[MONTH_INDEX] = 0;\n result[DAY_INDEX] = 1;\n } else {\n result[MONTH_INDEX] = 1;\n result[DAY_INDEX] = 0;\n }\n }\n return result;\n }", "public String getMonth(String x){\n\n if(x.contains(\"Apr\")){\n return \"April\";\n }\n else if(x.contains(\"Mar\")){\n return \"March\";\n }\n else if(x.contains(\"Jan\")){\n return \"January\";\n }\n else if(x.contains(\"Feb\")){\n return \"February\";\n }\n else if(x.contains(\"May\")){\n return \"May\";\n }\n else if(x.contains(\"Jun\")){\n return \"June\";\n }\n else if(x.contains(\"Jul\")){\n return \"July\";\n }\n else if(x.contains(\"Aug\")){\n return \"August\";\n }\n else if(x.contains(\"Sep\")){\n return \"September\";}\n else if(x.contains(\"Oct\")){\n return \"October\";}\n else if(x.contains(\"Nov\")){\n return \"November\";}\n else{\n return \"December\";}\n }", "private String concatenateYearAndMonthAsString(Date date){\n\t\tString concatenatedYearAndMonth=\"\";\n\t\tCalendar cal = Calendar.getInstance(); // creates calendar\n\t\tcal.setTime(date);\n\t\tconcatenatedYearAndMonth = String.valueOf(cal.get(Calendar.YEAR))\n\t\t\t\t\t\t\t\t\t\t .concat(String.valueOf(cal.get(Calendar.MONTH) + 1));\n\t\t\t\t\t\t\t\t\t\t \n\t\treturn concatenatedYearAndMonth;\n\t}", "public void setYear(int _year) { year = _year; }", "private int caBeDate(String str){\n if(!isNumber(str)){\n return 0;\n }if(str.length()<2){\n return 0;\n }if(str.length()==2){\n return 1;\n }if(str.length() == 3){\n return 2;\n }if(str.length() == 4){\n return 3;\n }if(str.length()>4){\n return 6;\n }\n return 0;\n }", "private String makeDateString(int day, int month, int year) {\n String str_month = \"\" + month;\n String str_day = \"\" + day;\n if (month < 10) {\n str_month = \"0\" + month;\n }\n if (day < 10) {\n str_day = \"0\" + day;\n }\n return year + \"-\" + str_month + \"-\" + str_day;\n }", "int getExpYear(String bookingRef);", "public interface Format {\n public static final String PATTERN_DATE = \"yyyy-MM-dd\";\n public static final String PATTERN_DATE_YEAR = \"yyyy\";\n}", "public int getStartingYear()\n {\n return 2013;\n }", "public date2(int theYear, int theMonth, int theDay) {\n\t\tmonth = checkMonth(theMonth); // validate month\n\t\tyear = checkYear(theYear); // validate year\n\t\tday = checkDay(theDay); // validate day\n\t}", "static int getYear(byte[] bytes) {\n return readBits(bytes, YEAR_POS, YEAR_BITS) - YEAR_EXCESS;\n }", "public String verifyDateFormat(String object, String data) {\n\t\tlogger.debug(\"verifying the date format\");\n\t\ttry {\n\t\t\tString date_text = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getText();\n\t\t\tString date[] = date_text.split(\"/\");\n\t\t\tBoolean flag = false;\n\n\t\t\tint month = Integer.parseInt(date[0]);\n\t\t\tint day = Integer.parseInt(date[1]);\n\t\t\tint year = Integer.parseInt(date[2]);\n\n\t\t\tfor (int i = 0; i < date.length; i++) {\n\t\t\t\tif (month <= 12 && day <= 31 && year > 2000) {\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (flag) {\n\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--date is in correct format\";\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--date is not in correct format\";\n\t\t\t}\n\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + e.getLocalizedMessage();\n\t\t}\n\t}", "private static String calcYMD(int[] age){\n\t\treturn age[2]+\" years \" + age[1] + \" months \" + age[0] + \" days \";\n\t}", "protected static Date fromInts(final Integer year, final Integer month, final Integer day, \r\n final Integer hour, final Integer minute, final Integer second, final Integer milli) \r\n throws Exception {\r\n Validate.notNull(year);\r\n Validate.notNull(month);\r\n Validate.notNull(day);\r\n Validate.notNull(hour);\r\n Validate.notNull(minute);\r\n Validate.notNull(second);\r\n Validate.notNull(milli);\r\n \r\n Integer safeYear = year; \r\n String yearAsString = year.toString();\r\n if ((safeYear.intValue() >= 0) && (yearAsString.length() <= 2)) {\r\n final SimpleDateFormat sdf = new SimpleDateFormat(\"yy\");\r\n final Calendar calendar = Calendar.getInstance();\r\n \r\n //It uses ParsePosition to make sure the whole \r\n //string has been converted into a number\r\n ParsePosition pp = new ParsePosition(0);\r\n Date date = sdf.parse(yearAsString, pp);\r\n if (pp.getIndex() != yearAsString.length()) {\r\n throw new ParseException(\"The whole input String does not represent a valid Date\", \r\n pp.getIndex());\r\n } \r\n calendar.setTime(date);\r\n safeYear = Integer.valueOf(calendar.get(Calendar.YEAR));\r\n } \r\n \r\n final Calendar result = Calendar.getInstance();\r\n result.set(Calendar.YEAR, safeYear.intValue());\r\n result.set(Calendar.MONTH, month.intValue() - 1);\r\n result.set(Calendar.DAY_OF_MONTH, day.intValue());\r\n result.set(Calendar.HOUR_OF_DAY, hour.intValue());\r\n result.set(Calendar.MINUTE, minute.intValue());\r\n result.set(Calendar.SECOND, second.intValue());\r\n result.set(Calendar.MILLISECOND, milli.intValue());\r\n \r\n return result.getTime();\r\n }", "String getDate();", "String getDate();", "private static String getDay(int year) {\n if (year == 1918)\n return \"\";\n return \"\";\n }", "public void setYear(String year)\r\n {\r\n this.year = year; \r\n }", "static String solve(int year){\n int beforeYear=1919, specialYear=1918, specialDay=28, sumDay=0, programmerDay=256;\n boolean leapYear=false;\n String result = null;\n if (year < beforeYear) {\n leapYear = year%4 == 0 ? true:false;\n } else {\n leapYear = (year%400 == 0 || (year%4 == 0 && year%100 != 0)) ? true : false;\n }\n for(int i=1; i < 13; i++) {\n int temp = i;\n\n if ((temp&=0x1) == 1 || i==8) {\n sumDay = sumDay + 31;\n } else {\n if (i == 2) {\n if (year == specialYear) {\n sumDay = sumDay + 15;\n } else {\n sumDay = sumDay + (leapYear ? specialDay + 1 : specialDay);\n }\n } else {\n sumDay = sumDay + 30;\n }\n }\n if ((programmerDay - sumDay) <= 30) {\n\n result = (programmerDay - sumDay) +\".\" + \"0\" + (i+1) + \".\"+ year;\n\n// try {\n// Date date = targetFmt.parse(temp1);\n//\n// return targetFmt2.parse(String.valueOf(date)).toString();\n// } catch (ParseException e) {\n// e.printStackTrace();\n// }\n return result;\n }\n }\n return result;\n }", "java.lang.String getStartDateYYYYMMDD();", "private static String checkFormat(String date){\r\n\t\tif(date.length()==0) return \"\";\r\n\t\tint dateChars=0,timeChars=0;\r\n\t\tchar currenChar;\r\n\t\t\r\n\t\t//check if the first and the last character of the string is a number, it must always be\r\n\t\tif(!Character.isDigit(date.charAt(0))) return \"\";\r\n\t\tif(!Character.isDigit(date.charAt((date.length()-1)))) return \"\";\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=1; i<date.length()-1;i++){\r\n\t\t\tcurrenChar=date.charAt(i);\r\n\t\t\t\r\n\t\t\t//check if every character is / or : or number\t\t\r\n\t\t\tif(!(Character.isDigit(currenChar) || currenChar==':' || currenChar=='/')) return \"\";\r\n\t\t\t//check if there is a number between // or ::, if not it returns false\r\n\t\t\tif((currenChar==':' || currenChar=='/') && (date.charAt(i+1)==':' || date.charAt(i+1)=='/')) return \"\";\r\n\t\t\t\r\n\t\t\t//count the / and :\r\n\t\t\tif(currenChar==':') timeChars++; \r\n\t\t\telse if(currenChar=='/') dateChars++;\r\n\t\t}\r\n\t\t\r\n\t\t//if it is time with one :\r\n\t\tif(timeChars==1 && dateChars==0){\r\n\t\t\t//check if one of the numbers has more than 2 digits, then it is invalid\r\n\t\t\tint index=0;\r\n\t\t\tfor(String s:splitWords(date.replaceAll(\":\", \" \"))){\r\n\t\t\t\tif( index==0 && s.length()!=1 && s.length()!=2) return \"\";\r\n\t\t\t\telse if(index>0 && s.length()!=2 ) return \"\";\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\treturn formats[2];\r\n\t\t}\r\n\t\t\r\n\t\t//if it is time with two :\r\n\t\telse if(timeChars==2 && dateChars==0){\r\n\t\t\t//check if one of the numbers has more than 2 digits, then it is invalid\r\n\t\t\tint index=0;\r\n\t\t\tfor(String s:splitWords(date.replaceAll(\":\", \" \"))){\r\n\t\t\t\tif( index==0 && s.length()!=1 && s.length()!=2) return \"\";\r\n\t\t\t\telse if(index>0 && s.length()!=2 ) return \"\";\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\treturn formats[1];\r\n\t\t}\r\n\t\t\r\n\t\t//if it is a date with two /\r\n\t\telse if(dateChars==2 && timeChars==0){\r\n\t\t\t//check if one of the numbers have the right amount of digits\r\n\t\t\tString[] numbers= splitWords(date.replaceAll(\"/\", \" \"));\r\n\t\t\tif(numbers[0].length()>2) return \"\";\r\n\t\t\tif(numbers[1].length()>2) return \"\";\r\n\t\t\tif(numbers[2].length()>4) return \"\";\r\n\t\t\t\r\n\t\t\treturn formats[0];\r\n\t\t}\r\n\t\t\r\n\t\telse return \"\";\t\t\r\n\t}", "private String YYYYMMDD(String str) {\n\t\tString[] s = str.split(\"/\");\n\t\treturn s[0] + parseToTwoInteger(Integer.parseInt(s[1].trim())) + parseToTwoInteger(Integer.parseInt(s[2].trim()));\n\t}", "public static void printMonthTitle(int year, int month) {\n\n }", "private String formatDate(String date)\n\t{\n\t\tif(date == null || date.isEmpty())\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString[] dateSplit = date.split(\"/\");\n\t\t\tif(dateSplit.length != 3)\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn getMonthName(dateSplit[0]) + \" \"+ dateSplit[1]+\", \"+ dateSplit[2];\n\t\t\t}\n\t\t}\n\t}", "private boolean leapyear(int yr){\n if(yr%4 == 0 && yr%100 != 0){ //If year is divisible by 4 but not by 100\r\n days[1] = 29; //Set February's days to 29\r\n return true; //Retrn true.\r\n }\r\n return false; //Otherwise, return false.\r\n }", "public String getYear()\n {\n return year;\n }", "private String getDate(int year, int month, int day) {\n return new StringBuilder().append(month).append(\"/\")\n .append(day).append(\"/\").append(year).toString();\n }", "public static String getddmmyyDate(String dt) {\n String dd = \"\", mm = \"\", yy = \"\";\n int i = 0;\n try {\n for (String retval : dt.split(\"-\")) {\n if (i == 0)\n yy = retval;\n else if (i == 1)\n mm = retval;\n else\n dd = retval;\n\n i++;\n }\n return (yy + \"-\" + mm + \"-\" + dd).toString();\n } catch (Exception e) {\n e.printStackTrace();\n return \"\";\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tjava.util.Scanner input = new java.util.Scanner (System.in);\r\n\t\tint year = 0;\r\n\t\tboolean works1 = true;\r\n\t\t\r\n\t\t//petlja koja kontrolise unos godine (mora biti veca od nule)\r\n\t\twhile(works1){\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tSystem.out.print(\"Unesite godinu: \");\r\n\t\t\t\tyear = input.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tif (year <= 0){\r\n\t\t\t\t\tSystem.out.println(\"Unesite cijeli broj veci od nule!\");\r\n\t\t\t\t\tworks1 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tworks1 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch (InputMismatchException ex){\r\n\t\t\t\tSystem.out.println(\"Unesite cijeli broj veci od nule!\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t}\r\n\t\tboolean works2 = true;\r\n\t\tString month = \"\";\r\n\t\t\r\n\t\t//petlja koja kontrolise unos prva tri slova mjeseca, ukoliko se prva tri slova slazu sa nekim od naziva mjeseci\r\n\t\t//stampa se broj dana za taj mjesec, a ukoliko se prva tri slova ne zlazu ni sa jednim nazivom trazi se ponovni unos\r\n\t\twhile (works2){\r\n\t\t\tSystem.out.print(\"Unesite prva tri slova naziva mjeseca (npr., dec): \");\r\n\t\t\tmonth = input.next();\r\n\t\t\tmonth = month.toLowerCase();\r\n\t\t\t\r\n\t\t\tif (month.equals(\"jan\")){\r\n\t\t\t\tSystem.out.println(\"Jan \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if(month.equals(\"feb\")){\r\n\t\t\t\tif (isLeapYear(year)){\t\t\t\t\t\t\t\t\t\t\t//poziv metode za provjeru je li godina prestupna\r\n\t\t\t\t\tSystem.out.println(\"Feb \" + year + \". ima 29 dana.\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Feb \" + year + \". ima 28 dana.\");\r\n\t\t\t\t}\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"mar\")){\r\n\t\t\t\tSystem.out.println(\"Mar \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"apr\")){\r\n\t\t\t\tSystem.out.println(\"Apr \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"maj\")){\r\n\t\t\t\tSystem.out.println(\"Maj \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"jun\")){\r\n\t\t\t\tSystem.out.println(\"Jun \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"jul\")){\r\n\t\t\t\tSystem.out.println(\"Jul \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"avg\")){\r\n\t\t\t\tSystem.out.println(\"Avg \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"sep\")){\r\n\t\t\t\tSystem.out.println(\"Sep \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"oct\")){\r\n\t\t\t\tSystem.out.println(\"Oct \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"nov\")){\r\n\t\t\t\tSystem.out.println(\"Nov \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"dec\")){\r\n\t\t\t\tSystem.out.println(\"Dec \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}else{\r\n\t\t\t\tworks2 = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tinput.close();\r\n\t\t\r\n\t}" ]
[ "0.6652097", "0.6576376", "0.65243685", "0.651445", "0.6440659", "0.6416384", "0.6404499", "0.6390229", "0.6348734", "0.6338254", "0.62675077", "0.6222348", "0.62155765", "0.60976386", "0.60839576", "0.60625523", "0.60539925", "0.6040333", "0.6015361", "0.60113174", "0.59957474", "0.5988197", "0.5984197", "0.5977514", "0.594532", "0.59432584", "0.5927338", "0.58910024", "0.5889114", "0.58565056", "0.5855582", "0.585181", "0.58484936", "0.581258", "0.5805296", "0.5800577", "0.57855254", "0.5785472", "0.57782716", "0.57742083", "0.5769437", "0.5758783", "0.57545817", "0.5743815", "0.5720312", "0.56921494", "0.5691602", "0.5691581", "0.569156", "0.5691142", "0.5689359", "0.5682055", "0.56817657", "0.5672564", "0.56703466", "0.5667385", "0.56548923", "0.5651924", "0.56482697", "0.5646966", "0.5643189", "0.5640632", "0.5640632", "0.56384224", "0.5638154", "0.56349045", "0.56348443", "0.5629112", "0.5623744", "0.5610032", "0.56098497", "0.56075805", "0.5595704", "0.5584525", "0.55831313", "0.55816245", "0.5575524", "0.5575329", "0.55715185", "0.5570972", "0.5570728", "0.5570374", "0.55628526", "0.55599815", "0.55588925", "0.5557402", "0.5551635", "0.5551635", "0.5548722", "0.5548556", "0.5545493", "0.55416614", "0.55255955", "0.55237937", "0.5519498", "0.5515601", "0.55112606", "0.55091345", "0.5501678", "0.5497275", "0.5496867" ]
0.0
-1
Devuelve la entidad por si Id
Usuario findById(long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean containsId(int Id) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM curso where idcurso = ?\");\n\n pstmt.setInt(1, Id);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "private void thenLaPuedoBuscarPorSuId(Long id) {\n\tIngrediente ingredienteBuscado = session().get(Ingrediente.class, id);\t\n\tassertThat(ingredienteBuscado).isNotNull();\n\t}", "public Entidad obtenerEntidadPorId(Class<Entidad> clase, Serializable id) throws Exception;", "public int getId() {return Id;}", "boolean existePorId(Long id);", "@Test\r\n public void testCarregarPeloId() throws Exception {\r\n tx.begin();\r\n Categoria categoria = new Categoria(\"Teste carregar categoria por id\");\r\n dao.persiste(categoria);\r\n tx.commit();\r\n em.refresh(categoria);\r\n Long id = categoria.getId();\r\n Categoria result = dao.carregarPeloId(id);\r\n assertEquals(categoria, result);\r\n \r\n }", "DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;", "public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }", "TblSecuencia findByIdSecuencia(long idSecuencia );", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "boolean existeId(Long id);", "@Override\n public Venda Buscar(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n\n// transaction.commit();\n return v;\n }", "Empleado findById(Integer id);", "UsuarioDetalle cargaDetalle(int id);", "public Long getId() {\r\n return idComentario;\r\n }", "@Override\r\n public Assunto buscarId(int id) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.id =:id\");\r\n query.setParameter(\"id\", id);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }", "@Override\n\tpublic void llenarPorId(Object id) {\n\t\t\n\t}", "@Override\n public boolean compruebaPorId(Integer id) {\n return usuarioRepository.existsById(id);\n }", "Prueba selectByPrimaryKey(Integer id);", "public int getId()\r\n/* 53: */ {\r\n/* 54: 79 */ return this.idDetalleComponenteCosto;\r\n/* 55: */ }", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "AuditoriaUsuario find(Object id);", "Persona buscarPersonaPorId(Long id) throws Exception;", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Seguimiento)) {\r\n return false;\r\n }\r\n Seguimiento other = (Seguimiento) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public int getIdCandidatura(){\n return idCandidatura;\n }", "public Long getId()\r\n\t{\r\n\t\treturn idContrat;\r\n\t}", "@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@Override\n public Object recuperarElemento(Class clase, long id) {\n Query query = database.query();\n query.constrain(clase);\n query.descend(\"id\").constrain(id);\n ObjectSet result = query.execute();\n if (result.hasNext())\n return result.next();\n else return null;\n }", "private boolean estaId(int id){\n boolean estaId;\n Cursor c = getContentResolver().query(PostContract.getContentUri(),\n null,\n PostContract.Columnas._ID + \"=?\",\n new String[]{String.valueOf(id)},\n null);\n if(c.moveToFirst()){\n //String a = c.getString(c.getColumnIndex(PostContract.Columnas._ID));\n return estaId = true;\n }else {//Se puede insertar, ya que no hay un id que aparezca en la base de datos.\n estaId = false;\n }\n c.close();\n return estaId;\n }", "Movimiento selectByPrimaryKey(Integer idMovCta);", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId() {return id;}", "public Long getId() {return id;}", "public Long getId() {return id;}", "boolean hasFromId();", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario listarPorId(Usuario entidad) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tQuery query = entityManager.createQuery(\"from Usuario c where c.id = ?1\");\n\t\tquery.setParameter(1, entidad.getId());\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario Usuario = new Usuario();\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tUsuario = lista.get(0);\n\t\t}\n\n\t\treturn Usuario;\n\t}", "Videogioco findVideogiocoById(int id);", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Aluno)) {\n return false;\n }\n return id != null && id.equals(((Aluno) o).id);\n }", "public int getId_anneeScolaire() {return id_anneeScolaire;}", "@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}", "public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\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; }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n AnvaeKhodro anvaeKhodro = (AnvaeKhodro) o;\n if (anvaeKhodro.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), anvaeKhodro.getId());\n }", "O obtener(PK id) throws DAOException;", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "private boolean idSaoIguais(Service servico, Service servicoAComparar) {\n return servico.getId() == servicoAComparar.getId();\n }", "public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n Comida comida = (Comida) o;\n if (comida.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), comida.getId());\n }", "public int getId() {\n return id;\n }", "public Long getPersonaId();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Contrato)) {\n return false;\n }\n Contrato other = (Contrato) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();" ]
[ "0.67848617", "0.67641747", "0.6484233", "0.6432483", "0.64266443", "0.6390616", "0.63881814", "0.6366518", "0.6347138", "0.6332997", "0.6314305", "0.62872744", "0.62782377", "0.6209382", "0.6190617", "0.61704284", "0.6159766", "0.6130434", "0.6116258", "0.61160785", "0.61095876", "0.61082906", "0.6105138", "0.6084137", "0.6076985", "0.60735255", "0.60655063", "0.6053973", "0.60492516", "0.60455275", "0.6037217", "0.6037217", "0.6037217", "0.6037217", "0.6037217", "0.6037217", "0.6037217", "0.6035935", "0.6035286", "0.6035286", "0.6033836", "0.60323536", "0.60229623", "0.60215884", "0.60207987", "0.601649", "0.60145235", "0.60089284", "0.60089284", "0.60089284", "0.60089284", "0.60089284", "0.60089284", "0.60088044", "0.6003367", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.59913456", "0.5989841", "0.5981103", "0.59770423", "0.5970758", "0.5966485", "0.59607106", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503", "0.59513503" ]
0.0
-1
Obtiene Todos los cursos
List<Usuario> findAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "List<Curso> obtenerCursos();", "public String listarCursosInscripto(){\n StringBuilder retorno = new StringBuilder();\n \n Iterator<Inscripcion> it = inscripciones.iterator();\n while(it.hasNext())\n {\n Inscripcion i = it.next();\n retorno.append(\"\\n\");\n retorno.append(i.getCursos().toString());\n retorno.append(\" en condición de: \");\n retorno.append(i.getEstadoInscripcion());\n }\n return retorno.toString();\n }", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void mostrarSocios()\n\t{\n\t\t//titulo libro, autor\n\t\tIterator<Socio> it=socios.iterator();\n\t\t\n\t\tSystem.out.println(\"***********SOCIOS***********\");\n\t\tSystem.out.printf(\"\\n%-40s%-40s\", \"NOMBRE\" , \"APELLIDO\");\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSocio socio=(Socio)it.next();\n\t\t\tSystem.out.printf(\"\\n%-40s%-40s\\n\",socio.getNombre(),socio.getApellidos());\n\t\t}\n\t}", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "private void actualizarComboboxCursos() {\n\t\tint curso;\n\n\t\tDefaultComboBoxModel dcbm = new DefaultComboBoxModel();\n\t\tdcbm.removeAllElements();\n\n\t\tLinkedHashSet<Integer> resultado = modelo.obtenerCursos();\n\t\tIterator it = resultado.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tcurso = (int) it.next();\n\n\t\t\tdcbm.addElement(curso);\n\t\t}\n\t\tjfad.cBCursos.setModel(dcbm);\n\t\tjfad.cBCursosMod.setModel(dcbm);\n\t\tSystem.out.println(dcbm.getSelectedItem());\n\t}", "public void librosPorCategorian() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tOwlDAO.actualizarCategorian(mysql);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "private void listadoCategorias() {\r\n sessionProyecto.getCategorias().clear();\r\n sessionProyecto.setCategorias(itemService.buscarPorCatalogo(CatalogoEnum.CATALOGOPROYECTO.getTipo()));\r\n }", "private Hashtable<String, String> cargarRecursos() {\n Hashtable<String, String> recursosTemp = new Hashtable<String, String>(); \n \n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA, ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA);\n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB, ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB);\n return recursosTemp;\n }", "public Cursos() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI) this.getUI()).setNorthPane(null);\n jPopupMenuCurso.add(menuCurso);\n FuncionesAca.isListar(\"\");\n }", "private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}", "public void listOfCourses() {//admin cagirisa bulunna kurslarin hepsi\n if (Courses.size() != 0) {\n System.out.printf(\"%s kullanicisinin dersleri\\n\", this.getUsername());\n for (int i = 0; i < this.Courses.size(); ++i) {\n System.out.printf(\"%d-%s\\n\", i, Courses.get(i));\n }\n } else {\n System.out.printf(\"%s kullanicinin dersi yok\\n\", this.getUsername());\n }\n }", "public List<GrauParentesco> getListTodos();", "public List<Curso> recuperaTodosCursos(){\r\n Connection conexao = ConexaoComBD.conexao();\r\n //instrução sql\r\n String sql = \"SELECT * FROM curso;\";\r\n try {\r\n //statement de conexão\r\n PreparedStatement ps = conexao.prepareStatement(sql);\r\n //recebe a tabela de retorno do banco de dados em um formato java\r\n ResultSet rs = ps.executeQuery();\r\n //criar lista de retorno\r\n List<Curso> lista = new ArrayList<>();\r\n \r\n //tratar o retorno do banco\r\n \r\n while(rs.next()){\r\n //criar um objeto modelo do tipo do retorno \r\n Curso c = new Curso();\r\n c.setIdCurso(rs.getInt(1));\r\n c.setNome(rs.getString(2));\r\n c.setArea(rs.getString(3));\r\n c.setCargaHoraria(rs.getInt(5));\r\n c.setValorCurso(rs.getDouble(6));\r\n c.setValorMensal(rs.getDouble(7));\r\n c.setCod(rs.getString(8));\r\n lista.add(c);\r\n }\r\n //retornar lista preenchida \r\n return lista;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CursoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //retorna null em caso de excessao\r\n return null;\r\n }", "public ArrayList<String> listarEdiciones(String nomCurso) throws CursoExcepcion;", "public void saveCurList() {\n // Save the selected list by checking to see which list\n // was clicked on in the ComboBox\n\n // Create a new .txt file of the name given by the item that was clicked in the ComboBox\n\n // if: folder \"ToDoList\" exists?\n // store .txt inside of this folder\n // else:\n // create folder \"ToDoList\" on the user's desktop\n // with an appropriate path and then store the .txt\n // inside\n }", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }", "private void getObsequios(){\n mObsequios = estudioAdapter.getListaObsequiosSinEnviar();\n //ca.close();\n }", "@Override\n\tpublic List<CiclosCarreras> listar() {\n\t\treturn repoCiclos.findAll();\n\t}", "@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public ArrayList<Socio> obtenerTodos() {\n return (ArrayList<Socio>) socioRepo.findAll();\n }", "public Cursor fetchAllTodos() {\n\t\treturn database.query(DATABASE_TABLE, new String[] { KEY_COMPANYID,\n\t\t\t\tKEY_COMPANYNAME, KEY_COMPANYDESCRIPTION, KEY_WEBSITE, KEY_COMPANYIMG }, null, null, null,\n\t\t\t\tnull, null);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Curso> listarCursosPorDocente(int docente) {\r\n\t\tSession session = sf.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tQuery query = session.createQuery(\"select c from DocenteBean d join d.cursos c \"\r\n\t\t\t\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\t//Query query = session.createQuery(\"select c from CursoBean c join d.cursos c \"\r\n\t\t\t//\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\tquery.setInteger(0, docente);\r\n\t\tList<Curso> cursos = new ArrayList<Curso>();\r\n\t\ttry {\r\n\t\t\tList<CursoBean> cursosBean = new ArrayList<CursoBean>();\r\n\t\t\tcursosBean = query.list();\r\n\t\t\tfor(CursoBean cursoBean : cursosBean){\r\n\t\t\t\tCurso curso = cursoBean.pasarNegocio();\r\n\t\t\t\tcursos.add(curso);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tsession.flush();\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\treturn cursos;\r\n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public Cursor CargarTodosLosDatos()\n {\n return db.query(DATABASE_TABLE, new String[] {KEY_ATRIBUTO01}, null, null, null, null, null);\n }", "@Override\n\tpublic List<Ciclo> listarCiclos() {\n\t\treturn repository.findAll();\n\t}", "public void AltaCurso(String nombre, String descripcion, String duracion, int cantHoras, int creditos, Date fechaR, String url, String instituto, ArrayList<String> previas, ArrayList<String> categorias, String imagen) throws CursoExcepcion, InstitutoExcepcion;", "public void LlenarC(){\n for(int i=0;i< new GestionCategorias().getListCategoria().size();i++){\n catBox.addItem(new GestionCategorias().getListCategoria().get(i).getCat_nombre());\n \n }\n }", "private void lanzarListadoCategorias() {\n\t\tIntent i = new Intent(this, ListCategorias.class);\n\t\tstartActivity(i);\n\t\t\n\t}", "private static void mostrarSocios() {\n\n\t\tfor (Socio s : socios.values())\n\t\t\tSystem.out.println(s);\n\n\t}", "public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }", "public List<Aplicativo> buscarTodos() {\n return repositorio.findAll();\n }", "Curso modificaCurso(Curso curso);", "public Principal() {\n initComponents();\n\n System.out.println(\"lista de hoteles disponibles\");\n List<Document> hoteles = db.getAllDocuments(\"hoteles\");\n for (Document hotel : hoteles) {\n this.hoteles.add(hotel.getString(\"nombre\"));\n System.out.println(hotel.getString(\"nombre\"));\n }\n \n List<Document> ciudades = db.getAllDocuments(\"ciudades\");\n for (Document ciudad : ciudades) {\n this.ciudades_destino.add(ciudad.getString(\"nombre\"));\n }\n \n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public CatalogoJogos() {\r\n\t\tthis.listaDeJogosComprados = new ArrayList<Jogo>();\r\n\t}", "public void inicializarSugeridos() {\n\t\tarticulosSugeridos = new ArrayList<>();\n\t\tfor(Articulo articulo : this.getMain().getArticulosEnStock()) {\n\t\t\tarticulosSugeridos.add(articulo.getNombre().get() + \" - \" + articulo.getTalle().get());\n\t\t}\n\t\tasignarSugeridos();\n\t\tinicializarTxtArticuloVendido();\n\t}", "public void setNomeCurso(String nome)\n\t{\n\t\tcursoNome = nome;\n\t\tSystem.out.printf(\"Modificado o nome do curso %s\\n\", inicioCurso.getHoraAtual());\n\t}", "@Override\n public List<Cours> afficherTousLesCours() {\n return coursRepo.findAll();\n }", "@Override\r\n\tpublic List<Conta> RecuperTodos() {\n\t\treturn null;\r\n\t}", "public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }", "private void listadoRol(JComboBox cbb) throws SQLException {\n\t\tint selected = cbb.getSelectedIndex();\n\t\tDefaultComboBoxModel model = (DefaultComboBoxModel) cbb.getModel();\n\t\tif (!coordUsuario.listaRol().isEmpty()) {\n\t\tlistaRol = coordUsuario.listaRol();\n\t\t // Borrar Datos Viejos\n\t model.removeAllElements();\n\t for (int i=0;i<listaRol.size();i++) {\n\t model.addElement(listaRol.get(i).getNombre());\n\t }\n\t // setting model with new data\n\t cbb.setModel(model);\n\t cbb.setRenderer(new MyComboBox(\"Rol\")); \n \tcbb.setSelectedIndex(selected); \n\t}}", "private void limparPesquisasRecentes() {\n facade.deletarTodosTermos();\n pesquisas = facade.obterTermos();\n adapter.clear();\n adapter.notifyDataSetChanged();\n listViewPesquisas.refreshDrawableState();\n\n }", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "public List<CategoriaVO> mostrarCategorias() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<CategoriaVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerCategorias(mysql);\n\t\t\treturn resultado;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "private void getCodigosCasas(){\n mCodigosCasas = estudioAdapter.getListaCodigosCasasSinEnviar();\n //ca.close();\n }", "public List<CatCurso> consultarCatCurso()throws NSJPNegocioException;", "public controladorCategorias() {\r\n }", "public int cuantosCursos(){\n return inscripciones.size();\n }", "public String listarSensores(){\r\n String str = \"\";\r\n for(PacienteNuvem x:pacientes){//Para cada paciente do sistema ele armazena uma string com os padroes do protocolo de comunicação\r\n str += x.getNick()+\"-\"+x.getNome()+\"#\";\r\n }\r\n return str;\r\n }", "public void mostrarMenuLectura(TomarLectura tomarLectura, Lectura lecturaActual);", "public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}", "private void cargarSitiosLibres() {\r\n\t\tList<ArrSitioPeriodo> listado = mngRes.sitiosLibresPorPeriodoGenero(periodo.getPrdId(),\r\n\t\t\t\tgetEstudiante().getMatGenero());\r\n\t\thashSitios = new HashMap<String, ArrSitioPeriodo>();\r\n\t\tsitiosLibres = new ArrayList<SelectItem>();\r\n\t\tif (listado != null && !listado.isEmpty()) {\r\n\t\t\tgetSitiosLibres().add(new SelectItem(0, \"Seleccionar\"));\r\n\t\t\tfor (ArrSitioPeriodo sitio : listado) {\r\n\t\t\t\tgetSitiosLibres().add(new SelectItem(sitio.getId().getArtId(), sitio.getSitNombre()));\r\n\t\t\t\thashSitios.put(sitio.getId().getArtId(), sitio);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }", "private void populaNoticiaCat()\n {\n NoticiaCat n1 = new NoticiaCat(\"Avisos\", \"Help\");\n noticiaCatDAO.insert(n1);\n NoticiaCat n2 = new NoticiaCat(\"Noticias\", \"Document Notes\");\n noticiaCatDAO.insert(n2);\n NoticiaCat n3 = new NoticiaCat(\"Dicas\", \"Tag\");\n noticiaCatDAO.insert(n3);\n }", "public ArrayList<String> listarCursosInst(String nombreInstituto) throws InstitutoExcepcion;", "public static void consultarListaCategorias(Activity activity) {\n ConexionSQLite conectar = new ConexionSQLite(activity, BASE_DATOS, null, 1);\n SQLiteDatabase db = conectar.getReadableDatabase();\n CategoriaVo categoria = null;\n listaCategorias = new ArrayList<CategoriaVo>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM \"+TABLA_CATEGORIAS, null);\n\n while (cursor.moveToNext()) {\n categoria = new CategoriaVo();\n categoria.setId(cursor.getInt(0));\n categoria.setCategoria(cursor.getString(1));\n categoria.setDescripcion(cursor.getString(2));\n\n listaCategorias.add(categoria);\n }\n db.close();\n }", "private void CargarUsuarios(){\n administradores.clear();\n usuariosList.clear();\n for (String i: BienvenidaActivity.UsuariosRegistrados.keySet()) {\n if(EsAdmin(i)){\n administradores.add(BienvenidaActivity.UsuariosRegistrados.get(i));\n }else{\n usuariosList.add(BienvenidaActivity.UsuariosRegistrados.get(i));\n }\n }\n String admins_string = \"\";\n for(Usuario admin : administradores){\n admins_string += admin.getUsername() + \" -> \" + admin.getNombre() + \" \" + admin.getApellido() + \"\\n\";\n }\n\n String users_string = \"\";\n for(Usuario userss : usuariosList){\n users_string += userss.getUsername() + \" -> \" + userss.getNombre() + \" \" + userss.getApellido() + \"\\n\";\n }\n\n // Finalmente se coloca en la actividad\n\n txtvw_contadmin.setText(String.valueOf(administradores.size()));\n txtvw_contusers.setText(String.valueOf(usuariosList.size()));\n txtvw_admins.setText(admins_string);\n txtvw_users.setText(users_string);\n }", "@Listen(\"onClick =#asignarEspacioCita\")\n\tpublic void asginarEspacioCita() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}", "public void BuscarGrupo() {\r\n try {\r\n // Inicializamos la tabla para refrescar todos los datos contenidos.\r\n InicializarTabla(_escuchador.session);\r\n Transaction tx = _escuchador.session.beginTransaction();\r\n List<Cursos> tabla=rsmodel.lista;\r\n List<Cursos> borrados = new <Cursos>ArrayList();\r\n if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Todos los campos\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase()) && !obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Código del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Nombre del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n tabla.removeAll(borrados);\r\n tx.commit();\r\n if(tabla.isEmpty()){tabla.add(new Cursos(null));}\r\n rs=tabla;\r\n ControladorTabla registrosBuscados = new ControladorTabla(tabla);\r\n menuCursos.getTablaCursos().setModel(registrosBuscados);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e, \"Excepción\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "private void cargarCatalogo() throws DAOException {\n\t\t List<Usuario> usuariosBD = adaptadorUsuario.recuperarTodosUsuarios();\n\t\t for (Usuario u: usuariosBD) \n\t\t\t usuarios.put(u.getTelefono(), u);\n\t}", "@GET\n public List<TrayectoDetail> darTrayectos() {\n \n List<TrayectoDetail> listaTrayecto = listEntity2DetailDTO(trayectoLogic.getTrayectos());\n LOGGER.log(Level.INFO, \"BookResource getBooks: output: {0}\", listaTrayecto);\n return listaTrayecto;\n }", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}", "public DAOTablaMenuProductos() {\r\n\t\trecursos = new ArrayList<Object>();\r\n\t}", "private void printSavedCoursesNames() {\n ArrayList<Course> tempCourseList = courseList.getCourseList();\n for (int i = 0; i < tempCourseList.size(); i++) {\n System.out.println((i + 1) + \": \" + tempCourseList.get(i).getName());\n }\n }", "protected void CriarEventos(){\n ListMenu.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String opcMenu = ((TextView) view).getText().toString();\n\n RedirecionaTela(opcMenu);\n }\n });\n }", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "public List<ColaTicket> obtenerTodasLasColas() {\n return this.colaFacade.findAll();\n }", "public String navigateDocenteCollection() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Docente_items\", this.getSelected().getDocenteCollection());\n }\n return this.mobilePageController.getMobilePagesPrefix() + \"/docente/index\";\n }", "private void mostrarLibros() {\n dlmLibros.clear();\n for (Libro libro : modelo.getLibros()) {\n dlmLibros.addElement(libro);\n }\n seleccionarLibrosOriginales();\n }", "public String[] getAllCopiers();", "@Override\r\n public List<Concursando> consultarTodosConcursando() throws Exception {\n return rnConcursando.consultarTodos();\r\n }", "public void listarCarros() {\n System.err.println(\"Carros: \\n\");\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados\");\n } else {\n System.err.println(Arrays.toString(carrosCadastrados.toArray()));\n }\n }", "public Socio(String nombre, int id_socio)\r\n {\r\n this.nombre = nombre;\r\n this.id_socio = id_socio;\r\n motos = new ArrayList<Moto>();\r\n System.out.println(\"Socio creado \" + id_socio + \" \" + nombre + \"\\n\");\r\n }", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }", "private static void mostrarListaDeComandos() {\n System.out.println(\"Lista de comandos:\");\n for (int i = 0; i < comandos.length; i++){\n System.out.println(comandos[i]);\n }\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "public static void eliminarTodosLosConceptosCatgeorias() {\n\t\tnew Delete().from(ConceptoCategoria.class).execute();\n\t}", "private String getOeuvres(HttpServletRequest request) throws Exception {\n List<Oeuvre> lstOeuvresE;\n try {\n lstOeuvresE = oeuvreF.getOeuvres();\n request.setAttribute(\"lstOeuvresR\", lstOeuvresE);\n return (\"/catalogue.jsp\");\n } catch (Exception e) {\n throw e;\n }\n }", "public void getSconti() {\r\n\t\tsconti = ac.getScontiDisponibili();\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaSconti!= null) {\r\n\t\t\tvaloreScontiCol.setCellValueFactory(new PropertyValueFactory<Sconto, Integer>(\"valore\"));\r\n\t puntiRichiestiCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"puntiRichiesti\"));\r\n\t spesaMinimaCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"spesaMinima\"));\r\n\t \r\n\t Collections.sort(sconti);\r\n\t tabellaSconti.getItems().setAll(sconti);\r\n\t \r\n\t tabellaSconti.setOnMouseClicked(e -> {\r\n\t \tif(aggiungi.isDisabled() && elimina.isDisabled()) \r\n\t \t\ttotale.setText(\"\" + ac.applicaSconto(tabellaSconti.getSelectionModel().getSelectedItem()));\r\n\t });\r\n\t }\r\n\t}", "public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public List<Veiculo> listarTodosVeiculos(){\n\t\tList<Veiculo> listar = null;\n\t\t\n\t\ttry{\n\t\t\tlistar = veiculoDAO.listarTodosVeiculos();\n\t\t}catch(Exception e){\n\t\t\te.getMessage();\n\t\t}\n\t\treturn listar;\n\t}", "public void listarQuartos() {\n System.out.println(\"Quartos: \\n\");\n\n if (quartosCadastrados.size() > 0) {\n String esta = quartosCadastrados.toString();\n System.out.println(esta);\n } else {\n System.err.println(\"Não existem quartos cadastrados\");\n }\n\n }", "private void populaDiasTreinoCat()\n {\n DiasTreinoCat dias1 = new DiasTreinoCat(\"1 vez por semana\", 1);\n diasTreinoCatDAO.insert(dias1);\n DiasTreinoCat dias2 = new DiasTreinoCat(\"2 vez por semana\", 2);\n diasTreinoCatDAO.insert(dias2);\n DiasTreinoCat dias3 = new DiasTreinoCat(\"3 vez por semana\", 3);\n diasTreinoCatDAO.insert(dias3);\n DiasTreinoCat dias4 = new DiasTreinoCat(\"4 vez por semana\", 4);\n diasTreinoCatDAO.insert(dias4);\n DiasTreinoCat dias5 = new DiasTreinoCat(\"5 vez por semana\", 5);\n diasTreinoCatDAO.insert(dias5);\n DiasTreinoCat dias6 = new DiasTreinoCat(\"6 vez por semana\", 6);\n diasTreinoCatDAO.insert(dias6);\n DiasTreinoCat dias7 = new DiasTreinoCat(\"7 vez por semana\", 7);\n diasTreinoCatDAO.insert(dias7);\n\n }", "public List<String> getAllCAs(){\n return myDatabase.getAllCAs();\n }", "public void guardarContribuintes () throws IOException {\n FileWriter f = new FileWriter(\"registo_contribuintes.txt\");\n \n for(String NIF : contribuintes.keySet())\n f.write(getContribuinte(NIF).toString());\n \n f.close();\n }", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "public void saveAllLists() {\n // else: create \"ToDoList\" folder\n // Get all lists and their corresponding items via a while loop that loops\n // through the ComboBox's values and creates .txt files for each list\n // Create a new .txt of name list\n // This will need some sort of nested loop, the outer looping through the lists\n // and the inner looping through the items of that list\n // Store inside of the current .txt\n // Close the .txt\n }", "public Collection<OrdenCompra> traerTodasLasOrdenesDeCompra() {\n Collection<OrdenCompra> resultado = null;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.traerTodasLasOrdenesDeCompra();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return resultado;\n }", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "private void subirLista(){\n DatabaseReference db_lista = db_reference.child(\"Asistencias\");\n HashMap<String, String> dataLista = new HashMap<String, String>();\n dataLista.put(\"evento\",etNombreCurso.getText().toString());\n dataLista.put(\"fecha\", etFecha.getText().toString());\n dataLista.put(\"lista\", \"-\");\n db_lista.push().setValue(dataLista);\n }", "private final void fillPaths() {\n\t\ticalCombo.addItem(\"\"); //$NON-NLS-1$\n\t\tString[] paths = config.getCalendarPaths();\n\t\tif (paths != null) {\n\t\t\tString path, name;\n\t\t\tfor (int i = 0; i < paths.length; i++) {\n\t\t\t\tpath = paths[i];\n\t\t\t\tname = config.getCalendarName(path);\n\t\t\t\tif (name == null) {\n\t\t\t\t\ticalCombo.addItem(path);\n\t\t\t\t} else {\n\t\t\t\t\ticalCombo.addItem(name + \" - \" + path); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (fileSync != null && fileSync.icalPath != null) {\n\t\t\tMainConfig.selectItem(icalCombo, fileSync.icalPath);\n\t\t}\n\t}", "public void mostrarLista(){\n Nodo recorrer = inicio;\n while(recorrer!=null){\n System.out.print(\"[\"+recorrer.edad+\"]-->\");\n recorrer=recorrer.siguiente;\n }\n System.out.println(recorrer);\n }", "public void llenarDatos() {\n String nombre = \"\";\n String descripcion = \"\";\n try {\n ResultSet resultado = buscador.getResultSet(\"select nombre, descripcion from NODO where ID = \" + IDNodoPadre + \";\");\n if (resultado.next()) {\n nombre = resultado.getObject(\"nombre\").toString();\n descripcion = resultado.getObject(\"descripcion\").toString();\n }\n } catch (SQLException e) {\n System.out.println(\"*SQL Exception: *\" + e.toString());\n }\n campoNombre.setText(nombre);\n campoDescripcion.setText(descripcion);\n //Si esta asociada a categorias\n if(conCategorias)\n llenarComboCategoria();\n else{\n comboCategoria.setVisible(false);\n labelCategoria.setVisible(false);\n }\n }", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}" ]
[ "0.65823376", "0.6434567", "0.6055974", "0.59866875", "0.5918389", "0.5742652", "0.5728211", "0.5664589", "0.56514263", "0.56078726", "0.56077474", "0.55625284", "0.55608666", "0.5554733", "0.5539991", "0.5505057", "0.5502568", "0.5490373", "0.54873645", "0.5485272", "0.54731315", "0.54670805", "0.5465993", "0.5443333", "0.54412425", "0.54405135", "0.54362035", "0.5434777", "0.5433034", "0.54108864", "0.5396897", "0.5386257", "0.5383964", "0.53780156", "0.53642786", "0.53167176", "0.5312626", "0.5307667", "0.5295122", "0.5272512", "0.5270815", "0.5248332", "0.52399987", "0.5235846", "0.522819", "0.5221369", "0.5218059", "0.52169114", "0.5205797", "0.51963234", "0.5193493", "0.51894885", "0.5183543", "0.51830095", "0.5180273", "0.5174732", "0.5172521", "0.51672786", "0.51648253", "0.5163585", "0.51547486", "0.5152796", "0.5149633", "0.51467574", "0.51428145", "0.5132588", "0.5123628", "0.51186514", "0.51124734", "0.51112515", "0.51079977", "0.5102827", "0.5098362", "0.50922203", "0.508475", "0.5082183", "0.50819236", "0.507181", "0.5069082", "0.50655144", "0.506111", "0.50608593", "0.5044568", "0.5038853", "0.50316525", "0.5023529", "0.50229925", "0.50218415", "0.50215524", "0.50207293", "0.5009225", "0.50077254", "0.5004089", "0.49998295", "0.49985477", "0.49978483", "0.4995988", "0.49941808", "0.49910936", "0.49882707", "0.4987556" ]
0.0
-1
Obtiene los usuario con estado > 0
@Query("SELECT u FROM Usuario u WHERE u.estado > 0") List<Usuario> obtenerUsuariosActivos();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getUsuarioSuscrito(){\n return !(suscribirClientBean.getUsuarioSuscrito(idOferta).length == 0);\r\n }", "private boolean comprobarUsuario(String nombre, String contrasenia, String grupo) {\n\n return true;\n }", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "private void verificaTipoUsuario(Usuario usuario) {\n \n if( usuario.getTipoUsuario() == 3 ){ //Usuário apenas visualização\n adicionarInvAnimaisBT.setEnabled(false);\n adicionarInvBenfeitoriasBT.setEnabled(false);\n adicionarInvMaquinasBT.setEnabled(false);\n adicionarInvTerrasBT.setEnabled(false);\n \n editarInvAnimaisBT.setEnabled(false);\n editarInvBenfeitoriasBT.setEnabled(false);\n editarInvMaquinasBT.setEnabled(false);\n editarInvTerrasBT.setEnabled(false);\n \n removerInvAnimaisBT.setEnabled(false);\n removerInvBenfeitoriasBT.setEnabled(false);\n removerInvMaquinasBT.setEnabled(false);\n removerInvTerrasBT.setEnabled(false);\n \n atividadeLeiteBT.setEnabled(false);\n custoOportBT.setEnabled(false);\n salarioMinimoBT.setEnabled(false);\n \n valorGastoAnimaisBT.setEnabled(false);\n vidaUtilReprodBT.setEnabled(false);\n vidaUtilServBT.setEnabled(false);\n }\n \n }", "public int validarUsuario(Login l){\n\t\tcx.con();\n\t\tString com = \"SELECT * FROM usuario \"+ \n\t\t\t\t\"WHERE usuario='\"+l.getUsuario()+\"' \"+\n\t\t\t\t\"AND password='\"+l.getPassword()+\"' \"+\n\t\t\t\t\"AND estado=true\";\n\t\tint res = cx.contarFilas(com);\n\t\tcx.desconectar();\n\t\treturn res;\n\t}", "private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }", "public boolean verificarUsuario(){\n boolean estado = false;\n try{\n this.usuarioBean = (Dr_siseg_usuarioBean) this.manejoFacesContext.obtenerObjetoSession(\"usuario\");\n if(this.usuarioBean != null){\n estado = true;\n if (this.usuarioBean.getRoll().equals(\"GRP_SERVAGTMII_ADMIN\")){\n modoAdministrador=true;\n// this.usuarioRoll=\"ADMIN\";\n// this.disableBotonFinalizar=\"false\";\n// this.visibleImprimirComprobanteEncargado=\"true\";\n// this.visibleImprimirComprobanteEstudiante=\"true\";\n \n\n }else{\n if (this.usuarioBean.getRoll().equals(\"GRP_SERVAGTMII_PF1\")){\n modoAdministrador=true;\n// this.usuarioRoll=\"PF1\";\n// this.disableBotonFinalizar=\"true\";\n// this.visibleImprimirComprobanteEncargado=\"false\";\n// this.visibleImprimirComprobanteEstudiante=\"true\";\n \n }\n }\n\n }else{\n this.manejoFacesContext.redireccionarFlujoWeb(\"/WebAppSLATE/LogoutServlet\" );\n }\n }catch(Exception ex){\n this.manejoFacesContext.redireccionarFlujoWeb(\"/WebAppSLATE/LogoutServlet\" );\n // this.manejoFacesContext.redireccionarFlujoWeb(\"/WebAppMADEB/cr.ac.una.reg.info.contenido/moduloFuncionario/estudiante/e_editarDireccion.jspx\");\n }//\n return estado;\n }", "public List<Usuario> listarUsuarios(boolean Vigente){\r\n return cVista.listarUsuarios(Vigente);\r\n }", "@Override\n\t/*Método que se va a utilizar cuando el usuario inicie sesión, para ver si los datos son o no correctos*/\n\tpublic String comprobarinicio(String nombreusuario, String clave) {\n\t\tDBConnection con = new DBConnection();\n\t\tString sql=\"Select * from usuarios where nombreusuario='\"+nombreusuario+\"'and clave='\"+clave+\"'\"; //búsqueda del usuario en la BD\n\t\tBoolean encontrado=false; //Booleano que indicará si el usuario está o no en la BD\n\t\ttry {\n\t\t\tStatement st = con.getConnection().createStatement(); \n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\t/*De lo que devuelve la consulta, se va a coger el nombre de usuario y la clave (aunque no haya datos en ellos lo devuelve pero vacio)*/\n\t\t\twhile(rs.next()) {\n\t\t\tString nombre_usu= rs.getString(\"nombreusuario\");\n\t\t\tString pass= rs.getString(\"clave\");\n\t\t\t/*En caso de que los datos coincidan con los que se han pasado como parámetros desde el inicio de sesión, significará que los datos son correctos\n\t\t\t * y la variable encontrado cambia su valor para dejar constancia de que el usuario es correcto*/\n\t\t\tif(nombre_usu.equals(nombreusuario) && pass.equals(clave)) {\n\t\t\t\tencontrado=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tst.close();\n\t\t\t//En caso del valor de encontrado, se devolverá ok (si se encuentra) o not ok (\"si no se encuentra\")\n\t\t\tif(encontrado) {\n\t\t\t\treturn \"ok\";\n\t\t\t}else {\n\t\t\t\treturn \"not ok\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n return(e.getMessage());\n\t\t}finally {\n\t\t\tcon.desconectar();\n\t\t}\n\t\t\n\t\t\n\t}", "public boolean logInDatosCorrectos(){\n if (txtNombreUsuario.getText().equals(\"\") || txtContraseña.getText().equals(\"\")){\n return false;\n }\n return true;\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 }", "private boolean compararNombreUsuario () {\n\t\tlistaUsuarios = UsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tString nombre = this.campoTextoNombreUsuario.getText();\n\t\tfor (Usuario nombres : listaUsuarios) {\n\t\t\tif (nombres.getUsuario().equals(nombre)) {\n\t\t\t\treturn false;\n\t\t\t}//FIN IF\n\t\t}//FIN FOR\n\t\treturn true;\n\t}", "@Override\n\tpublic User CheckUser(String username,String password,String administra) {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\t//String sqlString =\"select*from user where username= '\"+username+\"' and password= '\"+password+\"' \";\n\t\tString sqlString=\"select * from user where username = '\"+username+\"' and password = '\"+password+\"' and administra = '0' \";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\",FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\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\tif (list.size()==0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn list.get(0);\n\t}", "public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }", "public Boolean validarUsuarioActivo(String idUsuario);", "public List<UsuarioDto> getAvalesByIdSolicitud(BigInteger idSolicitud) throws BusinessException {\n try {\n\n List<UsuarioDto> avales = avaSolDao.getAvalesByIdSolicitud(idSolicitud);\n\n for (UsuarioDto aval : avales) {\n /*Cuando el usuario está activo*/\n if(aval.getEstatus()==null){\n aval.setEstatus(0);\n }\n \n if (aval.getEstatus() == 1) {\n aval.setEstatusStr(Constantes.USR_ACTIVO);\n } else {\n aval.setEstatusStr(Constantes.USR_BAJA);\n }\n\n switch (aval.getEstatusAvalInt()) {\n case 1:\n aval.setEstatusAvalStr(Constantes.SOLAVA_PENDIENTE);\n break;\n case 2:\n aval.setEstatusAvalStr(Constantes.SOLAVA_VALIDANDO);\n break;\n case 3:\n aval.setEstatusAvalStr(Constantes.SOLAVA_APROBADO);\n break;\n case 4:\n aval.setEstatusAvalStr(Constantes.SOLAVA_RECHAZADO);\n break;\n }\n }\n\n return avales;\n } catch (IntegracionException ex) {\n throw new BusinessException(ex.getMessage(), ex);\n }\n }", "public static boolean verificaUsuario(String usuario,String password){\n\t\tResultSet resultadoConsulta;\n\t\tString query =\"SELECT\"\n\t\t\t\t+ \" usuario.id,\"\n\t\t\t\t+ \" usuario.nombres,\"\n\t\t\t\t+ \"usuario.apellido_paterno,\"\n\t\t\t\t+ \"usuario.apellido_materno,\"\n\t\t\t\t+ \"usuario.usuario,\"\n\t\t\t\t+ \" usuario.contrasenia,\"\n\t\t\t\t+ \" usuario.catergoria as categoria\"\n\t\t\t\t+ \" FROM \"\n\t\t\t\t+ \"usuario\"\n\t\t\t\t+ \" WHERE\"\n\t\t\t\t+ \" usuario.usuario = ?\"\n\t\t\t\t+ \" AND \"\n\t\t\t\t+ \"usuario.contrasenia = ?\"; \n\t\t\n\t\ttry {\n\t\t\tPreparedStatement comando = conexion.prepareStatement(query);\n\t\t\tcomando.setString(1, usuario);\n\t\t\tcomando.setString(2, password);\n\t\t\tresultadoConsulta = comando.executeQuery();\n\n\t\t\twhile (resultadoConsulta.next()) {\n\t\t\t\tUsuario.setId(resultadoConsulta.getInt(\"id\"));\n\t\t\t\tUsuario.setNombre(resultadoConsulta.getString(\"nombres\"));\n\t\t\t\tUsuario.setUsuario(resultadoConsulta.getString(\"usuario\"));\n\t\t\t\tUsuario.setApellidoPaterno(resultadoConsulta.getString(\"apellido_paterno\"));\n\t\t\t\tUsuario.setApellidoMaterno(resultadoConsulta.getString(\"apellido_materno\"));\n\t\t\t\tUsuario.setCategoria(resultadoConsulta.getString(\"categoria\"));\n\t\t\t}\n\t\t\treturn true;\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 false;\n\t}", "private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}", "public void validacionDatos() {\n if (!this.interfazLogin.txtUsuario().getText().isEmpty()) {\n if (this.interfazLogin.txtPassword().getText().length() > 7) {\n\n String[] usuario = modeloLogin.getAcceso(\n this.interfazLogin.txtUsuario().getText(),\n this.interfazLogin.txtPassword().getText());\n\n if (usuario[0].isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Usuario o Contraseña Invalidos\");\n } else {\n controlInterfazPrincipal();\n\n if (usuario[2].equals(\"Administrador\")) {\n interfazPrincipal.btnUsuario().setVisible(true);\n pintarPanelPrincipal(panelUsuarios);\n\n } else {\n interfazPrincipal.btnUsuario().setVisible(false);\n pintarPanelPrincipal(panelClientes);\n }\n }\n this.interfazLogin.txtPassword().setText(\"\");\n } else {\n JOptionPane.showMessageDialog(null, \"El campo de password debe tener como minino 8 caracteres\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"El campo de usurario no puede ir vacio\");\n }\n }", "private void cargaUsuarios() {\n //Abre la conexion\n Connection con = Star.conAbrBas(true, false);\n \n //Declara variables de la base de datos \n java.sql.Statement st;\n java.sql.ResultSet rs; \n String sQ;\n /*Obtiene todos los datos del usuario*/\n try\n {\n sQ = \"SELECT estac FROM estacs WHERE estac <> '\" + Login.sUsrG + \"' AND admcaj <= (SELECT admcaj FROM estacs WHERE estac = '\" + Login.sUsrG + \"')\";\n st = con.createStatement();\n rs = st.executeQuery(sQ);\n /*Si hay datos*/\n while(rs.next())\n {\n /*Obtiene los datos y cargalos en sus campos*/\n jcmbUsuarios.addItem(rs.getString(\"estac\"));\n }\n //si ingreso usuarios al combo, jalo los permisos del primer usuario\n// if(jcmbUsuarios.getItemCount() > 0){\n// cargaPermisos(jcmbUsuarios.getSelectedItem().toString());\n// }\n \n }catch(SQLException expnSQL)\n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnSQL.getMessage(), Star.sErrSQL, expnSQL.getStackTrace(), con); \n }\n }", "private boolean recuperaDadosInseridos() throws SQLException, GrupoUsuarioNaoSelecionadoException{\n \n GrupoUsuarios grupoUsuarios = new GrupoUsuarios();\n Usuarios usuarios = new Usuarios();\n boolean selecao = false;\n \n try{\n \n if(this.optUsuariosGerente.isSelected()){\n grupoUsuarios.setGerente(1);\n selecao = true;\n }\n if(this.optUsuariosGestorEstoque.isSelected()){\n grupoUsuarios.setGestorEstoque(1);\n selecao = true;\n }\n if(this.optUsuariosGestorCompras.isSelected()){\n grupoUsuarios.setGestorCompras(1);\n selecao = true;\n }\n if(this.optUsuariosCaixeiro.isSelected()){\n grupoUsuarios.setCaixeiro(1);\n selecao = true;\n }\n \n if(selecao!=true)\n throw new GrupoUsuarioNaoSelecionadoException();\n else usuarios.setGrupoUsuarios(grupoUsuarios); \n \n }catch(TratarMerciExceptions e){\n System.out.println(e.getMessage());\n }\n return selecao;\n }", "@Override\n\t/*Método que se va a usar para comprobar el saldo del usuario que esté logueado nada más entrar en el panel del usuario*/\n\tpublic String comprobarDatos(String nombreusuario) {\n\t\tDBConnection con = new DBConnection();\n\t\tString sql =\"SELECT * from usuarios where nombreusuario LIKE '\"+nombreusuario+\"'\"; //consulta para obtener el saldo\n\t\tString datos=\"\";\n\t\ttry {\n\t\t\tStatement st = con.getConnection().createStatement();\n\t\t\tResultSet rs=st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tString saldo=Float.toString(rs.getFloat(\"saldo\")); //cojo el saldo de la consulta y haco la conversion de float a string\n\t\t\t\tString nombre=rs.getString(\"nombre\");\n\t\t\t\tString apellidos=rs.getString(\"apellidos\");\n\t\t\t\tString clave=rs.getString(\"clave\");\n\t\t\t\tString email=rs.getString(\"email\");\n\t\t\t\tString premium=rs.getString(\"premium\");\n\t\t\t\t\n\t\t\t\tdatos=nombre+\",\"+apellidos+\",\"+clave+\",\"+email+\",\"+premium+\",\"+saldo; //se almacenan los datos obtenidos en la cadena que se va a devolver\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tst.close();\n\t\t\treturn datos; //devuelvo todos los datos que se han obtenido\n\t\t}catch(Exception e) {\n\t\t\treturn e.getMessage();\n\t\t}finally {\n\t\t\tcon.desconectar();\n\t\t\t}\n\t\t\n\t}", "protected void accionUsuario() {\n\t\t\r\n\t}", "List<Usuario> obtenerUsuarios() throws Exception;", "public ArrayList<Usuario> getUsuarios(Usuario creador){\r\n ArrayList<Usuario> al= new ArrayList<>();\r\n if (creador.isAdmin()){\r\n try {\r\n String sql= \"Select * from sistemasEM.usuarios\";\r\n Statement s= connection.createStatement();\r\n ResultSet rs = s.executeQuery(sql);\r\n Usuario u;\r\n while(rs.next()){\r\n TipoDescuento td = this.getTipoDescuento(rs.getInt(\"permisosDescuento\"));\r\n TipoPersonal tp = this.getTipoPersonal(rs.getInt(\"permisosPersonal\"));\r\n al.add( new Usuario(rs.getInt(\"id\"), rs.getString(\"nombre\"), rs.getString(\"mostrar\"),rs.getBoolean(\"admin\"),tp,td,rs.getBoolean(\"notas\"),rs.getBoolean(\"habilitacion\"),rs.getBoolean(\"profesor\"),rs.getInt(\"ciProfesor\"),rs.getBoolean(\"cambiarContra\")));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return al;\r\n }", "public boolean validarUsuarioActivo(Long idUsuario);", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}", "@Override\r\n\tpublic void analizarUsuario() {\n\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\tia.analizarUsuario();\r\n\t\t}\t\r\n\t}", "public String verUsuarios() {\n\t\tString stringIdRol = session.getAttribute(\"rol\").toString();\n\t\tInteger idRol = Integer.parseInt(stringIdRol);\n\n\t\tif (idRol == 1) {\n\t\t\treturn \"TodosLosUsuarios\";\n\t\t}\n\n\t\treturn \"home\";\n\t}", "public usuarios Verificar_Usuario(String cedula){\r\n usuarios usuario = Cargar_Usuario(Integer.parseInt(cedula));\r\n return usuario;\r\n }", "public List<Usuario> ultimosUsuariosCadastrados(){\r\n List<Usuario> users = new ArrayList<Usuario>();\r\n try{\r\n PreparedStatement ps = bd.prepareStatement(\"SELECT * FROM usuarios ORDER BY id DESC\");\r\n ResultSet rs = ps.executeQuery();\r\n while(rs.next()){\r\n Usuario u = new Usuario();\r\n u.setId(rs.getInt(\"id\"));\r\n u.setUsuario(rs.getString(\"usuario\"));\r\n u.setNome(rs.getString(\"nome\"));\r\n u.setEmail(rs.getString(\"email\"));\r\n u.setSenha(rs.getString(\"senha\"));\r\n u.setPin(rs.getString(\"pin\"));\r\n u.setUrlfoto(rs.getString(\"urlfoto\"));\r\n u.setAcesso(rs.getTimestamp(\"acesso\"));\r\n u.setAdmin(rs.getInt(\"admin\"));\r\n users.add(u);\r\n }\r\n rs.close();\r\n ps.close();\r\n ConexaoBD.fechar(bd);\r\n } catch(SQLException sqle){\r\n System.out.println(\"Erro ao apresentar os ultimos usuarios cadastrados: \"+sqle.getMessage());\r\n }\r\n return users;\r\n }", "@Override\n public void onResume() {\n if(currentUser != null){\n btnEnviar.setEnabled(false);\n DatabaseReference referenciaTipo = FirebaseDatabase.getInstance().getReference().child(\"usuarios\").child(currentUser);\n referenciaTipo.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Usuarios usuarios = dataSnapshot.getValue(Usuarios.class);\n nombreUsuarioLog = usuarios.getNombre();\n textNombre.setText(nombreUsuarioLog);\n btnEnviar.setEnabled(true);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }else{\n returnLogin();\n }\n super.onResume();\n }", "public boolean crarUsuario(Usuario creador, String nombre, String nombreMostrar, String contrasena, boolean cambiarContra,boolean admin,int tipoPersonal,int tipodescuento, boolean notas, boolean habilitacion,boolean profesor, int ciProfesor){\r\n if (creador.isAdmin()){\r\n try {\r\n String sql= \"insert into sistemasEM.usuarios (nombre, mostrar, contrasena,cambiarContra,admin,permisosPersonal,permisosDescuento,notas, habilitacion,profesor,ciProfesor) values(?,?,MD5(?),?,?,?,?,?,?,?,?)\";\r\n PreparedStatement s= connection.prepareStatement(sql);\r\n int i=1;\r\n s.setString(i++, nombre);\r\n s.setString(i++, nombreMostrar);\r\n s.setString(i++, contrasena);\r\n s.setBoolean(i++, cambiarContra);\r\n s.setBoolean(i++, admin);\r\n s.setInt(i++, tipoPersonal);\r\n s.setInt(i++, tipodescuento);\r\n s.setBoolean(i++, notas);\r\n s.setBoolean(i++, habilitacion);\r\n s.setBoolean(i++, profesor);\r\n s.setInt(i++, ciProfesor);\r\n int result = s.executeUpdate();\r\n if(result>0){\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return false;\r\n }", "public ArrayList <Usuario>listaUsuario(){\r\n\t\treturn loja.getUsuarios();\r\n\t}", "private void actualizarUsuario() {\n\n\n if (!altura_et.getText().toString().isEmpty() && !peso_et.getText().toString().isEmpty() &&\n !email_et.getText().toString().isEmpty() && !nombreUO_et.getText().toString().isEmpty()) {\n\n user.setAltura(Integer.parseInt(altura_et.getText().toString()));\n user.setPeso(Integer.parseInt(peso_et.getText().toString()));\n user.setCorreo(email_et.getText().toString());\n user.setUserID(nombreUO_et.getText().toString());\n\n\n }else\n Toast.makeText(this,\"Comprueba los datos\", Toast.LENGTH_LONG).show();\n\n }", "public String ListOnlineUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio e online\r\n if(u.getStatus().equals(\"ONLINE\")) {\r\n \tlistUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n }\r\n return listUsers.toString(); \r\n }", "void checkUserName() {\n usernameChecked = false;\n signInUpController.checkUserName(userNameText.getText().toString(), new OnTaskListeners.Bool() {\n @Override\n public void onSuccess(Boolean result) {\n usernameChecked = true;\n if (result)\n uniqueUsername = false;\n else\n uniqueUsername = true;\n\n\n }\n });\n }", "@Test\r\n\tpublic void CT06ConsultarUsuarioPorDados() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\t// acao\r\n\t\ttry {\r\n\t\t\tSystem.out.println(usuario.getRa());\r\n\t\t\tSystem.out.println(usuario.getNome());\r\n\t\t} catch (Exception e) {\r\n\t\t\tassertEquals(\"Dados inválidos\", e.getMessage());\r\n\t\t}\r\n\t}", "public String[] getUsuariosInmueble(){\n\t\tint registros=0;\n\t\ttry{\n\t\t\tPreparedStatement statemenet=getConnection().prepareStatement(\"select count(*) as total from usuarios where tipo='A' \");\n\t\t\tResultSet respuesta=statemenet.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tregistros=respuesta.getInt(\"total\");\n\t\t\trespuesta.close();\n\t\t\t\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\tString[] usuarios=new String[registros+1];\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select usuario from usuarios where tipo='R' \");\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tusuarios[0]=respuesta.getString(1);\n\t\t\tstatement=getConnection().prepareStatement(\"select usuario from usuarios where tipo='A' \");\n\t\t\trespuesta=statement.executeQuery();\n\t\t\tint i=1;\n\t\t\twhile(respuesta.next()){\n\t\t\t\tusuarios[i]=respuesta.getString(1);\n\t\t\t\ti++;\n\t\t\t\n\t\t\t}\n\t\t\tstatement.close();\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\treturn usuarios;\n\t}", "@Override\n\tpublic List<ControlAcceso> registroUsers(String fecha, int codigo) {\n\t\treturn controlA.registroUsers(fecha, codigo);\n\t}", "public List<Usuarios> findAllActive() throws javax.persistence.NoResultException {\r\n return EM.createNamedQuery(Usuarios.FIND_ALL_ACTIVE_USUARIOS)\r\n .setParameter(\"p2\", Estados.ACTIVO)\r\n .getResultList();\r\n }", "public List<Usuario> getTodosOsUsuarios() {\r\n\t\treturn listaDeUsuarios;\r\n\t}", "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 actualizarUsuario(Usuario usuario) {\n \n //este usuario le mandamos al dao\n boolean cent = usuarioDAO.update(usuario);\n return cent;\n\n }", "private Boolean isInUserBoard() {\n\t\t\tBoolean isInUserBoard;\n\t\t\t//String g = userBoard.getUser().getfName();\n\t\t\tif(userBoard.getUser().getExitCode() != null){\n if(Integer.parseInt(userBoard.getUser().getExitCode()) == 0 ){\n isInUserBoard = true;\n userSingleton.INSTANCE.setfName(userBoard.getUser().getfName());\n userSingleton.INSTANCE.setName(userBoard.getUser().getName());\n userSingleton.INSTANCE.setId(userBoard.getUser().getId());\n userSingleton.INSTANCE.setClasse(userBoard.getUser().getClasse());\n userSingleton.INSTANCE.setPassword(userBoard.getUser().getPassword());\n\n\n }\n else{\n isInUserBoard = false;\n }\n }\n else{\n isInUserBoard = false;\n }\n\n\n\n\t\t\treturn isInUserBoard;\n\t\t}", "@Then(\"^o usuario se loga no aplicativo cetelem$\")\n\tpublic void verificaSeUsuarioLogadoComSucesso() throws Throwable {\n\t\tAssert.assertTrue(login.validaSeLoginSucesso());\n\n\t}", "public Usuario verUsuario() {\n\t\tString id = session.getAttribute(\"id\").toString();\n\t\tInteger idUsuario = Integer.parseInt(id);\n\t\tUsuario usuario = usuarioService.buscarUsuarioPorId(idUsuario);\n\t\tif (usuario != null) {\n\t\t\treturn usuario;\n\t\t}\n\t\treturn new Usuario();\n\t}", "private void controladorUser(Controlador controlador){\n this.contUserCrearProyecto = controlador.getUserCrearProyecto();\n inicioUser.setControlCrearProyecto(contUserCrearProyecto);\n \n this.contUserCrearColectivo = controlador.getUserCrearColectivo();\n inicioUser.setControlCrearColectivo(contUserCrearColectivo);\n\n this.contInformes = controlador.getInformes();\n inicioUser.setControlSolicitarInformes(contInformes); \n \n this.contFiltrar = controlador.getFiltrar();\n inicioUser.setControlFiltrar(contFiltrar);\n\n this.contLimpiar = controlador.getLimpiarFiltro();\n inicioUser.setControlLimpiarFiltro(contLimpiar);\n }", "public List<User> ObtenerTodosUsuarios() throws BLException;", "public Usuario verificarDatos(String usuario, String password) throws Exception{\n Usuario us = new Usuario(usuario, password);\n try {\n Session session = HibernateUtil.getSessionFactory().openSession();\n String hql = \"from Usuario where usuario = '\" + usuario\n + \"' and password = '\" + password + \"'\";\n Query query = session.createQuery(hql);\n \n if(!query.list().isEmpty()) {\n us = (Usuario) query.list().get(0);\n } \n } catch (Exception e){\n throw e;\n }\n return us;\n /*\n desde el if se cambia\n query.setParameter(\"usuario\", usuario);\n query.setParameter(\"password\", password);\n us = (Usuario) query.uniqueResult();\n \n \n */\n }", "@Override\n public boolean validacionLogin(UsuarioDto usuarioDto) {\n HashMap<String, Object> params = new HashMap<>();\n params.put(\"NOMBRE_USUARIO\", usuarioDto.getNombre());\n params.put(\"PASS\", usuarioDto.getContracena());\n IntegerDto data = (IntegerDto) executeList(IntegerDto.class, \"PRC_VALIDAR_LOGIN\", params).get(0);\n return data.getData() != 0;\n }", "boolean hasSelectedUser();", "private boolean isLoggedInUser(){\n return true;\n }", "public String getAllLoggedInUsers(Request req, Response res) {\n List<User> users = model.getAvailableUser();\n List<User> onlineUser = new ArrayList<>();\n for (User user : users) {\n if (user.getStatus()) {\n onlineUser.add(user);\n }\n }\n\n JsonArray bodyResult = JsonUtil.usersToJson(onlineUser);\n res.status(200);\n return JsonUtil.stringify(new ServerResponse(SUCCESS, bodyResult));\n }", "public static boolean estaVacia(ArrayList lista){\n if(lista.isEmpty()){\n System.out.println(\"No hay usuarios u objetos registrados por el momento\");\n return true;\n }\n else{\n return false;\n }\n }", "public boolean verificarSesion(){\n boolean sesionValida = false;\r\n if(FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(\"usuarioValidado\")!=null){\r\n sesionValida=true;\r\n }\r\n return sesionValida;\r\n }", "public String getNombreUsuarioValidado(){\n Usuario usuario = (Usuario)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(\"usuarioValidado\");\r\n return usuario.getNombreUsuario();\r\n }", "private static int login(String username, String passe) {\n PreparedStatement stmt;\r\n try {\r\n stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome = ? and passe = ?;\");\r\n stmt.setString(1, username);\r\n stmt.setString(2, passe);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n utilizador_corrente = new Utilizador(username, passe, rs.getBoolean(4));\r\n cartao_cidadao = rs.getInt(1);\r\n if (rs.getBoolean(4))//tem direitos\r\n return 2;\r\n else if (!rs.getBoolean(4))//nao tem direitos\r\n return 1;\r\n stmt.close();\r\n } catch (SQLException e) {\r\n }\r\n return 0;\r\n }", "public List<Usuario> findAllUsuarios(){\n\t\t\t List<Usuario> listado;\n\t\t\t Query q;\n\t\t\t em.getTransaction().begin();\n\t\t\t q=em.createQuery(\"SELECT u FROM Usuario u ORDER BY u.idUsr\");\n\t\t\t listado= q.getResultList();\n\t\t\t em.getTransaction().commit();\n\t\t\t return listado;\n\t\t\t \n\t\t\t}", "public int getLoggedInUsers();", "public boolean isUsuarioActivo(String nombreUsuario){\n\t\t\n \tUsuario u = this.buscarUsuarioPorNombre(nombreUsuario);\n \tif (u!=null){\n \t\treturn u.getEstado().toString().equals(\"A\");\n \t}\n \treturn false;\n }", "private void getUserFromStatus(LinkedList<User> users, Status A) {\n boolean does_Exist = false;\n //getting the user of the status\n User user = A.getUser();\n //if a User Has More The 200 Interest we are better of\n if (isUserSatisfyParameters(user)) {\n //Search if The User pre exist\n for (User B : users) {\n if (B.getScreenName().equals(user.getScreenName())) {\n does_Exist = true;\n break;\n }\n }\n\n if (!does_Exist)\n users.add(user);\n }\n }", "private static void validar() throws AcessoException {\r\n BancoDados bd = new BancoDados();\r\n PreparedStatement ps;\r\n ResultSet rs;\r\n String sql;\r\n \r\n try {\r\n //Define String\r\n sql = \"SELECT * FROM Usuario WHERE Login=? AND Senha=? AND XDEAD=FALSE\";\r\n //Prepara gatilho\r\n ps = bd.abrirConexao().prepareStatement(sql);\r\n ps.setString(1, usuario.getLogin());\r\n ps.setString(2, usuario.getSenha());\r\n //Executa e puxa a busca\r\n rs = ps.executeQuery();\r\n //Caso não foi encontrado, informa de erro, e anula admin\r\n if(!rs.next()){\r\n usuario = null;\r\n throw new AcessoException(\"Usuário não encontrado.\");\r\n }\r\n //Fecha conexão\r\n bd.fecharConexao();\r\n } catch(SQLException ex) {\r\n throw new AcessoException(\"Erro de SQL: \" + ex.getMessage() + \".\");\r\n } catch(ConexaoException ex) {\r\n throw new AcessoException(\"Erro de conexão: \" + ex.getMessage() + \".\");\r\n }\r\n }", "public static boolean comprobarUsuarioPrestado(int id, int codigo) throws Exception {\n\t\tf = new RandomAccessFile(Const.FPRESTAMOS, \"rw\");\n\t\tArchivos.irARegistro(f, id, Usuario.getlongitugRegistroUsuarioPrestamos());\n\t\tUsuario u = new Usuario();\n\t\tu.leer(f);\n\t\tLibro l = new Libro();\n\t\tboolean b = false;\n\t\tfor (int i = 0; i < Const.MAXLIBROSPRES && !b; i++) {\n\t\t\tl.leer(f);\n\t\t\tif (l.codigo == codigo)\n\t\t\t\tb = true;\n\t\t}\n\n\t\tf.close();\n\t\treturn b;\n\t}", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "public boolean existeUsuario(String usuario){\r\n try {\r\n Statement s= connection.createStatement();\r\n String sql=\"Select * from sistemasEM.usuarios where nombre='\"+usuario+\"'\";\r\n ResultSet rs= s.executeQuery(sql);\r\n if (rs.next()){\r\n return true;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "public void comprobarEstado() {\n if (ganarJugadorUno = true) {\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (ganarJugadorDos = true) {\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tirar == 9 && !ganarJugadorUno && !ganarJugadorDos) {\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "public List<UsuariosEntity> findByEstado() {\n\t\treturn (List<UsuariosEntity>) iUsuarios.findByEstado();\n\t}", "public boolean conectarUsuario(String nombre_usuario, InetAddress ip){\n boolean ok = true;\n Usuario usuario_info = tabla.get(nombre_usuario);\n if(usuario_info == null){\n // Introducimos el usuario en la base de datos\n tabla.put(nombre_usuario, new Usuario(nombre_usuario,ip,true,new ArrayList<>()));\n }\n\n else if(usuario_info.getConectado()) {\n ok = false;\n } else{\n usuario_info.setConectado(true);\n usuario_info.setDirIP(ip);\n }\n return ok;\n }", "public List<UsuarioDTO> listarUsuarios() {\n\t\treturn null;\n\n\t}", "@Override\r\n\tpublic List<Usuario> listarUsuario() {\n\t\treturn iUsuario.listarUsuarios();\r\n\t}", "private Boolean executaTrocaSenhaUsuario(User user, HttpServletRequest request, String deposito) {\r\n\t\tString novaSenha = StringUtils.isNotEmpty(request.getParameter(\"novaSenha\"))? request.getParameter(\"novaSenha\") : null;\r\n\t\t\r\n\t\tif (StringUtils.isBlank(novaSenha)){\r\n\t\t\trequest.setAttribute(\"trocaSenha\", 1);\r\n\t\t\trequest.setAttribute(\"depositoTrocaSenha\", deposito);\r\n\t\t\trequest.setAttribute(\"username\", request.getParameter(\"username\"));\r\n\t\t\trequest.setAttribute(\"password\", request.getParameter(\"password\"));\r\n\t\t\treturn Boolean.TRUE;\r\n\t\t}else{\r\n\t\t\tupdatePasswordOnDataBase(user, Util.crypto.makeHashJasypt(novaSenha));\r\n\t\t}\r\n\t\t\r\n\t\treturn Boolean.FALSE;\r\n\t}", "boolean hasObjUser();", "private void listarUsuarios() {\r\n \t\r\n \tfor(String usuario : ConfigureSetup.getUsers()) {\r\n \t\tif(!usuario.equals(ConfigureSetup.getUserName()))\r\n \t\t\tlista_usuarios.getItems().add(usuario);\r\n \t}\r\n \t\r\n \t//lista_usuarios.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\t\r\n }", "public UsuarioTable getUsuarioLogueado() {\n String usuario = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n return getUsuarioFacade().obtenerIDPorNombre(usuario);\n }", "public boolean validarIngresosUsuario_sueldo(JTextField empleadoTF, JTextField montoTF){\n\t\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\t\tif(montoTF.getText().length() >30) return false;\n\t\t\tif(!validarInt(empleadoTF.getText())) return false;\n\t\t\tif(numero==33) return false; //codigo halcones\n\t\t\tif(empleadoTF.getText().length() >30) return false;\n\t\t\t//if(numero < 0) return false;\n\t\t\tif(numero_double < 0) return false;\n\t\t\n\t\t\treturn true;\n\t}", "public boolean existeUser(String usuario) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String sql = \"SELECT email FROM usuario WHERE usuario.usuario = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, usuario);\n rs = ps.executeQuery();\n if (rs.next()) {\n return true;\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return false;\n }", "public int leerDatosUsuarios() {\n\t\tMiObjectInputStream oi = null;\n\t\tboolean b = false;\n\t\ttry { // comprueba que el archivo FLIBROS existe antes de leerlo\n\t\t\toi = new MiObjectInputStream(new FileInputStream(Const.FUSUARIOS));\n\t\t\tb = true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Archivo no encontrado - altaUsuario\" + e.toString());\n\t\t}\n\n\t\tint n = 0;\n\t\tif (b) { // si el archivo existe, leera los usuarios almacenados\n\t\t\ttry {\n\t\t\t\twhile (b) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tUsuario u = (Usuario) oi.readObject();\n\t\t\t\t\t\tn++;\n\t\t\t\t\t} catch (EOFException e) {\n\t\t\t\t\t\tb = false;\n\t\t\t\t\t}\n\t\t\t\t} // finaliza el while para la lectura\n\t\t\t\toi.close();\n\t\t\t} catch (Exception e) {// encaso de encontrar el archivo pero no puede leerlo\n\t\t\t\tSystem.out.println(\"Problemas al leer el archivo - altaUsuario\" + e.toString());\n\t\t\t}\n\t\t}\n\t\treturn n;\n\t}", "@Override\r\n\tpublic boolean updateUsuario(Usuario user) {\n\t\treturn false;\r\n\t}", "public TabelaHash getUsuarios() {\n return usuarios;\n }", "@Test\n public void testGetUsersForOrganization_hideOnbehalfUsers()\n throws Exception {\n\n // given\n container.login(customerUser.getKey(), ROLE_ORGANIZATION_ADMIN);\n List<VOUserDetails> oldList = idService.getUsersForOrganization();\n\n // execute\n container.login(supplierAdminUser.getKey(), ROLE_SERVICE_MANAGER);\n idService.createOnBehalfUser(customer.getOrganizationId(), \"pwd123\");\n\n // assert\n container.login(customerUser.getKey(), ROLE_ORGANIZATION_ADMIN);\n List<VOUserDetails> newList = idService.getUsersForOrganization();\n assertEquals(oldList.size(), newList.size());\n }", "public usuarios Cargar_Usuario(int cedula) {\r\n base_datos_Usuarios ae_db = new base_datos_Usuarios();\r\n usuarios informacion_usuario = ae_db.Buscar_Usuario_DB(cedula);\r\n return informacion_usuario;\r\n }", "public boolean validarUsuario(String correo, String contrasena) {\n\n usuario = usuarioDAO.login(correo, contrasena);\n if (usuario != null) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "public List<Usuario> obtenerTodosLosIngenieros() {\n return this.usuarioFacade.obtenerTodosLosIngenieros();\n }", "public List<User> getActiveUsers(boolean active);", "public String verificarCredenciales() {\n String resultado = \"\";\n \n Usuario usuario = usuarioBean.verificarCredenciales(this.usuario, this.password);\n \n if (usuario != null) {\n FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(\"usuario\", usuario);\n resultado = \"home?faces-redirect=true\";\n \n \n } else {\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.addMessage(\"\", new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Acceso Denegado\", \"Las credenciales son incorrectas\"));\n }\n return resultado;\n }", "private void checkUserExists() {\n dblogin.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n showData1(dataSnapshot);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }", "public void verificarNivel (int nivel) {\n this.nivelUsuario = nivel;\n }", "public void verificarRol() throws IOException {\n\t\tif (FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(\"email\") != null) {\n\t\t\tObject rol = FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(\"rol\");\n\n\t\t\tif ((Integer) rol != 1) {\n\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"home.xhtml\");\n\t\t\t} else {\n\t\t\t\t// System.out.println(\"sin permisos\");\n\t\t\t}\n\t\t}\n\t}", "protected void recuperarDados(){\n SharedPreferences sharedPreferences = getSharedPreferences(ARQUIVO_PREFERENCIA,0);\n\n if(sharedPreferences.contains(\"nome\")){\n String nomeUsuario = sharedPreferences.getString(\"nome\",\"Usuario não encontrado\");\n\n if(nomeUsuario.equals(\"Usuario não encontrado\")){\n lblMensagem.setText(nomeUsuario);\n } else {\n lblMensagem.setText((\"Seja bem vindo \" + nomeUsuario));\n }\n\n } else {\n lblMensagem.setText(\"Olá usuario não definido.\");\n }\n }", "public List<Usuario> getUsuario() {\r\n return usuarios;\r\n }", "public List getUsuarios();", "public synchronized boolean desactivarPerfil(String nombreUsuario) throws ExceptionViajesCompartidos{\n \tthis.limpiarTransacciones();\n Usuario u = this.buscarUsuarioPorNombre(nombreUsuario);\n\t\tif (u == null){\n\t\t\tthrow new ExceptionViajesCompartidos(\"El usuario ha desactivar no se encuentra registrado en el sistema\");\n\t\t}\n\t\tif (!this.isUsuarioActivo(nombreUsuario)){\n\t\t\tthrow new ExceptionViajesCompartidos(\"El usuario ya se encuentra desactivado\");\n\t\t}\n\t\t\n\t\tthis.iniciarTransaccion();\n\t\tCharacter inactivo = \"B\".charAt(0);\n\t\tu.setEstado(inactivo);\n\t\ttry{\n\t\t \tentitymanager.getTransaction( ).commit( );\t\n\t\t}catch(RollbackException e){\n\t\t \tString error= ManejadorErrores.parsearRollback(e);\n\t\t \tthrow new ExceptionViajesCompartidos(\"ERROR: \"+error);\n\t\t}\n\t\t\n\t\treturn true;\n }" ]
[ "0.6756977", "0.64380974", "0.63625145", "0.61966", "0.61612695", "0.6133471", "0.60757875", "0.6040128", "0.5861425", "0.58578914", "0.5855756", "0.58430666", "0.5767755", "0.5722759", "0.57170284", "0.5696962", "0.56837267", "0.5682084", "0.5674556", "0.5661145", "0.56555176", "0.5640019", "0.5638462", "0.5635273", "0.5634922", "0.56258625", "0.5622059", "0.5622059", "0.5622059", "0.5622059", "0.5622059", "0.5622059", "0.5622059", "0.56190765", "0.56085193", "0.55999947", "0.559417", "0.55877256", "0.55876446", "0.5582014", "0.55724794", "0.5563419", "0.55553013", "0.554404", "0.5539084", "0.5537268", "0.5535441", "0.5515838", "0.5504935", "0.55030996", "0.55015403", "0.5501154", "0.5500032", "0.54905725", "0.54785734", "0.5474891", "0.5437809", "0.5433699", "0.5431415", "0.54274106", "0.5421597", "0.541996", "0.5417519", "0.5407343", "0.5405482", "0.5401974", "0.5398356", "0.53927726", "0.539015", "0.5386207", "0.5380142", "0.5377577", "0.53761935", "0.5372805", "0.53705275", "0.5369546", "0.5363447", "0.53589916", "0.535235", "0.5351756", "0.53503084", "0.53491604", "0.5347955", "0.5347246", "0.5345898", "0.5345618", "0.5344449", "0.53383833", "0.5333254", "0.533143", "0.5327439", "0.5325898", "0.5322832", "0.53120184", "0.531197", "0.53107625", "0.53093016", "0.530631", "0.530107", "0.5299818" ]
0.6405034
2
get all download list from database
public void getDownloadItem() { List<Download> downloadList = dataSource.getDownloadLists(); DownloadListAdapter downloadListAdapter = new DownloadListAdapter(DownloadActivity.this, downloadList); recyclerViewDownloadList.setAdapter(downloadListAdapter); recyclerViewDownloadList.setLayoutManager(new LinearLayoutManager(this)); downloadListAdapter.notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<UploadDF> getAll() {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tList<UploadDF> list = session.createCriteria(UploadDF.class).addOrder(Order.desc(\"id\")).list();\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn list;\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "public List<RssGeneratedFile> selectRssFileList( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_RSS_FILE_LIST );\n daoUtil.executeQuery( );\n\n List<RssGeneratedFile> list = new ArrayList<RssGeneratedFile>( );\n\n while ( daoUtil.next( ) )\n {\n RssGeneratedFile rssFile = new RssGeneratedFile( );\n rssFile.setId( daoUtil.getInt( 1 ) );\n rssFile.setPortletId( daoUtil.getInt( 2 ) );\n rssFile.setName( daoUtil.getString( 3 ) );\n rssFile.setState( daoUtil.getInt( 4 ) );\n rssFile.setUpdateDate( daoUtil.getTimestamp( 5 ) );\n rssFile.setDescription( daoUtil.getString( 6 ) );\n rssFile.setWorkgroup( daoUtil.getString( 7 ) );\n rssFile.setTypeResourceRss( daoUtil.getString( 8 ) );\n rssFile.setMaxItems( daoUtil.getInt( 9 ) );\n rssFile.setFeedType( daoUtil.getString( 10 ) );\n rssFile.setEncoding( daoUtil.getString( 11 ) );\n\n list.add( rssFile );\n }\n\n daoUtil.free( );\n\n return list;\n }", "List<NewsFile> selectAll();", "public DBCursor getFileList() {\n\treturn getFileList(new BasicDBObject());\n }", "private List<Woacrawledurl> readCrawledUrls()\n\t{\n\t\tString hql = \"from Woacrawledurl where instanceId=\"\n\t\t\t\t+ this.param.instance.getTaskinstanceId() + \"order by id\";\n\t\tSessionFactory sessionFactory = TaskFactory.getSessionFactory(this.param.dbid);\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tTransaction t = session.beginTransaction();\n\t\tQuery q = session.createQuery(hql);\n\t\tList<Woacrawledurl> list = q.list();\n\t\tt.commit();\n\t\treturn list;\n\t}", "@Override\n\tpublic Cursor queryDBDownloadList(Integer paramInteger)\n\t{\n\t\treturn null;\n\t}", "List<StockList> fetchAll();", "public List getAll() throws FileNotFoundException, IOException;", "List fetchAll() throws AdaptorException ;", "public List<FileServer> viewAllFileServer() {\n\t\tList<FileServer> fileservers=getHibernateTemplate().find(\"from FileServer\");\r\n\t\t//另外一种方法\r\n\t\t/*Session session=getHibernateTemplate().getSessionFactory().openSession();\r\n\t\tTransaction ts=session.beginTransaction();\r\n\t\tQuery query=session.createQuery(\"from FileServer\");\r\n\t\t\r\n\t\tList<FileServer> fileservers=query.list();\r\n\t\t\r\n\t\tts.commit();\r\n\t\tsession.close();\r\n\t\tsession=null;*/\r\n\t\treturn fileservers;\r\n\t}", "@Override\n\tpublic List<File> getAll() {\n\t\t return getSession().\n\t createQuery(\"from File f\", File.class).\n\t getResultList();\n\t}", "@GetMapping(\"/all\")\r\n\tpublic List<FileModel> getListFiles() {\r\n\t\treturn fileRepository.findAll();\r\n\t}", "@Override\n public List<Seq> getAll() {\n Connection conn = null;\n Statement stmt = null;\n List<Seq> listSeqs = new ArrayList<>();\n\n try {\n String url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n conn = DriverManager.getConnection(url);\n stmt = conn.createStatement();\n ProcessesDAO pdao = new ProcessesDAO();\n String sql = \"select * from seq;\";\n ResultSet rs = stmt.executeQuery(sql);\n\n while (rs.next()) {\n\n Seq seq = new Seq(rs.getInt(\"id\"), pdao.getbyidentifier(rs.getString(\"identifier\")), rs.getInt(\"seq_number\"));\n listSeqs.add(seq);\n }\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n return listSeqs;\n }", "@Override\n public List<Download> findByUser(User user) {\n return new ArrayList<>(this.downloadRepository.findByUser(user));\n }", "public synchronized ResultSet getFileList() {\n try {\n return statement.executeQuery(\"select * from FileManager\");\n } catch (SQLException ex) {\n Logger.getLogger(DataManager.class.getName()).log(Level.SEVERE,\n null, ex);\n }\n\n return null;\n }", "@GetMapping(\"/downloads\")\n @Timed\n public ResponseEntity<List<DownloadsDTO>> getAllDownloads(Pageable pageable) {\n log.debug(\"REST request to get a page of Downloads\");\n Page<DownloadsDTO> page = downloadsService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/downloads\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "public abstract List<LocalFile> getAllFiles();", "@Override\n public List listar() {\n return instalaciones.getAll();\n }", "List<String> getFeeds();", "private void getGiveBackBillList() {\n User user = DataFunctionUtil.findFirstUserByName(HuIZhanApplication.getLName(mContext));\n Service.stringGet(this, Const.URL_DOWNLOAD_GIVBACK + user.getStorageID(), new DownloadGiveBackBillCallBack(\"正在下载出库单...\", mHandler, this), 104);\n\n }", "public ArrayList<QueryParameter> downloadExcel() {\n ArrayList<QueryParameter> queries = new ArrayList<QueryParameter>(this.query.interval);\n for (int i = 0; i < this.query.interval; i++) {\n QueryParameter query = new QueryParameter(this.query.year - i);\n queries.add(query);\n this.downloadSingleExcel(query);\n }\n return queries;\n }", "public ArrayList<FileDesc> getAllFiles() {\n\n\t\tArrayList<FileDesc> result = new ArrayList<FileDesc>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllFiles);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\tString query = \"SELECT FILEGID, TYPE, DESCRIPTION FROM FILE\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\t\n\t\t\twhile (rs.next() == true) {\n\t\t\t\tString fileGID = rs.getString(1);\n\t\t\t\tString type = rs.getString(2);\n\t\t\t\tString Description = rs.getString(3);\n\t\t\t\tresult.add(new FileDesc(fileGID, \"\", \"\", \"\", type, Description));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "java.util.List<entities.Torrent.FileInfo>\n getFilesList();", "@Override\r\n\tpublic List<Importancia> findAll() throws DataAccessException {\n\t\treturn importanciaDAO.findAll();\r\n\t}", "@Override\r\n\tpublic List<Map<String, Object>> select_file_list(int cms_bno) throws Exception {\n\t\treturn sql.selectList(\"cms_board.select_file_list\", cms_bno);\r\n\t}", "public ArrayList<String> getPendingFiles() {\n\n\t\tif (m_db == null) {\n\t\t\t//\n\t\t\t// database not yet initialized\n\t\t\t//\n\t\t\treturn null;\n\t\t}\n\n\t\tCursor cursor = m_db.query(PENDING_FILE_TABLE_NAME,\n\t\t\t\tnew String[] { PENDING_FIELD_PATH }, null, null, null, null,\n\t\t\t\tPENDING_FIELD_PATH + \" DESC\");\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\n\t}", "private void getAllNewsFromDatabase() {\n new GetAllNewsAsyncTask(newsDao).execute(newsList);\n }", "@RequestMapping(path = \"/files\",method = RequestMethod.GET)\n @ApiOperation(value = \"Return files information\", response = TarFile.class)\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Successfully able to get the all files\"),\n @ApiResponse(code = 404, message = \"files not found\"),\n @ApiResponse(code = 500, message = \"Server error\") })\n\n public List<TarFile> downloadFiles() {\n List<TarFile> dbFiles = filesStorageService.getFiles();\n\n return dbFiles;\n }", "@Override\n @Transactional(readOnly = true)\n public List<FileDTO> findAll() {\n log.debug(\"Request to get all Files\");\n return fileRepository.findAll().stream().map(FileMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public List<DocDownloadForm> allDocList(DataSource dataSource) \r\n\t{\n\t\treturn impl.allDocList(dataSource);\r\n\t}", "List<WebCrawlerData> retrieveAllEntity();", "public static List getAllUrl() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT url FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"url\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "@Override\n\tpublic List<EhmoPackage> fetchAll() {\n\t\treturn ehmoPackageDao.fetchAll();\n\t}", "public abstract List<String> getFiles( );", "public List<String> getAllData(){\n\t}", "private void downloadData(SQLiteDatabase db){\n DeviceDataManager.downloadDeviceData(db);\n CustomerDataManager.downloadCustomerData(db);\n CheckInTypeDataManager.downloadCheckInTypeData(db);\n CheckInPointDataManager.downloadCheckInPointData(db);\n PhotographerDataManager.downloadPhotographerData(db);\n }", "public List<NewsItem> getNewsItemDataFromDB() throws SQLException;", "@GetMapping(\"/files\")\n public ResponseEntity<List<FileInfo>> getListFiles() {\n List<FileInfo> fileInfos = storageService.loadAll().map(path -> {\n String filename = path.getFileName().toString();\n String url = MvcUriComponentsBuilder\n .fromMethodName(FilesController.class, \"getFile\", path.getFileName().toString()).build().toString();\n\n return new FileInfo(filename, url);\n }).collect(Collectors.toList());\n\n return ResponseEntity.status(HttpStatus.OK).body(fileInfos);\n }", "List<TParklotstatusFile> selectAll();", "private void getDBInstallationList() {\n DataHolder mDataHolder;\n mArrayListInstallations = new ArrayList<>();\n try {\n String url = \"select * from \" + mActivity.mDbHelper.mTableInstall + \" where \" + mActivity.mDbHelper.mFieldInstallIsSync + \"= 0\" + \" AND \" + mActivity.mDbHelper.mFieldInstallUserId + \"= '\" + PreferenceHelper.getPreferenceInstance(MyApplication.getAppContext()).getUserId() + \"'\" + \" order by \" + mActivity.mDbHelper.mFieldInstallLocalId + \" DESC\";\n System.out.println(\"Local url \" + url);\n mDataHolder = mActivity.mDbHelper.read(url);\n if (mDataHolder != null) {\n System.out.println(\"Local Device List \" + url + \" : \" + mDataHolder.get_Listholder().size());\n for (int i = 0; i < mDataHolder.get_Listholder().size(); i++) {\n VoInstallation mVoInstallation = new VoInstallation();\n mVoInstallation.setInst_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalId));\n mVoInstallation.setInst_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerId));\n mVoInstallation.setInst_user_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUserId));\n mVoInstallation.setInst_device_imei_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceIMEINo));\n mVoInstallation.setInst_device_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceServerId));\n mVoInstallation.setInst_device_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceLocalId));\n mVoInstallation.setInst_device_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDevicName));\n mVoInstallation.setInst_device_warranty_status(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceWarranty_status));\n mVoInstallation.setInst_device_type_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceTypeName));\n mVoInstallation.setInst_help_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallHelpNo));\n mVoInstallation.setInst_date_time(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTime));\n mVoInstallation.setInst_latitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLatitude));\n mVoInstallation.setInst_longitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLongitude));\n mVoInstallation.setInst_country_code(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryCode));\n mVoInstallation.setInst_country_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryName));\n mVoInstallation.setInst_vessel_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselLocalId));\n mVoInstallation.setInst_vessel_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselServerId));\n mVoInstallation.setInst_vessel_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselName));\n mVoInstallation.setInst_vessel_regi_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselRegNo));\n mVoInstallation.setInst_power(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPower));\n mVoInstallation.setInst_location(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocation));\n mVoInstallation.setInst_owner_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerName));\n mVoInstallation.setInst_owner_address(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerAddress));\n mVoInstallation.setInst_owner_city(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerCity));\n mVoInstallation.setInst_owner_state(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerState));\n mVoInstallation.setInst_owner_zipcode(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerZipcode));\n mVoInstallation.setInst_owner_email(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerEmail));\n mVoInstallation.setInst_owner_mobile_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerMobileNo));\n mVoInstallation.setInst_local_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalSignUrl));\n mVoInstallation.setInst_server_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerSignUrl));\n mVoInstallation.setInst_local_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalInstallerSignUrl));\n mVoInstallation.setInst_server_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerInstallerSignUrl));\n mVoInstallation.setInst_pdf_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPdfUrl));\n mVoInstallation.setInst_created_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCreatedDate));\n mVoInstallation.setInst_updated_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUpdatedDate));\n mVoInstallation.setInst_is_sync(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallIsSync));\n mVoInstallation.setIs_install(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallStatus));\n mVoInstallation.setInst_date_timestamp(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTimeStamp));\n mArrayListInstallations.add(mVoInstallation);\n }\n }\n// Collections.sort(mArrayListTreatmentLists, new Comparator<TreatmentList>() {\n// @Override\n// public int compare(TreatmentList s1, TreatmentList s2) {\n// return s1.getTreatment_title().compareToIgnoreCase(s1.getTreatment_title());\n// }\n// });\n } catch (Exception e) {\n e.printStackTrace();\n }\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false);\n mInstallationAdapter = new InstallationAdapter();\n mRecyclerViewInstallation.setLayoutManager(mLayoutManager);\n mRecyclerViewInstallation.setAdapter(mInstallationAdapter);\n mInstallationAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n checkAdapterIsEmpty();\n }\n });\n checkAdapterIsEmpty();\n }", "@Override\n\tpublic List<NewsVO> getAll() {\n\t\tList<NewsVO> list = new ArrayList<NewsVO>();\n\t\tNewsVO newsVO = null;\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVO 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t\tlist.add(newsVO); // Store the row in the list\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public List<Buy> getAll() throws PersistException;", "List<Transfer> requestDownloads(Leecher leecher);", "public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }", "public List<GridFSFile> getDBFilesInfo() {\n try {\n List<GridFSFile> files = new LinkedList<>();\n GridFSFindIterable gfsi = gridFSBucket.find();\n for (GridFSFile gfsf : gfsi) {\n files.add(gfsf);\n }\n return files;\n } catch (MongoException e) {\n System.err.println(e.getCode() + \" \" + e.getMessage());\n return null;\n }\n }", "public List<IncomingReport> list() throws DAOException;", "@Transactional\n\n\t@Override\n\tpublic Collection<FileModel> getAll() {\n\t\treturn fm.findAll();\n\t}", "public DocumentListFeed getAllDocuments() throws MalformedURLException, IOException, ServiceException;", "@Override\n @Transactional(readOnly = true)\n public List<FicheroByteDTO> findAll() {\n log.debug(\"Request to get all FicheroBytes\");\n return ficheroByteRepository.findAll().stream()\n .map(ficheroByteMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "private List<String> getDataFromApi() throws IOException {\n // Get a list of up to 10 files.\n List<String> fileInfo = new ArrayList<String>();\n FileList result = mService.files().list()\n .setMaxResults(10)\n .execute();\n List<File> files = result.getItems();\n if (files != null) {\n for (File file : files) {\n fileInfo.add(String.format(\"%s (%s)\\n\",\n file.getTitle(), file.getId()));\n }\n }\n return fileInfo;\n }", "public List<String> getFiles();", "public List<TradeModel> downloadLossDeals() {\n List<TradeModel> result = new ArrayList<>();\n for (int i = 0; i < 3; i++) {\n TradeModel tradeModel = new TradeModel(\"JPY\", \"AUD\", 1235);\n result.add(tradeModel);\n }\n return result;\n }", "@Override\n\tpublic List<String> getAllImages() {\n\t\t\n\t\treturn jdbcTemplate.query(\"select * from news\", new BeanPropertyRowMapper<News>());\n\t}", "public static ArrayList<Song> getAll() {\n ArrayList<Song> songs = new ArrayList<>();\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + host + \"/\" + db + \"?\" + \"user=\" + user + \"&password=\" + psw );\n\n songStatement = conn.createStatement();\n songResultSet = songStatement.executeQuery(\"SELECT * FROM spotify.track WHERE annotated = 0 LIMIT 0, 25\");\n\n songs = createSongs(songResultSet);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close();\n }\n\n return songs;\n }", "public void exportAllLists(){\n }", "public List<File> getFiles();", "List<StockList> fetch(String title);", "public void showDownloadList() {\n\t\tButton btn = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_downlist);\n\t\t// On le desactive\n\t\tbtn.setEnabled(false);\n\t\t\n\t\t// On prend le bouton d'upload\n\t\tbtn = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_uplist);\n\t\t// On l active\n\t\tbtn.setEnabled(true);\n\t\t\n\t\tsetDirectionDownload();\n\t\t((Sync) initiator).showListView();\n\t\t\t\t\n\t}", "@GetMapping(\"/api/obd\")\n public List<Obd> readAll() {\n return obdRepository.findAll();\n }", "public ArrayList<String> getFiles() {\n\n\t\tif (m_db == null)\n\t\t\treturn new ArrayList<String>();\n\n\t\t//\n\t\t// query database\n\t\t//\n\t\tCursor cursor = m_db.query(FILE_TABLE_NAME,\n\t\t\t\tnew String[] { FILE_FIELD_PATH }, null, null, null, null, null);\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\t}", "private void ListForeignDatei () {\n\n ForeignDataDbSource foreignDataDbSource = new ForeignDataDbSource();\n\n List<ForeignData> foreignDataList= foreignDataDbSource.getAllForeignData();\n Log.d(LOG_TAG,\"=============================================================\");\n\n for (int i= 0; i < foreignDataList.size(); i++){\n String output = \"Foreign_ID_Node: \"+ foreignDataList.get(i).getUid() +\n //\"\\n Status: \"+ foreignDataList.get(i).isChecked() +\n \"\\n Foto ID: \"+ foreignDataList.get(i).getFotoId() +\n \"\\n Punkt X: \"+ foreignDataList.get(i).getPunktX() +\n \"\\n Punkt Y: \"+ foreignDataList.get(i).getPunktY() +\n \"\\n IP: \"+ foreignDataList.get(i).getForeignIp() ;\n\n Log.d(LOG_TAG, output);\n }\n Log.d(LOG_TAG,\"=============================================================\");\n }", "List<T> getAll() throws PersistException;", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "public List<ImagingDocument> getDocumentsToCompleteImports() throws SQLException {\n\t\tList<ImagingDocument> documentsToComplete = new ArrayList<ImagingDocument>();\n\t\tConnection connection = DataSourceUtils.getConnection(dataSource);\n\t\tString sql = SQL_UEWI_SELECT_DOCUMENTS_TO_COMPLETE_IMPORTS;\n\t\tPreparedStatement stmt = connection.prepareStatement(sql);\n\t\tstmt.setMaxRows(batchSize);\n\t\tResultSet rs = stmt.executeQuery();\n\t\t\n\t\twhile (rs.next()) {\n\t\t\tImagingDocument docRow = new ImagingDocument(rs.getString(1), rs.getString(2), rs.getBoolean(3), rs.getString(4), rs.getInt(5));\n\t\t\tdocumentsToComplete.add(docRow);\n\t\t}\n\t\trs.close();\n\t\tconnection.close();\n\t\tstmt.close();\n\t\t\n\t\treturn documentsToComplete;\n\t}", "public Collection<File> getRetrievedFiles() {\n Collection<File> result = new ArrayList<>(upToDateFiles.size() + copiedFiles.size());\n result.addAll(upToDateFiles);\n result.addAll(copiedFiles);\n return result;\n }", "@Override\r\n\tpublic List<Mlid> downloadMlid(String service) {\n\t\tSystem.out.println(\"serv:\"+service);\r\n\t\tList<Mlid> mlidlist = mlidRepository.downloadMlid(service);\r\n\t\tSystem.out.println(\"size:\"+mlidlist.size());\r\n\t\t\r\n\t\treturn mlidlist;\r\n\t}", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> \n getBackupsList();", "public static List<String> getAllFileNames() {\n List<String> fileNames = new ArrayList();\n\n String sql = \"SELECT fileName FROM files;\";\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n while (rs.next()) {\n fileNames.add(rs.getString(\"fileName\"));\n }\n return fileNames;\n } catch (SQLException e) {\n System.out.println(\"getAllFileIDs: \" + e.getMessage());\n }\n return null;\n }", "public java.util.List<DataEntry> findAll();", "public List<String> getListFilePath() throws AncestryException {\n\t\tList<String> listFormKey = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT filepath FROM \" + management + \" WHERE step =4 GROUP BY filepath ORDER BY filepath\";\n\t\t\tcon = db.getConnectByProject(project);\n\t\t\tlistFormKey = JdbcHelper.queryToSingleList(con, sql , true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new AncestryException(\"getListFilePath : \" + e.toString() ,e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn listFormKey;\n\t}", "List<InvoiceDTO> fetchAll();", "@Override\r\n\tpublic List<String> downloadPendingTracking() {\n\t\treturn trackEventsRepository.fetchPendingArticleIDs();\r\n\t}", "public List<Record> listAllRecords();", "@Override\r\n\tpublic List<Libro> readAll() {\n\t\treturn libroRepository.findAll();\r\n\t}", "@Override\n public int getCount() {\n return downloads.length;\n }", "private List<PageExtract> getList() throws SQLException {\n\t\tDbConnector db = null;\n\t\ttry {\n\t\t\tdb = new DbConnector();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tdb.executeQuery(SqlConstants.SET_MAX_CONCAT_LENGTH);\n\t\tResultSet pageResult = db.executeQuery(SqlConstants.PAGE_EXTRACT);\n\t\tList<PageExtract> list = new ArrayList<>();\n\t\twhile (pageResult.next()) {\n\t\t\tint pageId = pageResult.getInt(\"pageId\");\n\t\t\tString content = pageResult.getString(\"content\");\n\t\t\tlist.add(new PageExtract(pageId, content));\n\n\t\t}\n\t\treturn list;\n\t}", "public List<Playlist> findAll() {\n String sql = \"SELECT * FROM Playlists\";\n List<Playlist> list = new ArrayList();\n Connection connection = DatabaseConnection.getDatabaseConnection();\n\n try {\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n list.add(processRow(resultSet));\n }\n } catch (SQLException ex) {\n System.out.println(\"PlaylistDAO - findAll Exception: \" + ex);\n }\n\n DatabaseConnection.closeConnection(connection);\n return list;\n }", "private void DownloadCMVMMVFiles() {\n ConnectivityManager cm = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo nInfo = cm.getActiveNetworkInfo();\r\n if (nInfo != null && nInfo.isAvailable() && nInfo.isConnected()) {\r\n dbHelper.open();\r\n ArrayList<String> mfb = dbHelper.getCMVFiles(divid, rangeCode, fbid);\r\n String path = GetFilePath();\r\n for (int i = 0; i < mfb.size(); i++) {\r\n if (!mfb.get(i).equals(\"null\")) {\r\n getCMVData(mfb.get(i));\r\n }\r\n }\r\n /* if (state == true && circle == true && ran == true && div == true) {\r\n\r\n } else {\r\n for (int i = 0; i < master.length; i++) {\r\n getCMVData(master[i]);\r\n }\r\n }*/\r\n } else {\r\n Toast.makeText(this, \"Please check your Internet Connection.\", Toast.LENGTH_SHORT).show();\r\n }\r\n }", "public Download getDownload(int row) {\n\t return downloadList.get(row);\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic static List<ClearList> getAllClearlists(){\r\n\t\t\r\n\t\treturn clearListRepository.findAll();\r\n\t}", "protected URL[] getDAOJavaFiles() {\r\n\t\treturn FileUtils.getUrls(getDaoInDir(), DEFAULT_JAVA_SUFFIX,\r\n\t\t\t\tgetDAOFileNameFilter());\r\n\t}", "public List<File> getListing(){\n\t return getFileList(new File(defaultPath));\n }", "public String[] getArtistsList() {\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n Vector<String> list = new Vector<String>();\n String[] result = null;\n try {\n //obtain the database connection by calling getConn()\n con = getConn();\n //create the PreparedStatement from the Connection object by calling prepareStatementl\n //method, passing it the sql \n st = con.prepareStatement(\"select * from Artist\");\n \n //Calls executeQuery and the resulting data is returned in the resultset\n rs = st.executeQuery();\n \n //loop through the result set and save the data in the datamodel objects\n while (rs.next()){\n //System.out.println(\"inside while....\");\n list.add(rs.getString(\"id\") + \",\" + rs.getString(\"NAME\"));\n \n }\n result = new String[list.size()];\n for (int i = 0 ; i< list.size() ; i++){\n result[i] = list.get(i);\n \n }\n }\n catch (SQLException e){\n \n }\n //close the resultset,preparedstatement and connection to relase resources \n if (rs != null){\n try{\n rs.close();\n rs = null;\n }\n catch (SQLException e){\n \n }\n }\n if (st != null){\n try{\n st.close();\n st = null;\n }\n catch (SQLException e){\n \n }\n }\n \n if (con != null){\n try{\n con.close();\n con = null;\n }\n catch (SQLException e){\n \n }\n }\n \n return result;\n }", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "public List<CD> getCDFromDB() {\n\t\tList<CD> lst = new ArrayList<>();\n\t\ttry (Connection conn = db.connect()) {\n\t\t\tStatement statement = (Statement) conn.createStatement();\n\t\t\tString sql = \"SELECT * FROM cd\";\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tCD obj = new CD();\n\t\t\t\tobj.setId(resultSet.getInt(\"id\"));\n\t\t\t\tobj.setName(resultSet.getString(\"name\"));\n\t\t\t\tobj.setNumOfSong(resultSet.getInt(\"numbersongs\"));\n\t\t\t\tobj.setSinger(resultSet.getString(\"singer\"));\n\t\t\t\tobj.setPrice(resultSet.getDouble(\"price\"));\n\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\tconn.close();\n\t\t} catch (SQLException | ClassNotFoundException ex) {\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\n\t\t}\n\t\treturn lst;\n\t}", "public List<Volume> list() {\n List<Volume> volumes = new ArrayList<Volume>();\n\n try {\n\n HttpResponse<Volume[]> jsonResponse = Unirest.get(rootUrl + ENDPOINT_DATASET_LIST)\n .basicAuth(auth.getUsername(),auth.getPassword())\n .header(\"accept\", \"application/json\")\n .asObject(Volume[].class);\n //System.out.print(jsonResponse.getBody());\n\n if (jsonResponse.getStatus() == HttpStatus.SC_OK) {\n Volume [] body = jsonResponse.getBody();\n System.out.println(body);\n\n for (Volume b: body){\n volumes.add(b);\n }\n }\n\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n\n return volumes;\n }", "public static List getAllImgs() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT imgUrl FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String imgUrl = result.getString(\"imgUrl\");\n polovniautomobili.add(imgUrl);\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "public ArrayList<Flight> fetchFlightDatabaseContentToList() { \n\n\t\tArrayList<Flight> listOfFlights = flightdb.fetchDatabaseContent();\n\n\t\tif (listOfFlights.isEmpty()) {\n\t\t\tSystem.out.println(\"There's no flights stored in database!\");\n\t\t\treturn null;\n\t\t}\n\t\treturn listOfFlights;\n\t}", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\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 return collection;\n }", "@Override\n public Iterable<File> list(File storageDirectory) {\n\treturn null;\n }", "List<Bill> all() throws SQLException;", "List<HistoryData> loadAllHistoryData();", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "public static List<Book> retrieveAll( EntityManager em) {\n TypedQuery<Book> query = em.createQuery( \"SELECT b FROM Book b\", Book.class);\n List<Book> books = query.getResultList();\n System.out.println( \"Book.retrieveAll: \" + books.size()\n + \" books were loaded from DB.\");\n return books;\n }", "List<T> obtenerAll();", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public DocumentListFeed getAllFeeds() throws MalformedURLException, IOException, ServiceException;", "public static List<UrlInfo> searchAllUrl() {\n\n //getSynonyms(queryKeywords);\n\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n ArrayList<Long> finalIdList = new ArrayList<Long>();\n\n String email = Secured.getUser(ctx());\n List<UrlEntry> entryIdList = UrlEntry.find()\n .select(\"entryId\")\n .where()\n .eq(\"email\", email)\n .findList();\n for (UrlEntry entry : entryIdList) {\n finalIdList.add(entry.getEntryId());\n }\n System.out.println(\"finalIdList---\" + finalIdList);\n List<UrlInfo> urlList = UrlInfo.find().select(\"url\").where().in(\"urlEntryId\", finalIdList).findList();\n /*ArrayList<String> urls = new ArrayList<String>();\n for (UrlInfo urlInfo : urlList) {\n urls.add(urlInfo.getUrl());\n }\n System.out.println(\"urls in search----\" + urls);*/\n return urlList;\n }" ]
[ "0.6698991", "0.6692516", "0.6558856", "0.6531353", "0.6461014", "0.64145947", "0.63858134", "0.6372907", "0.6282383", "0.62647253", "0.6262355", "0.6240543", "0.6088542", "0.6079143", "0.60744774", "0.597367", "0.5968437", "0.5966432", "0.59299743", "0.5929936", "0.59151185", "0.5909606", "0.5906953", "0.5904641", "0.58915615", "0.5885084", "0.587835", "0.5860833", "0.5858812", "0.5846072", "0.58394265", "0.58179295", "0.5810426", "0.5808554", "0.5794231", "0.5794195", "0.5790586", "0.57899123", "0.5789475", "0.57842374", "0.57777035", "0.5767234", "0.5766613", "0.5760273", "0.57512397", "0.57500917", "0.57495606", "0.5749396", "0.57428235", "0.57305396", "0.57255924", "0.5722742", "0.5720084", "0.57192105", "0.5717664", "0.5705929", "0.5694905", "0.567849", "0.5674239", "0.5673973", "0.5654607", "0.56424755", "0.5624475", "0.5622283", "0.561901", "0.5599867", "0.55833375", "0.55746067", "0.5571558", "0.5565847", "0.5564711", "0.5556611", "0.55533004", "0.5550691", "0.5550131", "0.5548726", "0.5547255", "0.5537786", "0.5536821", "0.5534398", "0.55310977", "0.55247", "0.5521412", "0.5518194", "0.5511556", "0.55035436", "0.5500178", "0.54964465", "0.54881513", "0.54830843", "0.5482789", "0.5476091", "0.5469905", "0.54693186", "0.54681283", "0.5467516", "0.54671377", "0.5465667", "0.5462325", "0.54622453" ]
0.5748529
48
Affiche le message dans la console
public void afficherMessage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }", "public void showMessage(String message);", "public static void displayMsg() {\n\t}", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "private void display(String msg) {\n cg.append(msg + \"\\n\");\n }", "private static void displayMessage(String message) {\n\t\toutput.append(message);\n\t}", "void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}", "public void console(String message){\n\t\tactivity.append(message + \"\\n\");\n\t\tactivity.selectAll();\n\t}", "@Override\n\tvoid showMsg() {\n\t\tSystem.out.println(\"Sample\");\n\t}", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }", "private static void print(String message)\n {\n System.out.println(message);\n }", "private void print(String message) {\n\n //System.out.println(LocalDateTime.now() + \" \" + message);\n System.out.println(message);\n }", "public void printMessage() {\n printMessage(System.out::print);\n }", "public static void echo(String msg)\n {\n System.out.println(msg);\n }", "private static void printLine(String message){\n\t\tSystem.out.println(message);\n\t}", "public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}", "private void println(final String msg) {\n if (!mTestStop) {\n CUIOutputStream.println(msg);\n }\n }", "private void display(String msg) {\n\t\tString msgF = \"\\tClient- \" + msg + \"\\n\\n >> \";\n System.out.print(msgF);\n }", "private void display(String msg) {\n\t\tif(cg == null)\n\t\t\tSystem.out.println(msg); // println for Console mode\n\t\telse\n\t\t\tcg.append(msg + \"\\n\"); // Append to, for example, JTextArea in the ClientGUI\n\t}", "private static void println(String message) {// metodo imprimir\r\n\t\tString threadName = Thread.currentThread().getName();\r\n\t\tSystem.out.println(threadName + \": \" + message);\r\n\t}", "public void println(String message){\n if (this.okToPrint){\n System.out.println(message);\n }\n }", "public static void WelcomeMessage () {\n System.out.println(\"===============================================\");\r\n System.out.println(\" C O M P U T E R\");\r\n System.out.println(\" S C I E N C E\");\r\n System.out.println(\" R O U L E T T E\");\r\n System.out.println(\"====================================== v1.2 ===\");\r\n System.out.println();\r\n }", "private void alert(String msg) {\r\n\t\tSystem.out.print(msg);\r\n\t }", "protected void output(String message) {\n \t\tSystem.out.print(message);\n \t}", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "public void printMessage() {\n\t\tSystem.out.println(this.greeting + \" \" + this.message);\n\t}", "protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }", "void println(String message);", "private synchronized void display(String msg) {\n\n\t\t//guiConversation.append(msg);\n\t\tSystem.out.println(msg);\n\t}", "private static void echo(String msg) {\n assert msg != null;\n\n System.out.println(msg);\n }", "public static void info(Object message) {\n\t\tSystem.out.print(message);\n\t}", "public void printCommand() {\n System.out.println(\"Cette commande n'est pas supportee\");\n System.out.println(\"Quitter : \\\"quit\\\", Total: \\\"total\\\" , Liste: \\\"list\\\" ou Time: \\\"time\\\"\");\n System.out.println(\"--------\");\n }", "public void displayTextToConsole();", "private void displayMessage(String message) {\n }", "abstract void consoleMessage(String message);", "private void showMessage(String string) {\n\n }", "public void print(String message) {\n System.out.println(message);\n }", "public void print(String message) {\n System.out.println(message);\n }", "void displayMessage(String message);", "public void print(String message);", "public static void print(String message)\n {\n\tSystem.out.println(message);\n }", "static void displayMessage() {\n\n System.out.println(\"\\nA total of \" + graphVisited.size() + \" vertices visited\");\n\n System.out.println(\"Found \" + silhouetteAnalyzer(numberOfVertices)\n + \" silhouettes\");\n }", "public void ShowMessage() {\n\t\tthis.ShowMessage(null);\n\t\t\n\t\t/* Exit function. */\n\t\treturn;\n\t}", "public void writeInfo(String message){\n final String output = getTimeString() + \" INFO: \" + message+ ENTER;\n switch (PreferencesHelper.getConsolePopupLevel()) {\n case ALL:\n case ONLY_INFO:\n popConsoleView();\n break;\n default:\n break;\n }\n UIBundlingThread.getInstance().addRunnable(new Runnable(){\n public void run() {\n if(infoStream == null){\n infoStream = console.newOutputStream();\n infoStream.setColor(CustomMediaFactory.getInstance().getColor(\n CustomMediaFactory.COLOR_BLACK));\n }\n writeToConsole(infoStream, output);\n }\n });\n\n }", "public void print(String message){\n if (this.okToPrint){\n System.out.print(message);\n }\n }", "public static void displayMsg() {\n\t\tSystem.out.println(\"Welcome Visit Count \"+count++);\n\t}", "private void display(String msg) {\n String time = simpleDateFormat.format(new Date()) + \" | \" + msg;\n System.out.println(time);\n }", "public static void printMessage(String message) {\n printDashLines();\n System.out.println(message);\n printDashLines();\n }", "public void printMsg() {\n System.out.println(\"This is an example RMI program\");\n }", "public void println(String message) {\r\n chatFrame.println(message);\r\n }", "void printMsg(){\n\tdisplay();\n }", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "private void msg(String name, String message) {\n System.out.println(\"[\" + (System.currentTimeMillis() - system_start_time) + \"] \" + name + \": \" + message);\n }", "public void printMessage(String message) {\n\r\n\t}", "public void displayMessage()\n\t{\n\t\t// this statement calls getCourseName to get the\n\t\t// name of the course this GradeBook represents\n\t\tSystem.out.printf( \"Welcome to the grade book for\\n%s!\\n\", getCourseName() );\n\t}", "protected void displayMessage() {\n \n System.out.print (\"Message:\\n\");\n userMessage = message.toString();\n\n for(int i = 0; i < userMessage.length(); i++) \n System.out.format (\"%3d\", i);\n System.out.format (\"\\n\");\n for (char c : userMessage.toCharArray()) \n System.out.format(\"%3c\",c);\n System.out.format (\"\\n\");\n }", "public void showUserTurnMessage() {\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"dein Zug... (9 drücken um zu speichern)\");\n\t\tSystem.out.println(\"\");\n\t}", "private void printConsole(String text) {\n\t\tMessage msg = getHandler().obtainMessage(MESSAGE_CONSOLE_CHANGED);\n\t\tmsg.obj = \"\\n\" + text ;\n\t\tmsg.sendToTarget();\t\t\n\t}", "public void message() {\n JOptionPane.showMessageDialog(null,\n \"Task was deleted successfully.\",\n \"Message\", JOptionPane.INFORMATION_MESSAGE);\n }", "private void printGoodbye() {\n System.out.println();\n System.out.println(\"Thank you for playing. Good bye.\");\n }", "void showInConsole();", "public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}", "public void showMsg(String str);", "public static void println(String message) {\n System.out.println(message);\n }", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "public void simpleMessage(String name) {\r\n\t\tSystem.out.println(\"\");\r\n\t\t// Tells system to print out 'Hello' (name var value) '!' Ex: Hello Owen!\r\n\t\tSystem.out.println(\"Hello \" + name + \"!\");\r\n\t}", "public void DisplayMessage(String massage);", "public void logToConsole(String message) {\n Bukkit.getServer().getConsoleSender().sendMessage(color(message));\n }", "public void outputMessage(String gameMessage){\n System.out.println(gameMessage);\n }", "public static void print(String message) {\n System.out.print(message);\n }", "@Override\n\t\tpublic void displayMessage() {\n\t\t\tsuper.displayMessage();\n\t\t}", "public void say(String message)\r\n {\r\n System.out.println(\"*\" + name + \" - \" + message);\r\n }", "public void showWinMessage() {\n\n\t}", "static void giveInfo(String message){\n JOptionPane.showMessageDialog(null, message);\n }", "private void display(String msg) {\n\t\t\tif(clientGui == null)\n\t\t\t\tSystem.out.println(msg); \t// terminal\n\t\t\telse\n\t\t\t\tclientGui.append(msg + \"\\n\");\t// JTextArea\n\t}", "@Override\r\n\tpublic void printPlain(String message) {\n\t\tSystem.out.println(message);\r\n\t}", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "public static void println(String message) {\n\t\tSystem.out.println(message);\n\t}", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\n\t}", "public void printMsg(String msg) {\n\t\tSystem.out.println(msg);\n\t}", "public static void displayWelcomeMessage() {\n\t\tSystem.out.println(\"Welcome to my program! :D\");\n\t\tSystem.out.println(\" Ryan Shupe \");\n\t\tSystem.out.println(\" CSCI 1250-004 Project 3 \");\n\t}", "public void printGoodbyeMessage() {\n System.out.println(BORDER_LINE + System.lineSeparator()\n + \" Bye, see you again!\" + System.lineSeparator()\n + BORDER_LINE);\n }", "public void displayMessage(String message) {\n gameWindowController.showMessage(message);\n }", "@Override\n\tpublic void message() {\n\t\tSystem.out.println(\"스마트폰으로 문자하기\");\n\t}", "public static void print(String message) {\n\t\tSystem.out.print(message);\n\t}", "void print(String message);", "private void print(String msg)\n {\n m_log.log(msg);\n m_vbox.write(\" \" + msg);\n }", "protected void displayMessage(String message) throws IOException {\n FXMLLoader fxmlLoader =\n new FXMLLoader(getClass().getResource(DISPLAY));\n Parent root = fxmlLoader.load();\n\n DisplayController displayController = fxmlLoader.getController();\n System.out.println(\"Messages: \");\n System.out.println(message + \"\\n\");\n displayController.setText(message);\n\n Stage stage = new Stage();\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }", "private synchronized void display(Message msg) {\n\t\tSystem.out.println(msg.toString());\n\t\tguiConversation.append(msg.toString());\n\t}", "public static void write(String message) {\n System.out.println(message);\n }", "@Override\r\n\tpublic void falar(String mensagem) {\r\n\t\tSystem.out.println(\"[ \"+getNome()+\" ] \"+mensagem);\r\n\t}", "private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}", "public void showErrorMessage(String message){\n System.out.println(LocalTime.now() + \": Error: \" + message);\n }", "private void log(String message) {\n System.out.println(message);\n }", "private void showMessageOnScreen(String message) {\n JOptionPane.showMessageDialog(this, message);\n }", "protected void PRINT(String message)\n\t{\n\t\tSystem.out.println(message);\n\t}", "private static void log(String message) {\n System.out.println(message);\n }" ]
[ "0.7212123", "0.720856", "0.7208409", "0.7181703", "0.7176213", "0.7138352", "0.71319103", "0.71280926", "0.7083962", "0.7068207", "0.7057897", "0.7030581", "0.7027842", "0.7027292", "0.6962945", "0.6961878", "0.69390947", "0.6935593", "0.69251454", "0.69118977", "0.69115424", "0.69034386", "0.6896404", "0.68949395", "0.68873256", "0.6859679", "0.6849864", "0.6839577", "0.68330866", "0.68279016", "0.68073094", "0.6804774", "0.679606", "0.6793596", "0.6793334", "0.6790411", "0.67758197", "0.6753399", "0.67531383", "0.67531383", "0.67478925", "0.6740657", "0.67187524", "0.67146087", "0.6712068", "0.6707662", "0.670265", "0.66997415", "0.6693723", "0.6687393", "0.66692185", "0.66665316", "0.6665606", "0.6664595", "0.6664595", "0.66558045", "0.6651701", "0.66458297", "0.6639826", "0.66316605", "0.66298485", "0.6628316", "0.6625017", "0.6619191", "0.66119576", "0.6607882", "0.66050774", "0.66023475", "0.6598532", "0.659718", "0.65935045", "0.65925926", "0.65908337", "0.6583459", "0.65747035", "0.6559879", "0.6555981", "0.6552427", "0.6550254", "0.6543007", "0.65417707", "0.65337", "0.6533024", "0.65239197", "0.6508824", "0.6505991", "0.6491075", "0.6488768", "0.6487651", "0.64834654", "0.64830184", "0.64720255", "0.6463606", "0.6457909", "0.6457415", "0.644726", "0.6443994", "0.643946", "0.6404179", "0.639499", "0.63920337" ]
0.0
-1
add a vehicle to the garage
public void addVehicle(Vehicle v) { vehicles.add(v); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addVehicle(Vehicle vehicle) {\n\t\tvehicleList.add(vehicle);\n\t\tSystem.out.println(vehicle.getMake() + \" added to garage!\");\n\t}", "public void addVehicle(Vehicle vehicle) {\n this.vehicles.add(vehicle);\n }", "public void addVehicle(Vehicle vehicle) {\n\t\tvehicles.add(vehicle);\n\t}", "public void add(Vehicle vehicle) {\n\t\tvehicles.add(vehicle);\n\t}", "private void addVehicle(Vehicle v){\n\t\tthis.putResource(v);\n\t}", "public void addVehicle() {\n\t\tcurrentInstance = FacesContext.getCurrentInstance();\n\t\tFacesMessage message = null;\n\t\ttry {\n\t\t\tvehicleService.insert(vehic);\n\t\t\tmessage = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Saved\",\"Vehicle Saved\");\n\t\t} catch (Exception e) {\n\t\t\tmessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Failed\",\"Vehicle Failed to be Saved: \" + e.getMessage());\n\t\t}\n\t\tcurrentInstance.addMessage(null, message);\n\t}", "public void addCar(Vehicle v) {\n\t\tif (this.mVehicles.size() < this.mCapacity) {\n\t\t\tCarAndTime carA = new CarAndTime(v, mTravelingTime);\n\t\t\tmVehicles.addFirst(carA);\n\t\t}\n\t}", "public void addVehicle(Vehicle vehicle) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(COLUMN_VEHICLE_NAME, vehicle.getName());\n values.put(COLUMN_VEHICLE_NUMBER, vehicle.getNumber());\n values.put(COLUMN_VEHICLE_CC, vehicle.getCc());\n values.put(COLUMN_VEHICLE_YEAR, vehicle.getYear());\n values.put(COLUMN_VEHICLE_TYPE, vehicle.getType());\n values.put(COLUMN_VEHICLE_FUEL, vehicle.getFuel());\n values.put(COLUMN_VEHICLE_CATEGORY, vehicle.getCategory());\n values.put(COLUMN_VEHICLE_DATE, vehicle.getDate());\n\n // Inserting Row\n db.insert(TABLE_VEHICLE, null, values);\n db.close();\n }", "public void add (Car car){\n\t\t}", "@Override\n public void add(T car) {\n carsInGarage.add(car);\n }", "@Override\n public synchronized void add(VehicleData vehicleData){\n slotFor(vehicleData).add(vehicleData);\n }", "void addGarage(Garage garage);", "void addVehicle(String type, int speed, int roadRef) {\n if (type.equals(\"Car\")) {\n roads.get(roadRef).addCar(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n\n } else if (type.equals(\"Bus\")) {\n roads.get(roadRef).addBus(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n } else if (type.equals(\"Motorbike\")) {\n roads.get(roadRef).addMotorbike(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n\n }\n }", "public void addVehicle(String registragtionNumber, Vehicle newVehicle )\n\t{\n\t\tgarageMap.put(newVehicle.getRegistrationNumber(), newVehicle);\n\t\tSystem.out.println(\"\\n\" + \"Vehicle parked! \\n \");\n\t}", "public void loadVehicle(Vehicle vehicle) {\n storage.addVehicle(vehicle);\n }", "public void insertNewVehicle(ShopGood vehicle) throws SQLException {\n int type = 0;\n String ability = new String();\n if(vehicle.getName().contains(\"Freezer\")) type = 1;\n if(vehicle.getName().contains(\"Fuel\")) type = 2;\n if(vehicle.getName().contains(\"Chemical\")) type = 3;\n if(vehicle.getName().contains(\"Pallet\")) type = 4;\n if(vehicle.getName().contains(\"Super\")) type = 5;\n double speed = 1;\n //if(vehicle.getName().contains(\"Truck\")) speed = 1;\n if(vehicle.getName().contains(\"Ship\")) speed = 0.5;\n if(vehicle.getName().contains(\"Plane\")) speed = 2;\n if (type == 5) speed++;\n\n String query = \"INSERT INTO `vehicles`(`name`, `type`, `speed`) VALUES (\\\"\"+vehicle.getName()+\"\\\", \\\"\"+type+\"\\\", \\\"\"+speed+\"\\\")\";\n st.executeUpdate(query);\n }", "public void addVehicule(Vehicule vehicule) { listeVehicule.add(vehicule); }", "public void addVehicleFirst(Vehicle vehicle){\n\t\tvehicles.addFirst(vehicle);\n\t}", "@Override\n public boolean AddVehicleToLine(Vehicle v) {\n boolean alreadyContainsThisVehicle = false;\n for(Vehicle vehicle : vehicles) {\n if(vehicle.getStart() == v.getStart()) {\n alreadyContainsThisVehicle = true;\n break;\n }\n }\n if(!alreadyContainsThisVehicle) {\n vehicles.add(v);\n for(int i=0; i<stops.size()-1;i++) {\n Route route = new MyRoute();\n route.ConstructRoute(streets,\n new PointInPath(route, stops.get(i).getKey().getStreet(), stops.get(i).getKey().getCoordinate()),\n new PointInPath(route, stops.get(i+1).getKey().getStreet(), stops.get(i+1).getKey().getCoordinate()),\n stops.get(i+1).getValue());\n v.AddRoute(route);\n }\n return true;\n } else {\n return false;\n }\n }", "@Override\n public void add_vehicle_packet(float timestamp, PacketLaneGroup vp, Long next_link_id) throws OTMException {\n\n // for each vehicle\n Dispatcher dispatcher = link.network.scenario.dispatcher;\n for(AbstractVehicle absveh : create_vehicles_from_packet(vp,next_link_id)){\n\n MesoVehicle veh = (MesoVehicle) absveh;\n\n // tell the event listeners\n if(veh.get_event_listeners()!=null)\n for(InterfaceVehicleListener ev : veh.get_event_listeners())\n ev.move_from_to_queue(timestamp,veh,veh.my_queue,transit_queue);\n\n // tell the vehicle it has moved\n veh.move_to_queue(timestamp,transit_queue);\n\n // tell the travel timers\n if (travel_timer != null)\n ((VehicleLaneGroupTimer)travel_timer).vehicle_enter(timestamp,veh);\n\n // register_with_dispatcher dispatch to go to waiting queue\n dispatcher.register_event(new EventTransitToWaiting(dispatcher,timestamp + transit_time_sec,veh));\n\n }\n\n update_supply();\n\n }", "public void archiveNewVehicle(Vehicle v) throws SimulationException {\r\n\t\tif (v.isQueued() == true) {\r\n\t\t\tthrow new SimulationException(\"The vehicle is already in queue.\");\r\n\t\t} else if (v.isParked() == true) {\r\n\t\t\tthrow new SimulationException(\"The vehicle is already parked.\");\r\n\t\t}\r\n\t\tdissatifiedVehicles.add(v);\r\n\t}", "Vehicle createVehicle();", "Vehicle createVehicle();", "public void addRobot(Robot robot) {\r\n this.robots.add(robot);\r\n this.vue.poserRobot(robot, getCoordBase());\r\n }", "public void agregarGarage(Garage garage) {\n\t\tthis.garages.add(garage);\n\t}", "public Vehicle addVehicle(NewVehicle newVehicle){\n\t\tif (newVehicle.getId()==null || newVehicle.getOriginId()==null ||\n\t\t\tnewVehicle.getDestinationId()==null || newVehicle.getType()==null)\n\t\t\treturn null;\n\t\t\n\t\tVehicle v = (new ObjectFactory()).createVehicle();\n\t\t\n\t\tv.setId(newVehicle.getId());\n\t\tv.setSelf(buildVehicleUriFromId(v.getId()));\n\t\tXMLGregorianCalendar now = getNow();\n\n\t\tv.setEntryTime(now);\n\t\tv.setOriginUri(this.buildPlaceUriFromId(newVehicle.getOriginId()));\n\t\tv.setDestinationUri(this.buildPlaceUriFromId(newVehicle.getDestinationId()));\n\t\tv.setPositionUri(v.getOriginUri());\n\t\tv.setType(newVehicle.getType());\n\t\tv.setState(VehicleState.IN_TRANSIT);\n\t\tv.setPlacePathUri(v.getSelf() + \"/suggestedPath\");\n\t\tsetLastModifiedDateNow(v);\n\t\tsynchronized(this.getVehicleLock()){\n\t\t\tthis.addVehicle(v);\n\t\t\treturn v;\n\t\t}\n\t}", "public void addCar(Car usedCar) {\n if (usedCar == null) {\n return;\n }\n // if price is 0 or negative, reject car\n if (usedCar.getPrice() <= 0) {\n System.out.println(\"Does not have price; cannot be added.\");\n return;\n }\n // if VIN is not unique, reject car\n if (!isUniqueVin(usedCar.getVin())) {\n System.out.println(\"Does not have unique VIN; cannot be added.\");\n return;\n }\n // car can be added\n cars.add(usedCar);\n totalValue += usedCar.getPrice();\n }", "public void addCarToCarRental(InterfaceAbstractCar car) {\r\n\t\tcompanyCars.add(car);\r\n\t}", "@Override\r\n public void agregarVehiculo(VehiculoModel vehiculo) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Insert into vehiculo(veh_placa, veh_marca, veh_modelo, veh_anio, veh_capacidad, veh_color, veh_kilometros) values (?, ?, ?, ?, ?, ?, ?)\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, vehiculo.getVehPlaca());\r\n statement.setString(2, vehiculo.getVehMarca());\r\n statement.setString(3, vehiculo.getVehModelo());\r\n statement.setInt(4, vehiculo.getVehAnio());\r\n statement.setInt(5, vehiculo.getVehCapacidad());\r\n statement.setString(6, vehiculo.getVehColor());\r\n statement.setInt(7, vehiculo.getVehKilometros());\r\n //para insert into se usa executeUpdate();\r\n int rowUpdated = statement.executeUpdate();\r\n if(rowUpdated > 0){\r\n JOptionPane.showMessageDialog(null, \"El registro fue \" \r\n + \" creado exitosamente.\");\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError : \" + ex.getMessage());\r\n }\r\n }", "public void addObervor(Obervor obervor) {\n this.obervors.add(obervor);\n }", "@Override\n\tpublic void add(Plane p) {\n\t\tString query = \"INSERT INTO fleet(model,planeid)\" + \"VALUES ('\" + p.getName() + \"',\" + p.getPlaneID() + \")\";\n\t\tDBManager.getInstance().addToDB(query);\n\t}", "org.landxml.schema.landXML11.TrafficVolumeDocument.TrafficVolume addNewTrafficVolume();", "public void addCarro(Carro c){\n\t\tfor (int i = 0; i < carros.length; i++) {\n\t\t\tfor (int j = 0; j < carros[i].length; j++) {\n\t\t\t\tif(carros[i][j].getPlaca().equals(\"-VAZIO-\")){\n\t\t\t\t\tcarros[i][j] = c;\n\t\t\t\t\tSystem.out.println(\"O seu carro estara na vaga \" + (i*10) + j);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void addVehicleType(String s){\n\t\tVehicleType v = new VehicleType(s);\n\t\ttypes.add(v);\n\t}", "public int addVehicle(int capacity) {\n\t\tcapacity = Math.max(capacity, 1);\n\t\tsynchronized(this) {\n\t \tif (vehicleCapacity == null) {\n\t \t\tvehicleCapacity = new int[1];\n\t \t\tvehicleCapacity[0] = capacity;\n\t \t} else {\n\t \t\tint[] temp = new int[vehicleCapacity.length + 1];\n\t \t\tfor (int i=0; i<vehicleCapacity.length; i++) temp[i] = vehicleCapacity[i];\n\t \t\ttemp[vehicleCapacity.length] = capacity;\n\t \t\tvehicleCapacity = temp;\n\t \t}\n\t \trecreateSolver(solver.getType());\n\t \treturn vehicleCapacity.length - 1;\n\t\t}\n\t}", "public void add(Avion avion)\n\t{\n\t}", "@Override\r\n public Driver addDriver(Integer age, Vehicle vehicle) {\r\n Driver driver = new Driver(age);\r\n Set<Vehicle> vehicleOwned = driver.getVehiclesOwned();\r\n if(vehicleOwned==null)\r\n vehicleOwned = new HashSet<>();\r\n vehicleOwned.add(vehicle);\r\n driver.setVehiclesOwned(vehicleOwned);\r\n drivers.put(age,driver);\r\n return driver;\r\n }", "public void addflight(Flight f)\n {\n \t this.mLegs.add(f);\n \t caltotaltraveltime();\n \t caltotalprice();\n }", "public static void addNewVilla() {\n Services villa = new Villa();\n villa = addNewService(villa);\n ((Villa) villa).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n ((Villa) villa).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n ((Villa) villa).setPoolArea(FuncValidation.getValidDoubleNumber(ENTER_POOL_AREA,INVALID_DOUBLE_NUMBER,30.0));\n ((Villa) villa).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR, 0));\n\n //Get villa list from CSV\n ArrayList<Villa> villaList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.VILLA);\n\n //Add villa to list\n villaList.add((Villa) villa);\n\n //Write villa list to CSV\n FuncReadWriteCSV.writeVillaToFileCSV(villaList);\n System.out.println(\"----Villa \"+villa.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "@Override\n public void addCar(Car car) {\n if (inDock) {\n transporter.addCar(car, this);\n } else {\n throw new IllegalStateException(\"The ferry is not in a harbour\");\n }\n }", "void addReservation(ReservationDto reservationDto) ;", "public void addLineVehicles(Circle c)\r\n {\r\n this.all_line_vehicles.add(c);\r\n return;\r\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "@Override\n\tpublic void insert(Vehicle v) {\n\t\ttry {\n\t\t\tint modelID = VehicleModelDAOImpl.getInstance()\n\t\t\t\t\t.getAll()\n\t\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(m-> m.getDescription().equals(v.getModel()))\n\t\t\t\t\t.findFirst()\n\t\t\t\t\t.get()\n\t\t\t\t\t.getModelID();\n\n\t\t\tint categoryID = VehicleCategoryDAOImpl.getInstance()\n\t\t\t\t\t.getAll()\n\t\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(c->c.getDescription().equals(v.getType()))\n\t\t\t\t\t.findFirst()\n\t\t\t\t\t.get()\n\t\t\t\t\t.getCategoryID();\n\n\n\t\t\tPreparedStatement st = Database.getInstance().getDBConn().prepareStatement(\"INSERT INTO vehicle(vehicle_ID,plate_number,mv_number,engine_number,chassis_number,model_ID,category_ID,status,image) VALUES(?,?,?,?,?,?,?,?,?)\");\n\t\t\t\n\t\t\tst.setString(1, v.getPlateNumber());\n\t\t\tst.setString(2, v.getMvNumber());\n\t\t\tst.setString(3, v.getEngineNumber());\n\t\t\tst.setString(4, v.getChassisNumber());\n\t\t\tst.setInt(5, modelID);\n\t\t\tst.setInt(6, categoryID);\n\t\t\tst.setString(7, v.getStatus());\n//\t\t\tst.setBlob(8, v.getImage());\n\t\t\tst.executeUpdate();\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 AddCarGUI(Car newCar){\n \n switch (newCar.path) { \n case 0:\n carModel.addRow(new Object[]{newCar.carId,\"East\",\"West\",newCar.status, newCar.timeLeft});\n break;\n case 1: \n carModel.addRow(new Object[]{newCar.carId,\"East\",\"South\",newCar.status, newCar.timeLeft});\n break; \n case 2: \n carModel.addRow(new Object[]{newCar.carId,\"West\",\"South\",newCar.status, newCar.timeLeft});\n break; \n case 3: \n carModel.addRow(new Object[]{newCar.carId,\"West\",\"East\",newCar.status, newCar.timeLeft}); \n break; \n case 4: \n carModel.addRow(new Object[]{newCar.carId,\"South\",\"East\",newCar.status, newCar.timeLeft}); \n break; \n case 5: \n carModel.addRow(new Object[]{newCar.carId,\"South\",\"West\",newCar.status, newCar.timeLeft});\n break; \n default: \n System.out.println(\"Car not reaching crossing\"); \n break; \n } \n }", "public void addPet(VirtualPet pet) {\n\t\tshelterPets.put(pet.name, pet);\n\t}", "public String addVe(Ve ve);", "public void addVoto(Voto v) {\n if(v.idPA != this.id) {\n \tSystem.out.println(\"addVoto PA error: idPa \"+v.idPA +\"!= this \"+ this.id); \n }\n votos.add(v); \n }", "public void addGas(double gallons)\n {\n this.fuelInTank = this.fuelInTank + gallons;\n }", "public void addPetModel(PetModel param) {\n if (localPetModel == null) {\n localPetModel = new PetModel[] { };\n }\n\n //update the setting tracker\n localPetModelTracker = true;\n\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localPetModel);\n list.add(param);\n this.localPetModel = (PetModel[]) list.toArray(new PetModel[list.size()]);\n }", "@PostMapping(\"/add-car\")\n public String addCar(@ModelAttribute Car car){\n cars.add(car);\n\n return \"redirect:/car\";\n }", "public synchronized void addBeacon(Vehicle vehicle, long ID, long x, long y, double speed, boolean isEncrypted){\r\n\t\tbeaconInfoText_.append(\"\\n\\nVehicle\\n\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(Renderer.getInstance().getTimePassed());\r\n\t\tbeaconInfoText_.append(\"ms\\n\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(Long.toHexString(ID));\r\n\t\tbeaconInfoText_.append(\",\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(speed);\r\n\t\tbeaconInfoText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(x);\r\n\t\tbeaconInfoText_.append(\",\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(y);\r\n\t\tbeaconInfoText_.append(\", encrypted:\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(isEncrypted);\r\n\t}", "public synchronized void addBeacon(Vehicle vehicle, long ID, long x, long y, double speed, boolean isEncrypted, boolean isForwared){\r\n\t\tbeaconInfoText_.append(\"\\n\\nVehicle (forwarded by RSU) \\n\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(Renderer.getInstance().getTimePassed());\r\n\t\tbeaconInfoText_.append(\"ms\\n\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(Long.toHexString(ID));\r\n\t\tbeaconInfoText_.append(\",\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(speed);\r\n\t\tbeaconInfoText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(x);\r\n\t\tbeaconInfoText_.append(\",\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(y);\r\n\t\tbeaconInfoText_.append(\", encrypted:\"); //$NON-NLS-1$\r\n\t\tbeaconInfoText_.append(isEncrypted);\r\n\t}", "public void addAgent(String name)\r\n {\n \r\n }", "public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }", "public void fillGarage() {\n\t\n\t\tfor (int i = 0; i < 10; i++) { // 10 cars\n\t\t\taddVehicle(new Car(\"Silver\", \"Audi\", \"petrol\", 250, 4, 40000));\n\t\t}\n\t\tfor (int i = 0; i < 20; i++) { // 20 motorcycles\n\t\t\taddVehicle(new Motorcycle(\"Red\", \"Suzuki\", \"petrol\", 300, 2, 80000));\n\t\t}\n\t\tfor (int i = 0; i < 3; i++) { // 3 buses \n\t\t\taddVehicle(new Bus(\"White\", \"Volvo\", \"diesel\", 140, 4, 100000));\n\t\t}\n\t\t\n\t}", "public void addReservation(Reservation reservation) {\n reservations.add(reservation);\n }", "void add(GeometricalObject object);", "public void addV(double vx, double vy, double vz){\n vel[0] += vx;\n vel[0] += vy;\n vel[0] += vz;\n }", "void park(Vehicle v) {\n\t\t\tcurrentVehicle = v;\n\t\t}", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "public void setVehicle(VehicleAgent vehicle) {\n\t\tthis.vehicle = vehicle;\n\t}", "public void agregarCarrito(Carrito carrito){\n\t\tthis.listaCarritos.add(carrito);\n\t}", "public Vehicle(){\n System.out.println(\"Parking a unknown model Vehicle\");\n numberOfVehicle++;\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "private static void addTV() {\n\n TV newTV = new TV(); // create new TV object\n\n String TVMake = Validate.readString(ASK_MAKE_TV); // Ask for the make and store input\n\n newTV.setMake(TVMake); // set make of TV based on user input\n\n int screenSize = Validate.readInt(ASK_SCREENSIZE_TV); // Ask for the screen size\n\n newTV.setScreenSize(screenSize); // set screensize of TV based on user input\n\n int type = Validate.readInt(ASK_TYPE_TV,3); // Ask for type of TV\n\n newTV.setType(type); // set type of TV based on user input\n\n boolean capableOf3D = Validate.readBoolean(ASK_3D_TV); // Ask if 3d compatible\n\n newTV.set3DCapability(capableOf3D); // set 3d capability of TV based on user input\n\n double price = Validate.readDouble(ASK_PRICE_TV); // Ask for price of TV\n\n newTV.setPrice(price); // set price of TV based on user input\n\n ProductDB.addProduct(newTV); // add new TV to the product DB\n\n newTV.saveTV(); // saves new tv to productDB text file\n\n }", "public void add(T toy) {\n // Complete add method with proper argument and method body\n v.add(toy);\n }", "public void add(Equipment equipment) {\n equipments.add(equipment);\n }", "public void addRoad(Road r) {\n\t\tthis.roads.add(r);\n\t}", "void addAdvert(Advert advert);", "public void addNewJet() {\n\t\n\tSystem.out.println(\"Please enter the model of the JET in all CAPS:\");\n\tString modelsOfJets = kb.next();\n\tSystem.out.println(\"Please enter the speed of the JET in miles per hour (MPH):\");\n\tdouble speedMPH = kb.nextDouble();\n\tSystem.out.println(\"Please enter the price of the JET in dollars:\");\n\tdouble priceInDollars = kb.nextDouble();\n\tSystem.out.println(\"Please enter the range of the JET in miles:\");\n\tdouble rangeInMiles = kb.nextDouble();\n\t\n\tJet j = new Jet(modelsOfJets, speedMPH, priceInDollars, rangeInMiles);\n\t\n\thangar.addNewJetInHangar(j); // adds the jet to the hangar object (that has the jet array)\n\t\t}", "Long addTravel(Travel travel);", "public void addNewAirplane(){\r\n\t\tuiAirplaneModel.setNewAirplane(new ArrayList<UiAirplaneModel>());\r\n\t\tUiAirplaneModel plane=new UiAirplaneModel();\r\n\t\tplane.setAirplaneModel(\"\");\r\n\t\tplane.setGroupIDs(new ArrayList<String>());\r\n\t\tplane.setStatusCheck(false);\r\n\t\tplane.setApNamesList(new ArrayList<UiAirplaneModel>());\r\n\t\tplane.setAirplaneNames(\"\");\r\n\t\tplane.setStage(\"\");\r\n\t\tuiAirplaneModel.setSelectedGrp(\"\");\r\n\t\tuiAirplaneModel.getNewAirplane().add(plane);\r\n\t}", "void addTruck(Truck truck){\n deleteTruck(truck);\n //next insert new user\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, truck.getId());\n values.put(KEY_PLAQUE, truck.getPlaque());\n values.put(KEY_TRUCK_CODE, truck.getTruckCode());\n values.put(KEY_TRUCK_MODEL, truck.getTruckModel());\n db.insert(TABLE_TRUCKS,null,values);\n db.close();\n }", "public void add(Lugar g){\n lugares.add(g);\n }", "@Override\r\n public void update(Vehicle vehicle) {\n }", "public void add(Good good) {\n cargo.add(good);\n numOfGoods++;\n }", "public void AddToVG() throws Exception{\n\tString PVPath = null;\n\tBufferedReader addDrives = new BufferedReader(new FileReader(\"add\"));\n\tcommandExec c1 = new commandExec();\n\tPattern pattern = \n Pattern.compile(\"(\\\\/)(d)(e)(v)(\\\\/)(s)([a-z])([a-z])(\\\\*?)\");\n\twhile ((PVPath = addDrives.readLine())!= null){\n\t\tMatcher match = pattern.matcher(PVPath);\n\t\tif(match.find()){\n\t\t\tSystem.out.println(\"Adding \" + PVPath + \" to TargetVG volume group\");\n\t\t\tc1.runCommand(\"vgextend \" + VGName + \" \" + PVPath);\n\t\t}\n\t}\n}", "void add(Lugar lugar);", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "Vehicle(int p, int f, int m) {\n\t\tpassengers = p;\n\t\tfuelcap = f;\n\t\tmpg = m;\n\t}", "public void addCars(User user, int idCar){\n ContentValues values= new ContentValues();\n values.put(COLUMN_IDUSER, user.getId());\n values.put(COLUMN_MODELEID, idCar);\n\n db.insert(TABLE_MODELE_SALVATE, null, values);\n }", "public void add(GeometricalObject object);", "public void add(ComplexCar[] cars) throws DatabaseTestException;", "@Override\n\tpublic ResultMessage insertCar(Carpo po) {\n\t\treturn inList.insert(po);\n\t}", "void add(Vertex vertex);", "void addVertex(Vertex v);", "public void addVirtualMachine(VirtualMachine vm){\n\t\tvms.add(vm);\n\t}", "@Override\r\n\tpublic void add(Army garrison) {\r\n\t\tgarrison.addArtillery(1);\r\n\t}", "void addRegion(Region region);", "@Override\r\n\tpublic boolean add(VOI o) {\r\n VOI voi = null;\r\n\r\n // check that object is a VOI\r\n if (!(o instanceof VOI)) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n voi = o;\r\n\r\n // check the voi name, fix if necessary\r\n if (contains(voi)) {\r\n voi.setName(buildName(voi.getName()));\r\n }\r\n\r\n if (super.add(voi)) { // add the voi to the vector\r\n fireVOIadded(voi); // notify listeners of a change\r\n Preferences.debug(\"Add voi: name = \" + voi.getName() + \"\\n\");\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public void agregarVehiculo(String patente, Vehiculo v) {\n vehiculos.put(patente, v);\n }", "void addRide(String name, String park, Date ridden);", "public void addAgent(Agent a)\n/* 86: */ {\n/* 87:139 */ this.mapPanel.addAgent(a);\n/* 88: */ }", "public void addAgent(Agent a) {\n\t\tagents.add(a);\n\t}", "public static void addToMileage(Car car, double mileageToAdd) {\n car.setMileage(car.getMileage() + mileageToAdd);\n }", "public void vampireAdd(){\n //Will permit to know if every vampires are different\n Set<Being> swap = new HashSet();\n\n //Iterate till the set is equal to the number of vampire we need\n while(swap.size() != this.vampires){\n //Create a new vampire\n Vampire vamp = vampireSet();\n //Test if the vampire is unique\n if(swap.add(vamp)){\n //Add the vampire to the real list if it's unique\n this.beings.add(vamp);\n }\n }\n //Clear the set, I guess it's optional\n swap.clear();\n }", "public void add(Evolver occupant)\n {\n Location loc = getRandomEmptyLocation();\n if (loc != null)\n add(loc, occupant);\n }", "public void addTruck(EntyTruck truck) {\n\t\t// Schedule weighing of fully loaded truck\n\t\tif (this.truck != null)\n\t\t\tqueue.enqueue(truck);\n\t\telse {\n\t\t\tthis.truck = truck;\n\t\t\tmodel.enqueueEvent(new EvtEndWeighing(truck, model.getTime()));\n\t\t}\n\t}", "RocketDTO addRocket(CreateRocketDTO rocket);" ]
[ "0.80029285", "0.79530185", "0.7768063", "0.77064884", "0.77034706", "0.75871706", "0.73121434", "0.7295324", "0.7266963", "0.7229025", "0.7141671", "0.7026961", "0.6951744", "0.69446814", "0.6821052", "0.67723626", "0.6759044", "0.6704221", "0.6412956", "0.64051104", "0.6349751", "0.6337252", "0.6337252", "0.63340735", "0.6303371", "0.62301064", "0.6201173", "0.61601967", "0.6143461", "0.6054909", "0.6053865", "0.6026095", "0.60249215", "0.60222805", "0.60217494", "0.5997484", "0.598693", "0.5983106", "0.5974981", "0.5965736", "0.5964437", "0.59611094", "0.5947087", "0.5944214", "0.59376127", "0.59254116", "0.59244925", "0.5917244", "0.5897114", "0.5890476", "0.5879759", "0.587164", "0.5869566", "0.5849578", "0.5825892", "0.58251387", "0.5815607", "0.5813218", "0.5809533", "0.5802534", "0.5795827", "0.57926846", "0.5786403", "0.57804096", "0.57638", "0.5762436", "0.57323134", "0.5730606", "0.5730033", "0.57228947", "0.5718833", "0.57143337", "0.57030296", "0.5700188", "0.56972814", "0.5686585", "0.5684945", "0.5684198", "0.5651354", "0.5648013", "0.56473994", "0.56435364", "0.56366", "0.56353873", "0.5628316", "0.5616721", "0.5613419", "0.561012", "0.56082207", "0.56060666", "0.56011844", "0.56007284", "0.55868894", "0.5586799", "0.55842876", "0.5580959", "0.5576321", "0.55714774", "0.55706596", "0.5569891" ]
0.7847286
2
populate the garage with vehicles
public void fillGarage() { for (int i = 0; i < 10; i++) { // 10 cars addVehicle(new Car("Silver", "Audi", "petrol", 250, 4, 40000)); } for (int i = 0; i < 20; i++) { // 20 motorcycles addVehicle(new Motorcycle("Red", "Suzuki", "petrol", 300, 2, 80000)); } for (int i = 0; i < 3; i++) { // 3 buses addVehicle(new Bus("White", "Volvo", "diesel", 140, 4, 100000)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void populateVehicleList() {\n\t\tfor (int i = 0; i < VEHICLE_LIST_SIZE; i++) {\n\t\t\tvehicleList[i] = createNewVehicle();\n\t\t}\n\t}", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void populate1()\r\n\t{\r\n\t\tRandom gen=new Random();\r\n\t\tint add=(gen.nextInt(8)+5);\r\n\t\twhile (add>0)\r\n\t\t{\r\n\t\t\t/**If the max capacity is reach, will break out to prevent further car instantiation*/\r\n\t\t\tif (carNum==LIMIT)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tboolean straight;\r\n\t\t\tint straightNum=gen.nextInt(2);\r\n\t\t\tif (straightNum==0)\r\n\t\t\t\tstraight=true;\r\n\t\t\telse\r\n\t\t\t\tstraight=false;\r\n\t\t\tint directionNumber=gen.nextInt(4);\r\n\t\t\tDirection direction=null;\r\n\t\t\tStreet street=null;\r\n\t\t\tswitch (directionNumber)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tdirection=Direction.N;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdirection=Direction.S;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tdirection=Direction.E;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tdirection=Direction.W;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"There was an error with your direction. Please look into this problem.\");\r\n\t\t\t}\r\n\t\t\tVehicle car=new Vehicle(carNum, time, direction, street, straight);\r\n\t\t\tcarNum++;\r\n\t\t\tif (car.getStraight())\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tadd--;\t\r\n\t\t}\t\r\n\t}", "public void vacateGarage() {\n\t\tvehicles.clear(); \n\t}", "public void populate2()\r\n\t{\r\n\t\tRandom gen=new Random();\r\n\t\tint add=(gen.nextInt(13)+3);\r\n\t\twhile (add>0)\r\n\t\t{\r\n\t\t\tif (carNum==LIMIT)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tboolean straight;\r\n\t\t\tint straightNum=gen.nextInt(2);\r\n\t\t\tif (straightNum==0)\r\n\t\t\t\tstraight=true;\r\n\t\t\telse\r\n\t\t\t\tstraight=false;\r\n\t\t\tint directionNumber=gen.nextInt(4);\r\n\t\t\tDirection direction=null;\r\n\t\t\tStreet street=null;\r\n\t\t\tswitch (directionNumber)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tdirection=Direction.N;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdirection=Direction.S;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tdirection=Direction.E;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tdirection=Direction.W;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"There was an error with your direction. Please look into this problem.\");\r\n\t\t\t}\r\n\t\t\tVehicle car=new Vehicle(carNum, time, direction, street, straight);\r\n\t\t\tcarNum++;\r\n\t\t\tif (car.getStraight())\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tadd--;\t\r\n\t\t}\r\n\t}", "private void prePopulate()\r\n\t{\r\n\t\tRandom gen=new Random();\r\n\t\t/**How many cars to add*/\r\n\t\tint add=(gen.nextInt(6)+5);\r\n\t\twhile (add>0)\r\n\t\t{\r\n\t\t\tboolean straight;\r\n\t\t\tint straightNum=gen.nextInt(2);\r\n\t\t\t/**Right lane or straight lane*/\r\n\t\t\tif (straightNum==0)\r\n\t\t\t\tstraight=true;\r\n\t\t\telse\r\n\t\t\t\tstraight=false;\r\n\t\t\t\t/**Determines whether going east west north or south*/\r\n\t\t\tint directionNumber=gen.nextInt(4);\r\n\t\t\tDirection direction=null;\r\n\t\t\tStreet street=null;\r\n\t\t\tswitch (directionNumber)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tdirection=Direction.N;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdirection=Direction.S;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tdirection=Direction.E;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tdirection=Direction.W;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"There was an error with your direction. Please look into this problem.\");\r\n\t\t\t}\r\n\t\t\t/**Creates a new car dependent on the information given. Finds the lane and direction and applies it to the appropriate queue*/\r\n\t\t\tVehicle car=new Vehicle(carNum, time, direction, street, straight);\r\n\t\t\tcarNum++;\r\n\t\t\tif (car.getStraight())\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchnorthstriahgt\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchsouthstraight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred Mainweststraight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred maineaststraight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchnorthright\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchsouthright\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred MainwestRight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred MainEastRight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tadd--;\t\r\n\t\t}\r\n\t\tprint.println(\"--Simulation starting. Processing of North and South traffic will begin--\");\r\n\t\t\r\n\t}", "public void generateVehicles(JSONObject resp) throws JSONException {\n birds = new ArrayList<Vehicle>();\n JSONArray items = resp.getJSONArray(\"birds\");\n double lat = 0;\n double lng = 0;\n String id = \"\";\n int bat = 0;\n System.out.println(items.toString());\n System.out.println(\"parsing.....\");\n for(int i=0;i<items.length();++i){\n JSONObject current = (JSONObject) items.get(i);\n //Vehicle(String vendor,String id, int battery, double lat, double lng, double startPrice, double minutePrice)\n //birds.add(new Vehicle(\"bird\",items.get(i).getString(\"id\");\n if(current.getString(\"captive\").equals(\"false\")) {\n JSONObject loc = current.getJSONObject(\"location\");\n lat = loc.getDouble(\"latitude\");\n lng = loc.getDouble(\"longitude\");\n bat = Integer.parseInt(current.getString(\"battery_level\"));\n id = current.getString(\"id\");\n\n Vehicle veh = new Vehicle(\"bird\",id,bat,lat,lng,\"$1 to unlock $0.27 / 1 min\");\n veh.setType(\"scooter\");\n System.out.print(veh);\n\n birds.add(veh);\n }\n }\n/* for(int i=0;i<birds.size();++i){\n System.out.println(birds.get(i));\n }\n */\n\n }", "private void populateFuelData(Fuel fuel) {\n\n // populate data and also remove trailing zero if any\n fuelDate = fuel.getFuelDate();\n tv_input_fuel_date.setText(AppUtils.getFormattedDateString(fuelDate));\n tin_perLitrePrice.setText(AppUtils.removeTrailingZero(fuel.getPerLitrePrice().toString()));\n tin_fuelQuantityLitres.setText(AppUtils.removeTrailingZero(fuel.getFuelQuantityLitres().toString()));\n tin_totalFuelPrice.setText(AppUtils.removeTrailingZero(fuel.getTotalFuelPrice().toString()));\n tin_currentKm.setText(AppUtils.removeTrailingZero(fuel.getCurrentKm().toString()));\n currentKm = fuel.getCurrentKm();\n tin_startingKm.setText(AppUtils.removeTrailingZero(fuel.getStartingKm().toString()));\n tin_distanceCovered.setText(AppUtils.removeTrailingZero(fuel.getDistanceCovered().toString()));\n tv_calculatedAverage_addEdit.setText(AppUtils.removeTrailingZero(fuel.getCalculatedAverage().toString()) + \" km/l\");\n tv_coverableDistance_addEdit.setText(AppUtils.removeTrailingZero(fuel.getCoverableDistance().toString()) + \" km\");\n tv_nextFuelFill_addEdit.setText(AppUtils.removeTrailingZero(fuel.getNextFuelFill().toString()) + \" km\");\n vehicleFuelCapacity = fuel.getTotalFuelCapacity(); // in editing mode, we want to get fuel capacity and store to variable so we can use it in calculating (coverableDistance and nextFuelFill)\n Log.d(TAG, \"populateFuelData: vehicleFuelCapacity = \" + vehicleFuelCapacity);\n }", "private void populate()\n\t{\n\t\tages = new int[] { 15, 18, 16, 16, 15, 16 }; \n\t}", "private void populateTable() {\n \n DefaultTableModel dtm = (DefaultTableModel) tblAllCars.getModel();\n dtm.setRowCount(0);\n \n for(Car car : carFleet.getCarFleet()){\n \n Object[] row = new Object[8];\n row[0]=car.getBrandName();\n row[1]=car.getModelNumber();\n row[2]=car.getSerialNumber();\n row[3]=car.getMax_seats();\n row[4]=car.isAvailable();\n row[5]=car.getYearOfManufacturing();\n row[6]=car.isMaintenenceCerticateExpiry();\n row[7]=car.getCity();\n \n dtm.addRow(row);\n \n }\n }", "public void populateVitals() {\n try {\n Statement stmt = con.createStatement();\n\n ResultSet rs = stmt.executeQuery(\"select * from device\");\n while (rs.next()) {\n\n String guid = rs.getString(\"DeviceGUID\");\n int deviceId = rs.getInt(\"DeviceID\");\n int deviceTypeId = rs.getInt(\"DeviceTypeID\");\n int locationId = rs.getInt(\"LocationID\");\n float deviceProblem = rs.getFloat(\"ProblemPercentage\");\n\n String dateService = rs.getString(\"DateOfInitialService\");\n\n Device device = new Device();\n device.setDateOfInitialService(dateService);\n device.setDeviceGUID(guid);\n device.setDeviceID(deviceId);\n device.setDeviceTypeID(deviceTypeId);\n device.setLocationID(locationId);\n device.setProblemPercentage(deviceProblem);\n\n deviceList.add(device);\n\n }\n } catch (SQLException e) {\n log.error(\"Error populating devices\", e);\n }\n\n }", "private void getVehicleList() {\n mApiCall.getVehicleList();\n }", "public VehicleList() {\n\t\tvehicles = new ArrayList<Vehicle>();\n\t}", "public Vehicle() {\r\n\t\tthis.numOfDoors = 4;\r\n\t\tthis.price = 1;\r\n\t\tthis.yearMake = 2019;\r\n\t\tthis.make = \"Toyota\";\r\n\t}", "private void prepareForNewVehicle() {\n\t\tbtnActVehUpdate.setVisibility(View.INVISIBLE);\n\t\tbtnActVehCreate.setVisibility(View.VISIBLE);\n\t\ttxtActVehAutonumberId.setText(getResources().getString(R.string.act_vehicle_id) + \": *\");\n\t\teTxtActVehLicenseplate.setText(\"\");\n\t\tautComplActVehCountry.setText(\"\");\n\t\teTxtActVehNoOfPassengers.setText(\"\");\n\t\tautComplActVehBrand.setText(\"\");\n\t\teTxtActVehVehicleType.setText(\"\");\n\t\tbtnActVehUpdate.setText(CREATE);\n\t\tvh = null;\n\t}", "Vehicle(int p, int f, int m) {\n\t\tpassengers = p;\n\t\tfuelcap = f;\n\t\tmpg = m;\n\t}", "public void populateRiver()\n\t{\n\t\twhile (emptyIndices.size() != 10) // 10 animals requirement at start\n\t\t{\n\t\t\tswitch (rng.nextInt(3))\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\triver[rng.nextInt(20)] = new Bear();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\triver[rng.nextInt(20)] = new Fish();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\triver[rng.nextInt(20)] = null;\n\t\t\t}\n\t\t\tfindEmpty(); // force emptyIndices update\n\t\t}\n\t}", "public void loadVehicles() throws IOException {\n File veFile = new File(VE_FILE);\n\n //Checks is file created\n if (!veFile.exists()) {\n veFile.createNewFile(); //If not, creates new file\n System.out.print(\"The data file vehicles.txt is not exits. \" +\n \"Creating new data file vehicles.txt... \" +\n \"Done!\");\n this.numberOfVehicle = 0; //New data file with the number of Vehicle is 0\n } else {\n //If file is existed, so loading this data file\n System.out.print(\"The data file vehicles.txt is found. \" +\n \"Data of vehicles is loading...\");\n\n //Loads text file into buffer\n try (BufferedReader br = new BufferedReader(new FileReader(VE_FILE))) {\n String line, contractId, type, licensePlate, chassisId, enginesId;\n\n //Reads number of vehicles\n line = br.readLine();\n if (line == null) return;\n this.numberOfVehicle = Integer.parseInt(line);\n\n for (int i = 0; i < this.numberOfVehicle; i++) {\n //Reads Vehicle's information\n contractId = br.readLine();\n type = br.readLine();\n licensePlate = br.readLine();\n chassisId = br.readLine();\n enginesId = br.readLine();\n\n\n //Create new instance of Vehicle and adds to Vehicle bank\n this.vehicles.add(new Vehicle(Integer.parseInt(contractId), type, licensePlate, chassisId, enginesId));\n }\n }\n System.out.print(\"Done!\");\n }\n }", "public EvolutionaryVehicleRouter() {\n super();\n initializeShippingPoints();\n individual_count = 0;\n generation_count = 0;\n }", "Vehicle createVehicle();", "Vehicle createVehicle();", "public void setCar() {\n\n\t\tint tries = 0;\n\t\tif(type ==RANDOM)\n\t\t{\n\t\t\tfor (int i = 0; i < noOfCarsGenerated; i++) {\n\t\t\t\tCar c = generateRandomCar(Timer.getClock());\n\t\t\t\twhile (c == null){\n\t\t\t\t\ttries++;\n\t\t\t\t\tSystem.out.println(\"i'm null somehow : \" + tries);\n\t\t\t\t\tc = generateRandomCar(Timer.getClock());\n\t\t\t\t}\n\t\t\t\tSimulator.getStations().get(c.getDestination()).addMovingQueue(c);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if (type == FIXED) {\n\t\t\t\n\t\t\tPoint source=Simulator.geoToCor(latitude, longitude);\n\t\t\tString destination=strategy.chooseDestination(source);\n\n\t\t\tfor (int i = 0; i < noOfCarsGenerated; i++) {\n\t\t\t\tCar c = new Car(latitude, longitude, destination, Timer.getClock(), strategy.setChargingTime(source));\n\t\t\t\tc.saveRoute(c.getCarRoute());\n\t\t\t\tSimulator.getStations().get(c.getDestination()).addMovingQueue(c);\n\t\t\t}\n\t\t}\n\n\t\tcurrentNo += noOfCarsGenerated;\n\n\t\tSimulator.updateCarNolbl(noOfCarsGenerated);\n\n\n\t}", "public UsedCarLot2()\n {\n cars = new ArrayList<>();\n totalValue = 0;\n }", "public static void main(String[] args) {\n\t\tOilStation benzinostanciq = new OilStation(\"OMV\");\r\n\t\tbenzinostanciq.printInfo();\r\n\t\t\r\n\t\t//2\r\n\t\tString[] names = {\"Petar\", \"Dragomir\", \"Svetoslav\", \"Canko\", \"Dencho\", \"Ivan\", \"Hristo\", \"Stamat\"};\r\n\t\tdouble[] money = {6500, 6100, 4900, 5900, 6000, 5700, 6200};\r\n\t\t\r\n\t\tArrayList<Driver> drivers = new ArrayList<>();\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tdrivers.add(new Driver(names[new Random().nextInt(names.length)], money[new Random().nextInt(money.length)], benzinostanciq));\r\n\t\t}\r\n\t\t\r\n\t\t//3\r\n\t\tArrayList<Vehicle> avtomobili = new ArrayList<>();\r\n\t\t\r\n\t\tfor (int i = 0; i < 200; i++) {\r\n\t\t\tswitch (new Random().nextInt(3)) {\r\n\t\t\tcase 0:\r\n\t\t\t\tavtomobili.add(new Car(\"Golf\", 2005));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tavtomobili.add(new Bus(\"Man\", 2006));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tavtomobili.add(new Truck(\"Scania\", 2011));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < drivers.size(); i++) {\r\n\t\t\tint broiAvt = 10;\r\n\t\t\twhile (broiAvt > 0) {\r\n\t\t\t\tint idx = new Random().nextInt(avtomobili.size());\r\n\t\t\t\tdrivers.get(i).addVehicle(avtomobili.get(idx));\r\n\t\t\t\tavtomobili.remove(idx);\r\n\t\t\t\tbroiAvt--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//4\r\n\r\n\t\tfor (int i = 0; i < drivers.size(); i++) {\r\n\t\t\tif (i % 3 == 0) {\r\n\t\t\t\tint buyVinetki = 5;\r\n\t\t\t\twhile (buyVinetki > 0) {\r\n\t\t\t\t\tint idx = new Random().nextInt(drivers.get(i).getVehicle().size());\r\n\t\t\t\t\tif (drivers.get(i).getVehicle().get(idx).getVinetka() == null) {\r\n\t\t\t\t\t\tdrivers.get(i).buyVinetka(idx, ValidPeriod.values()[new Random().nextInt(ValidPeriod.values().length)]);\r\n\t\t\t\t\t\tbuyVinetki--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdrivers.get(i).buyVinetki(ValidPeriod.values()[new Random().nextInt(ValidPeriod.values().length)]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//5\r\n\t\tfor (Driver dr : drivers) {\r\n\t\t\tdr.printInfoForDriver();\r\n\t\t}\r\n\t\t\r\n\t\t//6\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-----ÑÏÈÑÚÊ ÍÀ ÂÈÍÅÒÊÈ ÑËÅÄ ÏÐÎÄÀÆÁÀ-----\");\r\n\t\tbenzinostanciq.printInfo();\r\n\r\n\t}", "public Vehicle(){\n System.out.println(\"Parking a unknown model Vehicle\");\n numberOfVehicle++;\n }", "public void addVehicle(Vehicle vehicle) {\n\t\tvehicleList.add(vehicle);\n\t\tSystem.out.println(vehicle.getMake() + \" added to garage!\");\n\t}", "void initialiseShowroom(){\n currentCars.put(\"Aston Martin\", new Car(\"Aston Martin\", 50000, 2012));\n currentCars.put(\"BMW\", new Car(\"BMW\", 30000, 2014));\n currentCars.put(\"Chevrolet\", new Car(\"Chevrolet\", 20000, 2013));\n currentCars.put(\"Datsun\", new Car(\"Datsun\", 2000, 2001));\n }", "void addVehicle(String type, int speed, int roadRef) {\n if (type.equals(\"Car\")) {\n roads.get(roadRef).addCar(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n\n } else if (type.equals(\"Bus\")) {\n roads.get(roadRef).addBus(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n } else if (type.equals(\"Motorbike\")) {\n roads.get(roadRef).addMotorbike(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n\n }\n }", "private void carsArriving(){\r\n\t\t\tint numberOfCars=getNumberOfCars(weekDayArrivals, weekendArrivals);\r\n\t\t\taddArrivingCars(numberOfCars, NORMCAR); \t\r\n\t\t\tnumberOfCars=getNumberOfCars(weekDayPassArrivals, weekendPassArrivals);\r\n\t\t\taddArrivingCars(numberOfCars, PASS); \t\r\n\t\t}", "private void setCarList(){\n List<com.drife.digitaf.ORM.Database.CarModel> models = new ArrayList<>();\n\n if(nonPackageGrouping != null && nonPackageGrouping.size()>0){\n //cars = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(0).getCategoryGroupId());\n for (int i=0; i<nonPackageGrouping.size(); i++){\n List<com.drife.digitaf.ORM.Database.CarModel> carModels = CarController.getAllAvailableCarInPackage(nonPackageGrouping.get(i).getCategoryGroupId());\n for (int j=0; j<carModels.size(); j++){\n com.drife.digitaf.ORM.Database.CarModel model = carModels.get(j);\n models.add(model);\n }\n }\n }\n\n TextUtility.sortCar(models);\n\n for (int i=0; i<models.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel model = models.get(i);\n String car = model.getCarName();\n if(!carModel.contains(car)){\n carModel.add(car);\n cars.add(model);\n }\n }\n\n /*for (int i=0; i<cars.size(); i++){\n com.drife.digitaf.ORM.Database.CarModel carModel = cars.get(i);\n String model = carModel.getCarName();\n this.carModel.add(model);\n }*/\n\n atModel.setAdapter(new ArrayAdapter<com.drife.digitaf.ORM.Database.CarModel>(this, android.R.layout.simple_list_item_1, this.cars));\n\n //SpinnerUtility.setSpinnerItem(getApplicationContext(), spinModel, this.carModel);\n }", "public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }", "protected void populateList() {\n\n\t\tif (inTruckMode) {\n\t\t\t// issue #37 fix(block 2 users from punch-in)\n\t\t\t// Doing force sync for Vehicles table\n\t\t\t// if (com.operasoft.snowboard.dbsync.Utils.isOnline(this)) {\n\t\t\t// System.out.println(\"Sw_LoginScreenActivity.populateList():vehicle sync start\");\n\t\t\t// AbstractPeriodicSync vehiclesPeriodicSync = new AnonymousPeriodicSync(\"Vehicle\", new\n\t\t\t// VehiclesDao());\n\t\t\t// vehiclesPeriodicSync.fetchData(this);\n\t\t\t// }\n\n\t\t\tString vehicleId = mSP.getString(Config.VEHICLE_ID_KEY, \"\");\n\t\t\tString lastVehicleId = mSP.getString(Config.LAST_VEHICLE_KEY, \"\");\n\t\t\tvehiclesDao = new VehiclesDao();\n\n\t\t\t// issue #37 fix(block 2 users from punch-in)\n\t\t\t// VehicleListController vehicleListController = new VehicleListController();\n\t\t\t// vehiclesArray = vehicleListController.listVehicles(this);//vehiclesDao.listSorted();\n\t\t\tvehiclesArray = vehiclesDao.listSorted();\n\t\t\tvehiclesNameArray = new ArrayList<String>();\n\t\t\tint selectedIndex = -1;\n\n\t\t\tfor (int i = 0; i < vehiclesArray.size(); i++) {\n\t\t\t\tVehicle vehicles = vehiclesArray.get(i);\n\t\t\t\tvehiclesNameArray.add(vehicles.getName());\n\t\t\t\t// Check if the user is already connected to a vehicle\n\t\t\t\tif (vehicles.getId().equals(vehicleId)) {\n\t\t\t\t\tvehicle = vehicles;\n\t\t\t\t\tselectedIndex = i;\n\t\t\t\t}\n\t\t\t\t// Else check if it is his preferred one\n\t\t\t\tif ((selectedIndex == -1) && (vehicles.getId().equals(lastVehicleId))) {\n\t\t\t\t\tvehicle = vehicles;\n\t\t\t\t\tselectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((selectedIndex == -1) && (!vehiclesArray.isEmpty())) {\n\t\t\t\t// The user is not currently connected to any vehicle and has no\n\t\t\t\t// preferred one\n\t\t\t\tvehicle = vehiclesArray.get(0);\n\t\t\t\tselectedIndex = 0;\n\t\t\t}\n\n\t\t\t// Update the session with the vehicle currently selected\n\t\t\tSession.setVehicle(vehicle);\n\n\t\t\ttruckList.setAdapter(new TruckListAdapter(this, vehiclesNameArray, selectedIndex));\n\t\t} else {\n\n\t\t\t// Sites are not supported yet. Enable this code once they become\n\t\t\t// supported\n\t\t\t// SiteDao siteDao = new SiteDao();\n\t\t\t// sitesArray = siteDao.listAllValid();\n\t\t\t// sitesNameArray = new ArrayList<String>();\n\t\t\t//\n\t\t\t// for (Site site : sitesArray)\n\t\t\t// sitesNameArray.add(site.getName());\n\n\t\t\ttruckList.setAdapter(new TruckListAdapter(this, sitesNameArray, 0));\n\t\t}\n\n\t\tsetLoginMarker();\n\t}", "public void updateNumberOfVehicles() {\r\n numberOfVehicles = getVehicles().size();\r\n }", "@PostConstruct\n\tpublic void init() {\n\t\tif (vehicles == null) {\n\t\t\ttry {\n\t\t\t\tvehicles = getVehicles();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//\n\t\t\t} \n\t\t}\n\t}", "private void getVehicleByParse() {\n\t\tvehicles = new ArrayList<DCVehicle>();\n\t\tfinal ParseUser user = ParseUser.getCurrentUser();\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCVehicle\");\n\n\t\tquery.setCachePolicy(ParseQuery.CachePolicy.NETWORK_ELSE_CACHE);\n\t\tquery.whereEqualTo(\"vehiclePrivateOwner\", user);\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(final List<ParseObject> vehicleList,\n\t\t\t\t\tParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\t// Loop through all vehicles that we got from the query\n\t\t\t\t\tfor (int i = 0; i < vehicleList.size(); i++) {\n\t\t\t\t\t\t// Convert parse object (DC Vehicle) into vehicle\n\t\t\t\t\t\tDCVehicle vehicle = ParseUtilities\n\t\t\t\t\t\t\t\t.convertVehicle(vehicleList.get(i));\n\n\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\tParseFile photo = (ParseFile) vehicleList.get(i).get(\n\t\t\t\t\t\t\t\t\"vehiclePhoto\");\n\t\t\t\t\t\tbyte[] data = null;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (photo != null)\n\t\t\t\t\t\t\t\tdata = photo.getData();\n\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (data == null) {\n\t\t\t\t\t\t\tvehicle.setPhotoSrc(null);\n\t\t\t\t\t\t\tvehicle.setPhoto(false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvehicle.setPhotoSrc(data);\n\t\t\t\t\t\t\tvehicle.setPhoto(true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvehicles.add(vehicle);\n\t\t\t\t\t\tvehicleObjects.add(vehicleList.get(i));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set adapter\n\t\t\t\t\tadapter = new VehicleListAdapter(VehiclesListActivity.this,\n\t\t\t\t\t\t\tvehicles, vehiclePicker, addJournyActivity);\n\t\t\t\t\tlist.setAdapter(adapter);\n\t\t\t\t} else {\n\t\t\t\t\tLog.e(\"Get Vehicle\", e.getMessage());\n\t\t\t\t}\n\n\t\t\t\t// Disable loading bar\n\t\t\t\tloading.setVisibility(View.GONE);\n\t\t\t}\n\t\t});\n\t}", "private void updateVehicles() {\n OffloaderSyncAdapter.syncImmediately(getContext());\n Log.w(LOG_TAG, \"updateVehicles: \");\n }", "public UpdateVehicleCharges() {\n initComponents();\n view();\n \n \n }", "public CarShowroom() {\n initialiseShowroom();\n calculateAveragePrice();\n setOldestCar();\n getPriciestCar();\n }", "private void initializeViews()\n {\n ButterKnife.bind(this);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n rv_my_vehicles.setLayoutManager(layoutManager);\n rv_my_vehicles.setAdapter(myVehiclesAdapter);\n\n myVehiclesAdapter.setParent(getIntent().getIntExtra(COMING_FROM,0));\n presenter.fetchMyVehicles();\n progressDialog = alerts.getProcessDialog(this);\n progressDialog.setCancelable(false);\n\n tv_all_tool_bar_title.setText(my_vehicles);\n tv_all_tool_bar_title.setTypeface(appTypeface.getPro_narMedium());\n tv_add_new_vehicle.setTypeface(appTypeface.getPro_narMedium());\n tv_vehicles_empty.setTypeface(appTypeface.getPro_narMedium());\n }", "public Dealership() {\n cars = new TreeMap<>();\n }", "private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }", "@Override\n public void runTask() {\n final String aid = agencyId();\n // Make API call\n final Value payload = NextBusApi.getVehiclesForAgency(Assets.httpClient(), aid, this.lastTime);\n // Extract information for all vehicles and the payload's timestamp\n final List<Value> vehicleInfos = new ArrayList<>(payload.length());\n for (Item i : payload) {\n if (i.head() instanceof Attr) {\n final String label = i.head().key().stringValue(null);\n if (\"vehicle\".equals(label)) {\n vehicleInfos.add(i.head().toValue());\n } else if (\"lastTime\".equals(label)) {\n this.lastTime = i.head().toValue().get(\"time\").longValue();\n }\n }\n }\n // Relay each vehicleInfo to the appropriate VehicleAgent\n int i = 0;\n for (Value vehicleInfo : vehicleInfos) {\n command(\"/vehicle/\" + aid + \"/\" + vehicleInfo.get(\"id\").stringValue(),\n \"addMessage\",\n // lastTime came separately, manually add it to each vehicleInfo\n vehicleInfo.updatedSlot(\"timestamp\", this.lastTime));\n i++;\n }\n System.out.println(nodeUri() + \": relayed info for \" + i + \" vehicles\");\n }", "public void loadVehicle(Vehicle vehicle) {\n storage.addVehicle(vehicle);\n }", "void park(Vehicle v) {\n\t\t\tcurrentVehicle = v;\n\t\t}", "public void sortVehicles() {\n\t\tCollections.sort(vehicles);\n\t\t\n\t}", "private static void resetVehicle() {\n Vehicle vehicle = MavDemo1.getVehicle();\n VehicleControl engineBody = vehicle.getVehicleControl();\n\n float[] angles = new float[3];\n engineBody.getPhysicsRotation().toAngles(angles);\n Vector3f location = engineBody.getPhysicsLocation();\n\n vehicle.removeFromPhysicsSpace();\n vehicle.warpAllBodies(location, angles[1]);\n if (vehicle.contactTest()) {\n Vector3f newLocation = location.add(0f, 1f, 0f);\n for (int iteration = 0; iteration < 9; ++iteration) {\n vehicle.warpAllBodies(newLocation, angles[1]);\n if (vehicle.contactTest()) {\n break;\n }\n Vector3f offset = generator.nextVector3f();\n offset.multLocal(0.1f * (iteration + 1));\n newLocation.addLocal(offset);\n }\n }\n vehicle.addToPhysicsSpace();\n }", "public void fixAllVehiclesInGarage() {\n\n\t\tSystem.out.println(\"--- Fix All Vehicles In Garage ---\");\n\n\t\tdouble carBill = 0;\n\t\tdouble bikeBill = 0;\n\t\tdouble scootBill = 0;\n\n\t\tfor (Vehicle vehicle : vehicleList) {\n\n\t\t\tif (vehicle.getClass().getName() == \"garage.Car\") {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Fixing Car.....Looks like you need some new break pads in addition to the oil change\");\n\t\t\t\tcarBill += 100;\n\t\t\t\tSystem.out.println(vehicle.getMake() + \" has been fixed, this will cost you £100.00\");\n\t\t\t\tSystem.out.println(\"Bill so far: \" + carBill);\n\n\t\t\t} else if (vehicle.getClass().getName() == \"garage.Bike\") {\n\t\t\t\tSystem.out.println(\"Fixing Bike.....\");\n\t\t\t\tbikeBill += 50;\n\t\t\t\tSystem.out.println(vehicle.getMake() + \" has been fixed, this will cost you £50.00\");\n\t\t\t\tSystem.out.println(\"Bill so far: \" + bikeBill);\n\n\t\t\t} else if (vehicle.getClass().getName() == \"garage.ElectricScooter\") {\n\t\t\t\tSystem.out.println(\"Fixing Scooter.....\");\n\t\t\t\tscootBill += 25;\n\t\t\t\tSystem.out.println(vehicle.getMake() + \" has been fixed, this will cost you £25.00\");\n\t\t\t\tSystem.out.println(\"Bill so far: \" + scootBill);\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"------BILL------\");\n\t\tSystem.out.println(\"Car - Total Bill: \" + \"£\" + carBill);\n\t\tSystem.out.println(\"Bike - Total Bill: \" + \"£\" + bikeBill);\n\t\tSystem.out.println(\"Electric Scooter - Total Bill: \" + \"£\" + scootBill);\n\t\tSystem.out.println(\"\");\n\n\t\tSystem.out.println(\"---BILL PAID ---\");\n\t\tcarBill = 0;\n\t\tbikeBill = 0;\n\t\tscootBill = 0;\n\n\t\tSystem.out.println(\"Removing vehicles from garage!...\");\n\t\tremoveAllVehiclesFromGarage();\n\n\t}", "private void initHotelsAndReservations() \n\t{\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(\"Hotels.txt\");\n\t\t\tScanner fs = new Scanner(fis);\n\t\t\twhile(fs.hasNextLine())\n\t\t\t{\n\t\t\t\tScanner is = new Scanner(fs.nextLine());\n\t\t\t\tis.useDelimiter(\",\");\n\t\t\t\tint id = Integer.parseInt(is.next().trim());\n\t\t\t\tString name = is.next().trim();\n\t\t\t\tString address = is.next().trim();\n\t\t\t\tString city = is.next().trim();\n\t\t\t\tString state = is.next().trim();\n\t\t\t\tint pricePerNight = Integer.parseInt(is.next().trim());\n\t\t\t\th = new Hotel (id, name, address, city, state, pricePerNight);\n\t\t\t\thotels.add(h);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * The catch block checks to make sure that the file is found\n\t\t */\n\t\tcatch( FileNotFoundException fnfe)\n\t\t{\n\t\t\tSystem.err.println(\"File not found!\");\n\t\t}\n\n\t\t/**\n\t\t * Binding hotel reservations to model/JComboBox\n\t\t */\n\t\tfor(Hotel h1: hotels)\n\t\t\thotelsModel.addElement(h1);\n\t\t/**\n\t\t * Binding hotel reservations to model/JList\n\t\t */\n\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\tfor(Reservation r1 : selectedHotel.getReservations())\n\t\t\treservationsModel.addElement(r1);\n\t}", "public void showVehicles() {\n\t\tfor (Vehicle vehicle : vehicles) {\n\t\t\tSystem.out.println(vehicle);\n\t\t}\n\t}", "public void addVehicle(Vehicle v) {\n\t\tvehicles.add(v); \n\t}", "private void generateVehicle(Lane l, int carRatio, int truckRatio) { \r\n int totalRatio = carRatio + truckRatio;\r\n int randRatio = random.nextInt(totalRatio);\r\n Vehicle v = l.getVehicleAhead(l.getFirstSegment());\r\n if (randRatio < carRatio) { // if ratio < carRatio, then make car\r\n new Car(l, l.getFirstSegment(), v, null, CAR_COLOR);\r\n numberOfVehicles++;\r\n } else { // else we make truck\r\n new Truck(l, l.getFirstSegment(), v, null, TRUCK_COLOR);\r\n numberOfVehicles++;\r\n }\r\n }", "public void restock() {\n List<String> bmwModels = new ArrayList<String>();\n bmwModels.add(\"1 Series\");\n bmwModels.add(\"2 Series\");\n bmwModels.add(\"3 Series\");\n bmwModels.add(\"4 Series\");\n bmwModels.add(\"M4\");\n cars.put(\"BMW\", bmwModels);\n List<String> vauxhallModels = new ArrayList<String>();\n vauxhallModels.add(\"Corsa\");\n vauxhallModels.add(\"Viva\");\n vauxhallModels.add(\"Astra\");\n vauxhallModels.add(\"Insignia\");\n cars.put(\"Vauxhall\", vauxhallModels);\n List<String> fordModels = new ArrayList<String>();\n fordModels.add(\"KA\");\n fordModels.add(\"Fiesta\");\n fordModels.add(\"Focus\");\n fordModels.add(\"Mondea\");\n fordModels.add(\"Kuga\");\n cars.put(\"Ford\", fordModels);\n }", "public Dealer() {\r\n\t\tthis.vehicleDatabase.put(BICYCLE, new ArrayList<>());\r\n\t\tthis.vehicleDatabase.put(TRICYCLE, new ArrayList<>());\r\n\t\tthis.vehicleDatabase.put(MOTORCYCLE, new ArrayList<>());\r\n\t\tthis.vehicleDatabase.put(CAR, new ArrayList<>());\r\n\t}", "public void setVehicle(VehicleAgent vehicle) {\n\t\tthis.vehicle = vehicle;\n\t}", "private void readVehicles(List<Element> vehicleElements, Model model)\n throws ObjectExistsException {\n // Add the vehicles.\n for (int i = 0; i < vehicleElements.size(); i++) {\n Element curVehicleElement = vehicleElements.get(i);\n String attrVal;\n Integer vehicleID;\n try {\n vehicleID = Integer.valueOf(curVehicleElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n vehicleID = null;\n }\n Vehicle curVehicle = model.createVehicle(vehicleID);\n TCSObjectReference<Vehicle> vehicleRef = curVehicle.getReference();\n String vehicleName = curVehicleElement.getAttributeValue(\"name\");\n if (vehicleName == null || vehicleName.isEmpty()) {\n vehicleName = \"VehicleName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(vehicleRef, vehicleName);\n attrVal = curVehicleElement.getAttributeValue(\"length\",\n \"1000\");\n model.setVehicleLength(vehicleRef,\n Integer.parseInt(attrVal));\n attrVal = curVehicleElement.getAttributeValue(\"energyLevelCritical\",\n \"30\");\n model.setVehicleEnergyLevelCritical(vehicleRef,\n Integer.parseInt(attrVal));\n attrVal = curVehicleElement.getAttributeValue(\"energyLevelGood\",\n \"90\");\n model.setVehicleEnergyLevelGood(vehicleRef,\n Integer.parseInt(attrVal));\n List<Element> properties = curVehicleElement.getChildren(\"property\");\n for (int j = 0; j < properties.size(); j++) {\n Element curPropElement = properties.get(j);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + j + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + j + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(vehicleRef, curKey, curValue);\n }\n }\n }", "public void ingresaVehiculo (){\r\n \r\n Vehicle skate = new Skateboard(\"vanz\", \"2009\", \"1 metro\");\r\n Vehicle carro = new Car(\"renault\", \"2009\", \"disel\",\"corriente\" );\r\n Vehicle jet = new Jet(\"jet\", \"2019\", \"premiun\", \"ocho motores\");\r\n Vehicle cicla = new Bicycle(\"shimano\", \"2010\",\"4 tiempos\" ) ; \r\n Vehuculo.add(skate);\r\n Vehuculo.add(carro);\r\n Vehuculo.add(jet);\r\n Vehuculo.add(cicla); \r\n \r\n /*\r\n for en el cual se hace el parceo y se instancia la clase Skateboard\r\n \r\n */\r\n for (Vehicle Vehuculo1 : Vehuculo) {\r\n if(Vehuculo1 instanceof Skateboard){\r\n Skateboard skatevehiculo = (Skateboard)Vehuculo1;\r\n skatevehiculo.imprimirPadre();\r\n skatevehiculo.imprimirSkate();\r\n skatevehiculo.imprimirInterfaz();\r\n }\r\n /*\r\n se intancia y se hace el parceo de la clase car\r\n \r\n */\r\n else if(Vehuculo1 instanceof Car){\r\n \r\n Car carvhiculo = (Car)Vehuculo1;\r\n carvhiculo.imprimirPadre();\r\n carvhiculo.imprimirCarro();\r\n carvhiculo.imprimirVehiculopotenciado();\r\n \r\n \r\n \r\n }\r\n /*se intancia y se hace el parceo de la clase\r\n \r\n */\r\n else if(Vehuculo1 instanceof Jet){\r\n \r\n Jet jethiculo = (Jet)Vehuculo1;\r\n jethiculo.imprimirPadre();\r\n jethiculo.imprimirJet();\r\n jethiculo.imprimirVehiculopotenciado();\r\n jethiculo.imprimirInterfaz();\r\n }\r\n else if(Vehuculo1 instanceof Bicycle){\r\n \r\n Bicycle ciclavehiculo = (Bicycle)Vehuculo1;\r\n ciclavehiculo.imprimirPadre();\r\n ciclavehiculo.imprimirBici();\r\n }\r\n }\r\n \r\n \r\n }", "public static void listVehicles() {\n\t\tSystem.out.println(\"-----------------\");\n\t\tSystem.out.println(\"Listing Vehicles\");\n\t\tSystem.out.println(\"-----------------\");\n\t\t\n\t\tfor (int i = 0; i < owners.size(); i++) {\n\t\t\tfor (Vehicle v : owners.get(i).getVehicles()) {\n\t\t\t\t\n\t\t\t\tSystem.out.println((owners.get(i).getName() + \"'s \" + v.toString()));\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "private void getSurvivor() {\r\n survivors = new Survivor[childNum + teacherNum + soldierNum];\r\n int i = 0;\r\n\r\n // Add Child objects\r\n for (i = 0; i < childNum; i++) {\r\n survivors[i] = new Child();\r\n\t\t}\r\n\r\n // Add Teacher objects\r\n for (; i < childNum + teacherNum; i++) {\r\n survivors[i] = new Teacher();\r\n\t\t}\r\n\r\n // Add Soldier objects\r\n for (; i < childNum + teacherNum + soldierNum; i++) {\r\n survivors[i] = new Soldier();\r\n\t\t}\r\n }", "public Vector<Cars> getCars() {\n\t\tVector<Cars> v = new Vector<Cars>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt\n\t\t\t\t\t.executeQuery(\"select * from vehicle_details order by vehicle_reg\");\n\t\t\twhile (rs.next()) {\n\t\t\t\tString reg = rs.getString(1);\n\t\t\t\tString make = rs.getString(2);\n\t\t\t\tString model = rs.getString(3);\n\t\t\t\tString drive = rs.getString(4);\n\t\t\t\tCars cars = new Cars(reg, make, model, drive);\n\t\t\t\tv.add(cars);\n\t\t\t}\n\t\t}\n\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "@Override\n public void onChanged(List<VehicleDataFirebase> vehicleDataFirebases) {\n if (adapter==null){\n Log.d(constants.YOURVEHICLETAG, vehicleDataFirebases.get(0).getRegistrationNumber());\n setupUI(vehicleDataFirebases);\n }\n Log.d(constants.YOURVEHICLETAG, vehicleDataFirebases.get(0).getRegistrationNumber());\n //Update data\n adapter.updateVehicles(vehicleDataFirebases);\n vehicles = vehicleDataFirebases;\n }", "private void transformVehicles(APDataCollection apData) throws APDataCollectionTransformationException {\n\n\t\t// Loop through the CommlRateState elements (one per state)\n\t\tfor (int[] vehicleIndexes = { 0, 0 }; vehicleIndexes[0] < apData.getCount(ICommlAutoConstants.COMML_RATE_STATE_XPATH); vehicleIndexes[0]++) {\n\n\t\t\t// Loop through the vehicles under that CommlRateState\n\t\t\tfor (vehicleIndexes[1] = 0; vehicleIndexes[1] < apData.getCount(ICommlAutoConstants.COMML_VEHICLE_XPATH, vehicleIndexes[0]); vehicleIndexes[1]++) {\n\n\t\t\t\t// This step changes the way garaging locations are stored from\n\t\t\t\t// the Turnstile method to the Portal method.\n\t\t\t\t// In turnstile, garaging locations are stored underneath the\n\t\t\t\t// vehicles:\n\t\t\t\t// CommlAutoLineBusiness.CommlRateState.CommlVeh.CommlVehSupplement.Addr\n\t\t\t\t// In Portal, all locations are stored in \"Location\" elements,\n\t\t\t\t// and the vehicle is linked to the Location\n\t\t\t\t// with an idref:\n\t\t\t\t// CommlAutoLineBusiness.CommlRateState.CommlVeh.@LocationRef\n\t\t\t\t//\n\t\t\t\tmoveGaragingAddress(apData, vehicleIndexes);\n\n\t\t\t\tmoveRegistrationState(apData, vehicleIndexes);\n\n\t\t\t\tsetVehicleType(apData, vehicleIndexes);\n\n\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<DeliveryVehicle> getVehiclesFromFile() throws java.io.IOException {\n \n DeliveryVehicleController controller = new DeliveryVehicleController();\n \n //reading the file and adding all lines to the list\n List<String> lines = Files.readAllLines(Paths.get(_filePath));\n String[] lineTokens;\n List<String> fileLines = Files.readAllLines(Paths.get(_filePath));\n\n for(String line : fileLines) {\n lineTokens = line.split(\" \");\n \n //Possible to change if statement case statement instead\n // [0] = Bike Used to check what type (never going to change)\n // [1] = RegNumber\n // [2] = EngineSize\n // [3] = DaysInService\n // [4] = MilesCovered\n // [5] = Deliverys\n\n if (lineTokens[0].equalsIgnoreCase(\"Bike\")){\n // System.out.print(lineTokens[1] + \"THISSHOULD BE REG NUMBER\");\n controller.addBike( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n // System.out.print(_vehicleList);\n }\n\n else if (lineTokens[0].equalsIgnoreCase(\"Car\")){\n controller.addCar( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n }\n\n else if (lineTokens[0].equalsIgnoreCase(\"Scooter\")){\n // _vehicleList.add(new DeliveryScooter( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) ));\n controller.addScooter( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n }\n } \n \n return controller.getVehiclesList();\n \n }", "private static Vehicle GetNewVehicle()\n {\n System.out.println(\"What type of vehicle is this?\");\n System.out.println(\" - Enter 1 for 'Car'\");\n System.out.println(\" - Enter 2 for 'Truck'\");\n System.out.println(\" - Enter 3 for 'Motorcycle'\");\n int vType = in.nextInt();\n in.nextLine(); //clear buffer or loop will break\n Vehicle v = null;\n switch (vType)\n {\n case 1:\n v = new Car();\n break;\n case 2:\n v = new Truck();\n System.out.println(\"Is this a four wheel drive?\");\n String s = in.nextLine();\n if (s.toUpperCase().indexOf(\"Y\") == 0)\n {\n Truck t = (Truck)v;\n t.toggleFourWheelDrive(true);\n }\n break;\n case 3:\n v = new Motorcycle();\n break;\n }\n System.out.println(\"What is the VIN?\");\n v.setVIN(in.nextLine());\n System.out.println(\"What is the Make?\");\n v.setMake(in.nextLine());\n System.out.println(\"What is the Model?\");\n v.setModel(in.nextLine());\n System.out.println(\"What is the Year\");\n v.setYear(in.nextInt());\n in.nextLine(); //clear buffer\n System.out.println(\"What is the Mileage\");\n v.setMileage(in.nextDouble());\n in.nextLine(); //clear buffer\n return v;\n }", "public void populate() { \n \n // make some grounds\n ground1 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground1.setPosition(new Vec2(-380, -200));\n \n Body ground2 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground2.setPosition(new Vec2(-0, -200));\n\n Body ground3 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground3.setPosition(new Vec2(300, -100));\n \n // make a moving platform \n Body movingPlatform = new SlidingPlatform(world, PolygonShape.makeBox(100, 5), new Vec2(130, 0), 2);\n movingPlatform.setPosition(new Vec2(-260, -150));\n \n // make some bottles\n Bottle bottle1 = new Bottle(game);\n bottle1.putOn(ground1);\n bottle1.setName(\"bottle1\");\n \n Bottle bottle2 = new Bottle(game);\n bottle2.putOn(ground2);\n bottle2.setName(\"bottle2\");\n \n Bottle bottle3 = new Bottle(game);\n bottle3.putOn(ground3);\n bottle3.setName(\"bottle3\");\n \n // show dialog with information about level\n JOptionPane.showMessageDialog(frame, \"Press N or M to throw bottles to kill Boxies.\", \"Level instructions:\", JOptionPane.PLAIN_MESSAGE);\n \n // make some boxies\n Boxy boxy1 = new Boxy(game);\n boxy1.setName(\"boxy1\");\n Vec2 vec1 = new Vec2(100, 0);\n boxy1.move(vec1);\n\n Boxy boxy2 = new Boxy(game);\n boxy2.setName(\"boxy2\");\n Vec2 vec2 = new Vec2(-100, 200);\n boxy2.move(vec2);\n\n Boxy boxy3 = new Boxy(game);\n boxy3.setName(\"boxy3\");\n Vec2 vec3 = new Vec2(-400, 200);\n boxy3.move(vec3);\n \n }", "public Vehicle(){}", "public void PopulateRV()\n {\n //get the recycler view from the layout\n RecyclerView rv = (RecyclerView) view.findViewById(R.id.GeneralFragmentRV);\n rv.setHasFixedSize(true);\n rv.setLayoutManager(new LinearLayoutManager(view.getContext()));\n //pass the list of bps to the Recycler view via a custom adapter\n\n //get the list of bps sorted by user selected sort option\n ArrayList<BoulderProblem> sortedBps = SortBps();\n\n //return the list of bps in ascending or descending order based on user selected option\n ArrayList<BoulderProblem> displayedBps = new ArrayList<>();\n if(!ascendingOption)\n {\n for(int i = sortedBps.size(); i > 0; i--)\n {\n displayedBps.add(sortedBps.get(i-1));\n }\n }\n else\n {\n for(BoulderProblem bp : sortedBps)\n {\n displayedBps.add(bp);\n }\n }\n rv.setAdapter(new GeneralRVAdapter(displayedBps));\n }", "public static Object[] getVehicleData(){\n String make, model;\n double price, fuelConsumption;\n int power, year;\n FuelType fuelType;\n\n System.out.println(\"\\n1. Car\\n2. Truck\");\n int res = ConsoleReader.getInt();\n System.out.print(\"\\nEnter make :\");\n ConsoleReader.getString();\n make = ConsoleReader.getString();\n System.out.print(\"Enter model :\");\n model = ConsoleReader.getString();\n System.out.print(\"Enter price($) :\");\n price = Double.parseDouble(ConsoleReader.getString());\n System.out.print(\"Enter fuelConsumption(l) :\");\n fuelConsumption = Double.parseDouble(ConsoleReader.getString());\n System.out.print(\"Enter power(kW) :\");\n power = ConsoleReader.getInt();\n System.out.print(\"Enter year :\");\n year = ConsoleReader.getInt();\n System.out.print(\"Enter fuelType :\\n\");\n\n FuelType[] fuelTypes = FuelType.values();\n for(int i = 0; i < fuelTypes.length; i++){\n System.out.print(\" \" + i + \". \" + fuelTypes[i].toString() + \"\\n\");\n }\n fuelType = FuelType.valueOf((fuelTypes[ConsoleReader.getInt()]).toString());\n\n if (res == 1){\n int seatCount, doorCount;\n BodyType bodyType;\n\n System.out.print(\"Enter seatCount :\");\n seatCount = ConsoleReader.getInt();\n System.out.print(\"Enter doorCount :\\n\");\n doorCount = ConsoleReader.getInt();\n\n BodyType[] bodyTypes = BodyType.values();\n for(int i = 0; i < bodyTypes.length; i++){\n System.out.print(\" \" + i + \". \" + bodyTypes[i].toString() + \"\\n\");\n }\n bodyType = BodyType.valueOf((bodyTypes[ConsoleReader.getInt()]).toString());\n\n return new Object[] {res, make, model, price, fuelConsumption,\n power, year, fuelType, seatCount, doorCount, bodyType};\n }else {\n int capacity;\n TruckCategory truckCategory;\n\n System.out.print(\"Enter capacity :\");\n capacity = ConsoleReader.getInt();\n\n TruckCategory[] truckCategories = TruckCategory.values();\n for (int i = 0; i < truckCategories.length; i++) {\n System.out.print(\" \" + i + \". \" + truckCategories[i].toString() + \"\\n\");\n }\n truckCategory = TruckCategory.valueOf((truckCategories[ConsoleReader.getInt()]).toString());\n\n return new Object[]{res, make, model, price, fuelConsumption,\n power, year, fuelType, capacity, truckCategory};\n }\n }", "private void reloadTreatmentData()\n {\n if (_dietTreatment == null) return;\n _dietTreatment.updateContactJournalsCache();\n _dietTreatment.updateDietParametersCache();\n _dietTreatment.updateDietPlansCache();\n _dietTreatment.updatePatientStatesCache();\n _dietTreatment.updateSystemUsersCache();\n \n // load nutritionprotocols\n NutritionProtocolDAO dao = DAOFactory.getInstance().getNutritionProtocolDAO();\n List<NutritionProtocol> nps = dao.findByDietTreatment(_dietTreatment.getModel());\n _nutritionProtocols = new ArrayList<NutritionProtocolBO>();\n for (NutritionProtocol nutritionProtocol : nps) \n {\n _nutritionProtocols.add(new NutritionProtocolBO(nutritionProtocol));\n }\n }", "public void addCar(Vehicle v) {\n\t\tif (this.mVehicles.size() < this.mCapacity) {\n\t\t\tCarAndTime carA = new CarAndTime(v, mTravelingTime);\n\t\t\tmVehicles.addFirst(carA);\n\t\t}\n\t}", "void vehicleDetails();", "public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }", "private void populateAltitudes()\r\n {\r\n for(int i=0; i<9; i++)\r\n {\r\n cboAltitude.addItem(aryAltitudes[i]);\r\n }\r\n }", "void moveVehicles() {\n for (int i = roads.size() - 1; i >= 0; i--) {\n roads.get(i).moveVehicles();\n checkTurns(i);\n\n\n }\n\n }", "private void fillDataStructures()\n \t{\n \t\tfor (Field field : fields) {\n \t\t\tif (field.object != null) {\n \t\t\t\tObject o = field.object;\n \t\t\t\tif (o instanceof Agent) {\n \t\t\t\t\tagents.add((Agent)o);\n \t\t\t\t\t((Agent) o).td = this;\n \t\t\t\t} else { // Box\n \t\t\t\t\tboxes.add((Box)o);\n \t\t\t\t\t((Box) o).td = this;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t\n \t\t// sort boxes and agents by color\n \t\tfor (int i=0; i<8; i++) {\n \t\t\tboxesByColor.add(new ArrayList<Box>());\n \t\t\tagentsByColor.add(new ArrayList<Agent>());\n \t\t\tgoalsByColor.add(new ArrayList<Goal>());\n \t\t}\n \t\tfor (Box box : boxes) {\n \t\t\tboxesByColor.get(box.color.ordinal()).add(box);\n \t\t}\n \t\tfor (Agent agent : agents) {\n \t\t\tagentsByColor.get(agent.color.ordinal()).add(agent);\n \t\t}\n \t\tfor (Goal goal : goals) {\n \t\t\tgoalsByColor.get(goal.color.ordinal()).add(goal);\n \t\t}\n \n \t\t\n \t\t// sort boxes and goals by ID\n \t\tfor (Box box : boxes) {\n \t\t\tif (boxesByID.get(box.id) == null) {\n \t\t\t\tboxesByID.put(box.id,new ArrayList<Box>());\n \t\t\t}\n \t\t\tboxesByID.get(box.id).add(box);\n \t\t}\n \t\tfor (Goal goal : goals) {\n \t\t\tif (goalsByID.get(goal.id) == null) {\n \t\t\t\tgoalsByID.put(goal.id,new ArrayList<Goal>());\n \t\t\t}\n \t\t\tgoalsByID.get(goal.id).add(goal);\n \t\t}\n \n \t\t\n \t\t// sort boxes and agents by Node\n \t\tfor (Node node : graph) {\n \t\t\tboxesByNode.put(node, new ArrayList<Box>());\n \t\t\tagentsByNode.put(node,new ArrayList<Agent>());\n \t\t}\n \t\tfor (Box box : boxes) {\n \t\t\tNode node = box.atField.node;\n \t\t\tboxesByNode.get(node).add(box);\n \t\t}\n \t\tfor (Agent agent : agents) {\n \t\t\tNode node = agent.atField.node;\n \t\t\tagentsByNode.get(node).add(agent);\n \t\t}\n \t}", "@Override\r\n public void printAllVehicles(Integer age) {\r\n if(!drivers.containsKey(age)) {\r\n System.out.println(\"No vehicle found parked by the driver of age \" + age.toString() + \".\");\r\n return;\r\n }\r\n Driver driver = drivers.get(age);\r\n Iterator<Vehicle> it = driver.getVehiclesOwned().iterator();\r\n System.out.print(\"Vehicle Registeration Numbers of all cars parked by driver of age \" + age.toString() + \" are as follows: \");\r\n while(it.hasNext()){\r\n System.out.print(it.next().getVehicleNumber() + \" | \");\r\n }\r\n System.out.println();\r\n }", "@Override\n public List<Vehicle> getVehicles(AuthContext context) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); }, 1,3);\n\n //get the vehicles - > for each vehicle, with the vehicle model field (String model = vehicle.getForeignKey(\"model\"))\n List<Vehicle> vehicles = new ArrayList<>();\n try {\n List<Map<String,Object>> data = get(\"SELECT * FROM TblVehicles\");\n for(Map<String,Object> map: data) {\n //create a vehicle\n Vehicle vehicle = new Vehicle(map);\n\n //get the model number\n String model = vehicle.getForeignKey(\"model\");\n\n //get the model from Tbl\n if (model != null) {\n VehicleModel vehicleModel = new VehicleModel(get(\"SELECT * FROM TblVehicleModel WHERE modelNum = ?\", model).get(0));\n vehicle.setModel(vehicleModel);\n }\n //adding\n vehicles.add(vehicle);\n }\n return vehicles;\n }catch (SQLException e) {\n throw new DSFormatException(e.getMessage());\n }\n }", "public Vehicle() {\n }", "private void initiate(){\n carDef = new BodyDef();\n\t carDef.type = BodyType.DynamicBody;\n\n\t shape = new PolygonShape();\n\t shape.setAsBox(width*0.8f, height*0.9f, new Vector2(0,0),0);\t\n\n\t // fixture \t\n\t fixture = new FixtureDef();\n\t fixture.shape = shape;\n\t fixture.restitution = 0.75f; \n\t fixture.friction = 0.75f;\n\t fixture.density = 1;\n\n\t}", "public void setCarList(List<VehicleVO> carList) {\n this.carList = carList;\n }", "private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }", "public Vehicle(Vehicle vehicle) {\r\n\r\n\t\tthis.make = vehicle.make;\r\n\t\tthis.yearMake = vehicle.yearMake;\r\n\t\tthis.numOfDoors = vehicle.numOfDoors;\r\n\t\tthis.price = vehicle.price;\r\n\t}", "private void addVehicle(Vehicle v){\n\t\tthis.putResource(v);\n\t}", "public Vehicle() {\n\n\t}", "public void populateCarList(View v) {\n String[] carList = new String[singleton.getCars().size()];\n for (int i = 0; i < singleton.getCars().size(); i++) {\n carList[i] = singleton.getCars().get(i).getMake() + \" \" + singleton.getCars().get(i).getModelName()\n + \" \" + singleton.getCars().get(i).getYearMade() + \" \" + singleton.getCars().get(i).getTransmission()\n + \" \" + singleton.getCars().get(i).getEngineDisplacement() + \" L\";\n }\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), R.layout.car_list_dialog, R.id.carList, carList);\n\n ListView list = (ListView) v.findViewById(R.id.listOfCarData);\n list.setAdapter(adapter);\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n carPosition = position;\n }\n });\n }", "public Car() {\n\t\t\tmake = \"GM\";\n\t\t\tyear = 1900;\n\t\t\tmileage= 0;\n\t\t\tcarCost = 0;\n\t\t}", "public void makeCars()\r\n\t{\r\n\t\tString[] names = new String[]{\"BOB\",\"SUE\",\"JOE\",\"NEATO\",\"FALCON\"};\r\n\t\tfor(int i=0; i<cars.length; i++)\r\n\t\t{\r\n\t\t\tString name = names[(int)(Math.random()*names.length)];\r\n\t\t\tColor color = new Color((int)(Math.random()*256),(int)(Math.random()*256),(int)(Math.random()*256));\r\n\t\t\tdouble speed = Math.random()*5+1;\r\n\t\t\tcars[i] = new Car(Math.random()*(-SCREEN_WIDTH),Math.random()*SCREEN_HEIGHT,name,color,speed);\r\n\t\t}\r\n\t}", "private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }", "public void removeVehicles() {\r\n numberOfVehicles = 0;\r\n for (Lane lane : lanes) {\r\n lane.removeVehicles();\r\n }\r\n }", "public static void main(String[] args) {\n Virus Ebola = new Virus();\n // set member variables on the instance of Virus stored in Herpes\n Ebola.Baltimore = \"V\";\n Ebola.Order = \"Mononegavirales\";\n Ebola.Family = \"Filoviridae\";\n Ebola.Genus = \"Ebolavirus\";\n Ebola.Tropism = \"Anything it can liquefy\";\n Ebola.HumanOnly = false;\n Ebola.Envelope = false;\n Ebola.GenomeSize = 19;\n \n // send our Car instance to a helper method to print its member variables\n displayVirusStats(Ebola);\n // test its methods\n Ebola.startReplication();\n Ebola.notReplicating();\n Ebola.getCurrentSpeed();\n \n}", "public static void main (String[] args)\n\t{\n\t\tint startMiles1 = 20015, endMiles1 = 20098;\n\t\tdouble gallonsUsed1 = 6.05, pricePerGallon1 = 2.99;\n\t\tString carType1 = \"Jeep Wrangler\";\n\t\t\n\t\t//declaration and initialization for car2\n\t\tint startMiles2 = 20015, endMiles2 = 20098;\n\t\tdouble gallonsUsed2 = 4.71, pricePerGallon2 = 2.99;\n\t\tString carType2 = \"TOYOTA Carola\";\n\t\t\n\t\t//objects construction\n\t\tCarV7 car1 = new CarV7(carType1, endMiles1, startMiles1, gallonsUsed1, pricePerGallon1);\n\t\tCarV7 car2 = new CarV7(carType2, endMiles2, startMiles2, gallonsUsed2, pricePerGallon2);\n\t\t\n\t\t//calculation for car1\n\t\tint distance1 = car1.calcDistance();\n\t\tdouble gpm1 = car1.calcGPM(distance1);\n\t\tdouble mpg1 = car1.calcMPG(distance1);\n\t\tdouble ttlCost1 = car1.totalCost();\n\t\t\n\t\t//calculation for car2\n\t\tint distance2 = car2.calcDistance();\n\t\tdouble gpm2 = car2.calcGPM(distance2);\n\t\tdouble mpg2 = car2.calcMPG(distance2);\n\t\tdouble ttlCost2 = car2.totalCost();\n\t\t\n\t\t//output\n\t\tSystem.out.printf(\"\\t\\tGas Mileage Calculations\\n\");\n\t\tSystem.out.printf(\"Type of Car\\tStart Miles\\tEnd Miles\\tDistance\\tGallons\\t\\tPrice\\t\\tCost\\t\\tMiles/Gal\\tGal/Mile\\n\");\n\t\tfor (int i = 0; i < 150; i++) {\n\t\t\tSystem.out.printf(\"=\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\n\t\t\n\t\t//print out info for car1\n\t\tcar1.printCarType();\n\t\tSystem.out.printf(\"\\t%d\\t\\t%d\\t\\t%d\\t\\t%f\\t%.2f\\t\\t%.2f\\t\\t%f\\t%f\\n\", startMiles1, endMiles1, distance1, gallonsUsed1, pricePerGallon1, ttlCost1, mpg1, gpm1);\n\t\t\n\t\t//print out info for car2\n\t\tcar2.printCarType();\n\t\tSystem.out.printf(\"\\t%d\\t\\t%d\\t\\t%d\\t\\t%f\\t%.2f\\t\\t%.2f\\t\\t%f\\t%f\\n\", startMiles2, endMiles2, distance2, gallonsUsed2, pricePerGallon2, ttlCost2, mpg2, gpm2);\n\t}", "Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }", "private void getObjects() {\n\t\tmeteors = go.getMeteors();\n\t\texplosions = go.getExplosions();\n\t\ttargets = go.getTargets();\n\t\tcrosses = go.getCrosses();\n\t\trockets = go.getRockets();\n\t\tearth = go.getEarth();\n\t}", "public void addVehicle(Vehicle vehicle) {\n this.vehicles.add(vehicle);\n }", "public void setArrive(Village arrive) {\n\t\tthis.arrive = arrive;\n\t}", "public void insertNewVehicle(ShopGood vehicle) throws SQLException {\n int type = 0;\n String ability = new String();\n if(vehicle.getName().contains(\"Freezer\")) type = 1;\n if(vehicle.getName().contains(\"Fuel\")) type = 2;\n if(vehicle.getName().contains(\"Chemical\")) type = 3;\n if(vehicle.getName().contains(\"Pallet\")) type = 4;\n if(vehicle.getName().contains(\"Super\")) type = 5;\n double speed = 1;\n //if(vehicle.getName().contains(\"Truck\")) speed = 1;\n if(vehicle.getName().contains(\"Ship\")) speed = 0.5;\n if(vehicle.getName().contains(\"Plane\")) speed = 2;\n if (type == 5) speed++;\n\n String query = \"INSERT INTO `vehicles`(`name`, `type`, `speed`) VALUES (\\\"\"+vehicle.getName()+\"\\\", \\\"\"+type+\"\\\", \\\"\"+speed+\"\\\")\";\n st.executeUpdate(query);\n }", "public static void main(String[] args) {\n int numberOfLevels = 5;\n int numberOfRows = 10;\n int spotsPerRow = 20;\n ParkingLot parkingLot = new ParkingLot(numberOfLevels, numberOfRows, spotsPerRow);\n\n System.out.println(\"\\n----------------------< PARKING >----------------------\\n\");\n\n // Park some vehicles\n List<Vehicle> motorcycles = new ArrayList<>();\n List<Vehicle> cars = new ArrayList<>();\n List<Vehicle> buses = new ArrayList<>();\n for (int i = 1; i <= 100; i++) {\n Vehicle bus = new Bus();\n buses.add(bus);\n if (parkingLot.parkVehicle(bus)) {\n System.out.print(\"Bus parking successful \");\n }\n }\n for (int i = 1; i <= 250; i++) {\n Vehicle motorCycle = new MotorCycle();\n motorcycles.add(motorCycle);\n if (parkingLot.parkVehicle(motorCycle)) {\n System.out.print(\"Motorcycle parking successful \");\n }\n Vehicle car = new Car();\n cars.add(car);\n if (parkingLot.parkVehicle(car)) {\n System.out.print(\"Car parking successful \");\n }\n }\n\n System.out.println(\"\\n\");\n\n parkingLot.print();\n // Get data for all the levels\n for (int i = 0; i < numberOfLevels; i++) {\n Level level = parkingLot.getLevel(i);\n System.out.println(\"Available spots for Level - \" + i + \": \" + level.getAvailableSpots());\n }\n\n System.out.println(\"\\n----------------------< UNPARKING >----------------------\\n\");\n\n // Unpark some vehicles\n for (int i = 1; i <= 100; i++) {\n Vehicle motorCycle = motorcycles.get(i - 1);\n parkingLot.unparkVehicle(motorCycle);\n Vehicle car = cars.get(i - 1);\n parkingLot.unparkVehicle(car);\n Vehicle bus = buses.get(i - 1);\n parkingLot.unparkVehicle(bus);\n }\n\n parkingLot.print();\n // Get data for all the levels\n for (int i = 0; i < numberOfLevels; i++) {\n Level level = parkingLot.getLevel(i);\n System.out.println(\"Available spots for Level - \" + i + \": \" + level.getAvailableSpots());\n }\n }", "public int chargeVehicle() {\n\t\t\n\t\tint price = 0; \n\t\t\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\t\n\t\t\tif(vehicles.get(i) instanceof Car) { // charge 10 GBP per car \n\t\t\t\tprice += 10;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Motorcycle) { // charge 5 GBP per motorcycle \n\t\t\t\tprice += 5;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Bus) { // charge 25 GBP per bus \n\t\t\t\tprice += 25; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn price; \n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public void populate(Game game) {\n player = new Strider(this,game);\n player.setPosition(startPosition());\n addStepListener(new GameStepListener(player,game)); // Listerner for every frame for smooth movement\n player.addCollisionListener(new StriderTouchGround(player)); // when Ninja touches static body\n\n Portal door = new Portal(this);\n door.setPosition(doorPosition());\n door.addCollisionListener(new PortalListener(game));\n }", "private void carregarAgendamentos() {\n agendamentos.clear();\n\n // Carregar os agendamentos do banco de dados\n agendamentos = new AgendamentoDAO(this).select();\n\n // Atualizar a lista\n setupRecyclerView();\n }" ]
[ "0.7476374", "0.6518172", "0.6446171", "0.64333254", "0.64046717", "0.6400899", "0.63259417", "0.59983855", "0.5909069", "0.5894866", "0.5874578", "0.58727676", "0.58689964", "0.5866083", "0.5838136", "0.58081657", "0.5781944", "0.5745372", "0.5690393", "0.568627", "0.568627", "0.56856066", "0.5667285", "0.5662449", "0.56584793", "0.5642026", "0.56350607", "0.56177396", "0.5616906", "0.5586148", "0.5585022", "0.5582372", "0.557745", "0.55760235", "0.5557404", "0.5554639", "0.5554432", "0.5549605", "0.5512034", "0.55046254", "0.5498528", "0.5487077", "0.5482166", "0.54797757", "0.5475849", "0.5450508", "0.5446663", "0.54412544", "0.54133314", "0.53706634", "0.53625214", "0.5360597", "0.5354625", "0.5353608", "0.5328387", "0.53223914", "0.5318578", "0.5312038", "0.5306716", "0.5297873", "0.5289164", "0.52881837", "0.5287347", "0.5285897", "0.52848434", "0.52754366", "0.52750856", "0.5265293", "0.5264221", "0.5263137", "0.5260527", "0.525473", "0.5246225", "0.5241753", "0.5235728", "0.5223118", "0.5214513", "0.52143246", "0.5204105", "0.5202543", "0.5196355", "0.5195433", "0.5193963", "0.51939255", "0.51928085", "0.5191128", "0.51844954", "0.5183399", "0.5180475", "0.51791006", "0.51779425", "0.5173859", "0.51663214", "0.5165532", "0.5164171", "0.5163156", "0.5163135", "0.51556945", "0.5153758", "0.515114" ]
0.813857
0
Calculate bill for each type of vehicle
public int chargeVehicle() { int price = 0; for (int i = 0; i < vehicles.size(); i++) { if(vehicles.get(i) instanceof Car) { // charge 10 GBP per car price += 10; } else if(vehicles.get(i) instanceof Motorcycle) { // charge 5 GBP per motorcycle price += 5; } else if(vehicles.get(i) instanceof Bus) { // charge 25 GBP per bus price += 25; } } return price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int calculateBill() {\n\t\treturn chargeVehicle(); \n\t}", "private void calculateBill() {\n\t\tif (unit <= 100) {\r\n\t\t\tbill = unit * 5;\r\n\t\t}else if(unit<=200){\r\n\t\t\tbill=((unit-100)*7+500);\r\n\t\t}else if(unit<=300){\r\n\t\t\tbill=((unit-200)*10+1200);\r\n\t\t}else if(unit>300){\r\n\t\t\tbill=((unit-300)*15+2200);\r\n\t\t}\r\n\t\tSystem.out.println(\"EB amount is :\"+bill);\r\n\t}", "public void generateBill(){\n System.out.println(\" Supermercado la 33 \");\n System.out.println(getName());\n System.out.println(getId());\n System.out.println(LocalDate.now() + \" -- \" +LocalTime.now());\n //System.out.println(\"Cantidad Denominacion nombre precio \");\n for (int i=0; i<bill.getProducts().size(); i++){\n Product temporal = bill.getProducts().get(i);\n System.out.println(temporal.getAvailableQuantity().getAmount() + \" \" + temporal.getAvailableQuantity().getProductDenomination() + \" \"\n + temporal.getName() + \" \" + temporal.getAvailableQuantity().getAmount() * temporal.getPrice());\n }\n System.out.println(\"Total : \" + bill.calculateTotal());\n System.out.println(\" Gracias por su compra vuelva pronto \");\n\n }", "public float calculatePrice(Airline flight, String type, int baggage);", "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}", "public void processBills() {\r\n \r\n System.out.printf(\"%nHow many bills are there to process? \");\r\n int numBills = input.nextInt(); //local variable captures int from user.\r\n \r\n cableBills = new Invoice[numBills];\r\n billingStmts = new String[numBills];\r\n \r\n for(int i=0; i < numBills; i++) {\r\n cableBills[i] = new Invoice();\r\n cableBills[i].setCustNm(i);\r\n cableBills[i].determineCableSrv(i);\r\n cableBills[i].setMoviesPurchased(i);\r\n \r\n double total = cableBills[i].getMoviePurchased() + cableBills[i].getCableSrv(); //local variable calculates the total/\r\n double movieCharges = cableBills[i].getMoviePurchased(); //local variable calculates the movie charges.\r\n \r\n billingStmts[i] = String.format(\"%nCustomer: %S\"\r\n + \"%n%nCable Service: %20c%,10.2f\"\r\n + \"%nMovies-On-Demand-HD: %14c%,10.2f\"\r\n + \"%n%nTOTAL DUE: %24c%,10.2f%n\",\r\n cableBills[i].getCustNm(), '$',\r\n cableBills[i].getCableSrv(), ' ', movieCharges, '$', total);\r\n }\r\n }", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "public void calculateToll(Vehicles v, ArrayList<Places> p){\n for(Places p1: p){\n if(p1.getToll() && p1.getPId()>= start && p1.getPId() <= end){\n tollbooths.add(p1.getPId());\n FeeForEachTollandTrip tt = new FeeForEachTollandTrip(isVip);\n tolltrips.add(tt);\n total += tt.calculateToll(v, p1.getPId());\n }\n }\n \n //printint the output\n /*\n Toll booths : B Amount : 20 Discount : 4 Total : 16\n */\n System.out.print(\"Tollbooths were: \");\n for(int i =0; i<tollbooths.size();i++){\n System.out.print(\" \" + tollbooths.get(i));\n }\n\n\n System.out.println();\n int amount;\n if(isVip)\n amount = (int) (total/0.8);\n else \n amount = (int)total;\n System.out.println(\"Amount is \" + amount);\n double discount = 0;\n if(isVip)\n discount = 0.2 * amount;\n System.out.println(\"Discount is \" + discount);\n System.out.println(\"Total is: \" +total);\n\n //checking if vehicle has already passed the toll before\n //if yes, nothing to be done.\n //if not, add the vehicle to the toll\n for(Places p1: p){\n if(p1.getToll() && tollbooths.contains(p1.getPId())){\n for(Vehicles v1: p1.getVehicles()){\n if(v1.getVehicleId() == v.getVehicleId()){\n break;\n }\n }\n p1.vehicles.add(v);\n }\n }\n }", "private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }", "public void totalBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\t\r\n\t\tBigDecimal runningSum = new BigDecimal(\"0\");\r\n\t\tBigDecimal runningTaxSum = new BigDecimal(\"0\");\r\n\t\t\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\t\r\n\t\t\trunningTaxSum = BigDecimal.valueOf(0);\r\n\t\t\t\r\n\t\t\tBigDecimal totalBeforeTax = new BigDecimal(String.valueOf(this.ItemsList.get(i).getPrice()));\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(totalBeforeTax);\r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isSalesTaxable()){\r\n\t\t\t\r\n\t\t\t BigDecimal salesTaxPercent = new BigDecimal(\".10\");\r\n\t\t\t BigDecimal salesTax = salesTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t salesTax = round(salesTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(salesTax);\r\n\t\t\t \r\n \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isImportedTaxable()){\r\n\r\n\t\t\t BigDecimal importTaxPercent = new BigDecimal(\".05\");\r\n\t\t\t BigDecimal importTax = importTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t importTax = round(importTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(importTax);\r\n\t\t\t \r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tItemsList.get(i).setPrice(runningTaxSum.floatValue() + ItemsList.get(i).getPrice());\r\n\t\t\r\n\t\t\ttaxTotal += runningTaxSum.doubleValue();\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(runningTaxSum);\r\n\t\t}\r\n\t\t\ttaxTotal = roundTwoDecimals(taxTotal);\r\n\t\t\ttotal = runningSum.doubleValue();\r\n\t}", "CarPaymentMethod processHotDollars();", "public void fixAllVehiclesInGarage() {\n\n\t\tSystem.out.println(\"--- Fix All Vehicles In Garage ---\");\n\n\t\tdouble carBill = 0;\n\t\tdouble bikeBill = 0;\n\t\tdouble scootBill = 0;\n\n\t\tfor (Vehicle vehicle : vehicleList) {\n\n\t\t\tif (vehicle.getClass().getName() == \"garage.Car\") {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Fixing Car.....Looks like you need some new break pads in addition to the oil change\");\n\t\t\t\tcarBill += 100;\n\t\t\t\tSystem.out.println(vehicle.getMake() + \" has been fixed, this will cost you £100.00\");\n\t\t\t\tSystem.out.println(\"Bill so far: \" + carBill);\n\n\t\t\t} else if (vehicle.getClass().getName() == \"garage.Bike\") {\n\t\t\t\tSystem.out.println(\"Fixing Bike.....\");\n\t\t\t\tbikeBill += 50;\n\t\t\t\tSystem.out.println(vehicle.getMake() + \" has been fixed, this will cost you £50.00\");\n\t\t\t\tSystem.out.println(\"Bill so far: \" + bikeBill);\n\n\t\t\t} else if (vehicle.getClass().getName() == \"garage.ElectricScooter\") {\n\t\t\t\tSystem.out.println(\"Fixing Scooter.....\");\n\t\t\t\tscootBill += 25;\n\t\t\t\tSystem.out.println(vehicle.getMake() + \" has been fixed, this will cost you £25.00\");\n\t\t\t\tSystem.out.println(\"Bill so far: \" + scootBill);\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"------BILL------\");\n\t\tSystem.out.println(\"Car - Total Bill: \" + \"£\" + carBill);\n\t\tSystem.out.println(\"Bike - Total Bill: \" + \"£\" + bikeBill);\n\t\tSystem.out.println(\"Electric Scooter - Total Bill: \" + \"£\" + scootBill);\n\t\tSystem.out.println(\"\");\n\n\t\tSystem.out.println(\"---BILL PAID ---\");\n\t\tcarBill = 0;\n\t\tbikeBill = 0;\n\t\tscootBill = 0;\n\n\t\tSystem.out.println(\"Removing vehicles from garage!...\");\n\t\tremoveAllVehiclesFromGarage();\n\n\t}", "double calculatePrice(VehicleType vehicleType, Date entryTime, Date exitTime);", "public void payments(RoomList rooms, Guest guest, int type) {\t//looks for room bill by room number\t\t\t\t\t\t\n\t\tSystem.out.println(\"Please enter the room number of the Guest wishing to pay their bill?\\nROOM NO:\");\n\t\tint roomNum = keyboard.nextInt();\t\t\t\t\t\t\t//user enters room number\n\t\t\n\t\troom = rooms.getRoomByRoomNumber(roomNum, rooms);\t\t\t//call the getRoomByRoomNumber method and return the room\n\t\tdouble roomPrice = room.Price(guest, room, roomNum);\t\t//rooms bill is called using the room.Price method\n\t\t\n\t\tif(type == 2) {\t\t\t\t\t\t\t\t\t\t\t\t//if int 'type' is set to 2 when the method is called it brings\n\t\t\tmakePayment(roomPrice, room, 0);\t\t\t\t\t\t//the user to pay the bill now with the make payment method\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if int is not 2 the this method is over and the user only sees\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//the bill for the room and is returned to the main menu\t\n\t}", "public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}", "public void calculateBonuses(){\n\n\n }", "public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }", "@Override\n public double sendCostCalculated(String length, String vehicleType) {\n\n double numOfKm = Double.parseDouble(length);\n double totalCost = 50.0;\n\n if ((numOfKm - 1) < 1) {\n return totalCost;\n }\n\n double nextLength = numOfKm - 1;\n\n switch (vehicleType) {\n case \"budget\":\n totalCost += nextLength * 35;\n break;\n case \"hybrid\":\n totalCost += nextLength * 55;\n break;\n default:\n totalCost += nextLength * 45;\n }\n\n return totalCost;\n }", "private void PayBill() {\r\n Cursor crsrBillDetail = dbBillScreen.getBillDetailByCustomer(iCustId, 2, Float.parseFloat(tvBillAmount.getText().toString()));\r\n if (crsrBillDetail.moveToFirst()) {\r\n strPaymentStatus = \"Paid\";\r\n PrintNewBill(businessDate, 1);\r\n } else {\r\n if (strPaymentStatus== null || strPaymentStatus.equals(\"\"))\r\n strPaymentStatus = \"CashOnDelivery\";\r\n\r\n\r\n ArrayList<AddedItemsToOrderTableClass> orderItemList = new ArrayList<>();\r\n int taxType =0;\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n int menuCode =0;\r\n String itemName= \"\";\r\n double quantity=0.00;\r\n double rate=0.00;\r\n double igstRate=0.00;\r\n double igstAmt=0.00;\r\n double cgstRate=0.00;\r\n double cgstAmt=0.00;\r\n double sgstRate=0.00;\r\n double sgstAmt=0.00;\r\n double cessRate=0.00;\r\n double cessAmt=0.00;\r\n double subtotal=0.00;\r\n double billamount=0.00;\r\n double discountamount=0.00;\r\n\r\n TableRow RowBillItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n\r\n // Item Number\r\n if (RowBillItem.getChildAt(0) != null) {\r\n CheckBox ItemNumber = (CheckBox) RowBillItem.getChildAt(0);\r\n menuCode = (Integer.parseInt(ItemNumber.getText().toString()));\r\n }\r\n\r\n // Item Name\r\n if (RowBillItem.getChildAt(1) != null) {\r\n TextView ItemName = (TextView) RowBillItem.getChildAt(1);\r\n itemName = (ItemName.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Quantity\r\n if (RowBillItem.getChildAt(3) != null) {\r\n EditText Quantity = (EditText) RowBillItem.getChildAt(3);\r\n String qty_str = Quantity.getText().toString();\r\n double qty_d = 0.00;\r\n if(qty_str==null || qty_str.equals(\"\"))\r\n {\r\n Quantity.setText(\"0.00\");\r\n }else\r\n {\r\n qty_d = Double.parseDouble(qty_str);\r\n }\r\n quantity = (Double.parseDouble(String.format(\"%.2f\",qty_d)));\r\n\r\n }\r\n\r\n // Rate\r\n if (RowBillItem.getChildAt(4) != null) {\r\n EditText Rate = (EditText) RowBillItem.getChildAt(4);\r\n String rate_str = Rate.getText().toString();\r\n double rate_d = 0.00;\r\n if((rate_str==null || rate_str.equals(\"\")))\r\n {\r\n Rate.setText(\"0.00\");\r\n }else\r\n {\r\n rate_d = Double.parseDouble(rate_str);\r\n }\r\n rate = (Double.parseDouble(String.format(\"%.2f\",rate_d)));\r\n\r\n }\r\n\r\n\r\n // Service Tax Percent\r\n\r\n if(chk_interstate.isChecked()) // IGST\r\n {\r\n cgstRate =0;\r\n cgstAmt =0;\r\n sgstRate =0;\r\n sgstAmt =0;\r\n if (RowBillItem.getChildAt(23) != null) {\r\n TextView iRate = (TextView) RowBillItem.getChildAt(23);\r\n igstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iRate.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(24) != null) {\r\n TextView iAmt = (TextView) RowBillItem.getChildAt(24);\r\n igstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iAmt.getText().toString())));\r\n }\r\n\r\n\r\n }else // CGST+SGST\r\n {\r\n igstRate =0;\r\n igstAmt =0;\r\n if (RowBillItem.getChildAt(15) != null) {\r\n TextView ServiceTaxPercent = (TextView) RowBillItem.getChildAt(15);\r\n sgstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxPercent.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(16) != null) {\r\n TextView ServiceTaxAmount = (TextView) RowBillItem.getChildAt(16);\r\n sgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxAmount.getText().toString())));\r\n }\r\n\r\n // Sales Tax %\r\n if (RowBillItem.getChildAt(6) != null) {\r\n TextView SalesTaxPercent = (TextView) RowBillItem.getChildAt(6);\r\n cgstRate = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxPercent.getText().toString())));\r\n }\r\n // Sales Tax Amount\r\n if (RowBillItem.getChildAt(7) != null) {\r\n TextView SalesTaxAmount = (TextView) RowBillItem.getChildAt(7);\r\n cgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxAmount.getText().toString())));\r\n }\r\n }\r\n if (RowBillItem.getChildAt(25) != null) {\r\n TextView cessRt = (TextView)RowBillItem.getChildAt(25);\r\n if(!cessRt.getText().toString().equals(\"\"))\r\n cessRate = Double.parseDouble(cessRt.getText().toString());\r\n }\r\n if (RowBillItem.getChildAt(26) != null) {\r\n TextView cessAt = (TextView)RowBillItem.getChildAt(26);\r\n if(!cessAt.getText().toString().equals(\"\"))\r\n cessAmt = Double.parseDouble(cessAt.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Tax Type\r\n if (RowBillItem.getChildAt(13) != null) {\r\n TextView TaxType = (TextView) RowBillItem.getChildAt(13);\r\n taxType = (Integer.parseInt(TaxType.getText().toString()));\r\n }\r\n // subtotal\r\n subtotal = (rate*quantity) + igstAmt+cgstAmt+sgstAmt;\r\n\r\n AddedItemsToOrderTableClass orderItem = new AddedItemsToOrderTableClass( menuCode, itemName, quantity, rate,\r\n igstRate,igstAmt, cgstRate, cgstAmt, sgstRate,sgstAmt, rate*quantity,subtotal, billamount,cessRate,cessAmt,discountamount);\r\n orderItemList.add(orderItem);\r\n }\r\n\r\n Bundle bundle = new Bundle();\r\n bundle.putDouble(Constants.TOTALBILLAMOUNT, Double.parseDouble(tvBillAmount.getText().toString()));\r\n bundle.putDouble(Constants.TAXABLEVALUE, Double.parseDouble(tvSubTotal.getText().toString()));\r\n\r\n// bundle.putDouble(Constants.ROUNDOFFAMOUNT, Double.parseDouble(edtRoundOff.getText().toString()));\r\n if (tvOthercharges.getText().toString().isEmpty()) {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n } else {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n }\r\n bundle.putDouble(Constants.DISCOUNTAMOUNT, Double.parseDouble(tvDiscountAmount.getText().toString()));\r\n bundle.putInt(Constants.TAXTYPE, isForwardTaxEnabled);\r\n //bundle.putInt(CUSTID, Integer.parseInt(tvCustId.getText().toString()));\r\n bundle.putString(Constants.PHONENO, edtCustPhoneNo.getText().toString());\r\n bundle.putParcelableArrayList(Constants.ORDERLIST, orderItemList);\r\n if (chk_interstate.isChecked()) {\r\n double igstAmount = Double.parseDouble(tvIGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, igstAmount + cessAmount);\r\n } else {\r\n double sgstAmount = Double.parseDouble(tvSGSTValue.getText().toString());\r\n double cgstAmount = Double.parseDouble(tvCGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, cgstAmount + sgstAmount + cessAmount);\r\n }\r\n\r\n fm = getSupportFragmentManager();\r\n proceedToPayBillingFragment = new PayBillFragment();\r\n proceedToPayBillingFragment.initProceedToPayListener(this);\r\n proceedToPayBillingFragment.setArguments(bundle);\r\n proceedToPayBillingFragment.show(fm, \"Proceed To Pay\");\r\n\r\n /* Intent intentTender = new Intent(myContext, PayBillActivity.class);\r\n intentTender.putExtra(\"TotalAmount\", tvBillAmount.getText().toString());\r\n intentTender.putExtra(\"CustId\", edtCustId.getText().toString());\r\n intentTender.putExtra(\"phone\", edtCustPhoneNo.getText().toString());\r\n intentTender.putExtra(\"USER_NAME\", strUserName);\r\n intentTender.putExtra(\"BaseValue\", Float.parseFloat(tvSubTotal.getText().toString()));\r\n intentTender.putExtra(\"ORDER_DELIVERED\", strOrderDelivered);\r\n intentTender.putExtra(\"OtherCharges\", Double.parseDouble(tvOthercharges.getText().toString()));\r\n intentTender.putExtra(\"TaxType\", taxType);// forward/reverse\r\n intentTender.putParcelableArrayListExtra(\"OrderList\", orderItemList);\r\n startActivityForResult(intentTender, 1);*/\r\n //mSaveBillData(2, true);\r\n //PrintNewBill();\r\n }\r\n\r\n /*int iResult = dbBillScreen.deleteKOTItems(iCustId, String.valueOf(jBillingMode));\r\n Log.d(\"Delivery:\", \"Items deleted from pending KOT:\" + iResult);*/\r\n\r\n //ClearAll();\r\n //Close(null);\r\n }", "public static void main(String[] args) {\n\r\n\t\tCustomer customer0 = new Customer(2007, \"35621485268\", \"José Felipe Martins\", true, 590.9);\r\n\t\tCustomer customer1 = new Customer(1950, \"47821485297\", \"Maria Alice Barros\", true, 700);\r\n\t\tCustomer customer2 = new Customer(850, \"25521485858\", \"Carlos Eduardo\", true, 750);\r\n\t\tCustomer customer3 = new Customer(2150, \"32412587548\", \"Gev Alisson\", true, 400);\r\n\t\t\r\n\t\t//2 ­ Criar um programa que percorra uma lista de objetos do tipo \r\n\t\t//criado acima e calcule a média do campo ​vl_total​ apenas para os \r\n\t\t//itens que este valor seja maior que 560 e o capo id_customer​ \r\n\t\t//esteja entre 1500 e 2700.\r\n\t\t\r\n\t\tList<Customer> lista = new ArrayList<Customer>();\r\n\t\tlista.add(customer0);\r\n\t\tlista.add(customer1);\r\n\t\tlista.add(customer2);\r\n\t\tlista.add(customer3);\r\n\t\t\r\n\t\tCustomerControl control = new CustomerControl();\r\n\t\tdouble media = control.CalcMedia(lista);\r\n\r\n\t\t//3 ­ Exibir a média final.\r\n\t\tSystem.out.println(\"a media é: \"+ media);\r\n\t\t\r\n\t\t//4 ­ Imprima cada um dos obejtos selecionados para o cálculo da média. \r\n\t\tSystem.out.println(\"objetos selecionados para media\\n\");\r\n\t\tfor(Customer c : control.selecionarParaMedia(lista)){\r\n\t\t\tSystem.out.println(c.toString());\r\n\t\t}\r\n\t\t//5 - 5 ­ Ordene pelo campo vlTotal os objetos selecionados para o cálculo da média. \r\n\t\tList<Customer> listaOrdenada = control.Ordenar(control.selecionarParaMedia(lista));\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\n resultado da lista ordenada\");\r\n\t\tfor(Customer c : listaOrdenada){\r\n\t\t\tSystem.out.println(c.toString());\r\n\t\t}\r\n\r\n\t}", "public Bill(String type, int people, double amount, ArrayList<String> nameList) {\n this.type = type;\n this.people = people;\n this.amount = amount;\n this.nameList = nameList;\n }", "List<Bill> findBillsForReservation(long reservationId);", "@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }", "private double calculateCommissionAmountVehicles(PrintItinerary itinerary) {\n\t\tdouble commissionAmount = 0.0;\n\t\tif (itinerary.getVehicles() != null\n\t\t\t\t&& itinerary.getVehicles().size() > 0) {\n\t\t\tfor (Vehicle vehicle : itinerary.getVehicles()) {\n\t\t\t\tcommissionAmount = commissionAmount\n\t\t\t\t\t\t+ vehicle.getPrice().getCommissionAmount();\n\t\t\t}\n\t\t}\n\n\t\treturn commissionAmount;\n\t}", "public String getBillType() {\n return billType;\n }", "public abstract void msgComputeBill(String choice, Customer c, Waiter w, int tableNumber, Map<String, Double> menu);", "public _179._6._235._119.cebwebservice.Bill billing_CalculateDetailMonthlyBill(java.lang.String accessToken, int tariff, int kwh) throws java.rmi.RemoteException;", "private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }", "public Bill getBill() {\n return bill;\n }", "public void calculate(View v) {\n EditText inputBill = findViewById(R.id.inputBill);\n EditText inputTipPercent = findViewById(R.id.inputTipPercent);\n String num1Str = inputBill.getText().toString();\n String num2Str = inputTipPercent.getText().toString();\n\n // multiply Bill by Tip to get Tip in dollars\n double num1 = Double.parseDouble(num1Str);\n double num2 = Double.parseDouble(num2Str);\n double tipInDollar = num1 * (num2 / 100);\n double total = num1 + tipInDollar;\n\n // show tip in dollars\n TextView lblTipAmount = findViewById(R.id.lblTipAmount);\n lblTipAmount.setText(String.valueOf(tipInDollar));\n\n // show total price with tip included\n TextView lblTotalAmount = findViewById(R.id.lblTotalAmount);\n lblTotalAmount.setText(String.valueOf(total));\n }", "@Override\n\tpublic ArrayList<InBillsPO> getBill(String division) {\n\t\t\n\t\treturn null;\n\t}", "abstract public double getBegBal(int yr);", "private HashMap<Integer, Integer> obtainBills(double amount)\n {\n HashMap<Integer, Integer> bills = new HashMap<>();\n bills.put(5, 0);\n bills.put(10, 0);\n bills.put(20, 0);\n bills.put(50, 0);\n return obtainBills(amount, bills);\n }", "public void bsetCostElements() {\n\t\t\t\n\t\t\t\n\t\tfor (int obj = 0; obj < finalLocation.length; obj++) {\n\t\t for (int time = 0; time < finalLocation[obj].length; time++) {\n\t\t\t\n\t\t bfCost[obj][time].bstorageCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bstorageCost;\n\t\t\t bfCost[obj][time].breadCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].breadCost;\n\t\t\t bfCost[obj][time].bwriteCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bwriteCost;\n\t\t\t bfCost[obj][time].btranCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].btranCost;\n\t\t\t \n\t\t\t //1. we calculate latency cost for two cases separately: when the object is in the hot tier or cool tier.\n\t\t\t if (finalLocation[obj][time]==0){//Object is in the cool tier\n\t\t\t\t bfCost[obj][time].bdelayCost=totalCostCalculation.btotalResidentCost[time][obj][0].bdelayCost;\n\t\t\t\t \n\t\t\t }else{// object is in both tiers and, in consequence, the latency cost of writes is the maximum latency of writing in both tiers, and the read latency is the one in hot tier.\n\t\t\t\t bfCost[obj][time].bedelCost=fc.bdelayMaxWriteReadCost(workloadGenerator.objectListRegion[obj], 1, obj, time);\n\t\t\t }\n\t\t\t \n\t\t /* 2. Here we calculate storage cost and transaction cost to make consistent data. This requires just write transaction. Since in our cost \n calculation make a computation for both read and writes.\n\t\t */\n\t\t \n\t\t if(finalLocation[obj][time]==1){//NOTE: in above cost storage, we calculate the cost of object in either in hot or cold tier. \n\t\t \t //So here we calculate the storage cost in cold tier when the object is in hot tier.\n\t\t \t bfCost[obj][time].bstorageCost=bfCost[obj][time].bstorageCost.add(totalCostCalculation.btotalResidentCost[time][obj][0].bstorageCost);\n\t\t bfCost[obj][time].bconsisCost=totalCostCalculation.btotalResidentCost[time][obj][0].bconsisCost;\n\t\t }\n\t\t\t bfCost[obj][time].bnonMigrationCost=bfCost[obj][time].bstorageCost.add(bfCost[obj][time].breadCost).add( bfCost[obj][time].bwriteCost).\n\t\t\t\t\t add(bfCost[obj][time].btranCost).add( bfCost[obj][time].bconsisCost).\n\t\t\t\t\t add(bfCost[obj][time].bdelayCost);\n\t\t\t\t\t //totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bnonMigrationCost.add(bfCost[obj][time].bconsisCost);\n\t\t\t \n\t\t\t //3. We need to calculate just transfer cost between cold to hot tier. From hot to cold tier does not make sense because we have a copy of data in cold tier.\n\t\t if(breakPoint==1){//If breakPoint is ONE then for serving every user, the object for each time slot is transfered from Cold to Hot tier.\n\t\t \t \n\t\t }\n\t\t else if(time>0 && finalLocation[obj][time-1]==0 && finalLocation[obj][time]==1){\n\t\t\t bfCost[obj][time].bmigrationCost=totalCostCalculation.btotalMigrationCost[time][obj][finalLocation[obj][time-1]][finalLocation[obj][time]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public abstract double pay(BikesType type, double rideDuration);", "private void mSaveBillData(int TenderType) { // TenderType:\r\n // 1=PayCash\r\n // 2=PayBill\r\n\r\n // Insert all bill items to database\r\n InsertBillItems();\r\n\r\n // Insert bill details to database\r\n InsertBillDetail(TenderType);\r\n\r\n updateMeteringData();\r\n\r\n /*if (isPrintBill) {\r\n // Print bill\r\n PrintBill();\r\n }*/\r\n }", "private HashMap<Integer, Integer> obtainBills(double amount, HashMap<Integer, Integer> bills)\n {\n if (amount == 0)\n return bills;\n HashMap<Integer, Integer> b;\n HashMap<Integer, Integer> k;\n if (amount >= 50 && typeOfCash.get(50) - bills.get(50) > 0)\n {\n k = new HashMap<>(bills);\n k.put(50, bills.get(50) + 1);\n b = obtainBills(amount - 50, k);\n if (b != null)\n return b;\n }\n if (amount >= 20 && typeOfCash.get(20) - bills.get(20) > 0)\n {\n k = new HashMap<>(bills);\n k.put(20, bills.get(20) + 1);\n b = obtainBills(amount - 20, k);\n if (b != null)\n return b;\n }\n if (amount >= 10 && typeOfCash.get(10) - bills.get(10) > 0)\n {\n k = new HashMap<>(bills);\n k.put(10, bills.get(10) + 1);\n b = obtainBills(amount - 10, k);\n if (b != null)\n return b;\n }\n if (amount >= 5 && typeOfCash.get(5) - bills.get(5) > 0)\n {\n k = new HashMap<>(bills);\n k.put(5, bills.get(5) + 1);\n b = obtainBills(amount - 5, k);\n if (b != null)\n return b;\n }\n return null;\n }", "public static Object[] getVehicleData(){\n String make, model;\n double price, fuelConsumption;\n int power, year;\n FuelType fuelType;\n\n System.out.println(\"\\n1. Car\\n2. Truck\");\n int res = ConsoleReader.getInt();\n System.out.print(\"\\nEnter make :\");\n ConsoleReader.getString();\n make = ConsoleReader.getString();\n System.out.print(\"Enter model :\");\n model = ConsoleReader.getString();\n System.out.print(\"Enter price($) :\");\n price = Double.parseDouble(ConsoleReader.getString());\n System.out.print(\"Enter fuelConsumption(l) :\");\n fuelConsumption = Double.parseDouble(ConsoleReader.getString());\n System.out.print(\"Enter power(kW) :\");\n power = ConsoleReader.getInt();\n System.out.print(\"Enter year :\");\n year = ConsoleReader.getInt();\n System.out.print(\"Enter fuelType :\\n\");\n\n FuelType[] fuelTypes = FuelType.values();\n for(int i = 0; i < fuelTypes.length; i++){\n System.out.print(\" \" + i + \". \" + fuelTypes[i].toString() + \"\\n\");\n }\n fuelType = FuelType.valueOf((fuelTypes[ConsoleReader.getInt()]).toString());\n\n if (res == 1){\n int seatCount, doorCount;\n BodyType bodyType;\n\n System.out.print(\"Enter seatCount :\");\n seatCount = ConsoleReader.getInt();\n System.out.print(\"Enter doorCount :\\n\");\n doorCount = ConsoleReader.getInt();\n\n BodyType[] bodyTypes = BodyType.values();\n for(int i = 0; i < bodyTypes.length; i++){\n System.out.print(\" \" + i + \". \" + bodyTypes[i].toString() + \"\\n\");\n }\n bodyType = BodyType.valueOf((bodyTypes[ConsoleReader.getInt()]).toString());\n\n return new Object[] {res, make, model, price, fuelConsumption,\n power, year, fuelType, seatCount, doorCount, bodyType};\n }else {\n int capacity;\n TruckCategory truckCategory;\n\n System.out.print(\"Enter capacity :\");\n capacity = ConsoleReader.getInt();\n\n TruckCategory[] truckCategories = TruckCategory.values();\n for (int i = 0; i < truckCategories.length; i++) {\n System.out.print(\" \" + i + \". \" + truckCategories[i].toString() + \"\\n\");\n }\n truckCategory = TruckCategory.valueOf((truckCategories[ConsoleReader.getInt()]).toString());\n\n return new Object[]{res, make, model, price, fuelConsumption,\n power, year, fuelType, capacity, truckCategory};\n }\n }", "public float getRequiredBracingTable13_1(double actualDiameter, TypeOfBracing typeOfBracing) throws MyApplicationException, SQLException{\n\n\n\t\t//creating the resources\n\n\t\tPreparedStatement preparedStatment = null;\n\n\t\tConnection connection = null;\n\n\t\t//for extracting\n\t\tResultSet resultSet = null;\n\n\t\ttry{\n\n\t\t\tconnection = JdbcUtils.getConnection();\n\t\t\tString sqlQuery;\n\n\t\t\tsqlQuery = \"SELECT * FROM TABLE13_1 WHERE MINDIAMETER<=? AND MAXDIAMETER>=? \";\n\n\t\t\tpreparedStatment = connection.prepareStatement(sqlQuery);\n\n\t\t\tpreparedStatment.setDouble(1,actualDiameter);\n\t\t\tpreparedStatment.setDouble(2, actualDiameter);\n\n\t\t\tresultSet = preparedStatment.executeQuery();\n\n\t\t\t//check if i get values from DB , if not =false --> null, if yes has value and cursor move forward\n\t\t\tif (resultSet.next()==false){\n\t\t\t\treturn 0;\t\t\t\n\t\t\t}\n\t\t\tif (typeOfBracing.equals(TypeOfBracing.CHANNEL)){\n\t\t\t\treturn resultSet.getFloat(\"CHANNELS SECTION MODULUS(INCH^3)\");\n\t\t\t}else{\t\t\t\n\t\t\t\treturn resultSet.getFloat(\"I-BEAMS SECTION MODULUS(INCH^3)\");\n\t\t\t}\n\n\t\t}catch (Exception e){\n\t\t\tthrow new MyApplicationException(e, ErrorType.GENERAL_ERROR,\"COULD NOT RETRIEVE BRACING FOR TANK ACTUAL CALCULATED CAPACITY: \\\"\" + actualDiameter +\"\\\"[liter]\");\n\t\t}\n\n\t\tfinally{\n\n\t\t\tJdbcUtils.closeResources(connection, preparedStatment, resultSet);\n\t\t}\n\n\n\t}", "public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);", "public static double computeAccidentCosts(double demand, Link link, ArrayList<Integer> roadType){\n\n\t\t// in EUR per 1000 vehicle-km\n\t\tdouble costRateTable[][][] = {\n\t\t\t\t\n\t\t\t/*\tposition 1\n\t\t\t * \t\tcolumn 0: 'Außerhalb von bebauten Gebiet, Kfz-Straße'\n\t\t\t * \t\tcolumn 1: 'Innerhalb von bebauten Gebiet, Kfz-Straße'\n\t\t\t * \t\tcolumn 2: 'Außerhalb von bebauten Gebiet'\n\t\t\t * \t\tcolumn 3: 'Innerhalb von bebauten Gebiet'\n\t\t\t * \n\t\t\t * \tposition 2: number of lanes\n\t\t\t */\n\t\t\t\n\t\t\t// 'planfrei': positon 0 --> 0\n\t\t\t{\n\t\t\t\t{ 0 , 0 , 0 , 0 }, // 1 lane\n\t\t\t\t{ 23.165 , 23.165 , 0 , 0 }, // 2 lane\n\t\t\t\t{ 23.79 , 23.79 , 0 , 0 }, // 3 lane\n\t\t\t\t{ 23.79 , 23.79 , 0 , 0 } // 4 lane\n\t\t\t},\n\t\t\t// 'plangleich': positon 0 --> 1\n\t\t\t{\n\t\t\t\t{ 61.785 , 101.2 , 61.785 , 101.2 }, // 1 lane\n\t\t\t\t{ 31.63 , 101.53 , 31.63 , 101.53 }, // 2 lane\n\t\t\t\t{ 37.84 , 82.62 , 34.735 , 101.53 }, // 3 lane\n\t\t\t\t{ 0 , 0 , 0 , 101.53 } // 4 lane\n\t\t\t},\n\t\t\t// tunnel: positon 0 --> 2\n\t\t\t{\n\t\t\t\t{ 9.56 , 15.09 , 9.56 , 15.09 }, // 1 lane\n\t\t\t\t{ 11.735 , 14.67425 , 0 , 17.57 }, // 2 lane\n\t\t\t\t{ 11.735 , 11.735 , 0 , 17.57 }, // 3 lane\n\t\t\t\t{ 9.11 , 9.11 , 0 , 17.57 } // 4 lane\n\t\t\t}\t\t\n\t\t};\n\t\t\n\t\tdouble costRate = costRateTable[roadType.get(0)][roadType.get(2)-1][roadType.get(1)]; \n\t\tif (costRate == 0) {\n\t\t\tlog.warn(\"Accident cost rate for link \" + link.getId().toString() + \" is 0. (roadtype: \" + roadType.toString() + \")\" );\n\t\t}\n\t\t\n\t\tdouble vehicleKm = demand * (link.getLength() / 1000.);\n\t\t\n\t\tdouble accidentCosts = costRate * (vehicleKm / 1000.);\n\t\t\n\t\treturn accidentCosts;\t\t\n\t}", "public static void main(String[] args) {\n Vehicle vehicle = new Vehicle(4,\"Black\",12343443,true);\n Object vehicle2 = new Vehicle(4,\"White\",32343443,false);\n //Create RegisteredVehicle Object\n RegisteredVehicle registeredVehicle =\n new RegisteredVehicle(4,\"Red\",134345454,true,\n \"AN123\", LocalDate.of(2020,5,2), LocalDate.of(2021, 5, 2));\n Vehicle registredVihicle2 = new RegisteredVehicle(4,\"Blue\",23322434,true,\n \"ABC222\", LocalDate.of(2020,4,22), LocalDate.of(2021, 4, 22));\n //Create Bike Object\n Bike bike =\n new Bike(2,\"black\",1213223,\n \"AC2323\",LocalDate.of(2020,4,22),\n LocalDate.of(2021, 4, 22),\n \"Sport\", \"Yamaha\",1000);\n RegisteredVehicle bike2 = new Bike(2,\"blue\",1213223,\n \"Abb2323\",LocalDate.of(2020,4,22),\n LocalDate.of(2021, 4, 22),\n \"Sport\", \"BMW\",1000);\n Vehicle bike3 = new Bike(2,\"Yellow\",33434,\n \"jjj222\",LocalDate.of(2020,4,22),\n LocalDate.of(2021, 4, 22),\n \"Sport\", \"Honda\",1000);\n\n System.out.println(\"price for vehicle object \" + VehicleShop.estimatePrice(vehicle));\n //vehicle2 is stored in Object class, which is larger than Vehicle class, so it Vehicle param cannot take it.\n //we can use casting in order to narrow down the variable data type\n System.out.println(vehicle2);//doesnt have access to any Vehicle members\n System.out.println(\"price for vehicle object \" + VehicleShop.estimatePrice((Vehicle)vehicle2));//we are changing\n //the data type of vehicle2 to Vehicle from Object\n System.out.println(((Vehicle) vehicle2).getNumOfWheels());\n System.out.println(VehicleShop.estimatePrice(registeredVehicle));\n //polymorphism\n Vehicle vehicle1 = VehicleShop.createAnObject(\"vehicle\");\n Bike bike1 = (Bike)VehicleShop.createAnObject(\"bike\");//cast\n bike1.setBrand(\"Yamaha\");\n System.out.println(bike1.getBrand());\n// Bike bike4 = (Bike)VehicleShop.createAnObject(\"registeredvehicle\");//ClassCast Exception.\n// //which we get when the actual object that's stored in the Parent Class data type is not\n// //covariant to the object we try casting to.\n// bike4.setBrand(\"Honda\");\n// System.out.println(bike4.getBrand());\n Vehicle vehicle3 = new Vehicle();//has info only about vehicle\n Vehicle v = new RegisteredVehicle();//has info about vehicle\n //by casting we can also get info about RegisteredVehicle.\n //RegisteredVehicle rg = (RegisteredVehicle)vehicle3;//class cast exception\n RegisteredVehicle rg = (RegisteredVehicle)v; //which object v is pointing to?\n //the object v is pointing to should be same or narrower than what we are trying to cast to.\n RegisteredVehicle rv = new Bike();\n Bike b1 = (Bike)rv;\n System.out.println(vehicle3.sum(4,2));\n //if the method is overridden in subclass\n //and the variable is stored in the parent class DataType\n //but actual value(object is subclass) we call a method in subclass\n System.out.println(v.sum(4,2));\n //Casting\n int y = 100;\n short x = (short)y;//compile time error.\n sum((byte)y);\n // sum(\"Hello\");cannot even be casted because they are not covariant.\n }", "public double calculateCost(Purchase purchase);", "private String getBillPrice() {\n double cost = 0.00;\n\n for (MenuItem item : bill.getItems()) {\n cost += (item.getPrice() * item.getQuantity());\n cost += item.getExtraIngredientPrice();\n cost -= item.getRemovedIngredientsPrice();\n }\n\n return String.format(\"%.2f\", cost);\n }", "public static double costFillTanks(Vehicle[] arr) {\n double sum = 0.0;\n for(Vehicle ride : arr)\n sum += ride.getGasCapacity();\n return sum * Vehicle.PRICE_PER_GALLON;\n }", "void addVehicle(String type, int speed, int roadRef) {\n if (type.equals(\"Car\")) {\n roads.get(roadRef).addCar(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n\n } else if (type.equals(\"Bus\")) {\n roads.get(roadRef).addBus(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n } else if (type.equals(\"Motorbike\")) {\n roads.get(roadRef).addMotorbike(speed);\n roads.get(roadRef).vehicles.get(roads.get(roadRef).vehicles.size() - 1).setRoadRef(roadRef);\n\n\n }\n }", "public void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n puntiFelicita -= 30;\n soldiTam -= 150;\n }\n case 2 -> {\n puntiVita += 30;\n puntiFelicita -= 15;\n soldiTam -= 70;\n }\n case 3 -> {\n puntiVita += 10;\n puntiFelicita -= 5;\n soldiTam -= 40;\n }\n }\n checkStato();\n }", "BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);", "BigDecimal calculateDailyIncome(List<Instruction> instructions);", "@Override\n public void getFee(ParkingBill parkingBill)\n {\n double hoursParked = parkingBill.getHoursParked();\n\n if(hoursParked <= 3)\n {\n parkingBill.setAmountDue(5.00);\n }\n else if(hoursParked > 3 && hoursParked <= 13)\n {\n parkingBill.setAmountDue(5.00 + (Math.ceil(hoursParked) - 3));\n }\n else\n {\n parkingBill.setAmountDue(15.00);\n }\n }", "private void calcTotalAmount(){\n\t totalAmount = 0;\n\t\tfor(FlightTicket ft : tickets)\n\t\t{\n\t\t\ttotalAmount += ft.getClassType().getFee() * getFlight().getFlightCost();\n\t\t}\n\t\tsetTotalAmount(totalAmount);\n\t}", "public float calculate(Ticket t) {\n\t}", "public void caltotalprice(){\n \tthis.mTotalPrice = 0;\n \tif (this.isCoachSeat) {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.coachprice();\n \t\t}\n \t}else {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.firstclassprice();\n \t\t}\n \t}\n }", "double calculate(Coupon coupon, double payable);", "List<WayBill> getAllWayBill();", "void displayCharge(Vehicle obj, long leaveTime);", "public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.length; i++)\n {\n if(salesItem[i] instanceof Timbit) \n {\n numTimbits = numTimbits + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Doughnut)\n {\n numDoughnuts = numDoughnuts + salesItem[i].getNumOfItems();\n }\n else if(salesItem[i] instanceof Coffee)\n {\n if(salesItem[i].getNumOfItems()==1)\n {\n smallCoffee ++;\n }\n else if(salesItem[i].getNumOfItems()==2)\n {\n mediumCoffee ++;\n }\n else\n {\n largeCoffee ++;\n }\n }\n \n total += salesItem[i].getFinalPrice();\n }\n \n order = \"Timbits: \" + numTimbits + \"\\nDoughnuts: \" + numDoughnuts + \"\\nSmall Coffees: \" + smallCoffee + \"\\nMedium Coffees: \" + mediumCoffee + \"\\nLarge Coffees: \" + largeCoffee ; \n showText(order + String.format(\"\\nTotal Price: $%5.2f\", total), 150, 175);\n }", "@Override\n\tpublic Map<String, Double> calculate(List<Map<String, Object>> houses,\n\t\t\tdouble usage) {\n\t\tSystem.err.println(houses.toString());\n\t\tresult = new HashMap<String, Double>();\n\t\tlogicArea = new HashMap<String, Double>();\n\t\t// calculate each logic Area\n\t\t/*\n\t\t * house.put(\"room-id\", \"01010101\"); house.put(\"water-usage\", \"1\");\n\t\t * house.put(\"electric-usage\", \"5\"); house.put(\"area\", \"100.9\");\n\t\t */\n\t\tcalculateTotalFee(usage);\n\t\tif (isAreaWeight) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (Map<String, Object> map : houses) {\n\t\t\t\tdouble areaOfRoom = (double)(map.get(\"area\"));\n\t\t\t\tlogicArea.put((String) map.get(\"room-id\"), areaOfRoom);\n\t\t\t\tsum += areaOfRoom;\n\t\t\t}\n\t\t\tfor (Entry<String, Double> aLogicArea : logicArea.entrySet()) {\n\t\t\t\tdouble shareOfRoom = aLogicArea.getValue() / sum * totalFee;\n\t\t\t\tdouble round = (double) (Math.round(shareOfRoom * 100) / 100.0);\n\t\t\t\tresult.put(aLogicArea.getKey(), round);\n\t\t\t}\n\t\t}// area Weight\n\t\telse {\n\t\t\tint sum = houses.size();\n\t\t\tfor (Map<String, Object> map : houses) {\n\t\t\t\tdouble shareOfRoom = 1.0 / sum * totalFee;\n\t\t\t\tdouble round = (double) (Math.round(shareOfRoom * 100) / 100.0);\n\t\t\t\tresult.put((String) map.get(\"room-id\"), round);\n\t\t\t}\n\t\t}\n\t\t// sum=?\n\t\t// calculate %\n\t\t// multi with total\n\t\t// put into result\n\t\treturn result;\n\n\t}", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n final byte PERCENT = 100;\n final byte MONTHS_IN_YEAR = 12;\n\n int principal = getPrincipal(scanner);\n\n float annualRate = getAnnualRate(scanner);\n float monthlyRate = annualRate / PERCENT / MONTHS_IN_YEAR;\n\n byte years = getYears(scanner);\n int numberOfPayments = years * MONTHS_IN_YEAR;\n \n String mortgage = calculateMortgage(\n principal, \n monthlyRate, \n numberOfPayments\n );\n\n String paymentSchedule = calculateSchedule(\n principal,\n monthlyRate,\n numberOfPayments\n );\n\n System.out.println(createMsg(\"MORTGAGE\", mortgage));\n System.out.println(createMsg(\"BREAKDOWN\", paymentSchedule));\n\n scanner.close();\n \n //NOTES\n\n // byte = 1 = [-128, 127]\n // short = 2 = [-32k, 32k]\n // int = 4 = [-2b, 2b]\n // long = 8 => even larger than 2b\n // float = 4 => decimals\n // double = 8 => larger decimals\n // char = 2 = [A,B,C,...]\n // boolean = 1 = [true/false]\n\n // reference types are tricky\n // be sure to remember that a refernece is being assigned to a variable. So if a variable is being assigned to another, it's reference is being assigned and the data changed to one of the variables will affect all the varaibles using the reference type\n\n // to print data in an array you need the Arrays package and use Arrays.toString(arrayName) and Arrays.deepToString(arrayName) for Mulit-deminsional arrays\n\n // implicit casting = automatic casting by Java\n // byte => short => int => long => float => double\n // happens when no chance of data lose\n\n // explicit casting\n // double x = 1.1;\n // int y = (int)x + 2;\n // by (int)x we are explicitly converting the x variable into an integer from a double\n\n // to convert a string number to a number you must use the correct wrapper class and then it's method parse\"wrapperClassNameHere\"(value)\n }", "private void addArrivingCars(int numberOfCars, String type){\n\t\t\tswitch(type) {\r\n\t\t\tcase NORMCAR: \r\n\t\t\t\tfor (int i = 0; i < numberOfCars; i++) {\r\n\t\t\t\t\tentranceCarQueue.addCar(new NormalCar());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase PASS:\r\n\t\t\t\tfor (int i = 0; i < numberOfCars; i++) {\r\n\t\t\t\t\tentrancePassQueue.addCar(new ParkingPassCar());\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\t \r\n\t\t\t}\r\n\t\t}", "public String modelChange(PO po, int type) throws Exception {\n\n\t\tif (po.get_TableName().equals(\"C_CashLine\") \n\t\t\t\t&& (type == TYPE_BEFORE_CHANGE \n\t\t\t\t\t\t|| type == TYPE_BEFORE_NEW)) {\n\t\t\tlog.fine(MCashLine.Table_Name + \" -- TYPE_BEFORE_NEW || TYPE_BEFORE_CHANGE\");\n\t\t\t//\tGet Cash Line from PO\n\t\t\tMCashLine m_CashLine = (MCashLine) po;\n\t\t\t//\tVerify if the (Base Amount + Tax Amount) > Amount\n\t\t\tif(m_CashLine != null) {\n\t\t\t\tString str_base_amount = m_CashLine.get_ValueAsString(\"A_Base_Amount\");\t\t\t\t\n\t\t\t\tBigDecimal base_amt = new BigDecimal((str_base_amount != null && str_base_amount.length() > 0? str_base_amount: \"0\"));\n\t\t\t\tBigDecimal amt = m_CashLine.getAmount();\n\t\t\t\t//Dixon Martinez\n\t\t\t\t//Calculate the tax amount and the exempt amount\n\t\t\t\tMTax m_Tax = new MTax(Env.getCtx(), m_CashLine.get_ValueAsInt(\"C_Tax_ID\"), null);\n\t\t\t\tMCurrency m_Currency = new MCurrency(Env.getCtx(), Env.getContextAsInt(Env.getCtx(), \"@#C_Currency_ID@\"), null);\n\t\t\t\tBigDecimal taxAmt = m_Tax.calculateTax(base_amt, false, m_Currency.getStdPrecision());\n\t\t\t\tBigDecimal exAmt = amt.subtract(base_amt).subtract(taxAmt);\t\t\t\t\t\t\t\n\t\t\t\t//\tError\n\t\t\t\t\n\t\t\t\t//Carlos Parada Add Validation When Amt is Equals To Zero\n\t\t\t\tif(base_amt.abs()\n\t\t\t\t\t\t.add(taxAmt.abs())\n\t\t\t\t\t\t.add(exAmt.abs())\n\t\t\t\t\t\t.compareTo(amt.abs()) > 0 && amt.abs()!=Env.ZERO)\n\t\t\t\t\t//Dixon Martinez\n\t\t\t\t\t//Modification of code to make translations of the elements.\n\t\t\t\t\treturn \"(\" + Msg.translate(m_CashLine.getCtx(), \"A_Base_Amount\") + \n\t\t\t\t\t\t\t\" + \" + Msg.translate(m_CashLine.getCtx(), \"TaxAmt\") + \n\t\t\t\t\t\t\t\" + \" + Msg.translate(m_CashLine.getCtx(), \"Exempt\") + \n\t\t\t\t\t\t\t\") > \" + Msg.translate(m_CashLine.getCtx(), \"Amount\");\t\t\t\t\n\t\t\t}\n\t\t\tlog.info(po.toString());\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public abstract double calculateTax();", "public Bill loadCharges(ResultSet rs) throws SQLException {\n\t\tBill bill = new Bill(rs.getInt(\"customerID\"), rs.getInt(\"hotelID\"), \n\t\t\t\trs.getInt(\"roomNumber\"));\n\t\twhile (rs.next()) {\n\t\t\tCharge temp = new Charge(rs.getInt(\"roomNumber\"), rs.getInt(\"hotelID\"), \n\t\t\t\t\trs.getInt(\"customerID\"), rs.getInt(\"staffID\"));\n\t\t\ttemp.setServiceType(rs.getInt(\"serviceType\"));\n\t\t\ttemp.setSvcCount(rs.getInt(\"serviceCounter\"));\n\t\t\ttemp.setAmount(rs.getInt(\"Amount\"));\n\t\t\tbill.add(temp);\n\t\t}\n\t\treturn bill; \n\t}", "public void printBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\tSystem.out.println(\"1\" + ItemsList.get(i).getName() + \"at \" + ItemsList.get(i).getPrice());\r\n\t\t}\r\n\t\tSystem.out.printf(\"Sales Tax: %.2f\\n\", taxTotal);\r\n\t\tSystem.out.println(\"Total: \" + total);\r\n\t}", "@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }", "@Override\r\n public double getBaseCost() { return type.getCost(); }", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "List<WayBillDTO> getWayBillByIdTravel(Long id_travel);", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "private void CalculateTotalAmount() {\r\n\r\n double dSubTotal = 0, dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0, dIGSTAmt=0, dcessAmt=0, dblDiscount = 0;\r\n float dTaxPercent = 0, dSerTaxPercent = 0;\r\n\r\n // Item wise tax calculation ----------------------------\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (RowItem.getChildAt(0) != null) {\r\n\r\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\r\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\r\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\r\n TextView ColTax = (TextView) RowItem.getChildAt(7);\r\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\r\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\r\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\r\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\r\n TextView ColAdditionalCessAmt = (TextView) RowItem.getChildAt(29);\r\n TextView ColTotalCessAmount = (TextView) RowItem.getChildAt(30);\r\n dblDiscount += Double.parseDouble(ColDisc.getText().toString());\r\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\r\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\r\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\r\n// dcessAmt += Double.parseDouble(ColcessAmount.getText().toString()) + Double.parseDouble(ColAdditionalCessAmt.getText().toString());\r\n dcessAmt += Double.parseDouble(ColTotalCessAmount.getText().toString());\r\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\r\n\r\n }\r\n }\r\n // ------------------------------------------\r\n\r\n // Bill wise tax Calculation -------------------------------\r\n Cursor crsrtax = dbBillScreen.getTaxConfig(1);\r\n if (crsrtax.moveToFirst()) {\r\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\r\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\r\n }\r\n Cursor crsrtax1 = dbBillScreen.getTaxConfig(2);\r\n if (crsrtax1.moveToFirst()) {\r\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\r\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\r\n }\r\n // -------------------------------------------------\r\n\r\n dOtherCharges = Double.valueOf(tvOthercharges.getText().toString());\r\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\r\n if (crsrSettings.moveToFirst()) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\r\n } else {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\r\n }\r\n } else {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n\r\n } else {\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n }\r\n }\r\n tvDiscountAmount.setText(String.format(\"%.2f\", dblDiscount));\r\n }\r\n }", "private void addArrivingCars(int numberOfCars, String type) {\n\t\tswitch (type) {\n\t\tcase AD_HOC:\n\t\t\tfor (int i = 0; i < numberOfCars; i++) {\n\t\t\t\tentranceCarQueue.addCar(new AdHocCar());\n\t\t\t\tnormaal++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PASS:\n\t\t\tfor (int i = 0; i < numberOfCars; i++) {\n\t\t\t\tentrancePassQueue.addCar(new ParkingPassCar());\n\t\t\t\treservering++;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "List<WayBill> getAllWayBillByIdTravel(Long id_travel);", "private void BScreate() {\n\n\t\tint sum=0;//全枝数のカウント\n\t\tfor(int i=0;i<banknode;i++) sum+=Bank.get(i).deg;\n\n\t\t//e,d,nの決定\n\t\tif(NW==\"BA\"){\n\t\tfor(int i=0;i<banknode;i++) {\n\t\t\tBank.get(i).totalassets=E*((double)Bank.get(i).deg/(double)sum);\n\t\t\tBank.get(i).n=Bank.get(i).totalassets*Bank.get(i).CAR;\n\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t}\n\t\t}\n\n\t\tif(NW==\"CM\"){\n\t\t\tfor(int i=0;i<banknode;i++){\n\t\t\t\tBank.get(i).totalassets=E/banknode;\n\t\t\t\tBank.get(i).n=Bank.get(i).totalassets*asyCAR;\n\t\t\t\tBank.get(i).forcelev=megaCAR;\n\t\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\r\n\tpublic long[] getTicketMoney() {\n\t\tlong[] result = new long[2];\r\n\t\tList<FeeRecord> card = feeRecordDao.getCardRecords();\r\n\t\tList<FeeRecord> cash = feeRecordDao.getCashRecords();\r\n\t\tfor(FeeRecord feeRecord:card){\r\n\t\t\tresult[0] += feeRecord.getMoney();\r\n\t\t}\r\n\t\tfor(FeeRecord feeRecord:cash){\r\n\t\t\tresult[1] += feeRecord.getMoney();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static double fillTanks(Vehicle[] arr) {\n double sum = 0.0;\n for(Vehicle ride : arr)\n sum += ride.getGasRemaining();\n return sum;\n }", "private void addArrivingCars(int numberOfCars, String type){\n\t \tswitch(type) {\n\t \tcase AD_HOC: \n\t for (int i = 0; i < numberOfCars; i++) {\n\t \tentranceCarQueue.addCar(new AdHocCar());\n\t }\n\t break;\n\t \tcase PASS:\n\t for (int i = 0; i < numberOfCars; i++) {\n\t \tentrancePassQueue.addCar(new ParkingPassCar());\n\t }\n\t break;\t \n\t \t}\n\t }", "public BigDecimal getLineNetAmt();", "public abstract void calcuteTax(Transfer aTransfer);", "public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }", "public Masary_Error CheckBillType(String BTC, double CusAmount, String CustId, double serv_balance, double masry_balance, double billamount, double fees, Main_Provider provider, double deductedAmount) {\n Masary_Error Status = new Masary_Error();\n try {\n Masary_Bill_Type bill_type = MasaryManager.getInstance().getBTC(BTC);\n double trunccusamount = Math.floor(CusAmount);\n// double deductedAmount = MasaryManager.getInstance().GetDeductedAmount(Integer.parseInt(CustId), Integer.parseInt(BTC), CusAmount, provider.getPROVIDER_ID());\n if ((deductedAmount > serv_balance) || deductedAmount == -1) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-501\", provider);\n } else if (!bill_type.isIS_PART_ACC() && CusAmount < billamount) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-502\", provider);\n } else if (!bill_type.isIS_OVER_ACC() && CusAmount > billamount && billamount != 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-503\", provider);\n } else if (!bill_type.isIS_ADV_ACC() && billamount == 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-504\", provider);\n } else if (!bill_type.isIS_FRAC_ACC() && (CusAmount - trunccusamount) > 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-505\", provider);\n } else if ((CusAmount > masry_balance) || deductedAmount == -2 || deductedAmount == -3 || deductedAmount == -4) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-506\", provider);\n } else {\n Status = MasaryManager.getInstance().GETMasary_Error(\"200\", provider);\n }\n } catch (Exception ex) {\n\n MasaryManager.logger.error(\"Exception \" + ex.getMessage(), ex);\n }\n\n return Status;\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "private void DetermineBalance() {\n\t\t\n\t\tString query = \"SELECT Ticket_Class FROM Customer_Flight_Information WHERE Customer_Name = \"+name;\n\t\tCursor cursor = deltaDB.rawQuery(query, null);\n\t\t\n\t\ttry{\n\t\t\tif(cursor.moveToFirst()){\n\t\t\t String ticketClass = cursor.getString(cursor.getColumnIndex(\"Ticket_Class\"));\n\t\t\t \n\t\t\t switch(ticketClass){\n\t\t\t \t\n\t\t\t \t\tcase \"Economy Class\":\n\t\t\t \t\t\tprice_txt.setText(\"$315\");\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \t\tcase \"Business Class\":\n\t\t\t \t\t\tprice_txt.setText(\"$365\");\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \t\tcase \"First Class\":\n\t\t\t \t\t\tprice_txt.setText(\"$420\");\n\t\t\t \t\tbreak;\t\n\t\t\t }\n\t\t\t}\n\t\t}finally{\n\t\t\tcursor.close();\n\t\t}\n\t}", "public double getCarbs() {\n\t\tdouble mealCarbs = 0;\n\t\tfor (String foodName : meal) {\n\t\t\tdouble carbs = foodDetail.get(foodName).getCarbs();\n\t\t\tdouble portion = foodPortion.get(foodName);\n\t\t\tmealCarbs += carbs * portion;\n\t\t}\n\t\treturn mealCarbs;\n\t}", "@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}", "private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}", "public JSONObject getInvoiceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n /**\n * Get Invoice total sum\n */\n String companyId=reqParams.optString(\"companyid\");\n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n JSONObject jSONObject = new JSONObject();\n List<Object> invoiceData = accEntityGstDao.getInvoiceDataWithDetailsInSql(reqParams);\n reqParams.remove(\"isb2cs\"); // remove to avoid CN index while fetching data\n double taxableAmountInv = 0d;\n double totalAmountInv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n String term = data[1]!=null?data[1].toString():\"\";\n double termamount = data[0]!=null?(Double) data[0]:0;\n count = data[4]!=null?((BigInteger) data[4]).intValue():0;\n totalAmountInv = data[3]!=null?(Double) data[3]:0;\n if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n IGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n CGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n } else if(StringUtil.isNullOrEmpty(term)){\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n }\n }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv, companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n } else {\n jSONObject = accGSTReportService.getSalesInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "BigDecimal getTotal();", "BigDecimal getTotal();", "void payBills();", "public Double calculateTotal(String type, Double price, Double numberOfCoins, Double fees) {\n\t\tif (type == \"Kauf\") {\n\t\t\treturn (price * numberOfCoins) + fees;\n\t\t} else {\n\t\t\treturn ((price * numberOfCoins) + fees) * -1;\n\t\t}\n\t}", "TotalInvoiceAmountType getTotalInvoiceAmount();", "@Override\n\tpublic double[] getVehicleCost() {\n\t\t\n\t\t\n\t\tdouble[] temp = {constantPO.getVanCost(),constantPO.getRailwayCost(),constantPO.getAirplaneCost()};\n\t\t\n\t\treturn temp;\n\t}", "public double calculateNet(){\r\n double total = 0;\r\n for (Map.Entry<String, Account[]> list : allAccounts.entrySet()){\r\n Account[] accountList = list.getValue();\r\n String accountName = list.getKey();\r\n for (Account account : accountList){\r\n if (account == null){\r\n break;\r\n }\r\n if (accountName.equals(\"CreditCard\") || accountName.equals(\"LineOfCredit\")){\r\n total -= account.getCurrentBalance();\r\n } else{\r\n total += account.getCurrentBalance();\r\n }\r\n }\r\n }\r\n return Double.valueOf(twoDec.format(total));\r\n }", "public static void car(Contract contract) {\n String flag1 = \"@@\";\n String flag2 = \"=\";\n //1,8 2, 7 2h,6 3,3 11,7 22,4 333 444 554 664 775 883\n if (contract.getTable1() != null && contract.getTable1().length() != 8) {\n String table = contract.getTable1();\n String[] tables = table.split(flag2, -1);\n int size = tables[0].split(flag1, -1).length;\n List<Table> list = new ArrayList<Table>();\n for (int i = 0; i < size; i++) {\n Table t = new Table();\n try {\n t.setTable0(tables[0].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable1(tables[1].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable2(tables[2].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable3(tables[3].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable4(tables[4].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable5(tables[5].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable6(tables[6].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable7(tables[7].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable8(tables[8].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable9(tables[9].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable10(tables[10].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable11(tables[11].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n String str = t.getTable0() + t.getTable1() + t.getTable2() + t.getTable3() + t.getTable4() + t.getTable5() + t.getTable6() + t.getTable7();\n if (!\"\".equals(str)) {\n list.add(t);\n }\n\n }\n contract.setTableList1(list);\n }\n\n if (contract.getTable2() != null && contract.getTable2().length() != 1) {\n String table = contract.getTable2();\n String[] tables = table.split(flag2, -1);\n int size = tables[0].split(flag1, -1).length;\n List<Table> list = new ArrayList<Table>();\n for (int i = 0; i < size; i++) {\n Table t = new Table();\n\n try {\n t.setTable1(tables[0].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable2(tables[1].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable2(contract.getTableList1().get(i).getTable0());\n } catch (Exception e) {\n\n }\n\n String str = t.getTable0() + t.getTable1() + t.getTable2() + t.getTable3() + t.getTable4() + t.getTable5() + t.getTable6();\n if (!\"\".equals(str)) {\n list.add(t);\n }\n\n }\n contract.setTableList2(list);\n }\n if (contract.getTable2H() != null && contract.getTable2H().length() != 2) {\n String table = contract.getTable2H();\n String[] tables = table.split(flag2, -1);\n int size = tables[0].split(flag1, -1).length;\n List<Table> list = new ArrayList<Table>();\n for (int i = 0; i < size; i++) {\n Table t = new Table();\n try {\n t.setTable0(tables[0].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable1(tables[1].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable2(tables[2].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n\n\n String str = t.getTable0() + t.getTable1() + t.getTable2() + t.getTable3() + t.getTable4() + t.getTable5();\n if (!\"\".equals(str)) {\n list.add(t);\n }\n\n }\n contract.setTableList2H(list);\n }\n\n\n if (contract.getTable11() != null && contract.getTable11().length() != 3) {\n String table = contract.getTable11();\n String[] tables = table.split(flag2, -1);\n int size = tables[0].split(flag1, -1).length;\n List<Table> list = new ArrayList<Table>();\n for (int i = 0; i < size; i++) {\n Table t = new Table();\n try {\n t.setTable0(tables[0].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable1(tables[1].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable2(tables[2].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable3(tables[3].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable4(tables[4].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable5(tables[5].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable6(contract.getTableList1().get(i).getTable0());\n } catch (Exception e) {\n\n }\n String str = t.getTable0() + t.getTable1() + t.getTable2() + t.getTable3() + t.getTable4() + t.getTable5() + t.getTable6();\n if (!\"\".equals(str)) {\n list.add(t);\n }\n\n }\n contract.setTableList11(list);\n }\n\n if (contract.getTable33() != null && contract.getTable33().length() != 2) {\n String table = contract.getTable33();\n String[] tables = table.split(flag2, -1);\n int size = tables[0].split(flag1, -1).length;\n List<Table> list = new ArrayList<Table>();\n for (int i = 0; i < size; i++) {\n Table t = new Table();\n try {\n t.setTable0(tables[0].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable1(tables[1].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n try {\n t.setTable2(tables[2].split(flag1, size)[i]);\n } catch (Exception e) {\n }\n\n\n String str = t.getTable0() + t.getTable1() + t.getTable2();\n if (!\"\".equals(str)) {\n list.add(t);\n }\n\n }\n contract.setTableList33(list);\n }\n }", "@Override \npublic double getPaymentAmount() { \n return getCommissionRate() * getGrossSales(); \n}", "public static void main(String[] args) {\n CarPark park = new CarPark () ;\r\n \r\n Scanner input = new Scanner (System.in) ;\r\n \r\n System.out.println(\"how many customers parked in the garage yesterday ???\");\r\n int number = input.nextInt() ;\r\n \r\n System.out.println(\"How many hours did each customer use ?\" ) ;\r\n for (int counter = 1 ; counter < number+1 ; counter ++) {\r\n \r\n double hour = input.nextDouble() ;\r\n park.CalculateCharges(hour) ;\r\n System.out.printf(\"The charge for yesterday's customer\"+counter+\" was : $ %.2f %n\" , park.charges );\r\n park.charge +=park.charges ;\r\n }\r\n System.out.printf(\"The total charge for yesterday was $ %.2f %n %n\", park.charge );\r\n \r\n //end of yesterday's charge calculation\r\n System.out.println(\"how many customers are parking in the Park today ???\");\r\n int num = input.nextInt() ;\r\n System.out.println(\"Enter the hours used so far for today's customer \") ;\r\n for (int count = 1 ; count < num+1 ; count ++) {\r\n \r\n double h = input.nextDouble() ;\r\n park.CalculateCharges(h);\r\n System.out.printf(\"The charges for today's customer \" +count +\" is $ %.2f %n\", park.charges); \r\n }\r\n \r\n \r\n }", "PriceCalculationModel calculateLeasePrice(Long leaseId);", "public abstract double calculateFee(int aWidth);", "@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }", "public double getStockFinal(long pv) {\n float entree = 0 ;\n float sortie = 0 ;\n\n ArrayList<Produit> produits = null ;\n if (pv==0) produits = produitDAO.getAll();\n else produits = produitDAO.getAllByPv(pv) ;\n\n ArrayList<Mouvement> mouvements = null;\n\n double valeur = 0 ;\n double total = 0 ;\n double quantite = 0 ;\n double cmpu = 0 ;\n double restant = 0 ;\n double qsortie = 0 ;\n double qentree = 0 ;\n // Vente par produit\n Mouvement mouvement = null ;\n Operation operation = null ;\n\n for (int i = 0; i < produits.size(); i++) {\n try {\n mouvements = mouvementDAO.getManyByProductInterval(produits.get(i).getId_externe(),DAOBase.formatter2.parse(datedebut),DAOBase.formatter2.parse(datefin)) ;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (mouvements != null){\n valeur = 0 ;\n quantite = 0 ;\n restant = 0 ;\n qentree = 0 ;\n cmpu = 0 ;\n qsortie = 0 ;\n\n for (int j = 0; j < mouvements.size(); j++) {\n mouvement = mouvements.get(j) ;\n operation = operationDAO.getOne(mouvement.getOperation_id()) ;\n if (operation==null || (operation.getAnnuler()==1 && operation.getDateannulation().before(new Date())) || operation.getTypeOperation_id().startsWith(OperationDAO.CMD)) continue;\n\n //if (pv!=0 && caisseDAO.getOne(operation.getCaisse_id()).getPointVente_id()!=pv) continue;\n if (j==0)\n if (mouvement.getRestant()==mouvement.getQuantite() && mouvement.getEntree()==0){\n restant = 0 ;\n }\n else restant = mouvement.getRestant() ;\n\n if (mouvement.getEntree()==0) {\n valeur -= mouvement.getPrixA() * mouvement.getQuantite() ;\n qentree += mouvement.getQuantite() ;\n cmpu = mouvement.getPrixA() ;\n }\n else {\n valeur += mouvement.getCmup() * mouvement.getQuantite() ;\n qsortie += mouvement.getQuantite() ;\n }\n /*\n if (restant!=0) cmpu = valeur / restant ;\n else cmpu = mouvement.getCmup() ;\n */\n }\n\n quantite = restant + qentree - qsortie ;\n total+=Math.abs(valeur) ;\n }\n }\n\n return total;\n }" ]
[ "0.67871106", "0.63073534", "0.6280403", "0.6114767", "0.6040699", "0.58991086", "0.57881707", "0.5772392", "0.5744952", "0.5713955", "0.5575164", "0.5549508", "0.5538981", "0.55260044", "0.55074424", "0.5480327", "0.5475882", "0.5464903", "0.5428279", "0.5421355", "0.53808177", "0.5376376", "0.53669107", "0.5339818", "0.5336275", "0.53246915", "0.5315082", "0.5310523", "0.5308905", "0.52915794", "0.52902544", "0.52840906", "0.5268914", "0.5249682", "0.52366513", "0.5225564", "0.52020794", "0.5189585", "0.51891196", "0.5186092", "0.51813257", "0.51752585", "0.51640403", "0.5148556", "0.5147827", "0.51269066", "0.5115198", "0.5106346", "0.50871485", "0.5069284", "0.5067192", "0.50623417", "0.5054582", "0.50488204", "0.5046874", "0.5041493", "0.5038781", "0.50336355", "0.50318456", "0.5027593", "0.50217056", "0.5015971", "0.5007877", "0.50028783", "0.5001584", "0.49767923", "0.4971644", "0.49686712", "0.49672908", "0.49665397", "0.4962572", "0.49591124", "0.49538276", "0.4952773", "0.49508026", "0.49464285", "0.49459812", "0.4944514", "0.49378937", "0.4923708", "0.49158698", "0.49137497", "0.49114808", "0.49038154", "0.48883212", "0.4888127", "0.4881406", "0.4881406", "0.48793983", "0.48770526", "0.4861457", "0.48611552", "0.48604122", "0.48569146", "0.4856871", "0.48441097", "0.48364142", "0.4833519", "0.48298824", "0.48214495" ]
0.5967232
5
remove all buses from the garage
public void removeVehicle () { for(int i = 0; i <= vehicles.size(); i++) { if(vehicles.get(i) instanceof Car) { continue; } else if(vehicles.get(i) instanceof Motorcycle) { continue; } else if(vehicles.get(i) instanceof Bus) { vehicles.remove(i); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeBalls() {\r\n for (Ball ball : this.ballsList) {\r\n ball.removeFromGame(this);\r\n }\r\n this.ballsList.clear();\r\n }", "public void resetArboles()\r\n {\r\n this.arboles = null;\r\n }", "public void clearBalls();", "public void removeFromSilkBag() {\r\n silkBag.remove(0);\r\n }", "public void emptyBasket() {\n balls.clear();\n }", "private void removeOOSBalas() {\n balasToRemove = new ArrayList<>();\n balas.forEach(bala -> {\n if(bala.getState() == Enums.BulletState.TO_REMOVE) {\n if(!balasToRemove.contains(bala)) {\n balasToRemove.add(bala);\n }\n }\n });\n balasToRemove.forEach(bala -> balas.remove(bala));\n }", "public void removeVehicles() {\r\n numberOfVehicles = 0;\r\n for (Lane lane : lanes) {\r\n lane.removeVehicles();\r\n }\r\n }", "void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}", "public void removeBrews(Brew b) {\r\n\t\tbrews.remove(b);\r\n\t\tb.setRecipe(null);\r\n\t}", "public void removeAllFightsystems()\r\n {\n\r\n }", "public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }", "public void removeAllElements() {\n for (int i = 0; i < OLast; i++) O[i] = null;\n ON = OLast = 0;\n Gap = -1;\n }", "public void clear() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tbeams[i] = null;\n\t\t}\n\t}", "private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "void removeAllSpawn();", "public void unsetGibbmt()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GIBBMT$4, 0);\r\n }\r\n }", "public void clearBids(){\n this.bids.clear();\n setRequested();\n }", "void removeAll();", "void removeAll();", "void removeAutopadding() {\n unset();\n for (int counter = springs.size() - 1; counter >= 0; counter--) {\n Spring spring = springs.get(counter);\n if (spring instanceof AutoPreferredGapSpring) {\n if (((AutoPreferredGapSpring)spring).getUserCreated()) {\n ((AutoPreferredGapSpring)spring).reset();\n } else {\n springs.remove(counter);\n }\n } else if (spring instanceof Group) {\n ((Group)spring).removeAutopadding();\n }\n }\n }", "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 void deallocate()\n\t{\n\t\t//for(int i = 0; i <= maxsize; i++){\n\t\t//\t notusemap[i].addAll(inusemap[i]);\n\t\t//\t inusemap[i].clear();\n\t\t//}\n\t}", "public int removeCarbs(double grams) {\n return this.carbohydrates -= grams;\n }", "public void purgeRelations() {\n this.purged = true;\n for (AS tCust : this.customers) {\n tCust.providers.remove(this);\n tCust.purgedNeighbors.add(this.asn);\n }\n for (AS tProv : this.providers) {\n tProv.customers.remove(this);\n tProv.purgedNeighbors.add(this.asn);\n }\n for (AS tPeer : this.peers) {\n tPeer.peers.remove(this);\n tPeer.purgedNeighbors.add(this.asn);\n }\n }", "public void unsetGibbsq()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GIBBSQ$2, 0);\r\n }\r\n }", "public void freeLights(){\n\t\t//android.util.Log.d(TAG,\"freeLights()\");\n\t\tfinal int size = this.lights.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.lights.delete(this.lights.keyAt(index));\n\t\t}\n\t}", "public void removeFromHashes() {\n getBrowser().getDrbdResHash().remove(getName());\n getBrowser().putDrbdResHash();\n for (final DrbdVolumeInfo dvi : drbdVolumes) {\n removeDrbdVolumeFromHashes(dvi);\n }\n }", "public void discardPotion(Bucket b) \n\t{\n\t\t//run through the contents of the potion and then add them to the bucket\n\t\tfor (int i=0; i < this.ingredients.length(); i++ ) \n\t\t{\n\t\t\tb.dumpIngredient(ingredients.charAt(i));\n\t\t}\n\t\t//clear the ingredients in the bottle\n\t\tthis.ingredients=\"\";\n\t}", "private void reapDeadRabbits() {\n for (int i = (rabbitList.size() - 1); i >= 0; i--) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n if (rabbit.getEnergy() <= 0) {\n space.removeRabbitAt(rabbit.getX(), rabbit.getY());\n rabbitList.remove(i);\n }\n }\n }", "private void removeAllObjects()\n {\n removeObjects (getObjects(Actor.class));\n }", "public void removeLostBodies(){\n for(int i = physics.rigidBodies.size() - 1; i >= 0; i--){\n BObject body = physics.rigidBodies.get(i);\n Vector3f pos = body.getPosition();\n \n if(pos.z < -1000){\n int idx = group_bulletbodies.getChildIndex(body.displayShape);\n if(idx >= 0){\n group_bulletbodies.removeChild(idx);\n }\n physics.removeBody(body);\n }\n }\n }", "public void removeAll() {\n\t\tsynchronized (mNpcs) {\n\t\t\tmNpcs = Collections.synchronizedList(new ArrayList<Npc>());\n\t\t\tmDemonCount = 0;\n\t\t\tmHumanCount = 0;\n\t\t}\n\t}", "public void removeAll() \r\n\t{\t\r\n\t\tbookArray = new String[MAXSIZE];\r\n\t\tnumItems = 0;\r\n\t}", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "@Override\n public void removeAll(){\n gameCollection.removeAllElements();\n }", "private void reapDeadRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.getEnergy() < 1) {\n\t\t\t\trabbitSpace.removeRabbitAt(rabbit.getX(), rabbit.getY());\n\t\t\t\trabbitList.remove(i);\n\t\t\t}\n\t\t}\n\t}", "public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "public void unsetGenbank()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GENBANK$8, 0);\r\n }\r\n }", "public void resetBalls() {\n\t\tBALL_LIST.clear();\n\t}", "public void ClearAll()\r\n {\r\n balls.clear();\r\n board.SetMissedBall(0);\r\n }", "void unsetCombine();", "abstract public void removeAll();", "public void removePlaces(){\n List<Place> copies = new ArrayList<>(places);\n for(Place p : copies){\n p.reset();\n }\n }", "private void clearStage(GOval ball) {\n remove(ball);\n remove((paddle));\n }", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "public void clearGenus() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (PhatVay phatVay : findAll()) {\n\t\t\tremove(phatVay);\n\t\t}\n\t}", "public void removeAllLights() {\n if (_lights != null){\n _lights.clear();\n }\n }", "public void clearAll();", "public void clearAll();", "public void removeAllComponents();", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "public void unsetGi()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GI$22, 0);\r\n }\r\n }", "public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }", "private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }", "public void removeAmmo(List<Color> cost)\n {\n ammo.removeAll(cost);\n }", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public void discardAll()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (CreditAppBankReference creditAppBankReference : findAll()) {\n\t\t\tremove(creditAppBankReference);\n\t\t}\n\t}", "public void removeAll() {\n start = null;\n _size = 0;\n }", "public void freeCameras(){\n\t\t//android.util.Log.d(TAG,\"freeCameras()\");\n\t\tfinal int size = this.cameras.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.cameras.delete(this.cameras.keyAt(index));\n\t\t}\n\t}", "public void unsetEmbl()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(EMBL$10, 0);\r\n }\r\n }", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "public void empty() {\n int StartSize = stockList.size();\r\n // While array is not empty.\r\n while (stockList.size() > 0) {\r\n // For every item in the \"stockList\" array.\r\n for (int i = 0; i < StartSize; i++) {\r\n // Remove the beanBag object at the current position in the \"stockList\".\r\n stockList.remove(i);\r\n // Set the global int \"nextReservationNumber\" to 0.\r\n nextReservationNum = 0;\r\n }\r\n }\r\n }", "public static void clearAllMeshes (Application app) {\r\n \t\tmeshes.remove(app);\r\n \t}", "public void removeAllBackgroundArtist() {\r\n\t\tBase.removeAll(this.model, this.getResource(), BACKGROUNDARTIST);\r\n\t}", "public void clear(){\r\n BarsList.clear();\r\n }", "public void clearNeighborhoods()\n\t{\n\t\tfor (int i=0; i<numberOfNeighborhoods; i++)\n\t\t{\n\t\t\t(listOfNeighborhoods.get(i)).clear();\n\t\t}\n\t}", "public void removeAllItems ();", "public static void clearWorld() {\n\t\t// Complete this method.\n\t\tfor(Critter i: population){\n\t\t\tpopulation.remove(i);\n\t\t}\n\t\tfor(Critter j: babies){\n\t\t\tbabies.remove(j);\n\t\t}\n\t\tpopulation.clear();\n\t\tbabies.clear();\n\n\n\t}", "void clearAll();", "void clearAll();", "public void removeAllElements();", "public void removeAll () {\n\t\teffects.clear();\n\t}", "public static void removeAll() {\r\n\t\tfor (final Block block : new HashSet<>(instances_.keySet())) {\r\n\t\t\trevertBlock(block, Material.AIR);\r\n\t\t}\r\n\t\tfor (final TempBlock tempblock : REVERT_QUEUE) {\r\n\t\t\ttempblock.state.update(true, applyPhysics(tempblock.state.getType()));\r\n\t\t\tif (tempblock.revertTask != null) {\r\n\t\t\t\ttempblock.revertTask.run();\r\n\t\t\t}\r\n\t\t}\r\n\t\tREVERT_QUEUE.clear();\r\n\t}", "public void removeAllProducers() {\n producers.clear();\n }", "public void resetBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tbuilding.reset();\n\t\t}\n\t}", "public void destroy() {\n\t\tfor (GroupPaddle groupPaddle : paddles) {\n\t\t\tPhysicsWorld.getPhysicsWorld().destroy(groupPaddle);\n\t\t}\n\t}", "public void removeAllLeadArtist() {\r\n\t\tBase.removeAll(this.model, this.getResource(), LEADARTIST);\r\n\t}", "public void clearThawed() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state != ConfigurationButton.FREEZE) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "public void purgeQueue() {\r\n\t\tfDirtyRegions.clear();\r\n\t}", "void unsetLegs();", "public void stop() {\n done=true;\n bridges.forEach(Bridge::stop);\n bridges.clear();\n }", "public void unsetGpipe()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GPIPE$36, 0);\r\n }\r\n }", "private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }", "public void removeFromAll(String path) {\n for (String device : this.execAdbDevices())\n this.remove(device, path);\n }" ]
[ "0.68310666", "0.6580089", "0.65655273", "0.6504228", "0.64408976", "0.6406448", "0.63249505", "0.62127936", "0.62111586", "0.61958", "0.6167323", "0.6151262", "0.61439013", "0.61367613", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.60969144", "0.6091131", "0.60714155", "0.60700595", "0.6026908", "0.6026908", "0.6001522", "0.59933376", "0.598732", "0.59500533", "0.59483314", "0.59409827", "0.5922468", "0.5920797", "0.5918905", "0.5917083", "0.59130114", "0.5909966", "0.59084153", "0.5906718", "0.5896066", "0.5894395", "0.58704704", "0.5866864", "0.5857513", "0.5853218", "0.5842747", "0.5838668", "0.58298945", "0.581758", "0.5817513", "0.58170825", "0.580485", "0.5788191", "0.5781064", "0.5776343", "0.57669175", "0.57669175", "0.5760686", "0.5759778", "0.575446", "0.57543325", "0.57509553", "0.5740256", "0.57381177", "0.57316804", "0.5730926", "0.5730925", "0.5724305", "0.5719354", "0.57176876", "0.571543", "0.5715008", "0.5713695", "0.57120913", "0.56977206", "0.5692987", "0.56892836", "0.5687004", "0.56858736", "0.56844276", "0.56844276", "0.5681526", "0.5678515", "0.56651694", "0.56586254", "0.5652785", "0.56525385", "0.56519604", "0.56491923", "0.5648913", "0.56450546", "0.5644969", "0.5642346", "0.5641203", "0.56409585" ]
0.0
-1
calculate the total charge for all vehicles
public int calculateBill() { return chargeVehicle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int chargeVehicle() {\n\t\t\n\t\tint price = 0; \n\t\t\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\t\n\t\t\tif(vehicles.get(i) instanceof Car) { // charge 10 GBP per car \n\t\t\t\tprice += 10;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Motorcycle) { // charge 5 GBP per motorcycle \n\t\t\t\tprice += 5;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Bus) { // charge 25 GBP per bus \n\t\t\t\tprice += 25; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn price; \n\t}", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "public void caltotalprice(){\n \tthis.mTotalPrice = 0;\n \tif (this.isCoachSeat) {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.coachprice();\n \t\t}\n \t}else {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.firstclassprice();\n \t\t}\n \t}\n }", "@Override\n\tpublic double calculateServiceCharge() {\n\t\treturn 10.19;\n\t}", "private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }", "private void calcTotalAmount(){\n\t totalAmount = 0;\n\t\tfor(FlightTicket ft : tickets)\n\t\t{\n\t\t\ttotalAmount += ft.getClassType().getFee() * getFlight().getFlightCost();\n\t\t}\n\t\tsetTotalAmount(totalAmount);\n\t}", "public static double totalCargo(Vehicle[] arr) {\n double cargo = 0.0;\n for(Vehicle ride : arr)\n if(ride instanceof Truck)\n cargo += ((Truck) ride).getCargo();\n return cargo;\n }", "@Override\n\tpublic double[] getVehicleCost() {\n\t\t\n\t\t\n\t\tdouble[] temp = {constantPO.getVanCost(),constantPO.getRailwayCost(),constantPO.getAirplaneCost()};\n\t\t\n\t\treturn temp;\n\t}", "public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}", "private double calculateCommissionAmountVehicles(PrintItinerary itinerary) {\n\t\tdouble commissionAmount = 0.0;\n\t\tif (itinerary.getVehicles() != null\n\t\t\t\t&& itinerary.getVehicles().size() > 0) {\n\t\t\tfor (Vehicle vehicle : itinerary.getVehicles()) {\n\t\t\t\tcommissionAmount = commissionAmount\n\t\t\t\t\t\t+ vehicle.getPrice().getCommissionAmount();\n\t\t\t}\n\t\t}\n\n\t\treturn commissionAmount;\n\t}", "public float totalVentas() {\n float total = 0;\n for (int i = 0; i < posicionActual; i++) {\n total += getValorCompra(i); //Recorre el arreglo y suma toda la informacion el el arreglo de los valores en una variable que luego se retorna \n }\n return total;\n }", "public double getCharges()\r\n {\r\n //variables\r\n double charges = 0.0;\r\n double parts = 0.0;\r\n double hours = 0.0;\r\n\r\n //get user input and change double\r\n parts = Double.parseDouble(chargeField.getText());\r\n hours = Double.parseDouble(hourField.getText());\r\n\r\n //math for charges\r\n charges = hours * LABOR_RATE + parts;\r\n return charges;\r\n }", "private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }", "public void totalFacturaVenta(){\n BigDecimal totalVentaFactura = new BigDecimal(0);\n \n try{\n //Recorremos la lista de detalle y calculamos la Venta total de la factura\n for(Detallefactura det: listDetalle){\n //Sumamos a la variable 'totalVentaFactura'\n totalVentaFactura = totalVentaFactura.add(det.getTotal());\n } \n }catch(Exception e){\n e.printStackTrace();\n }\n \n //Setemos al objeto Factura el valor de la variable 'totalFacturaVenta'\n factura.setTotalVenta(totalVentaFactura);\n \n }", "public void calcularTotalVentas(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.00;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaEntradas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaEntradas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalVentas().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total entradas\");\n\n }\n\n }", "@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo;\n\t}", "public float capacidadeTotal() {\r\n float toneladas = 0;\r\n\r\n for (int i = 0; i < numNavios; i++) {\r\n if (navios[i] instanceof Petroleiro) {\r\n Petroleiro petroleiro = (Petroleiro) navios[i];\r\n toneladas = toneladas + petroleiro.getCapacidadeCarga();\r\n } else if (navios[i] instanceof PortaContentores) {\r\n PortaContentores portaContentores = (PortaContentores) navios[i];\r\n toneladas = toneladas + portaContentores.getMaxContentores() * 10;\r\n }\r\n }\r\n return toneladas;\r\n }", "private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }", "@Override\n\tpublic double getPrice() {\n\n\t\tfor(Car temPart:listPart){\n\t\t\tthis.totalCost +=temPart.getPrice();\n\t\t}\n\t\treturn totalCost;\n\t}", "public double calculateAdditionalCharge() {\n return 5.0;\n }", "private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }", "@Override\n protected double calcTotalCost() {\n \n double totalCost, templateBasicRate = DEFAULT_BASIC_RATE;\n double extraBedrooms = 0, extraBathrooms = 0;\n\n // if there are extra beds/baths\n if (this.getNumBedrooms() > DEFAULT_NUM_BEDROOMS)\n extraBedrooms = this.getNumBedrooms() - DEFAULT_NUM_BEDROOMS;\n\n if (this.getNumBathrooms() > DEFAULT_NUM_BATHROOMS)\n extraBathrooms = this.getNumBathrooms() - DEFAULT_NUM_BATHROOMS;\n\n // multiply basic rate by 1.5 if the total area is >= 3,000 sq ft\n if (this.getTotalArea() >= 3000)\n templateBasicRate *= 1.5;\n\n // calculate total cost\n totalCost = (templateBasicRate + ((800 * extraBedrooms) + (500 * extraBathrooms)));\n\n // add tax\n totalCost += (TAX * totalCost);\n\n return totalCost;\n }", "public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}", "public int totalCostOfComponents( ){\n\t\tint total=0;\n\t\tfor (Component temp : components){\n\t\t\ttotal+=temp.getCost();\n\t\t}\n\t\treturn total;\n\t}", "public double getTotal() {\n return totalCost;\n }", "protected void charge() {\n Station nearestStation = map.nearestStation(currentPosition);\n if (Position.withinRange(nearestStation.pos, currentPosition)) {\n float[] values = nearestStation.discharge();\n coins += values[0];\n power += values[1];\n }\n }", "public void DeductCharges () {\r\n\r\n\t\tdouble Temp = 0;\r\n\r\n\t\tfor ( Map.Entry<String, Double> CA : _ChargeAmounts.entrySet() ) {\r\n\r\n\t\t\tTemp += CA.getValue();;\r\n\r\n\t\t}\r\n\r\n\t\t_MonthlyChargeAmounts.put( _Tick.getMonthNumber(), Temp );\r\n\r\n\t\t_FundValue -= Temp;\r\n\r\n\t\tSystem.out.println( \"\\t\\t\\t \" + _Name + \" After Charges : \" + _FundValue );\r\n\t}", "@Override\n public double calcularValorCompra(ArrayList<Mueble> muebles){\n double total = 0d;\n for (Mueble m : muebles) {\n total+= m.getCantidad()*m.getPrecio();\n }\n return total; \n }", "double getTotalCost();", "private double totalDriveDistance()\n\t{\n\t\tdouble totalDistance = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//grab the total distance\n\t\t\ttotalDistance += saveData.get(i).get(\"distance\"); //.get(\"distance\") to be replaced by whatever method we use to grab a variable from an jsonObject\n\t\t}\n\t\treturn totalDistance;\n\t}", "public int calcTotalPrice(){\r\n\t\tint flightPrice = flight.getFlightPrice();\r\n\t\tint bagPrice = nrBag*LUGGAGE_PRICE;\r\n\t\tthis.totalPrice = bagPrice + nrAdult*flightPrice + nrChildren*1/2*flightPrice;\r\n\t\treturn this.totalPrice;\r\n\t}", "void calculateTotalPrice(){\n totalPrice = 0;\n cartContents.forEach(Product-> this.totalPrice = totalPrice + Product.getSellPrice());\n }", "public double getCarbs() {\n\t\tdouble mealCarbs = 0;\n\t\tfor (String foodName : meal) {\n\t\t\tdouble carbs = foodDetail.get(foodName).getCarbs();\n\t\t\tdouble portion = foodPortion.get(foodName);\n\t\t\tmealCarbs += carbs * portion;\n\t\t}\n\t\treturn mealCarbs;\n\t}", "private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }", "public int getAtomicCharge()\n\t{\n\t\treturn protons-electrons;\n\t}", "public void printTotalValue( ) {\n\t\tSystem.out.println(\"This method prints the total cost for all computers\");\n\t\tint i=1;\n\t\tfor (Computer temp : computers ) {\n\n\t\t\tSystem.out.println(\"Computer number : \"+i+\" has the total cost of \"+temp.getPrice());\n\t\t\ti++;\n\t\t}\n\t}", "private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }", "public BigDecimal getCHARGE_AMOUNT() {\r\n return CHARGE_AMOUNT;\r\n }", "public double getTotal_Venta() {\n return total_Venta;\n }", "public int getAtomicCharge() {\r\n\t\treturn protons - electrons;\r\n\t}", "float calFuelConsumption(float distance, float numLiters);", "void chargeTf(double amount);", "public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}", "@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }", "public float carga(){\n return (this.capacidade/this.tamanho);\n }", "public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}", "public int getChargeRate();", "public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }", "CarPaymentMethod processHotDollars();", "private static BigDecimal summaryPrice(Car car) {\n BigDecimal result = car.getBasePrice(); // najpierw dajemy cene poczatkowa auta to co mamy i znamy\n CarOption[] carOptions = car.getOptions(); // wyciagamy za pomoca getOptions z Obiektu CAR(Car) , tablice z wyposazeniem czyli skora i radiem bo potrzebujemy ich ceny znac zeby potem dodac do ceny basePrice\n for (int i = 0; i < carOptions.length; i++) { // musimy kazdy indeks po kolei sumowac za pomoca petli\n result = result.add(carOptions[i].getOptionPrice());\n }\n return result;\n }", "public double totalPotential(Configuration conf) {\n \n return getValue(conf);\n}", "public void CalculateForces(){\n\n Vec3f gravon= mult(this.gravity,this.mass);\n this.force.add(gravon);\n// Totalforce.add(force);\n }", "@Override\r\n\tpublic float getCharge() {\n\t\treturn 0;\r\n\t}", "@PatchMapping(\"/payment/paymentId/{paymentId}/distance/{distance}/vehicle\")\n\tpublic ResponseEntity<Booking> calculateTotalBookingCost(@PathVariable(\"paymentId\") int paymentId,\n\t\t\t@PathVariable(\"distance\") double distance, Vehicle vehicle) {\n\t\tlogger.info(\"Calculate Total Booking Cost\");\n\t\tif (payService.calculateTotalBookingCost(paymentId, distance, vehicle) == null) {\n\t\t\tthrow new PaymentNotFoundException(\"Payment not found with this paymentId: \" + paymentId);\n\t\t}\n\t\treturn ResponseEntity.ok().body(payService.calculateTotalBookingCost(paymentId, distance, vehicle));\n\t}", "public double Get_Total(Context context){\n return ((double) (TrafficStats.getTotalRxBytes()+TrafficStats.getTotalTxBytes())/1048576);\n }", "public void calculateToll(Vehicles v, ArrayList<Places> p){\n for(Places p1: p){\n if(p1.getToll() && p1.getPId()>= start && p1.getPId() <= end){\n tollbooths.add(p1.getPId());\n FeeForEachTollandTrip tt = new FeeForEachTollandTrip(isVip);\n tolltrips.add(tt);\n total += tt.calculateToll(v, p1.getPId());\n }\n }\n \n //printint the output\n /*\n Toll booths : B Amount : 20 Discount : 4 Total : 16\n */\n System.out.print(\"Tollbooths were: \");\n for(int i =0; i<tollbooths.size();i++){\n System.out.print(\" \" + tollbooths.get(i));\n }\n\n\n System.out.println();\n int amount;\n if(isVip)\n amount = (int) (total/0.8);\n else \n amount = (int)total;\n System.out.println(\"Amount is \" + amount);\n double discount = 0;\n if(isVip)\n discount = 0.2 * amount;\n System.out.println(\"Discount is \" + discount);\n System.out.println(\"Total is: \" +total);\n\n //checking if vehicle has already passed the toll before\n //if yes, nothing to be done.\n //if not, add the vehicle to the toll\n for(Places p1: p){\n if(p1.getToll() && tollbooths.contains(p1.getPId())){\n for(Vehicles v1: p1.getVehicles()){\n if(v1.getVehicleId() == v.getVehicleId()){\n break;\n }\n }\n p1.vehicles.add(v);\n }\n }\n }", "public int totalCostOfComponents()\n\t{\n\t\tint total = 0;\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\ttotal += comp.getCost();\n\t\t}\n\t\treturn total;\n\t}", "@Override\n public double getTotal() {\n return total;\n }", "private String calculateDistancePerAmount() {\n double distance = parser(getTextFromEditText(R.id.distanceEdit));\n double fuel = parser(getTextFromEditText(R.id.fuelEdit));\n double value = distance / fuel;\n return rounder(value);\n }", "public BigDecimal getCHARGE() {\r\n return CHARGE;\r\n }", "@Override\n\tpublic double calcSpendFuel() {\n\t\tdouble result = distance / (literFuel - fuelStart);\n\t\treturn result;\n\t}", "double calculateCost() {\n double cost = 0;\n InspectionDTO[] DTOArray = this.currentInspectionChecklist.inspectionDTOArray;\n for (int i = 0; i <= DTOArray.length - 1; i++) {\n cost += DTOArray[i].getCost();\n }\n return cost;\n }", "private void determinationVATRate(Vehicle vehicle) {\n if (vehicle.getEngineType().name().equals(\"electric\")) {\n vehicle.setVATRate(0);\n } else {\n vehicle.setVATRate(20);\n }\n }", "@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }", "public void calcularTotal() {\n double valor = 0;\n String servico = (String)consultaSelecionada.getSelectedItem().toString();\n switch(servico) {\n case \"Consulta\":\n valor += 100;\n break;\n case \"Limpeza\":\n valor += 130;\n break;\n case \"Clareamento\":\n valor += 450;\n break;\n case \"Aparelho\":\n valor += 100;\n break;\n case \"Raio-x\":\n valor += 80;\n break;\n case \"Cirurgia\":\n valor += 70;\n break;\n }\n Total.setText(String.valueOf(valor));\n }", "public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t }\n \t case 1:\n \t { \n \t\t this.mTravelTime=this.mLegs.get(0).flighttime();\n \t\t break;\n \t }\n \t case 2:\n \t {\n \t\t Date arrivalt = this.mLegs.get(1).arrivaldate();\n \t\t Date departt = this.mLegs.get(0).departuredate();\n \t\t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t\t this.mTravelTime=diff;\n \t\t break;\n \t }\n \t case 3:\n \t {\n \t Date arrivalt = this.mLegs.get(2).arrivaldate();\n \t Date departt = this.mLegs.get(0).departuredate();\n \t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t this.mTravelTime=diff;\n \t break;\n \t }\n \t }\n }", "public synchronized double getTotal(){\n float CantidadTotal=0;\n Iterator it = getElementos().iterator();\n while (it.hasNext()) {\n ArticuloVO e = (ArticuloVO)it.next();\n CantidadTotal=CantidadTotal+(e.getCantidad()*e.getPrecio());\n}\n\n \n return CantidadTotal;\n\n }", "public double getTotalCost() {\r\n return totalCost;\r\n }", "double getTotal();", "private void restarTotalVenta(DetalleVenta dv) {\r\n\t\tint cantidad = dv.getCantidad();\r\n\t\tdouble precioProducto = dv.getProducto().getValorProducto();\r\n\t\ttotalVenta -= cantidad * precioProducto;\r\n\t}", "public int totalprice() {\n\t\tint totalPrice=0;\r\n\t\tfor (int i=0; i<arlist.size();i++) {\r\n\t\t\t totalPrice+=arlist.get(i).price;\r\n\t\t}\r\n\t\treturn totalPrice;\r\n\t}", "double calculateDeliveryCost(Cart cart);", "public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}", "public UpdateVehicleCharges() {\n initComponents();\n view();\n \n \n }", "public double getTotal (){ \r\n return total;\r\n }", "public void calculateCost() {\n\t\tthis.cost = 0.0;\n\t\t\n\t\tint i, count = this.cities.size()-1;\n\t\tfor (i = 0; i < count; i++)\n\t\t\tthis.cost += this.cities.get(i).distances[this.cities.get(i+1).index];\n\n\t\tthis.cost += this.cities.get(count).distances[this.cities.get(0).index];\n\t}", "public void total() {\n\t\t\n\t}", "public void refill(Car car){\n this.gasAmount -= car.capacity;\n System.out.println(gasAmount);\n }", "@Override\r\n double computeAccelerations() {\r\n double potentialEnergy;\r\n \r\n potentialEnergy = computeWallForces();\r\n assignMoleculesToCells(); \r\n potentialEnergy += computeForcesWithinCells();\r\n potentialEnergy += computeForcesWithNeighbourCells();\r\n \r\n return potentialEnergy;\r\n }", "public synchronized double getTotal(){\n double totalPrice=0;\n \n for(ShoppingCartItem item : getItems()){\n totalPrice += item.getTotal();\n }\n \n return totalPrice;\n }", "private void calculateCosts() {\r\n lb_CubicSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Volume)) + \" €\");\r\n lb_MaterialCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Price)) + \" €\");\r\n lb_CuttingTimeSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingHours)) + \" €\");\r\n lb_CuttingCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice)) + \" €\");\r\n lb_TotalCosts.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice) + getColmunSum(tc_Price)) + \" €\");\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n }", "public double calcular_costo() {\n\t\t return 1.3*peso+30 ;\n\t}", "public int dispatchTrucks(){\r\n for(int i = 0; i < trucks.size(); i++){\r\n System.out.println(\" Truck \" + (i + 1) + \" dispatched from Warehouse at (\" + x + \", \" + y + \"):\");\r\n totalDistance += trucks.get(i).planRoute();\r\n }\r\n return totalDistance;\r\n }", "public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }", "public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }", "public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }", "public double getTotal(){\n return total;\n }", "public double getBurntFuelMass();", "public static void main(String[] args) {\n CarPark park = new CarPark () ;\r\n \r\n Scanner input = new Scanner (System.in) ;\r\n \r\n System.out.println(\"how many customers parked in the garage yesterday ???\");\r\n int number = input.nextInt() ;\r\n \r\n System.out.println(\"How many hours did each customer use ?\" ) ;\r\n for (int counter = 1 ; counter < number+1 ; counter ++) {\r\n \r\n double hour = input.nextDouble() ;\r\n park.CalculateCharges(hour) ;\r\n System.out.printf(\"The charge for yesterday's customer\"+counter+\" was : $ %.2f %n\" , park.charges );\r\n park.charge +=park.charges ;\r\n }\r\n System.out.printf(\"The total charge for yesterday was $ %.2f %n %n\", park.charge );\r\n \r\n //end of yesterday's charge calculation\r\n System.out.println(\"how many customers are parking in the Park today ???\");\r\n int num = input.nextInt() ;\r\n System.out.println(\"Enter the hours used so far for today's customer \") ;\r\n for (int count = 1 ; count < num+1 ; count ++) {\r\n \r\n double h = input.nextDouble() ;\r\n park.CalculateCharges(h);\r\n System.out.printf(\"The charges for today's customer \" +count +\" is $ %.2f %n\", park.charges); \r\n }\r\n \r\n \r\n }", "public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }", "public static int totalDistance(Vehicle[] arr) {\n int sum = 0;\n for(Vehicle ride : arr)\n sum += ride.range();\n return sum;\n }", "public double calculatePrice(){\r\n\t\treturn getBasePrice()+getBasePrice()*getVat()+(getBasePrice()+getBasePrice()*getVat())*0.3;\r\n\t}", "public double totalFee(){\n return (this.creditHours*this.feePerCreditHour)-this.scholarshipAmount+((this.healthInsurancePerAnnum*4)/12);\n }", "@Override\n\tpublic double getPrice() {\n\t\treturn auto.getPrice() + AC_ADDITIONAL_CHARGE;\n\t}", "public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }", "public Double getTotal();", "public BigDecimal sumCostAvoidanceTotal(MaintenanceRequest po){\n\t\tBigDecimal total = new BigDecimal(0.00).setScale(2);\n\t\t\n\t\tfor(MaintenanceRequestTask task : po.getMaintenanceRequestTasks()){\n\t\t\ttotal = total.add(MALUtilities.isEmpty(task.getCostAvoidanceAmount()) ? new BigDecimal(0) : task.getCostAvoidanceAmount());\n\t\t}\n\t\t\n\t\treturn total;\t\t\n\t}", "public double totalVolume() {\n int index = 0;\n double total = 0.0;\n while (index < icosList.size()) {\n total += icosList.get(index).volume();\n index++; \n } \n return total;\n }", "public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\t\tttCost += itemsOrdered.get(i).getCost();\n\t\t}\n\t\treturn ttCost;\n\t}", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}" ]
[ "0.7888359", "0.6837595", "0.67007774", "0.6627601", "0.6306137", "0.6302368", "0.62835133", "0.6269724", "0.61650956", "0.6116365", "0.6098116", "0.6085919", "0.5959664", "0.5959109", "0.5918069", "0.5915158", "0.59092706", "0.5902343", "0.5888233", "0.5878758", "0.5866228", "0.5850165", "0.5845496", "0.5812676", "0.57993823", "0.57960176", "0.5795025", "0.5769245", "0.5766038", "0.57489085", "0.57245916", "0.5715521", "0.57024825", "0.56840104", "0.56676584", "0.5664788", "0.56620836", "0.5653651", "0.56483984", "0.5628136", "0.5616721", "0.5603851", "0.5596313", "0.55919546", "0.559004", "0.5559097", "0.55564624", "0.5546976", "0.55450934", "0.553956", "0.55311096", "0.5530697", "0.5529968", "0.55297947", "0.55278647", "0.5506331", "0.5505266", "0.5501261", "0.54987824", "0.5497636", "0.5475059", "0.5468047", "0.5467245", "0.54657686", "0.54554665", "0.5454387", "0.54480606", "0.5446615", "0.544203", "0.5425468", "0.5424452", "0.54148287", "0.5409774", "0.5408296", "0.5400647", "0.5399828", "0.53908694", "0.53905165", "0.53883827", "0.53860646", "0.5383432", "0.53797156", "0.5379004", "0.5375255", "0.5372603", "0.5367429", "0.5360701", "0.5359798", "0.53587675", "0.5357563", "0.53546053", "0.53542644", "0.53531283", "0.53490186", "0.5348185", "0.53465", "0.53393626", "0.5334207", "0.533413", "0.53295237" ]
0.6548585
4
empty the garage completely
public void vacateGarage() { vehicles.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\r\n\t\tsize = 0;\r\n\t}", "public void clear() {\n\t\t\r\n\t}", "public void clear() {\n size = 0;\n }", "public void clear()\n {\n }", "private void clear() {\n }", "public final void clear() {\n clear(true);\n }", "public void clear() {\n\t\t// Do nothing\n\t}", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear() {\n doClear( false );\n }", "public void clear(){\n\t\tclear(0);\n\t}", "@Override\n public void clear() {\n size = 0;\n }", "@Override\n public void clear() {\n size = 0;\n }", "@Override\n public void clear() {\n size = 0;\n }", "public void clear () {\n\t\treset();\n\t}", "public void clear(){\r\n currentSize = 0;\r\n }", "public void clear() {\n\n\t}", "public void clear() {\n\t\tcurrentSize = 0;\n\t}", "public void clear() {\n\t\tthis.count = (emptyItem ? 1 : 0);\n\t\tpages.clear();\n\t}", "public void clearGaps() {\n this.openGaps = 0;\n }", "public void clear() {\r\n init();\r\n }", "public void clear() {\n doClear();\n }", "public void empty() {\n _items.clear();\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "public void clear() {\n\t\tlocation.clear();\n\t\theap.clear();\n\t}", "void empty();", "public void clear() {\n }", "@Override\n public void clear() {\n size = 0;\n storage = null;\n }", "public void clear()\n\t{\n\t\tarraySize = 0;\n\t}", "@Override\r\n\tpublic void clear() {\n\t\t\r\n\t}", "public synchronized void clear()\n {\n clear(false);\n }", "public void clear() {\n }", "public void clear() {\n }", "private void clear() {\r\n\t\tpstate.clear();\r\n\t\tdisplay.setLegend(\"\");\r\n\t\tship = null;\r\n\t}", "public void empty() {\n int StartSize = stockList.size();\r\n // While array is not empty.\r\n while (stockList.size() > 0) {\r\n // For every item in the \"stockList\" array.\r\n for (int i = 0; i < StartSize; i++) {\r\n // Remove the beanBag object at the current position in the \"stockList\".\r\n stockList.remove(i);\r\n // Set the global int \"nextReservationNumber\" to 0.\r\n nextReservationNum = 0;\r\n }\r\n }\r\n }", "public void reset()\n {\n \tthis.heapFiles.clear();\n }", "public void clear() {\n\t \toccupied = 0;\n\t for (int i = 0; i < array.length; i++) {\n\t array[i] = null;\n\t }\n\t }", "public void clear() {\r\n GiftList.clear();\r\n names = new LinkedList<>();\r\n totalGifts = 0;\r\n totalCost = 0;\r\n }", "public void clear() {\n count = 0;\n }", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "public void clear() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tbeams[i] = null;\n\t\t}\n\t}", "@Override\n public void clear() {\n \n }", "@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}", "public void makeEmpty( )\n {\n doClear( );\n }", "public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}", "@Override\r\n\tpublic void clear() {\n\r\n\t}", "public void emptyBasket() {\n balls.clear();\n }", "@Override\n public void clear() {\n for (int i = 0; i < size; i++) {\n data[i] = null;\n }\n size = 0;\n }", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();", "void clear();" ]
[ "0.7174014", "0.716679", "0.71384144", "0.70666575", "0.7012645", "0.700166", "0.69982314", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6987298", "0.6984955", "0.698145", "0.6978143", "0.6978143", "0.6978143", "0.6976139", "0.69699347", "0.6942426", "0.6940353", "0.6901792", "0.6901401", "0.6898548", "0.6894183", "0.6889676", "0.68881273", "0.6886416", "0.6873876", "0.68632525", "0.68605214", "0.68565494", "0.68438315", "0.6825109", "0.68043786", "0.68043786", "0.6775087", "0.6770759", "0.6742204", "0.6738699", "0.67323154", "0.6728169", "0.67259085", "0.67259085", "0.67167544", "0.67157465", "0.6711729", "0.6709498", "0.67093796", "0.67093796", "0.6696838", "0.66943884", "0.669341", "0.6684915", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727", "0.66823727" ]
0.0
-1
initialize controller and mock object the mock object will be automatically inject into the controller
@Before public void setup(){ MockitoAnnotations.initMocks(this); // create a standalone MVC Context to mocking mockMvc = MockMvcBuilders.standaloneSetup(customerController).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before\r\n\tpublic void init() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tmockMvc = MockMvcBuilders.standaloneSetup(tokenController).build();\r\n\r\n\t\t// mockMvc = MockMvcBuilders.webAppContextSetup(context).build();\r\n\t}", "@BeforeEach\n public void initEach() {\n sut = new ApiKeyController(apiKeyService, new ModelMapper(), apiKeyLogWriter);\n mvc = MockMvcBuilders.standaloneSetup(sut)//\n .setCustomArgumentResolvers(new PageableHandlerMethodArgumentResolver())//\n .build();\n principal = new Principal() {\n @Override\n public String getName() {\n return \"principal\";\n }\n };\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tthis.mockMvc = MockMvcBuilders.standaloneSetup(brickController).build();\r\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "@Before\r\n public void setup() {\n JacksonTester.initFields(this, new ObjectMapper());\r\n // MockMvc standalone approach\r\n mvc = MockMvcBuilders.standaloneSetup(peopleController)\r\n .build();\r\n //peopleService = Mockito.mock(PeopleServiceImpl.class);\r\n }", "@BeforeEach\n public void setUp() {\n MockitoAnnotations.openMocks(this);\n\n // build a mockMvc instance by registering one or more @Controller instances\n // and configuring mvc infrastructure programmatically\n mockMvc = MockMvcBuilders.standaloneSetup(itemController).build();\n\n // initialize testItem\n now = LocalDate.now();\n date = Date.valueOf(now);\n item = new Item(\n null, \"SomeName\", \"This is a description\",\n \"FirstOwner\", \"Joe\",\n \"A photo\", date, date,\n 1.00, 2.00, 0.00\n );\n }", "public ControllerTest()\r\n {\r\n }", "@Before\n public void setUp() {\n mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();\n }", "@BeforeEach\n void setUp() {\n mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();\n\n objectMapper = new ObjectMapper();\n }", "@BeforeEach\n public void setup() throws Exception {\n MockitoAnnotations.openMocks(this);\n mockMvc = standaloneSetup(userController)\n .setControllerAdvice(userManagementExceptionHandler)\n .build();\n }", "@Before\n public void SetUp()\n {\n Mockito.reset(userServiceMock);\n Mockito.clearInvocations(userServiceMock);\n mockMvc = MockMvcBuilders.webAppContextSetup(webConfiguration).build();\n }", "@Test\n public void testConstructorController() {\n assertEquals(controller, dao.getController());\n }", "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "@PostConstruct\n public void setup() {\n this.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "@Before\n public void setUp()\n {\n Mockito.reset(memberServiceMock);\n\n mockMvc = MockMvcBuilders\n .webAppContextSetup(webApplicationContext)\n .apply(springSecurity())\n .build();\n }", "public ImportTestsController() {\n App app = App.getInstance();\n Company company = app.getCompany();\n clientStore = company.getClientStore();\n authFacade = company.getAuthFacade();\n testStore = company.getTestStore();\n testTypeStore = company.getTestTypeStore();\n parameterStore = company.getParameterStore();\n clinicalStore = company.getClinicalStore();\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\teventDao = new EventDAO();\t\t\n\t\tcontroller = new EventController();\n\t\tresponse = new MockHttpServletResponse();\t\t\n\t}", "@Before\n\tpublic void setup() throws Exception {\n\t\tthis.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();\n\t}", "@Before\n public void init(){\n mockClient = MockWebServiceClient.createClient(applicationContext);\n }", "@Before\n public void init(){\n mockClient = MockWebServiceClient.createClient(applicationContext);\n }", "void initHero() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/api/hero\")\n .content(objectMapper.writeValueAsString(createHeroObject()))\n .contentType(MediaType.APPLICATION_JSON));\n }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public abstract void initController();", "@Before\n public void init(){\n }", "@BeforeAll\n public void setup() {\n mockMvc = MockMvcBuilders.webAppContextSetup(webContext).build();\n\n patient = new Patient();\n LocalDate dob = LocalDate.of(Integer.parseInt(\"1999\"), Integer.parseInt(\"01\"), Integer.parseInt(\"01\"));\n Patient patient = new Patient();\n patient.setGivenName(\"TestGiven\");\n patient.setFamilyName(\"TestFamily\");\n patient.setDob(dob);\n patient.setSex('F');\n patient.setAddress(\"123 Test Street\");\n patient.setPhone(\"555-555-5555\");\n }", "public void initData(Controller controller) {\r\n //Initialise controller.\r\n this.controller = controller;\r\n }", "private void setUpController(){\n\n SessionController.getInstance().addCommand(new PartyCreateCommand(\"PARTY_CREATE\"));\n SessionController.getInstance().addCommand(new PartyDetailsRetrieveCommand(\"PARTY_DETAILS_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PartyInvitesRetrieveCommand(\"PARTY_INVITES_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PartyLeaveCommand(\"PARTY_LEAVE\"));\n SessionController.getInstance().addCommand(new PartyMemberRemoveCommand(\"PARTY_MEMBER_REMOVE\"));\n SessionController.getInstance().addCommand(new PlayerCreateCommand(\"PLAYER_CREATE\"));\n SessionController.getInstance().addCommand(new PlayerInvitesRetrieveCommand(\"PLAYER_INVITES_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PlayerLogOutCommand(\"PLAYER_LOG_OUT\"));\n }", "@Test\n public void testHomePage() throws Exception{\n System.out.println(\"home\");\n HomeController controller = new HomeController();\n MockMvc mockMvc = standaloneSetup(controller).build();\n mockMvc.perform(get(\"/\")).andExpect(view().name(\"home\"));\n assertEquals(\"home\", controller.home());\n \n }", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "@Before\n public void setup() {\n RoboGuice.overrideApplicationInjector(RuntimeEnvironment.application, new MyTestModule());\n mainPresenter = new MainPresenter(\n RuntimeEnvironment.application.getApplicationContext(), loginViewMock);\n\n }", "public Controller()\n\t{\n\n\t}", "@Before\n public void init() {\n }", "public GenericController() {\n }", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public static void init(Controller controller) {\n INSTANCE = controller;\n Coordinator core = INSTANCE.getCore();\n if(core != null) {\n core.refresh();\n }\n }", "@Test\n\t\n\t public void testAutowired() throws Exception {\n assertThat(controller).isNotNull();\n \n //Para asegurar que falla elimina la linea del controlador\n // @Controller\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "@Before\n @Override\n public void init() {\n }", "@Before\n public void setUp() throws Exception {\n INIT_LOC = new Location(INIT_LOC_STRING);\n ERR_LOC = new Location(ERR_LOC_STRING);\n INIT_LOCGRB = new LocationGroup(INIT_LOCGB_STRING);\n ERR_LOCGRB = new LocationGroup(ERR_LOCGB_STRING);\n mockMvc = MockMvcBuilders\n .webAppContextSetup(context)\n .apply(MockMvcRestDocumentation.documentationConfiguration(restDocumentation).uris()\n .withPort(8888))\n .addFilters(new CharacterEncodingFilter(\"UTF-8\", true))\n .build();\n }", "@Before\n public void setup() {\n //用于初始化@Mock注解修饰的组件\n MockitoAnnotations.initMocks(this);\n\n requestVO = new RoleRequestVO();\n requestVO.setName(\"ROLE_ADMIN\");\n\n role = new Role();\n role.setName(\"ROLE_ADMIN\");\n role.setId(new Random().nextLong());\n }", "public ClientController() {\n }", "@Before\r\n public void setUp() throws Exception {\r\n super.setUp();\r\n TestHelper.cleanupEnvironment();\r\n instance = new MockGetDocumentFileContestAction();\r\n instance.prepare();\r\n }", "private MissaJpaController() {\r\n }", "@Before\n\tpublic void init() {\n\t\tthis.acccountMock = new AccountDTO();\n\t\tthis.acccountMock.setId(ACCOUNT_ID);\n\t\tthis.acccountMock.setActive(true);\n\t\tthis.acccountMock.setBankingTransactions(new ArrayList<>());\n\n\t}", "@Before\n public void setUp() {\n MockitoAnnotations.initMocks(this);\n }", "@Before\n \tpublic void init() throws SimpleDBException {\n assertNotNull(applicationContext);\n handlerAdapter = applicationContext.getBean(\"handlerAdapter\", HandlerAdapter.class);\n this.testClient = this.createTestClient();\n \t\trefreshRequestAndResponse();\n \t}", "private ClientController(){\n\n }", "@Before\n public void setupRegisterViewModel(){\n MockitoAnnotations.initMocks(this);\n\n //we create an instance of the class to be tested by passing the mocked object\n registerViewModel = new RegisterViewModel(registerScreen, new UnitTestLogger());\n\n registerViewModel.getRegisterModel().setName(dummyName);\n registerViewModel.getRegisterModel().setEmail(dummyEmail);\n registerViewModel.getRegisterModel().setPhoneNo(dummyPhone);\n registerViewModel.getRegisterModel().setAddress(dummyAddress);\n }", "@Before\n public void init() throws Exception {\n TestObjectGraphSingleton.init();\n TestObjectGraphSingleton.getInstance().inject(this);\n\n mockWebServer.start();\n }", "@Before\n\tpublic void init() {\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "@Before\n public void setUp() throws Exception {\n MockServletContext mockServletContext = new MockServletContext();\n new SpannerClient().contextInitialized(new ServletContextEvent(mockServletContext));\n SpannerTestTasks.setup();\n\n eventVolunteeringFormHandlerServlet = new VolunteeringFormHandlerServlet();\n\n request = Mockito.mock(HttpServletRequest.class);\n response = Mockito.mock(HttpServletResponse.class);\n }", "@Before\n public void setUp() {\n MockitoAnnotations.initMocks(this);\n }", "@Test\r\n public void testShowAboutUs() {\r\n System.out.println(\"showAboutUs\");\r\n Controller instance = new Controller();\r\n instance.showAboutUs();\r\n }", "@Before\n\tpublic void init() {\n\t\tbankingTransactionDTO = new BankingTransactionDTO();\n\t\tbankingTransactionDTO.setType(\"deposit\");\n\t\tbankingTransactionDTO.setAmount(100.77d);\n\n\t\t// mock initialization\n\n\t}", "public void setController (Controller controller)\n {\n _controller = controller;\n }", "@Before\n public void setup() {\n mockMvc = MockMvcBuilders.webAppContextSetup(webContext).build();\n\n regularUser = new User();\n regularUser.setUsername(\"regularUser\");\n regularUser.setPassword(\"testPassword1!\");\n regularUser.setRole(\"USER\");\n\n adminUser = new User();\n adminUser.setUsername(\"adminUser\");\n adminUser.setPassword(\"testPassword1!\");\n adminUser.setRole(\"ADMIN\");\n\n auth = mock(Authentication.class);\n securityContext = mock(SecurityContext.class);\n SecurityContextHolder.setContext(securityContext);\n }", "public void injectMainController(Controller controller) {\n\t\tthis.controller = controller;\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "@BeforeEach\n\tpublic void setup() throws Exception {\n\t\tGDACoreActivator activator = new GDACoreActivator(); // Make an instance to call method that sets static field!\n\t\tactivator.start(mockContext); // Inject the mock\n\n\t\tosgiServiceBeanHandler = new OsgiServiceBeanHandler();\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "@BeforeEach\n public void testSetup() {\n request = mock(Request.class);\n response = mock(Response.class);\n session = mock(Session.class);\n when(request.session()).thenReturn(session);\n templateEngine = mock(TemplateEngine.class);\n playerLobby = new PlayerLobby(new GameCenter());\n CuT = new PostSignInRoute(templateEngine, playerLobby);\n }", "private ClientController() {\n }", "@Test\r\n public void testStartNewInspection() {\r\n instance = new Controller(dbMgr);\r\n instance.startNewInspection();\r\n \r\n }", "@Before\n\tpublic void setup(){\n\t\tMockitoAnnotations.initMocks(this);\n\t}", "public void handleInitRequest(ScenarioController scenarioController);", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "@Before\n public void beforeEach() {\n mockMvc = MockMvcBuilders\n .webAppContextSetup(context)\n .build();\n\n serviceMock = mock(PacketAppService.class);\n ReflectionTestUtils.setField(controller, PACKET_APP_SERVICE, serviceMock);\n\n testAppender = new TestLogAppender();\n root.addAppender(testAppender);\n root.setLevel(Level.DEBUG);\n }", "private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}", "private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}", "private void initializeWashControllers() {\n trNewPetWash = WashesControllersFactory.createTrNewPetWash();\n trObtainAllPetWashes = WashesControllersFactory.createTrObtainAllPetWashes();\n trDeleteWash = WashesControllersFactory.createTrDeleteWash();\n trUpdateWash = WashesControllersFactory.createTrUpdateWash();\n }", "@Before\n\tpublic void setup() {\n\t\tMockitoAnnotations.initMocks(this);\n\t\n\t}", "private void setupRequestContext() {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\n\t\tRequestContextHolder.setRequestAttributes(attributes);\n\t}", "@Before\n public void setup() {\n MockitoAnnotations.initMocks(this);\n final AddressEndpoint addressEndpoint = new AddressEndpoint(addressRepository);\n this.mockAddressEndpoint = MockMvcBuilders.standaloneSetup(addressEndpoint).build();\n\n address01 = new Address(\"Procession St\", \"Paris\", \"75015\", \"FR\");\n address02 = new Address(\"Ritherdon Rd\", \"London\", \"8QE\", \"UK\");\n address03 = new Address(\"Inacio Alfama\", \"Lisbon\", \"A54\", \"PT\");\n address04 = new Address(\"Jardins\", \"Sao Paulo\", \"345678\", \"BR\");\n address05 = new Address(\"Coffey\", \"Perth\", \"654F543\", \"AU\");\n address06 = new Address(\"Harbour Bridge\", \"Sydney\", \"JHG3\", \"AU\");\n address07 = new Address(\"Playa de la Concha\", \"San Sebastian\", \"45678\", \"ES\");\n\n // Persist the object\n addressRepository.save(address01);\n addressRepository.save(address02);\n addressRepository.save(address03);\n addressRepository.save(address04);\n addressRepository.save(address05);\n addressRepository.save(address06);\n addressRepository.save(address07);\n }", "public void setController(Controller controller);", "public void injectMainController(MainController mainController){this.mainController = mainController;}", "private void initializeExerciseControllers() {\n trAddExercise = ExerciseControllersFactory.createTrAddExercise();\n trDeleteExercise = ExerciseControllersFactory.createTrDeleteExercise();\n trUpdateExercise = ExerciseControllersFactory.createTrUpdateExercise();\n trAddWalk = ExerciseControllersFactory.createTrAddWalk();\n trGetAllWalks = ExerciseControllersFactory.createTrGetAllWalks();\n trGetAllExercises = ExerciseControllersFactory.createTrGetAllExercises();\n }", "public GameServiceTest() {\r\n\t\tsetupRequestContext();\r\n\t}", "@BeforeEach\n void setUp() {\n testBookServiceImpl = new BookServiceImpl(bookRepository, userService, modelMapper);\n }", "public TeamServiceTest() {\r\n\t\tsetupRequestContext();\r\n\t}", "public MockPageContext() {\n super();\n MockPageContext.init();\n }", "@Before\n public void setUp() {\n underTest = context.registerInjectActivateService(new CropSquareServlet());\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tMockitoAnnotations.initMocks(this);\n\t}", "public DomeinController() {\r\n DAOFactory.initFactory();\r\n gebruikerRepository = new GebruikerRepository();\r\n presentatieRepository = new PresentatieRepository();\r\n inschrijvingRepository = new InschrijvingRepository();\r\n campusRepository = new CampusRepository();\r\n lokaalRepository = new LokaalRepository();\r\n gastRepository = new GastRepository();\r\n bpCoordinator = gebruikerRepository.getBpCoordinator();\r\n }", "@Autowired\n public TrackController(TrackService trackService){\n this.trackService = trackService;\n }", "@BeforeEach\n void setUp() {\n personListTest = new ArrayList<>();\n test_Person = new Person(\"Jane\",\"Dorian\",\n \"987 Westbrook Blvd\",\"Chincinnati\",\"OH\",\"43123\",\"123456789\");\n\n// model.addColumn(\"Col1\");\n// model.addColumn(\"Col2\");\n// model.addColumn(\"Col3\");\n// model.addColumn(\"Col4\");\n// model.addColumn(\"Col5\");\n// model.addColumn(\"Col6\");\n// model.addColumn(\"Col7\");\n test_AddressBook = new AddressBook();\n controllerTest = new AddressBookController(test_AddressBook);\n }", "@Before\n\tpublic void setup() {\n\t\tMockitoAnnotations.initMocks(this);\n\t}", "public testDatabaseAppController()\n\t{\n\t\tdataController = new testDatabaseController(this);\n\t\tqueryList = new ArrayList<QueryInfo>();\n\t\tappFrame = new testDatabaseFrame(this);\n\t}", "public PlantillaController() {\n }", "@Before\r\n public void setUp() {\r\n clientAuthenticated = new MockMainServerForClient();\r\n }", "@Test\npublic void controllerHelloTest() {\n\tMockito.when(simpleService.sayHello()).thenReturn(\"Hello!\");\n\tassertEquals(simpleController.getSimpleHello().getBody(), \"Hello!\");\n}", "@Before\n public void setupIntroductionScreen() {\n MockitoAnnotations.initMocks(this);\n\n // Get a reference to the class under test\n presenter = new IntroductionPresenter(new IntroductionState());\n\n // Inject dependencies to the class under test\n presenter.injectView(new WeakReference<>(viewMock));\n presenter.injectModel(modelMock);\n presenter.injectRouter(routerMock);\n\n }", "@BeforeEach\n void init() {\n carte = new Carte();\n planning = new Planning(carte);\n }", "protected CityController() {\r\n\t}", "@BeforeEach\n public void testSetup() {\n request = mock(Request.class);\n response = mock(Response.class);\n session = mock(Session.class);\n when(request.session()).thenReturn(session);\n templateEngine = mock(TemplateEngine.class);\n playerLobby = new PlayerLobby(new GameCenter());\n CuT = new PostResignRoute(playerLobby);\n }", "protected void setUp() {\n config = new ContestConfig();\n }", "public Controller() {\n\t\tthis(null);\n\t}" ]
[ "0.8011271", "0.7359689", "0.725353", "0.71947515", "0.7147558", "0.713021", "0.70178473", "0.68358725", "0.6711686", "0.66852677", "0.6653395", "0.6578273", "0.6568835", "0.65408635", "0.6538354", "0.65157664", "0.64872074", "0.6459751", "0.6415912", "0.64153254", "0.64118093", "0.64118093", "0.6368573", "0.63191557", "0.6315315", "0.6305112", "0.62545913", "0.6239778", "0.6238658", "0.6236201", "0.62239605", "0.6221671", "0.61983633", "0.6192256", "0.61645436", "0.61565703", "0.61565703", "0.61504215", "0.6147299", "0.61445594", "0.61430466", "0.6120768", "0.61171514", "0.61038196", "0.6091656", "0.6090388", "0.60886174", "0.60794485", "0.60734487", "0.6059082", "0.6053047", "0.60366166", "0.6036129", "0.6035595", "0.60318005", "0.6008911", "0.60062945", "0.59806347", "0.59784985", "0.59739065", "0.5967525", "0.59658235", "0.5963977", "0.59550166", "0.5954284", "0.5943529", "0.5943357", "0.59327114", "0.59300333", "0.59250176", "0.5922416", "0.5917406", "0.5917406", "0.5910133", "0.59060717", "0.5903384", "0.590239", "0.5897469", "0.58929485", "0.588675", "0.5881547", "0.5862026", "0.5859939", "0.5855812", "0.5855558", "0.58551556", "0.58404434", "0.5838328", "0.58346486", "0.58328044", "0.5821421", "0.5803448", "0.58033586", "0.57959545", "0.57957834", "0.5787964", "0.57824916", "0.5782382", "0.5780107", "0.5775831" ]
0.76874816
1
======================================= = Testing Unit = =======================================
@Test public void testListCustomers() throws Exception{ List<Customer> customers = new ArrayList<>(); customers.add(new Customer()); customers.add(new Customer()); when(customerService.listAll()).thenReturn((List) customers); mockMvc.perform(get("/customers")) .andExpect(status().isOk()) .andExpect(view().name("customer/customers")) .andExpect(model().attribute("customers", hasSize(2))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void testWriteOrders() throws Exception {\n }", "public void testGetBasedata() {\n }", "@Test\n public void testAddACopy() {\n }", "@Test\n public void testGetProductInfo() throws Exception {\n }", "public void testSetBasedata() {\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n public void shouldProcessData() throws Exception {\n }", "private void test() {\n\n\t}", "@Test\n public void testQuickMapList() {\n//TODO: Test goes here... \n }", "@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }", "@Override\n public void setUp() throws Exception {}", "@Override\n public void setUp() {\n }", "@Before\n\t public void setUp() {\n\t }", "@Test\n public void request() throws Exception {\n\n\n }", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\n public void testCheckForProduct() throws Exception {\n }", "public void testGetConnection() {\r\n \r\n }", "@Test\n public void testingTheTwoPlane2016Order() {\n }", "@Test\n public void testQueryList(){\n }", "@Test\n\tpublic void testReadTicketOk() {\n\t}", "public void testGetInsDyn() {\n }", "@Test\n public void testGetOwner() {\n \n }", "@Test\n public void testQuickCopy() {\n//TODO: Test goes here... \n }", "@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Before public void setUp() { }", "@Before\n public void setUp () {\n }", "@Before\n\tpublic void setUp() {\n\t}", "@Test\n public void testGetAllOrders() throws Exception {\n }", "@Test\r\n public void testGetUserHistory() {\r\n }", "@Test\npublic void testFindDtoListBySql() throws Exception { \n//TODO: Test goes here... \n}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "@Test\n public void matchCorrect() {\n }", "public void testCheckOxyEmpty() {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Test\n\tvoid searchTest() {\n\t}", "public void testFindByCatalogo() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "protected void setUp() throws Exception {\n \n }", "@Before\n public void setUp() {\n }", "public void testBidu(){\n\t}", "@Test\n public void _objectTest() {\n // TODO: test _object\n }", "protected void setUp() {\n\n }", "@Test\n public void testInsertData() throws Exception {\n//TODO: Test goes here... \n }", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\n public void setUp() throws Exception {\n\n }", "@Test\n public void testGetNumberAvailable() {\n }", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "@Test\n public void testGetOneProduct() {\n }", "@Test\r\n public void testGetPaymentDetails() {\r\n }", "@Test\n void loadData() {\n }", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "@Test\n public void accuseSuccesTest() throws Exception {\n }", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "@Test\r\n\tpublic void test() {\r\n\t}", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Test\n public void testGetProducts() {\n }", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "@Test\n public void findProductListExceptionTest(){\n }", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "public void testLoadOrder() throws Exception {\n }", "@Test\r\n public void testSerialReader() {\n Assert.assertTrue(true);\r\n }", "@Before\r\n\tpublic void setUp() {\n\t}", "@Test\n public void simpleUse(){\n }", "@Test\n public void testGetLicensePlate() {\n }", "@Test\n public void searchesTest() {\n // TODO: test searches\n }", "@Test\n public void testQuery(){\n }", "@Test\n public void testGetSizeOfCheckoutList() {\n }", "@Before\n public void setUp() throws Exception {\n\n }" ]
[ "0.7065176", "0.6970864", "0.69523007", "0.6939009", "0.69243073", "0.690071", "0.6871283", "0.68199456", "0.6811747", "0.6761578", "0.6711731", "0.669017", "0.6667608", "0.6660446", "0.66570556", "0.66534513", "0.66491884", "0.6640165", "0.6631356", "0.66204417", "0.6602179", "0.65636396", "0.65626776", "0.65580225", "0.6555013", "0.65514624", "0.655032", "0.6543581", "0.65378565", "0.6533589", "0.65315366", "0.6527005", "0.6525571", "0.6522241", "0.6513088", "0.6513088", "0.6513088", "0.6513088", "0.6513088", "0.6509279", "0.65037066", "0.6503489", "0.65034544", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6500673", "0.6495368", "0.6493335", "0.64902437", "0.6486236", "0.64833856", "0.6477015", "0.64733934", "0.64724433", "0.64711916", "0.6471103", "0.6465521", "0.6465521", "0.6465521", "0.6465521", "0.6465024", "0.646494", "0.6464285", "0.6462093", "0.6461319", "0.6460364", "0.6459462", "0.6458675", "0.6456142", "0.6455282", "0.64540994", "0.64540994", "0.6454027", "0.6448105", "0.6448105", "0.64443994", "0.644337", "0.6439143", "0.64335847", "0.64305156", "0.64293325", "0.6428565", "0.6419959", "0.64154845", "0.6410228", "0.64043903" ]
0.0
-1
Service Interface for managing BindBank.
public interface UserCidService { /** * Save */ UserCidDTO save(UserCidDTO userCidDTO); HashMap<String,Object> checkSave(UserCidDTO userCidDTO); List<UserCidDTO> findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface TransBankService {\n /**\n * 获的所有的银行\n * @return\n */\n List<TransBank> getBankList();\n\n TransBank getBank(String bankId);\n /**\n * 获得银行的信息\n * @param regionCode\n * @return\n */\n List<TransBank> getBankListByRegion(String regionCode);\n\n /**\n * 保存银行的相关信息\n * @param transBank\n */\n TransBank save(TransBank transBank);\n\n /**\n * 删除银行\n * @param bankId\n * @return\n */\n void del(String bankId);\n\n}", "void setBank(shared.data.Bank bank);", "public void setBankService(BankService bankService) {\r\n this.bankService = bankService;\r\n }", "void addBank(IBank bank) throws RemoteException;", "public interface MemberBankcardService {\n /**\n * 根据MemberId来获取用户银行卡List信息集\n * @param memberId\n * */\n List<MemberBankcard> selectByMemberId(Long memberId);\n /**\n * 检测银行卡信息是否正确\n * */\n String checkBankcard(MemberBankcard memberBankcard);\n /**\n * 添加新的银行卡\n * */\n int addBankcard(MemberBankcard memberBankcard);\n\n /**\n * 清除绑定卡 设置还款卡或放款卡\n * */\n int bindBankCard(Long memberId,Long cardId,Long bindType);\n /**\n * 检查账户是否拥有到账卡 返回卡id\n * */\n Long checkMemberBankcard(Long memberId);\n int updateBankCard(MemberBankcard memberBankcard);\n\n List<MemberBankcard> queryBankcard(MemberBankcard memberBankcard);\n\n Boolean valid(Long memberId);\n\n MemberBankcard selectByPrimaryKey(Long id);\n\n MemberBankcard selectByMemberIdAndBindType(Long memberId,Long bindType);\n\n MemberBankcard selectWithhold(Long memberId);\n\n MemberBankcard selectByUidBankNumber(Long memberId,String bankcardNumber);\n\n}", "public void setBank(Bank bank) {\r\n this.bank = bank;\r\n }", "@Path(\"bank\")\n @Service({\"bank\"})\n public ResponseMessage addBank(Bank bank) {\n return bsi.addBank(bank);\n }", "Databank getBank();", "public Bank getBank() {\r\n return bank;\r\n }", "public ControlBank(Bank bank) {\r\n\t\tthis.bank = bank;\r\n\t}", "IBank getBank(int rekeningNr) throws RemoteException;", "public interface BankAccountService\n{\n BankAccount openAccount(long accountNumber, Date timeCreated);\n\n BankAccount getAccount(long accountNumber);\n\n void deposit(long accountNumber, double amount, String description, Date time);\n\n List<Transaction> getTransactions(BankAccount bankAccount, Date startTime, Date endTime);\n\n void withdraw(long testAccountNumber, double amount, String description, Date time);\n\n List<Transaction> getAllTransactions(BankAccount bankAccount);\n\n List<Transaction> getLatestTransactions(BankAccount bankAccount, int total);\n}", "public void setAmountBank(double amountBank) {\n this.amountBank = amountBank;\n }", "public void setBankID(String value) {\n this.bankID = value;\n }", "public interface IAccountbService {\n\n int add(Accountb account);\n\n int update(Accountb account);\n\n int delete(int id);\n\n Accountb findAccountById(int id);\n\n List<Accountb> findAccountList();\n\n Accountb findAccountByName(String name);\n\n\n\n\n}", "@Override\r\n\tpublic String getBind_bank_ind() {\n\t\treturn super.getBind_bank_ind();\r\n\t}", "IBank getBankFromName(String bankName) throws RemoteException;", "shared.data.Bank getBank();", "public interface MemberCardService {\n /**根据用户id查找银行卡*/\n public List<MemberCard> queryById(Integer id);\n\n int insertCard(String bankcard, String bankName, int memberId);\n}", "@Override\n protected void setBankNum(int bankNum) {\n }", "public void setBankId(long bankId) {\n this.bankId = bankId;\n }", "public void setBankName(String bankName) {\n this.bankName = bankName;\n }", "public GlAccountBank (\n\t\t\tLong in_id\n ) {\n\t\tthis.setId(in_id);\n }", "public Bank(BankDisplay bankDisplay) {\n this(\"bank\", \"localhost\", 1234, bankDisplay);\n }", "public static Bank getBank() {\n return Bank;\n }", "public interface PrimaryBankService {\n\n @GET(\"/user/bank\")\n void getPrimaryBankDetail(Callback<List<BankDetail>> callback);\n\n @POST(\"/user/bank\")\n void createPrimaryBankDetail(@Body List<BankDetail> bankDetail, Callback<List<BankDetail>> callback);\n\n @POST(\"/user/netBankingperfios\")\n void uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse, Callback<PerfiosTransactionResponse> callback);\n\n @POST(\"/user/netBankingperfios\")\n PerfiosTransactionResponse uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse);\n //@PUT(\"/user/bank\")\n //void updatePrimaryBankDetail(@Body BankDetail bankDetail, Callback<BankDetail> callback);\n\n\n public static class PerfiosTransactionResponse{\n private String message;\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n }\n\n public static class BankDetail{\n\n @SerializedName(value = \"name\")\n private String bankName;\n @SerializedName(value = \"account_no\")\n private String accountNumber;\n private boolean isPrimary = false;\n private boolean userStatementPresent = false;\n\n public boolean isUserStatementPresent() {\n return userStatementPresent;\n }\n\n public void setUserStatementPresent(boolean userStatementPresent) {\n this.userStatementPresent = userStatementPresent;\n }\n\n public String getBankName() {\n return bankName;\n }\n\n public void setBankName(String bankName) {\n this.bankName = bankName;\n }\n\n public String getAccountNumber() {\n return accountNumber;\n }\n\n public String getAccountNumberLast4Digits() {\n if(accountNumber!= null && accountNumber.length()>4)\n {\n return accountNumber.substring(accountNumber.length()-4);\n }\n return accountNumber;\n }\n\n public void setAccountNumber(String accountNumber) {\n this.accountNumber = accountNumber;\n }\n\n public boolean isPrimary() {\n return isPrimary;\n }\n\n public void setIsPrimary(boolean isPrimary) {\n this.isPrimary = isPrimary;\n }\n\n @Override\n public boolean equals(Object obj)\n {\n if(obj != null && obj instanceof BankDetail)\n {\n BankDetail second = (BankDetail)obj;\n return this.bankName.equals(second.getBankName())\n && this.getAccountNumberLast4Digits().equals(second.getAccountNumberLast4Digits());\n }\n return false;\n }\n }\n\n}", "public String getBank() {\r\n return bank;\r\n }", "public String getBank() {\r\n return bank;\r\n }", "public interface BDService {\n\n\n public List<BfPredict> getAllBf();\n\n public BfPredict getABf(String countyName);\n\n public Integer insertBf(BfPredict bfPredict);\n\n public Predict getAPredict(String countyName);\n\n public Integer insertPredict(Predict predict);\n\n}", "public BankImpl() {\n accounts = new HashMap<Integer,Account>();\n }", "public String getBank() {\n return bank;\n }", "@Override\r\n\tpublic IBinder onBind(Intent arg0) {\r\n\t\treturn new BDBServiceBinder();\r\n\t}", "public void setBankAccountType (String BankAccountType);", "public MyBank() {\n initComponents();\n fillClients();\n }", "private Bank() {\r\n\t\tsuper();\r\n\t\tlogService = new Logger(\"driverName\");\r\n\t\tlogger = new Logger(\"driverName\");\r\n\t\tthis.balance = balance;\r\n\t\tthis.clients = new Client[100];\r\n\t}", "void doBindService() {\n final Intent serviceIntent = new Intent(Testing.this, UploadService.class);\n bindService(serviceIntent, mConnection, Context.BIND_AUTO_CREATE);\n mIsBound = true;\n }", "public String getBankID() {\n return bankID;\n }", "public BankImpl() {\n persons = new ConcurrentHashMap<String, RemotePerson>();\n try {\n registry = LocateRegistry.createRegistry(8080);\n } catch (RemoteException e) {\n e.printStackTrace();\n System.exit(2);\n }\n }", "public Bank() {\n\t\tsuper();\n\t}", "public long getBankId() {\n return bankId;\n }", "void addBankAccountDetails(BankAccountDTO bankAccountDTO,String name)throws EOTException;", "public interface BmmarkerService {\n Bmmarker selectByBmmtype(Integer bmmtype);\n\n Integer saveBmmarker(Bmmarker record);\n}", "public GlAccountBank () {\n\t\tsuper();\n\t}", "public interface BankCardService {\n /**\n * 根据主账号id,查询微店的银行卡信息\n *\n * @api {dubbo} com.pzj.core.customer.bankcard.BankCardService#queryMicroshopBankCardByOwnerid 查询主账号的银行卡信息\n * @apiGroup 银行卡服务\n * @apiVersion 1.3.0\n * @apiDescription\n * <p>\n * 根据主账号id,查询微店的银行卡信息。\n * </p>\n *\n * @apiParam {Long} ownerId 主账号id\n *\n * @apiParamExample {json} 参数示例\n *\n * {\n * \"id\" : 48381023784545\n * }\n *\n * @apiSuccess (响应数据) {int} errorCode 错误码\n * @apiSuccess (响应数据) {String} errorMsg 错误说明\n * @apiSuccess (响应数据) {BankCardDetailResponse} data 银行卡信息。\n *\n * @apiSuccessExample {json} 响应数据示例\n *\n * {\n * \"errorCode\" : 10000,\n * \"errorMsg\" : null,\n * \"data\" : {\n * \"id\" : 123,\n * \"ownerId\" : 48381023784545,\n * \"accountHolder\" : \"张三\",\n * \"idNum\" : \"14010919999999\",\n * \"bank\" : \"农行\",\n * \"cardNum\" : “596432034334”,\n * }\n * }\n *\n * @apiError (错误码说明) 1 1。\n *\n * @param ownerId\n * @return\n */\n Result<BankCardDetailResponse> queryMicroshopBankCardByOwnerid(Long ownerId);\n\n /**\n * 创建微店的银行卡信息\n *\n * @api {dubbo} com.pzj.core.customer.bankcard.BankCardService#createMicroshopBankCard 创建微店的银行卡信息\n * @apiGroup 银行卡服务\n * @apiVersion 1.3.0\n * @apiDescription\n * <p>\n * 创建微店的银行卡信息,目前只能创建一份。\n * </p>\n *\n * @apiParam {String} accountHolder 开户人\n * @apiParam {String} idNum 身份证号\n * @apiParam {String} bank 银行名称\n * @apiParam {String} cardNum 银行卡号\n * @apiParam {Integer} dataSource 创建系统\n * @apiParam {Long} operator 创建人id\n *\n * @apiParamExample {json} 参数示例\n *\n * {\n * \"accountHolder\" : \"张三\",\n * \"idNum\" : \"14010919999999\",\n * \"bank\" : \"农行\",\n * \"cardNum\" : \"596432034334\",\n * \"dataSource\" : 1,\n * \"id\" : 48381023784545\n * }\n *\n * @apiSuccess (响应数据) {int} errorCode 错误码\n * @apiSuccess (响应数据) {String} errorMsg 错误说明\n * @apiSuccess (响应数据) {Long} data 银行卡id。\n *\n * @apiSuccessExample {json} 响应数据示例\n *\n * {\n * \"errorCode\" : 10000,\n * \"errorMsg\" : null,\n * \"data\" : 123\n * }\n *\n * @apiError (错误码说明) 1 1。\n *\n * @param request\n * @return\n */\n Result<Long> createMicroshopBankCard(CreateBankCardRequest request);\n\n /**\n * 修改微店的银行卡信息\n *\n * @api {dubbo} com.pzj.core.customer.bankcard.BankCardService#modifyMicroshopBankCard 修改微店的银行卡信息\n * @apiGroup 银行卡服务\n * @apiVersion 1.3.0\n * @apiDescription\n * <p>\n * 修改微店的银行卡信息。\n * </p>\n *\n * @apiParam {Long} dataSource 银行卡id\n * @apiParam {String} accountHolder 开户人\n * @apiParam {String} idNum 身份证号\n * @apiParam {String} bank 银行名称\n * @apiParam {String} cardNum 银行卡号\n * @apiParam {Long} operator 创建人id\n *\n * @apiParamExample {json} 参数示例\n *\n * {\n * \"id\" : 123,\n * \"accountHolder\" : \"张三\",\n * \"idNum\" : \"14010919999999\",\n * \"bank\" : \"农行\",\n * \"cardNum\" : \"596432034334\",\n * \"id\" : 48381023784545\n * }\n *\n * @apiSuccess (响应数据) {int} errorCode 错误码\n * @apiSuccess (响应数据) {String} errorMsg 错误说明\n * @apiSuccess (响应数据) {Boolean=true:成功,false:失败} data 是否修改成功。\n *\n * @apiSuccessExample {json} 响应数据示例\n *\n * {\n * \"errorCode\" : 10000,\n * \"errorMsg\" : null,\n * \"data\" : true\n * }\n *\n * @apiError (错误码说明) 1 1。\n *\n * @param request\n * @return\n */\n Result<Boolean> modifyMicroshopBankCard(ModifyBankCardRequest request);\n}", "public double getAmountBank() {\n return this.amountBank;\n }", "public Bank ()\n {\n super (\"Bank\", defaults, trans, sharedQueue);\n customer = new Source (0, defaults [0], \"Bank$Customer\", customer_es, sharedQueue);\n teller = new Facility (1, defaults [1], new LinkedList<Coroutine> (), teller_es, sharedQueue);\n exit = new Sink (2, defaults [2], null, sharedQueue);\n initModel (new DynamicNode [] { customer, teller, exit });\n \n }", "public Bank() {\n\n }", "public BudgetAccountServiceImpl() {\r\n\t}", "public String getBankID() {\n return bankID;\n }", "public Map<Integer, BankClient> getBankDatabase() {\n return bankDatabase;\n }", "public String getBankName() {\n return bankName;\n }", "public interface IBidService {\n\n\t/**\n\t * 账户的保存方法\n\t * @param bid\n\t * @return 操作成功受影响的行数\n\t */\n\tint save(Bid bid);\n\n\t/**\n\t * 账户的更新方法\n\t * @param bid\n\t * @return 操作成功受影响的行数\n\t */\n\tint update(Bid bid);\n\n\t/**\n\t * 账户的单独查询方法\n\t * @param id\n\t * @return 方法单个Bid对象\n\t */\n\tBid get(Long id);\n\n\t/**\n\t * 批量修改投标的状态\n\t * @param bidRequestId\n\t * @param bidRequestState\n\t */\n\tvoid updateState(Long bidRequestId, int bidRequestState);\n}", "@Override\n\tpublic void saveBankingDetail(BankingDetail baningDetail) {\n\t\t\n\t}", "public List<Bank> findAllBanks() {\n return em.createNamedQuery(\"Bank.findAll\").getResultList();\n\n }", "public DataBank getDataBank() {\n return dataBank;\n }", "public interface MemberService {\n\n void addBalance(float amount,long memberId) ;\n\n void minusBalance(float amount, long memberId) ;\n}", "public void setBank(String bank) {\n\t\tif (bank == null)\n\t\t\tbank = \"\";\n\t\tthis.bank = bank;\n\t}", "public interface BankServerOperations \n{\n boolean checkAcntNum (int acntNum);\n boolean checkAcntStatus (int acntNum);\n boolean verifyAcntPin (int acntNum, int acntPin);\n void lockAcnt (int acntNum);\n void makeDeposit (int acntNum, int amount);\n void makeWithdrawal (int acntNum, int amount);\n double checkBalance (int acntNum);\n boolean checkOverdraft (int acntNum, double amount);\n void getTransactions (int acntNum, String startDate, String endDate, String emailAddr);\n}", "public void enterData(IBankDB bankDB) {\n this.bankDB = bankDB;\n }", "public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }", "public void setBankNumber(java.lang.String bankNumber) {\n this.bankNumber = bankNumber;\n }", "BankDetail() {\n this.isValid = new Boolean(false);\n this.bankAccountNo = new String();\n this.bankAccountHolderName = new String();\n this.bankCountry = new String();\n this.IFSC = new String();\n }", "public Bank() {\n\t\tnamesTree = new BankAccountsBinarySearchTree(new AccountComparatorByName());\n\t\taccountNumbersTree = new BankAccountsBinarySearchTree(new AccountComparatorByNumber());\n\t}", "public interface BalanceInfoService {\r\n\r\n\t/** The user balance Dao. */\r\n\tUserBalanceDao userBalance=null;\r\n\t\r\n\t/**\r\n\t * Gets the balance info.\r\n\t *\r\n\t * @param request the webservice request from which the function is called. \r\n\t * @param user the user \r\n\t * @return the balance info in the json format similar to the object com.mobisols.tollpayments.response.get.BalanceInfoResponse\r\n\t */\r\n\tpublic String getBalanceInfo(String request,String user);\r\n}", "@RemoteServiceRelativePath(\"BankOfficeGWTService\")\npublic interface BankOfficeGWTService extends RemoteService {\n\tpublic BankOfficeDTO findById(Integer id) throws ObjectNotExistGError;\n\tpublic Integer saveOrUpdate(BankOfficeDTO entity) throws ExternalOrMidasIdIsInUseGError;\n\tpublic BankOfficeDTO getMyOffice();\n\tpublic BankOfficeDTO findByExternalId(Long midasId);\n\tpublic ArrayList<BankOfficeDTO> findAll();\n\tpublic ArrayList<ListBoxDTO> findAllShort();\n}", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "@Override\r\n\tpublic String getBind_ex_bank_ind() {\n\t\treturn super.getBind_ex_bank_ind();\r\n\t}", "@Override\n\tpublic void createBank(String bankName) {\n\t\tBank newBank = new Bank(bankName, new HashSet<Account>());\n\t\tcache.addToCache(newBank);\n\t\t\n\t}", "public void setBankBic(String bankBic) {\n this.bankBic = bankBic;\n }", "public void bind() {\n\n Intent startintent = new Intent(context, MafService.class);\n startintent.setAction(\"com.baidu.maf.service\");\n\n if(ServiceControlUtil.showInSeperateProcess(context)) {\n try {\n context.startService(startintent);\n } catch (Exception e) {\n LogUtil.e(TAG, \"fail to startService\", e);\n }\n }\n\n //Intent intent = new Intent(InAppApplication.getInstance().getContext(), OutAppService.class);\n\n\n boolean result =\n context.bindService(startintent, mConnection, Context.BIND_AUTO_CREATE);\n\n LogUtil.printMainProcess(\"Service bind. reslut = \" + result);\n LogUtil.printMainProcess(\"bind. serverMessenger = \" + serverMessenger);\n mIsBound = result;\n }", "private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}", "public void setTotalBank(double totalBank) {\n this.totalBank = totalBank;\n }", "public void popBank(AjaxBehaviorEvent e) {\n\t\tSystem.out.println(\"inside pop bank\");\n\t\tbankMasterList = new ArrayList<BankMaster>();\n\t\tbankMasterList.addAll(getGeneralService().getAllBankList(new BigDecimal(sessionStateManage.isExists(\"languageId\")?sessionStateManage.getSessionValue(\"languageId\"):\"1\"),getCountryId()));\n\t\t\n\t}", "public void setWordBank(WordBank bank) {\n \t\twordBank = bank;\n \t}", "public WorldbankImportServiceImpl() {\n\t\tsuper();\n\t}", "void doBindService() {\n\t\tbindService(new Intent(this, eidService.class), mConnection, Context.BIND_AUTO_CREATE);\n//\t\tLog.i(\"Convert\", \"At doBind2.\");\n\n\t\tmIsBound = true;\n\t\n\t\tif (mService != null) {\n//\t\t\tLog.i(\"Convert\", \"At doBind3.\");\n\t\t\ttry {\n\t\t\t\t//Request status update\n\t\t\t\tMessage msg = Message.obtain(null, eidService.MSG_UPDATE_STATUS, 0, 0);\n\t\t\t\tmsg.replyTo = mMessenger;\n\t\t\t\tmService.send(msg);\n\t\t\t\tLog.i(\"Convert\", \"At doBind4.\");\n\t\t\t\t//Request full log from service.\n\t\t\t\tmsg = Message.obtain(null, eidService.MSG_UPDATE_LOG_FULL, 0, 0);\n\t\t\t\tmService.send(msg);\n\t\t\t} catch (RemoteException e) {}\n\t\t}\n//\t\tLog.i(\"Convert\", \"At doBind5.\");\n\t}", "public void setC_BankAccount_ID (int C_BankAccount_ID);", "public void setBankNo(java.lang.String param) {\r\n localBankNoTracker = param != null;\r\n\r\n this.localBankNo = param;\r\n }", "public void setBankNo(java.lang.String param) {\r\n localBankNoTracker = param != null;\r\n\r\n this.localBankNo = param;\r\n }", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public String getBank() {\n\t\tthis.setBank(this.bank);\n\t\treturn this.bank;\n\t}", "@Override\n public void onServiceConnected(ComponentName className, IBinder service) {\n StockInfoService.LocalBinder binder = (StockInfoService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n if(stockFile == null)\n throw new NullPointerException();\n mService.setStockFile(stockFile);\n }", "@WebMethod(operationName = \"addBank\")\n public Bank addBank(@WebParam(name = \"bic\") String bic, @WebParam(name = \"name\") String name) {\n return ejbRef.addBank(bic, name);\n }", "public int getBankAccount() {\n return bankAccount;\n }", "@Override\n\tpublic void setBankCustomerPerson() {\n\t\t\n\t}", "public void updateBank(Bank bank) {\n\n em.merge(bank);\n }", "public interface ClientBalanceService {\n public void queryClientBalance();\n}", "public interface IBank {\n //办卡\n void applyBank();\n //挂失\n void loseBank();\n //......\n}", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "public String getBankCode() {\r\n return bankCode;\r\n }", "public interface AccountBankMapper {\n\n public List<AccountBankVO> getAccountBankDetail(AccountBankReq accountBankReq);\n\n public Integer countAccountBank(AccountBankReq accountBankReq);\n\n public List<AccountBankVO> listAccountBankDetail(AccountBankReq accountBankReq);\n}", "public interface IBookBorrowService {\n boolean initBorrowSession(HttpServletRequest request, BorrowerDto borrowerDto);\n RfidDtoList addCopiesToSession(HttpServletRequest request, RfidDtoList rfidDtoList);\n List<BorrowedBookCopyDto> checkoutSession(HttpServletRequest request, String userId);\n\n RestServiceModel<BorrowerDto> initBorrowCart(BorrowerDto borrowerDto, boolean isLibrarian);\n RestServiceModel<RfidDtoList> scanCopiesToCart(RfidDtoList rfidDtoList);\n RestServiceModel<RfidDtoList> scanCopyToCart(RfidDto rfidDto);\n RestServiceModel<List<BorrowedBookCopyDto>> checkoutCart(BorrowerDto borrowerDto, boolean isLibrarian);\n RestServiceModel<Set<String>> cancelAddingCopies(BorrowerDto borrowerDto);\n List<BorrowedBookCopyDto> getBorrowingBookByUserId(AccountDto accountDto);\n List<BorrowedBookCopyDto> deleteBorrowingCopy(BorrowedBookCopyDto borrowedBookCopyDto);\n RestServiceModel<BorrowedBookCopyDto> scanCopyToCartByLibrarian(RfidDto rfidDto);\n\n RestServiceModel<BorrowedBookCopyDto> renewBorrowedBookCopy(String rfid);\n\n RestServiceModel<List<BorrowedBookCopyDto>> getHistory(String userId);\n\n void checkBorrowingBookCopyDeadline() throws UnsupportedEncodingException;\n int calculateUsableBalanceFromDb(String userId);\n void sendNotificationForLateDeadline();\n boolean updateUsableBalanceInBorrowCartOf(String userId, int difference);\n\n List<BorrowCart> getListBorrowCart();\n}", "@Override\n\tprotected void onServiceBinded(UARTService.UARTBinder binder) {}", "public void setBank(String bank) {\n this.bank = bank == null ? null : bank.trim();\n }", "public ClanBank getClanBank() {\n return clanBank;\n }", "public interface PosWithdrawService extends GenericService<PosWithdrawRecord,String> {\n\n List<PosWithdrawRecord> selectByExampleAndPage(DataTablesPage<PosWithdrawRecord> page, BaseExample baseExample);\n\n PosWithdrawRecord getPosWithdrawRecordById(int id);\n\n void updateResult(PosWithdrawRecord posWithdrawRecord,\n String money,\n String orderLogNo,\n String lklMerchantCode,\n String lklTerminalCode);\n\n void deleteSend(int pid);\n\n void inserBatchPosWithdraw(List<PosWithdrawRecord> posWithdrawRecord);\n\n PosWithdrawRecord getCountWithdraw();\n\n List<PosWithdrawRecord> searchSendRecordList(PosWithdrawRecord posWithdrawRecord);\n\n}", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public interface BrowseService {\n\n\n public List callNumberBrowse(CallNumberBrowseForm callNumberBrowseForm);\n\n public List callNumberBrowsePrev(CallNumberBrowseForm callNumberBrowseForm);\n\n public List callNumberBrowseNext(CallNumberBrowseForm callNumberBrowseForm);\n\n public boolean getPreviosFlag();\n\n public boolean getNextFlag();\n\n public String getPageShowEntries();\n\n public List browse(OLESearchForm oleSearchForm);\n\n public List browseOnChange(OLESearchForm oleSearchForm);\n\n public List browsePrev(OLESearchForm oleSearchForm);\n\n public List browseNext(OLESearchForm oleSearchForm);\n\n public String validateLocation(String locationString);\n}", "private void createComboMemBank() {\r\n\t\tcomboMemBank = new Combo(sShell, SWT.READ_ONLY);\r\n\t\t\r\n\t\tcomboMemBank.setBounds(new Rectangle(54, 55, 92, 21));\r\n\t\tString items[] = new String[]{ \"Reserved\", \"EPC\", \"TID\", \"User\" };\r\n\t\tcomboMemBank.setItems(items);\r\n\t\tcomboMemBank.select(1);\r\n\r\n\t\t\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\tBankAccountListener listen = new BankAccountListener(this);\n\t\tlisten.actionPerformed(e);\n\n\t}", "@RequestMapping(value = \"/viewAllBank\", method = RequestMethod.GET)\n\tpublic List<Bank> viewAllBank() {\n\t\tAtmDAO ad = new AtmDAO();\n\t\tList<Bank> listBank = ad.getAllBank();\n\t\treturn listBank;\n\t}" ]
[ "0.71687883", "0.698817", "0.68668956", "0.6810616", "0.6728567", "0.6595855", "0.64276767", "0.6384154", "0.62577385", "0.6223979", "0.6199916", "0.61874366", "0.61468494", "0.613599", "0.6112544", "0.6095716", "0.6081535", "0.608142", "0.6042142", "0.59658337", "0.5952748", "0.59467113", "0.5921213", "0.5918579", "0.5895134", "0.5894366", "0.5886198", "0.5886198", "0.58335894", "0.58098704", "0.57980764", "0.57862663", "0.5783286", "0.5782548", "0.57812864", "0.573969", "0.57256526", "0.5725134", "0.57090557", "0.5707888", "0.56942654", "0.5690211", "0.56863827", "0.56781733", "0.567447", "0.5673927", "0.565721", "0.5641944", "0.5640914", "0.5619585", "0.56168073", "0.5611463", "0.5607965", "0.55985963", "0.5597438", "0.5594959", "0.558213", "0.5570704", "0.55689484", "0.55680096", "0.5561835", "0.55612344", "0.55313426", "0.5509948", "0.5489773", "0.54713964", "0.545939", "0.5450388", "0.54244953", "0.54149663", "0.54113054", "0.5398621", "0.53983504", "0.53926724", "0.5392179", "0.5381427", "0.5379976", "0.5375946", "0.5375946", "0.53750104", "0.53678876", "0.5351076", "0.53505516", "0.5338891", "0.5338776", "0.5329525", "0.53286856", "0.53115314", "0.5302837", "0.53027815", "0.53020227", "0.5301675", "0.529984", "0.5294717", "0.5292459", "0.5291513", "0.52906495", "0.5289491", "0.528652", "0.5286049", "0.5280873" ]
0.0
-1
C++ TO JAVA CONVERTER TODO TASK: The implementation of the following method could not be found: int j(int x);
public static int Main() { int[] b = new int[12]; int w; int i; int[] a = {13, 44, 72, 103, 133, 164, 194, 225, 256, 286, 317, 347}; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { w = Integer.parseInt(tempVar); } for (i = 0;i < 12;i++) { b[i] = a[i] % 7 - 1; b[i] = (b[i] + w) % 7; } for (i = 0;i < 12;i++) { if (b[i] == 5) { System.out.printf("%d\n",i + 1); } } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void j() {\n }", "public abstract int a(long j2, int i2);", "public void mo9223a(long j, int i, int i2) {\n }", "public abstract void mo9811b(int i, long j);", "public abstract int mo9745j();", "public int j() {\n \treturn j; \n }", "public abstract AbstractC5663d mo39570a(long j, int i);", "interface j {\n void a(int i);\n}", "C3579d mo19716j(long j) throws IOException;", "void mo1941j();", "public abstract void mo9801a(int i, long j);", "public abstract void mo4383c(long j);", "public interface ju {\n int m11960a();\n\n void m11961a(jz jzVar);\n\n int m11962b();\n}", "public abstract void mo4382c(int i, long j);", "void mo24142a(long j);", "void mo54410a(int i, int i2, long j);", "void mo18324a(C7260j jVar);", "void mo13371a(int i, long j);", "public abstract C7035a mo24417b(long j);", "void mo30275a(long j);", "public abstract void mo4369a(long j);", "public abstract void mo9243b(long j);", "void mo28891b(int i, long j) throws zzlm;", "public abstract long f(long j2, int i2);", "public abstract void mo9803a(int i, C3635j jVar);", "void compileToJava();", "int mo9690a(int i, int i2);", "public abstract long a(long j2, long j3);", "void mo54409a(int i, int i2, int i3, long j);", "protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }", "void mo28888a(int i, long j, long j2) throws zzlm;", "public abstract void mo9812b(int i, C3635j jVar);", "public abstract void mo4363a(int i, long j);", "public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }", "public abstract void mo2624j();", "public abstract void mo20156a(long j);", "int mo1503j();", "public abstract void mo9813b(long j);", "void mo63039b(int i, int i2);", "void mo5870a(C1111j jVar);", "int mo28885a(int i);", "long mo25071a(long j);", "public abstract AbstractC5665f mo39571a(long j);", "public void mo21785J() {\n }", "public static jn J(Context param0) {\n }", "public static void Main()\n\t{\n\t\tvoid shuru(int * p,int len);\n\t\tvoid paixu(int * p,int len);\n\t\tvoid hebing(int * p1,int * p2);\n\t\tvoid shuchu(int * p,int,int);\n\t\tint m;\n\t\tint n;\n\t\tString tempVar = ConsoleInput.scanfRead();\n\t\tif (tempVar != null)\n\t\t{\n\t\t\tm = Integer.parseInt(tempVar);\n\t\t}\n\t\tString tempVar2 = ConsoleInput.scanfRead();\n\t\tif (tempVar2 != null)\n\t\t{\n\t\t\tn = Integer.parseInt(tempVar2);\n\t\t}\n//C++ TO JAVA CONVERTER TODO TASK: Java does not have an equivalent to pointers to value types:\n//ORIGINAL LINE: int *p1,*p2;\n\t\tint p1;\n//C++ TO JAVA CONVERTER TODO TASK: Java does not have an equivalent to pointers to value types:\n//ORIGINAL LINE: int *p2;\n\t\tint p2;\n\t\tint[] a = {'\\0', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tint[] b = {'\\0', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tp1 = a;\n\t\tp2 = b;\n\ttangible.RefObject<Integer> tempRef_p1 = new tangible.RefObject<Integer>(p1);\n\t\tshuru(tempRef_p1, m);\n\t\tp1 = tempRef_p1.argValue;\n\ttangible.RefObject<Integer> tempRef_p2 = new tangible.RefObject<Integer>(p2);\n\t\tshuru(tempRef_p2, n);\n\t\tp2 = tempRef_p2.argValue;\n\ttangible.RefObject<Integer> tempRef_p12 = new tangible.RefObject<Integer>(p1);\n\t\tpaixu(tempRef_p12, m);\n\t\tp1 = tempRef_p12.argValue;\n\ttangible.RefObject<Integer> tempRef_p22 = new tangible.RefObject<Integer>(p2);\n\t\tpaixu(tempRef_p22, n);\n\t\tp2 = tempRef_p22.argValue;\n\ttangible.RefObject<Integer> tempRef_p13 = new tangible.RefObject<Integer>(p1);\n\ttangible.RefObject<Integer> tempRef_p23 = new tangible.RefObject<Integer>(p2);\n\t\thebing(tempRef_p13, tempRef_p23);\n\t\tp2 = tempRef_p23.argValue;\n\t\tp1 = tempRef_p13.argValue;\n\ttangible.RefObject<Integer> tempRef_p14 = new tangible.RefObject<Integer>(p1);\n\t\tshuchu(tempRef_p14, m, n);\n\t\tp1 = tempRef_p14.argValue;\n\t}", "void mo723b(long j) throws RemoteException;", "public interface C38422j {\n /* renamed from: nm */\n void mo6247nm(int i);\n}", "public void mo5335a(int i, C0268jw jwVar) {\n }", "void mo708a(long j) throws RemoteException;", "public abstract int mo12585RY(int i);", "public boolean b(int paramInt, amj paramamj)\r\n/* 578: */ {\r\n/* 579:621 */ return true;\r\n/* 580: */ }", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public abstract int mo12581RU(int i);", "public interface C33322h {\n /* renamed from: J */\n void mo34547J(float f, float f2);\n}", "void mo30290d(long j);", "public void mo5334a(int i, int i2, C0283kk kkVar, C0268jw jwVar) {\n }", "dkj mo4367a(dkk dkk);", "void mo7306c(int i, int i2);", "public interface class_25 {\r\n\r\n // $FF: renamed from: b (int, int) boolean\r\n boolean method_103(int var1, int var2);\r\n\r\n // $FF: renamed from: c (int, int) gI\r\n class_1069 method_104(int var1, int var2);\r\n\r\n // $FF: renamed from: d (int, int) gI\r\n class_1069 method_105(int var1, int var2);\r\n\r\n // $FF: renamed from: b (gG, int, int) void\r\n void method_106(class_25 var1, int var2, int var3);\r\n\r\n // $FF: renamed from: b (boolean, vu) boolean\r\n boolean method_107(boolean var1, class_81 var2);\r\n\r\n // $FF: renamed from: a () boolean\r\n boolean method_108();\r\n\r\n // $FF: renamed from: b () boolean\r\n boolean method_109();\r\n\r\n // $FF: renamed from: c () java.lang.String\r\n String method_110();\r\n\r\n // $FF: renamed from: b (as, int, int, int) java.util.List\r\n List method_111(class_922 var1, int var2, int var3, int var4);\r\n\r\n // $FF: renamed from: b (ahb, java.lang.String, int, int, int) dd\r\n class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);\r\n\r\n // $FF: renamed from: d () int\r\n int method_113();\r\n\r\n // $FF: renamed from: f (int, int) void\r\n void method_114(int var1, int var2);\r\n\r\n // $FF: renamed from: e () void\r\n void method_115();\r\n}", "interface C9349bs {\n /* renamed from: a */\n int mo28885a(int i);\n\n /* renamed from: a */\n void mo28886a(int i, double d) throws zzlm;\n\n /* renamed from: a */\n void mo28887a(int i, int i2, zzno zzno) throws IOException, InterruptedException;\n\n /* renamed from: a */\n void mo28888a(int i, long j, long j2) throws zzlm;\n\n /* renamed from: a */\n void mo28889a(int i, String str) throws zzlm;\n\n /* renamed from: b */\n void mo28890b(int i) throws zzlm;\n\n /* renamed from: b */\n void mo28891b(int i, long j) throws zzlm;\n\n /* renamed from: c */\n boolean mo28892c(int i);\n}", "interface C15937b {\n /* renamed from: a */\n void mo13368a();\n\n /* renamed from: a */\n void mo13369a(int i, int i2, int i3, boolean z);\n\n /* renamed from: a */\n void mo13370a(int i, int i2, List<C15929a> list) throws IOException;\n\n /* renamed from: a */\n void mo13371a(int i, long j);\n\n /* renamed from: a */\n void mo13372a(int i, ErrorCode errorCode);\n\n /* renamed from: a */\n void mo13373a(int i, ErrorCode errorCode, ByteString byteString);\n\n /* renamed from: a */\n void mo13374a(boolean z, int i, int i2);\n\n /* renamed from: a */\n void mo13375a(boolean z, int i, int i2, List<C15929a> list);\n\n /* renamed from: a */\n void mo13376a(boolean z, int i, BufferedSource bufferedSource, int i2) throws IOException;\n\n /* renamed from: a */\n void mo13377a(boolean z, C15943j c15943j);\n }", "public interface C2950c {\n /* renamed from: a */\n int mo9690a(int i, int i2);\n\n /* renamed from: a */\n int mo9691a(String str, String str2, float f);\n\n /* renamed from: a */\n int mo9692a(String[] strArr, int i);\n\n /* renamed from: a */\n void mo9693a();\n\n /* renamed from: a */\n void mo9694a(float f, float f2);\n\n /* renamed from: a */\n void mo9695a(float f, float f2, float f3, float f4, float f5);\n\n /* renamed from: a */\n void mo9696a(float f, float f2, int i);\n\n /* renamed from: a */\n void mo9697a(String str);\n\n /* renamed from: a */\n void mo9698a(String str, float f);\n\n /* renamed from: a */\n void mo9699a(String str, String str2, boolean z);\n\n /* renamed from: a */\n void mo9700a(String str, boolean z);\n\n /* renamed from: a */\n void mo9701a(boolean z);\n\n /* renamed from: b */\n int mo9702b(String str, String str2, float f);\n\n /* renamed from: b */\n void mo9703b(float f, float f2);\n\n /* renamed from: b */\n void mo9704b(float f, float f2, int i);\n\n /* renamed from: c */\n void mo9705c(float f, float f2);\n}", "void mo62991a(int i);", "public abstract int mo4307b(int i);", "void mo34684de(int i, int i2);", "void mo4102a(int i, int i2);", "static int getInt(){\n return j;\n }", "public abstract void mo4381c(int i, int i2);", "public int j()\r\n/* 60: */ {\r\n/* 61: 79 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 62: 80 */ if (this.a[i] == null) {\r\n/* 63: 81 */ return i;\r\n/* 64: */ }\r\n/* 65: */ }\r\n/* 66: 84 */ return -1;\r\n/* 67: */ }", "void mo7304b(int i, int i2);", "void mo25957a(long j, long j2);", "C3197iu mo30281b(long j);", "void mo7443f(int i, int i2);", "@Nullable\r\n/* */ public ji Z_() {\r\n/* 257 */ return new ji(this.d_, 3, aa_());\r\n/* */ }", "void mo7445h(int i, int i2);", "static int type_of_jnz(String passed){\n\t\treturn 1;\n\t}", "public amj e(int paramInt)\r\n/* 480: */ {\r\n/* 481:493 */ return this.b[paramInt];\r\n/* 482: */ }", "public abstract Integer mo36212o();", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "void mo66999a(int i, int i2);", "int mo5885j(String str);", "void jugar(Jugada jugada);", "void mo88773a(int i);", "void mo122221a(int i);", "static void jhat() {\n\n }", "void mo63037a(int i, int i2);", "int mo54441g(int i);", "public abstract void mo9807a(long j);", "void mo1933b(int i);", "void mo7301a(int i, int i2);", "public abstract long g(int i2);", "public abstract void mo4377b(int i, int i2);", "public void mo9257i(int i, int i2) {\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public abstract boolean mo2163j();", "static void perform_jpo(String passed){\n\t\tint type = type_of_jpo(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tjump_when_parity_not(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public abstract int mo12582RV(int i);", "public abstract void mo9810b(int i, int i2);", "public void mo5356b(int i, int i2) {\n }", "public abstract int mo12574RN(int i);" ]
[ "0.64970034", "0.6343328", "0.6248956", "0.6218174", "0.6217151", "0.61998826", "0.61668116", "0.61425066", "0.6138536", "0.6112295", "0.60917854", "0.6087146", "0.60798794", "0.6075007", "0.6067451", "0.6043189", "0.6028741", "0.60127324", "0.6005791", "0.5987971", "0.59793234", "0.5971378", "0.5970158", "0.5966168", "0.59374744", "0.593654", "0.5936395", "0.5932747", "0.59324735", "0.5932182", "0.5905819", "0.5897889", "0.58654547", "0.58608216", "0.5835143", "0.5827516", "0.57958406", "0.57830733", "0.5774648", "0.5769892", "0.57612884", "0.57612133", "0.57557863", "0.5740069", "0.57247686", "0.5710969", "0.5703778", "0.5696123", "0.56677616", "0.56628877", "0.5661001", "0.56548524", "0.5647712", "0.5640263", "0.5637241", "0.5634185", "0.56330216", "0.5633017", "0.56329054", "0.5622635", "0.56196123", "0.561657", "0.5614508", "0.561232", "0.5609316", "0.56087404", "0.560567", "0.5588708", "0.5580277", "0.55788636", "0.5578354", "0.5577445", "0.5574125", "0.55711406", "0.5567279", "0.55672425", "0.55667025", "0.5562583", "0.55518365", "0.555081", "0.5550592", "0.55501795", "0.5550096", "0.5546767", "0.5545185", "0.55427516", "0.55412173", "0.5515986", "0.5512831", "0.5512569", "0.5510642", "0.55047804", "0.5503041", "0.54988074", "0.54943717", "0.54879737", "0.54835737", "0.5479602", "0.54769796", "0.54739463", "0.54712534" ]
0.0
-1
Parse the JSON Object from the Udacity Server, extracting the values associated with the given keys. Add the values to the fields inside the Recipe Object, and add the object to the ArrayList of Recipe objects
public static List<Recipe> parseJson(String recipeJson) { //Verify Json is valid if (TextUtils.isEmpty(recipeJson)) { return null; } try { //Instantiate a JsonArray containing the response from the network request JSONArray baseJsonArray = new JSONArray(recipeJson); //Iterate through the list of objects inside the first array for (int i = 0; i < baseJsonArray.length(); i++) { //Get the first object in the list of objects from the baseJson JSONObject jsonObject = baseJsonArray.getJSONObject(i); //Get the name of the recipe String recipeName = jsonObject.optString(JSON_RECIPE_NAME); //Get the array listing the various ingredients JSONArray ingredients = jsonObject.optJSONArray(JSON_RECIPE_INGREDIENTS); //Generate a list of the amount, measure, and names of the ingredients ArrayList<String> ingredientList = ingredientParse(ingredients); //Get the array listing the recipe steps, and videos JSONArray steps = jsonObject.optJSONArray(JSON_RECIPE_STEPS); //Generate a list of short recipe steps ArrayList<String> briefList = briefDescriptionParse(steps); //Generate a list of detailed recipe steps ArrayList<String> detailedList = detailedDescriptionParse(steps); //Generate a list of video URLs ArrayList<String> videoUrlList = videoUrlParse(steps); //Generate a list of thumbnail URLs ArrayList<String> thumbnailUrlList = thumbnailParse(steps); recipes.add(new Recipe( recipeName, ingredientList, briefList, detailedList, videoUrlList, thumbnailUrlList)); } } catch (JSONException e) { Log.e(LOG_TAG, "JSON Error", e); } return recipes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<Recipe> convertJsonToRecipeObjects() throws JSONException {\n //Convert fullJsonMoviesData to JsonObject\n String urlResponse = null;\n URL jsonURL = buildUrl();\n try {\n urlResponse = getResponseFromHttpUrl(jsonURL);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JSONArray bakingDataArray = new JSONArray(urlResponse);\n ArrayList<Recipe> results = new ArrayList<>();\n for (int i = 0; i < bakingDataArray.length(); i++) {\n Recipe recipe = new Recipe();\n recipe.setId(bakingDataArray.getJSONObject(i).getInt(ID));\n recipe.setName(bakingDataArray.getJSONObject(i).getString(NAME));\n recipe.setImage(getDefaultorActualImage(bakingDataArray.getJSONObject(i).getString(IMAGE)));\n recipe.setServings(bakingDataArray.getJSONObject(i).getString(SERVINGS));\n JSONArray ingredientsJSONArray = bakingDataArray.getJSONObject(i).getJSONArray(INGREDIENTS);\n ArrayList<Ingredient> ingredientsArray = new ArrayList<>();\n for (int j = 0; j < ingredientsJSONArray.length(); j++) {\n Ingredient ingredient = new Ingredient();\n ingredient.setIngredient(ingredientsJSONArray.getJSONObject(j).getString(INGREDIENT));\n ingredient.setMeasure(ingredientsJSONArray.getJSONObject(j).getString(MEASURE));\n ingredient.setQuantity(ingredientsJSONArray.getJSONObject(j).getString(QUANTITY));\n ingredientsArray.add(ingredient);\n }\n recipe.setIngredients(ingredientsArray);\n JSONArray stepJSONArray = bakingDataArray.getJSONObject(i).getJSONArray(STEPS);\n ArrayList<Step> stepArray = new ArrayList<>();\n for (int k = 0; k < stepJSONArray.length(); k++) {\n Step step = new Step();\n step.setId(stepJSONArray.getJSONObject(k).getString(STEP_ID));\n step.setDescription(stepJSONArray.getJSONObject(k).getString(DESCRIPTION));\n step.setShortDescription(stepJSONArray.getJSONObject(k).getString(SHORT_DESCRIPTION));\n step.setThumbnailURL(stepJSONArray.getJSONObject(k).getString(thumbnailURL));\n step.setVideoURL(stepJSONArray.getJSONObject(k).getString(videoURL));\n stepArray.add(step);\n }\n recipe.setSteps(stepArray);\n results.add(recipe);\n }\n return results;\n }", "public static Recipes[] ParseRecipeJson(String jsonresponse) throws JSONException {\n JSONArray recipesArray = new JSONArray(jsonresponse);\n Recipes[] recipe = new Recipes[recipesArray.length()];\n\n for (int i = 0; i < recipesArray.length(); i++) {\n recipe[i] = new Recipes();\n JSONObject currentRecipe = recipesArray.getJSONObject(i);\n\n recipe[i].setRecipeId(currentRecipe.getString(\"id\"));\n recipe[i].setRecipeItemName(currentRecipe.getString(\"name\"));\n recipe[i].setRecipeServings(currentRecipe.getString(\"servings\"));\n\n// PARSES INGREDIENTS ARRAY\n JSONArray ingredientsArray = currentRecipe.getJSONArray(\"ingredients\");\n ArrayList<String> ingredientsList = new ArrayList<>();\n ArrayList<String> ingredientsQtyList = new ArrayList<>();\n ArrayList<String> ingredientsMeasureList = new ArrayList<>();\n for (int j = 0; j < ingredientsArray.length(); j++) {\n\n JSONObject currentIngredients = ingredientsArray.getJSONObject(j);\n ingredientsList.add(currentIngredients.getString(\"ingredient\"));\n ingredientsQtyList.add(currentIngredients.getString(\"quantity\"));\n ingredientsMeasureList.add(currentIngredients.getString(\"measure\"));\n }\n\n recipe[i].setRecipeIngredient(ingredientsList);\n recipe[i].setIngredientQuantity(ingredientsQtyList);\n recipe[i].setIngredientMeasure(ingredientsMeasureList);\n\n// PARSES INGREDIENTS ARRAY\n JSONArray stepsArray = currentRecipe.getJSONArray(\"steps\");\n ArrayList<String> stepId = new ArrayList<>();\n ArrayList<String> shortDescription = new ArrayList<>();\n ArrayList<String> description = new ArrayList<>();\n ArrayList<String> videoURL = new ArrayList<>();\n ArrayList<String> thumbnailURL = new ArrayList<>();\n for (int k = 0; k < stepsArray.length(); k++) {\n\n JSONObject currentStep = stepsArray.getJSONObject(k);\n stepId.add(currentStep.getString(\"id\"));\n shortDescription.add(currentStep.getString(\"shortDescription\"));\n description.add(currentStep.getString(\"description\"));\n videoURL.add(currentStep.getString(\"videoURL\"));\n thumbnailURL.add(currentStep.getString(\"thumbnailURL\"));\n }\n\n recipe[i].setStepId(stepId);\n recipe[i].setShortDescription(shortDescription);\n recipe[i].setDescription(description);\n recipe[i].setVideoUrl(videoURL);\n recipe[i].setThumbnilUrl(thumbnailURL);\n }\n return recipe;\n }", "private void getRecipeFields(View view) throws JSONException {\n EditText recipeTitleEditText = findViewById(R.id.recipeTitleInput);\n String recipeTitle = recipeTitleEditText.getText().toString();\n\n EditText caloriesEditText = findViewById(R.id.caloriesInput);\n String calories = caloriesEditText.getText().toString();\n\n EditText timeEditText = findViewById(R.id.timeInput);\n String time = timeEditText.getText().toString();\n\n LinearLayout ingredientsLayout = findViewById(R.id.recipeIngredientsInputLayout);\n String[] ingredientsArray = new String[ingredientsLayout.getChildCount()];\n for (int i = 0; i < ingredientsLayout.getChildCount(); ++i) {\n EditText ingredientText = (EditText) ingredientsLayout.getChildAt(i);\n ingredientsArray[i] = ingredientText.getText().toString();\n }\n\n LinearLayout instructionsLayout = findViewById(R.id.recipeInstructionsInputLayout);\n String[] instructionsArray = new String[instructionsLayout.getChildCount()];\n for (int i = 0; i < instructionsLayout.getChildCount(); ++i) {\n EditText instructionText = (EditText) instructionsLayout.getChildAt(i);\n instructionsArray[i] = instructionText.getText().toString();\n }\n\n recipeSubmit = new JSONObject();\n List ingredientsList;\n List instructionsList;\n\n ingredientsList = Arrays.asList(ingredientsArray);\n instructionsList = Arrays.asList(instructionsArray);\n\n recipeSubmitFireStore.put(\"recipeTitle\", recipeTitle);\n recipeSubmitFireStore.put(\"recipeIngredients\", ingredientsList);\n recipeSubmitFireStore.put(\"recipeInstruction\", instructionsList);\n recipeSubmitFireStore.put(\"calories\", calories);\n recipeSubmitFireStore.put(\"time\", time);\n recipeSubmitFireStore.put(\"recipePublisher\", firebaseAuth.getCurrentUser().getUid());\n\n recipeSubmit.put(\"recipeTitle\", recipeTitle);\n recipeSubmit.put(\"recipeIngredients\", ingredientsList);\n recipeSubmit.put(\"recipeInstruction\", instructionsList);\n recipeSubmit.put(\"calories\", calories);\n recipeSubmit.put(\"time\", time);\n recipeSubmit.put(\"recipePublisher\", firebaseAuth.getCurrentUser().getUid());\n }", "public JsonObject getRecipesByIngredients(String ingredients) throws Exception\n {\n URL url = new URL(baseUrl+\"i=\"+ingredients);\n/* TODO \nYou have to use the url to retrieve the contents of the website. \nThis will be a String, but in JSON format. */\n String contents = \"\";\n Scanner urlScanner = new Scanner(url.openStream());\n while (urlScanner.hasNextLine()){\n contents += urlScanner.nextLine();\n }\n urlScanner.close();\n JsonObject recipes = (JsonObject)Jsoner.deserialize(contents,new JsonObject());\n\n return recipes;\n }", "@Override\n protected ArrayList<Recipe> doInBackground(Set<String>... params) {\n HttpURLConnection connection;\n BufferedReader reader;\n ArrayList<Recipe> recipeList = new ArrayList<>();\n\n try {\n StringBuilder urlBuilder = new StringBuilder(\"https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/findByIngredients?\");\n urlBuilder.append(\"fillIngredients=false&\"); // don't request information about what's used and what isn't\n urlBuilder.append(\"limitLicense=false&\"); // show recipes without regard to attribution license\n urlBuilder.append(\"number=5&\"); // how many recipes to return\n urlBuilder.append(\"ranking=2&\"); // minimize missing ingredients first\n urlBuilder.append(\"ingredients=\");\n Set<String> query = params[0];\n for (String s : query)\n urlBuilder.append(s + \"%2C\");\n urlBuilder.delete(urlBuilder.length() - 3, urlBuilder.length());\n URL url = new URL(urlBuilder.toString());\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestProperty(\"X-Mashape-Key\", MainActivity.KEY);\n connection.connect(); //connects to server and returns data as input stream\n\n InputStream stream = connection.getInputStream();\n\n // Parse input\n reader = new BufferedReader(new InputStreamReader(stream));\n StringBuilder buffer = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String finalJson = buffer.toString();\n\n JSONArray parentArray = new JSONArray(finalJson);\n\n // Create list of recipes (recipe handles JSON parsing)\n for (int i = 0; i < parentArray.length(); i++)\n recipeList.add(new Recipe(a, parentArray.getJSONObject(i).toString()));\n\n if (connection != null) {\n connection.disconnect();\n }\n if (reader != null) {\n reader.close();\n }\n\n } catch (IOException e) {\n recipeList.add(new Recipe(a, \"API connection exception occurred\", 0));\n } catch (JSONException e) {\n recipeList.add(new Recipe(a, \"JSON read exception occurred\", 0));\n }\n\n return recipeList;\n\n }", "public static List<BakingRecipe> getBakingRecipes(String bakingJsonStr) throws JSONException {\n // Declare and initialize variables to return results\n\n List<BakingRecipe> bakingRecipes = new ArrayList<>();\n\n // Check if there are actual results\n JSONArray bakingJsonArray = new JSONArray(bakingJsonStr);\n if (bakingJsonArray.length() == 0) {\n return null;\n }\n for (int i = 0; i < bakingJsonArray.length(); i++) {\n // Create a bakingRecipe object to put data\n BakingRecipe bakingRecipe = new BakingRecipe();\n // Get the current json recipe\n JSONObject currentRecipeJson = bakingJsonArray.getJSONObject(i);\n // Get information for this recipe\n bakingRecipe.setId(currentRecipeJson.getInt(ID));\n bakingRecipe.setName(currentRecipeJson.getString(NAME));\n // Get ingredients array\n JSONArray ingredientJsonArray = currentRecipeJson.getJSONArray(INGREDIENTS);\n // Create List to hold the recipe ingredients\n List<BakingIngredient> bakingIngredients = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < ingredientJsonArray.length(); j++) {\n // Create a baking ingredient object to hold the ingredient data\n BakingIngredient bakingIngredient = new BakingIngredient();\n // Get the current json ingredient\n JSONObject currentIngredientJson = ingredientJsonArray.getJSONObject(j);\n // Get ingredient data\n bakingIngredient.setQuantity(currentIngredientJson.getDouble(QUANTITY));\n bakingIngredient.setMeasure(currentIngredientJson.getString(MEASURE));\n bakingIngredient.setIngredient(currentIngredientJson.getString(INGREDIENT));\n // Add recipe key to baking ingredient\n bakingIngredient.setRecipeKey(bakingRecipe.getId());\n // add ingredient to ingredients list\n bakingIngredients.add(bakingIngredient);\n }\n // Add ingredients list to baking recipe\n bakingRecipe.setIngredientList(bakingIngredients);\n // Get steps array\n JSONArray stepJsonArray = currentRecipeJson.getJSONArray(STEPS);\n // Create List to hold the recipe ingredients\n List<BakingStep> bakingSteps = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < stepJsonArray.length(); j++) {\n // Create a baking step object to hold the step data\n BakingStep bakingStep = new BakingStep();\n // Get the current JSON step\n JSONObject currentStepJson = stepJsonArray.getJSONObject(j);\n // Get step data\n bakingStep.setId(currentStepJson.getInt(ID));\n bakingStep.setShortDescription(currentStepJson.getString(SHORT_DESCRIPTION));\n bakingStep.setDescription(currentStepJson.getString(DESCRIPTION));\n bakingStep.setVideoURL(currentStepJson.getString(VIDEO_URL));\n bakingStep.setThumbnailURL(currentStepJson.getString(THUMBNAIL_URL));\n // add recipe key to baking step\n bakingStep.setRecipeKey(bakingRecipe.getId());\n // add step to steps list\n bakingSteps.add(bakingStep);\n }\n // add steps list to baking recipe\n bakingRecipe.setStepList(bakingSteps);\n bakingRecipe.setServings(currentRecipeJson.getInt(SERVINGS));\n bakingRecipe.setImage(currentRecipeJson.getString(IMAGE));\n // add baking recipe to baking recipe list\n bakingRecipes.add(bakingRecipe);\n }\n // return completed recipe list\n return bakingRecipes;\n }", "@GET\n @Path(\"/getRecipes\")\n public Response getRecipes(\n @QueryParam(\"items\") String ingredients\n ){\n\n try {\n String decodedRecipes = URLDecoder.decode(ingredients, \"UTF-8\");\n } catch (Exception e){\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"Error\")\n .build();\n }\n\n String baseURL = \"https://api.edamam.com/search\";\n Client client = ClientBuilder.newClient();\n\n WebTarget target = client.target(baseURL)\n .queryParam(\"app_id\", \"d1fc9900\")\n .queryParam(\"app_key\", \"a9307ac9d85fe8df2ad5d37597245915\")\n .queryParam(\"q\", ingredients);\n String response = target.request().get(String.class);\n\n JSONObject jsonObject = new JSONObject(response);\n\n String recipes = jsonObject.get(\"hits\").toString();\n\n JSONArray array = new JSONArray(recipes);\n\n StringBuilder results = new StringBuilder();\n for(int i = 0; i < array.length(); i++){\n JSONObject object = (JSONObject) array.get(i);\n JSONObject recipeObject = (JSONObject) object.get(\"recipe\");\n\n //System.out.println(recipeObject.keySet());\n// System.out.println(\"Label: \" + recipeObject.get(\"label\"));\n// System.out.println(\"Image: \" + recipeObject.get(\"image\"));\n// System.out.println(\"URL: \" + recipeObject.get(\"url\"));\n// System.out.println();\n\n JSONObject data = new JSONObject();\n data.put(\"label\", recipeObject.get(\"label\"));\n data.put(\"image\", recipeObject.get(\"image\"));\n data.put(\"url\", recipeObject.get(\"url\"));\n\n results.append(data.toString() + \"∑\");\n }\n\n System.out.println(results.toString());\n\n return Response.ok(results.toString()).build();\n\n // Parsing JSON response\n\n//\n// ObjectMapper objectMapper = new ObjectMapper();\n//\n// try{\n// Map<String, Object> map = objectMapper.readValue(response, new TypeReference<Map<String, Object>>() {\n// });\n//\n// //StringTokenizer tokenizer = new StringTokenizer(map.get(\"hits\").toString(), \"recipe=\");\n// // System.out.println(map.get(\"hits\"));\n// //System.out.println(map.keySet());\n//\n// }\n// catch (Exception e){\n// System.out.println(\"Error parsing string\");\n// }\n// return null;\n }", "public void parseJson() {\n\n try {\n JSONParser parser = new JSONParser();\n jsonReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/resources/bangor-library.json\")));\n JSONObject jsonObj = (JSONObject) parser.parse(jsonReader);\n \n String name = (String) jsonObj.get(\"name\");\n libraryName = name;\n JSONArray extractedBooks = (JSONArray) jsonObj.get(\"books\");\n\n Iterator i = extractedBooks.iterator();\n while (i.hasNext()) {\n rec = new LibraryRecord();\n rec.setLib_name(libraryName);\n JSONObject innerObj = (JSONObject) i.next();\n rec.setBook_name(innerObj.get(\"name\").toString());\n rec.setAuth_name(innerObj.get(\"author\").toString());\n rec.setCat_name(innerObj.get(\"category\").toString());\n\n if (!LibraryAccess.bookShelves.isEmpty()) {\n for (LibraryRecord bookSaved : LibraryAccess.bookShelves) {\n if (this.rec.getHashOfContent() == bookSaved.getHashOfContent()) {\n duplicate = true;\n rec = null;\n }\n }\n if (!duplicate) {\n LibraryAccess.addRecord(rec);\n }\n duplicate = false;\n\n } else {\n System.out.println(\"Library empty : Adding records...\");\n LibraryAccess.addRecord(this.rec);\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ParseException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void main(String[] args) {\n Gson json = new Gson();\n RestPregunta client = new RestPregunta();\n ArrayList value = client.getPreguntasCuestionario(ArrayList.class, \"68\");\n for(Object ob: value){ \n System.out.println(ob);\n Pregunta pregunta = json.fromJson(ob.toString(), Pregunta.class);\n System.out.println(pregunta.getPregunta());\n }\n client.close();\n //Gson json = new Gson();\n RestPregunta restPregunta = new RestPregunta();\n ArrayList<Pregunta> lista = new ArrayList();\n ArrayList values = restPregunta.getPreguntasCuestionario(ArrayList.class,\"68\");\n for(Object pro: values){\n Pregunta pregunta = json.fromJson(pro.toString(), Pregunta.class);\n lista.add(new Pregunta(pregunta.getIdPregunta(), pregunta.getIdCuestionario(), pregunta.getPuntoAsignado(), pregunta.getPuntoObtenido(), pregunta.getPregunta())); \n }\n// Pregunta pregunta = client.getPregunta(Pregunta.class, \"1\");\n// System.out.println(pregunta);\n// System.out.println(pregunta.toString());\n \n// ArrayList value = client.getPreguntas(ArrayList.class);\n // ArrayList<Pregunta> list = new ArrayList();\n// System.out.println(value);\n \n //list.add(pregunta);\n \n //System.out.println(pregunta.getArchivoimg2());\n \n// Pregunta p = new Pregunta(1,14,400,300,\"5000?\",\"C:\\\\Users\\\\Matias\\\\Pictures\\\\Pictures\\\\Sample Pictures\\\\Desert.jpg\", inputStream,\" \");\n //Object ob = p;\n// client.addPregunta(p, Pregunta.class);\n// System.out.println(list);\n \n }", "public JsonObject getRecipesByDish(String dish) throws Exception\n {\n\n URL url = new URL(baseUrl+\"q=\"+dish);\n\n String contents = \"\";\n Scanner urlScanner = new Scanner(url.openStream());\n while (urlScanner.hasNextLine()){\n contents += urlScanner.nextLine();\n }\n urlScanner.close();\n JsonObject recipes = (JsonObject)Jsoner.deserialize(contents,new JsonObject());\n\n return recipes;\n\n }", "private void extractIDsfromJson(String s) {\n\n ArrayList<MovieAPI> movieAPIArrayList = new ArrayList<>();\n\n try {\n JSONObject jsonObject = new JSONObject(s);\n\n JSONArray jsonArray = jsonObject.getJSONArray(\"results\");\n\n\n for (int i = 0; i < jsonArray.length(); i++) {\n\n\n String m_id = jsonArray.getJSONObject(i).getString(\"id\");\n String mtitle = jsonArray.getJSONObject(i).getString(\"title\");\n String m_img = jsonArray.getJSONObject(i).getString(\"image\");\n\n MovieAPI movieAPI = new MovieAPI(m_id, mtitle, m_img);\n\n movieAPIArrayList.add(movieAPI);\n\n }\n\n updateListView(movieAPIArrayList);\n\n\n\n } catch (Exception e) {\n\n // update the UI to show failed results.\n //updateUI(\"JSON Retrieval Failed\");\n\n e.printStackTrace();\n\n }\n }", "private void getRecipeList(final String real_user) {\n String url = \"http://proj-309-yt-8.cs.iastate.edu/ryans_recipe_retriever.php\";\n StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.d(\"AddCalendarMealActivity/getRecipeList\", response);\n if(response.contains(\":\")) {\n String[] parsed = parseRecipes(response);\n updateList(parsed);\n } else {\n Toast.makeText(getApplicationContext(),\"Error retrieving recipes from database\", Toast.LENGTH_SHORT).show();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"AddCalendarMealActivity/getRecipeList\", error.toString());\n Toast.makeText(getApplicationContext(),\"Error connecting to database.\",Toast.LENGTH_SHORT).show();\n }\n }) {\n /*This is string data POSTed to server file with key-string format*/\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n @SuppressWarnings(\"Convert2Diamond\") Map<String,String> params = new HashMap<String, String>();\n params.put(\"login_id\",real_user);\n return params;\n }\n };\n AppController.getInstance().addToRequestQueue(stringRequest, \"string_req_cal_retrieve_recipes\");\n }", "public void onPostExecute(String result) {\n if (elements != null) elements.clear();\n try {\n JSONObject recipeObject = new JSONObject(result);\n\n JSONArray recipeResults = recipeObject.getJSONArray(\"results\");\n Log.i(\"JSON Array Contents\", recipeResults.toString());\n\n for (int i = 0; i < recipeResults.length(); i++) {\n JSONObject recipes = recipeResults.getJSONObject(i);\n // Pulling items from the array\n\n thumbnailURL = recipes.getString(\"thumbnail\");\n //Log.i(\"Titles\", oldTitle);\n title = recipes.getString(\"title\").replace(\"&quot;\", \"'''\").replace(\"&amp;\", \"&\");\n href = recipes.getString(\"href\");\n ingredients = recipes.getString(\"ingredients\");\n\n elements.add(new Recipe(title, href, ingredients, thumbnailURL));\n Log.i(\"Recipe Objects made: \", elements.toString());\n }\n } catch (JSONException e) {\n\n }\n myRecipeAdapter.notifyDataSetChanged();\n progress.setVisibility(View.INVISIBLE);\n }", "private Recipe mapToRecipeObject(RecipeEntity recipeEntity) {\n\t\tRecipe recipe = new Recipe();\n\t\t//Map primitive fields\n\t\trecipe.setId(recipeEntity.getId());\n\t\trecipe.setName(recipeEntity.getName());\n\t\trecipe.setType(recipeEntity.getType());\n\t\trecipe.setServingCapacity(recipeEntity.getServingCapacity());\n\t\t\n\t\t//Format creation date time to required format\n\t\tif(recipeEntity.getCreationDateTime() != null)\n\t\t\trecipe.setCDateTimeString(Util.formatDateTime(recipeEntity.getCreationDateTime()));\n\t\trecipe.setCreationDateTime(recipeEntity.getCreationDateTime());\n\t\t\n\t\t//Convert ingredients string into list and set to recipe object \n\t\tlog.debug(\"Ingredients String from DB: \"+recipeEntity.getIngredients());\n\t\tList<Ingredient> ingredientsList = Util.convertJSONStringToIngredientsList(recipeEntity.getIngredients());\n\t\tlog.debug(\"Ingredients List size after conversion: \"+ingredientsList.size());\n\t\trecipe.setIngredientsList(ingredientsList);\n\n\t\trecipe.setInstructions(recipeEntity.getInstructions());\n\n\t\treturn recipe;\n\t}", "private void populateRecipeInfo() {\n\t\tString title = currentRecipe.getTitle();\n\t\tString directions = currentRecipe.getDirections();\n\t\tString description = currentRecipe.getDescription();\n\n\t\tfillTextViews(title, description, directions);\n\t\tpopulateIngredientView();\n\t}", "private static FluidIngredient deserializeObject(JsonObject json) {\n if (json.entrySet().isEmpty()) {\n return EMPTY;\n }\n\n // fluid match\n if (json.has(\"name\")) {\n // don't set both, obviously an error\n if (json.has(\"tag\")) {\n throw new JsonSyntaxException(\"An ingredient entry is either a tag or an fluid, not both\");\n }\n\n // parse a fluid\n return FluidMatch.deserialize(json);\n }\n\n // tag match\n if (json.has(\"tag\")) {\n return TagMatch.deserialize(json);\n }\n\n throw new JsonSyntaxException(\"An ingredient entry needs either a tag or an fluid\");\n }", "ArrayList<RecipeObject> getRecipes(String recipeName);", "ArrayList<RecipeObject> getRecipes();", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void init() {\n\n mJokes = new ArrayList<>();\n\n StringBuilder sBuilder = new StringBuilder();\n\n try {\n\n InputStream in = getClass().getResourceAsStream(\"/jokes.json\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String mLine = reader.readLine();\n while (mLine != null) {\n //process line\n sBuilder.append(mLine);\n mLine = reader.readLine();\n }\n\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n String jsonString = sBuilder.toString();\n\n if( jsonString != null ){\n\n JsonParser parser = new JsonParser();\n JsonObject jsonObject = parser.parse(jsonString).getAsJsonObject();\n\n JsonArray jokesArray = jsonObject.getAsJsonArray(\"jokes\");\n\n for (JsonElement element : jokesArray) {\n String joke = element.getAsJsonObject().get(\"joke\").getAsString();\n mJokes.add(joke);\n }\n }\n\n }", "public void parseObject(JSONObject o) {\n\n System.out.println(o);\n\n if (o.containsKey(\"dog\")) {\n //Get employee object within list\n JSONObject dogObject = (JSONObject) o.get(\"dog\");\n\n //Get employee username\n String name = (String) dogObject.get(\"name\");\n System.out.println(name);\n\n String race = (String) dogObject.get(\"race\");\n System.out.println(race);\n\n String size = (String) dogObject.get(\"size\");\n System.out.println(size);\n\n String color = (String) dogObject.get(\"color\");\n System.out.println(color);\n\n Boolean domestic = (Boolean) dogObject.get(\"domestic\");\n\n int age = Integer.parseInt(dogObject.get(\"age\").toString());\n System.out.println(age);\n\n String gender = (String) dogObject.get(\"gender\");\n System.out.println(gender);\n\n dogList.add((JSONObject) o);\n\n //Dog dog = new Dog(name, race, color, domestic, age, gender, size);\n //this.dList.add(dog);\n\n //System.out.println(dogList);\n } else if (o.containsKey(\"costumer\")) {\n System.out.println(o);\n\n //Get employee object within list\n JSONObject costumerObject = (JSONObject) o.get(\"costumer\");\n\n //Get employee username\n String name = (String) costumerObject.get(\"name\");\n System.out.println(name);\n\n String surname = (String) costumerObject.get(\"surname\");\n System.out.println(surname);\n\n String cityOfBirth = (String) costumerObject.get(\"cityOfBirth\");\n System.out.println(cityOfBirth);\n\n String cityOfResidence = (String) costumerObject.get(\"cityOfResidence\");\n System.out.println(cityOfResidence);\n\n String telephone = (String) costumerObject.get(\"telephone\");\n System.out.println(telephone);\n\n String address = (String) costumerObject.get(\"address\");\n System.out.println(address);\n\n String province = (String) costumerObject.get(\"province\");\n System.out.println(province);\n\n String fiscalcode = (String) costumerObject.get(\"fiscalCode\");\n System.out.println(fiscalcode);\n\n//getting the document JsonObject \n JSONObject doc = (JSONObject) costumerObject.get(\"document\");\n String type = (String) doc.get(\"type\");\n System.out.println(type);\n\n String nDocument = (String) doc.get(\"nDocument\");\n System.out.println(nDocument);\n\n String ExpiryDate = (String) doc.get(\"ExpiryDate\");\n System.out.println(ExpiryDate);\n\n IdDocument document = new IdDocument(type, nDocument, ExpiryDate);\n\n Costumer c = new Costumer(name, surname, cityOfBirth, cityOfBirth, cityOfResidence, address, telephone, fiscalcode, province, document);\n\n costumerList.add((JSONObject) o);\n\n this.cList.add(c);\n\n } else if (o.containsKey(\"employee\")) {\n //Get employee object within list\n JSONObject employeeObject = (JSONObject) o.get(\"employee\");\n System.out.println(employeeObject.size());\n\n //Get employee username\n String username = (String) employeeObject.get(\"username\");\n System.out.println(username);\n\n String password = (String) employeeObject.get(\"password\");\n System.out.println(password);\n\n String typeemployee = (String) employeeObject.get(\"typeemployee\");\n System.out.println(typeemployee);\n\n Employee emp = new Employee(username, password, typeemployee);\n\n this.eList.add(emp);\n\n }\n\n }", "private static List<Article> extractFeatureFromJson(String jsonString) {\n\n // If Json string is empty or null, return early\n if (TextUtils.isEmpty(jsonString)) {\n return null;\n }\n\n List<Article> articles = new ArrayList<>();\n\n try {\n\n // Get json root string\n JSONObject jsonObjectString = new JSONObject(jsonString);\n\n // Get the response object in the root json string\n JSONObject responseObj = jsonObjectString.getJSONObject(\"response\");\n\n // Get th array that contains all the articles inside the response\n JSONArray articlesArray = responseObj.getJSONArray(\"results\");\n\n // Loop through every article object in the array\n for (int i = 0; i < articlesArray.length(); i++) {\n\n // get current article at the current index\n JSONObject currentArticle = articlesArray.getJSONObject(i);\n\n // Get the object that contains all fields of info on the currentArticle\n JSONObject feilds = currentArticle.getJSONObject(\"fields\");\n\n // Get the articles title\n String title = feilds.getString(\"headline\");\n\n // Get the articles webUrl\n String url = currentArticle.getString(\"webUrl\");\n\n // Get the articles picture\n String image = feilds.getString(\"thumbnail\");\n\n // Create bitmap from image url string\n Bitmap picture = readImageUrl(image);\n\n // Get Authors name\n String author = feilds.optString(\"byline\");\n\n // Get the date the article was published\n String datePublished = feilds.getString(\"firstPublicationDate\");\n\n // Get the articles section name\n String section = currentArticle.getString(\"sectionName\");\n\n // Create a new article and add it to the list\n articles.add(new Article(title, url, author, image, datePublished, section, picture));\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error parsing json:\" + e);\n }\n\n // Return list of articles\n return articles;\n\n }", "public ArrayList<Product> parseJSONAction(String textJson){\n \n JSONParser j = new JSONParser();\n \n try {\n \n Map<String, Object> productsListJson = j.parseJSON(new CharArrayReader(textJson.toCharArray()));\n ArrayList<Map<String,Object>> productsList = (ArrayList<Map<String,Object>>) productsListJson.get(\"root\");\n //System.out.println(\"pdd \" + productsList.toString());\n Map<String, Object> cart = productsList.get(0);\n //System.out.println(\"cc \" + cart);\n //System.out.println(\"ggg\" + cart.get(\"cart\"));\n ArrayList<Map<String,Object>> lis = (ArrayList<Map<String,Object>>) cart.get(\"cart\");\n //System.out.println(\"lista \" + lis.toString());\n for(Map<String, Object> en : lis){\n Product p = new Product();\n p.setDetails(en.get(\"numProducts\").toString());\n p.setRef_product((int) Double.parseDouble(en.get(\"refProduct\").toString()));\n p.setPrice((int) Float.parseFloat(en.get(\"totalPrice\").toString()));\n products.add(p);\n }\n \n Map<String, Object> data = productsList.get(1);\n ArrayList<Map<String,Object>> llis = (ArrayList<Map<String,Object>>) data.get(\"data\");\n System.out.println(\"dddd\" + llis.toString());\n int i=0;\n for(Map<String, Object> en : llis){\n Product pro = products.get(i);\n pro.setName(en.get(\"name\").toString());\n pro.setPhoto(\"http://127.0.0.1/ftbb_web/ftbb_web/public/images/prod/\"+en.get(\"photo\").toString());\n i++;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n return products; \n }", "private Recipe grabRecipeInfo() {\n\t\t// Get the number of images the recipe has\n\t\tImageController.updateImageNumber(currentRecipe);\n\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\tString title = etTitle.getText().toString();\n\t\tString description = etDescription.getText().toString();\n\t\tString directions = etDirections.getText().toString();\n\t\tString email = currentRecipe.getCreatorEmail();\n\t\tRecipe newRecipe = new Recipe();\n\t\tnewRecipe.setName(title);\n\t\tnewRecipe.setDescription(description);\n\t\tnewRecipe.setDirections(directions);\n\t\tnewRecipe.setIngredients(currentRecipe.getIngredients());\n\t\tnewRecipe.setQuantities(currentRecipe.getQuantities());\n\t\tnewRecipe.setUnits(currentRecipe.getUnits());\n\t\tnewRecipe.setCreatorEmail(email);\n\t\tnewRecipe.setRecipeId(currentRecipe.getRecipeId());\n\t\treturn newRecipe;\n\n\t}", "public void updateJSONdata() {\n\n mDispositiuList = new ArrayList<HashMap<String, String>>();\n\n mDispositiusMapper = new HashMap<Integer, Dispositiu>();\n\n JSONParser jsonParser = new JSONParser();\n\n // Building Parameters\n List<NameValuePair> postValues = new ArrayList<NameValuePair>();\n postValues.add(new BasicNameValuePair(\"id_empresa\", String.valueOf(dades.getInt(\"empresa\"))));\n\n // getting JSON Object\n // Note that login url accepts POST method\n JSONObject json = jsonParser.makeHttpRequest(URL_DISPOSITIUS, \"POST\", postValues);\n\n // check log cat from response\n // Log.d(\"DispositiusEmpresa Response\", json.toString());\n\n try {\n\n success = json.getInt(TAG_SUCCESS);\n\n if (success == 1) {\n // dispositius retrieved successfully\n\n mDispositius = json.getJSONArray(TAG_DEVICES);\n\n if (mDispositius != null) {\n\n int len = mDispositius.length();\n for (int i = 0; i < len; i++) {\n JSONObject obj = mDispositius.getJSONObject(i);\n\n // gets the content of each tag\n String id = String.valueOf(obj.getInt(TAG_DEVICEID));\n String nom = obj.getString(TAG_DEVICENAME);\n String flota = obj.getString(TAG_FLOTA);\n String vehicle = obj.getString(TAG_VEHICLE);\n\n // creating new HashMap\n HashMap<String, String> map = new HashMap<String, String>();\n\n map.put(TAG_DEVICEID, id);\n map.put(TAG_DEVICENAME, nom);\n map.put(TAG_FLOTA, flota);\n map.put(TAG_VEHICLE, vehicle);\n\n // adding HashList to ArrayList\n mDispositiuList.add(map);\n\n\n dispositiu = new Dispositiu();\n dispositiu.setId(obj.getInt(TAG_DEVICEID));\n dispositiu.setNom(nom);\n dispositiu.setFlota(flota);\n dispositiu.setVehicle(vehicle);\n dispositiu.setPosition(obj.getDouble(TAG_LAT), obj.getDouble(TAG_LNG));\n\n mDispositiusMapper.put(dispositiu.getId(), dispositiu);\n }\n }\n\n } else {\n // failed to retrieve dispositius\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void parseJson(JSONObject json) {\n try {\n nameRes = new String[json.getJSONArray(\"data\").length()];\n idRes = new String[json.getJSONArray(\"data\").length()];\n photoRes = new String[json.getJSONArray(\"data\").length()];\n bi_id = new BigInteger[json.getJSONArray(\"data\").length()];\n\n for(int i = 0; i < json.getJSONArray(\"data\").length();i++){\n JSONObject record = json.getJSONArray(\"data\").getJSONObject(i);\n nameRes[i] = record.getString(\"name\");\n photoRes[i] = record.getJSONObject(\"picture\").getJSONObject(\"data\").getString(\"url\");\n idRes[i] = record.getString(\"id\");\n String temp_id = record.getString(\"id\");\n BigInteger final_id = new BigInteger(temp_id);\n bi_id[i] = final_id;\n //System.out.println(photoRes[i]);\n //System.out.println(\"main____\"+nameRes[0]);\n }\n\n// listems = new ArrayList<Map<String, Object>>();\n// for (int i = 0; i < nameRes.length; i++) {\n// listem = new HashMap<String, Object>();\n// listem.put(\"photo\", photoRes[i]);\n// listem.put(\"name\", nameRes[i]);\n// listem.put(\"id\", idRes[i]);\n// listem.put(\"bi_id\", bi_id[i]);\n// listems.add(listem);\n// }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n/*\n List<Map<String, Object>> listems = new ArrayList<Map<String, Object>>();\n for (int i = 0; i < nameRes.length; i++) {\n Map<String, Object> listem = new HashMap<String, Object>();\n listem.put(\"photo\", photoRes[i]);\n listem.put(\"name\", nameRes[i]);\n\n listems.add(listem);\n }*/\n }", "List<Gist> deserializeGistsFromJson(String json);", "public static ArrayList<Nutritionix> parse(String json) throws JSONException {\n ArrayList<Nutritionix> nutritionixs = new ArrayList<>();\n\n //JSONArray children = new JSONObject(json).getJSONObject(\"data\").getJSONArray(\"children\");\n //JSONArray children = new JSONObject(json).getJSONObject(\"data\").getJSONArray(\"children\");\n JSONArray hits = new JSONObject(json).getJSONArray(\"hits\");\n\n\n for (int i = 0; i < hits.length(); i++) {\n JSONObject childObject = hits.getJSONObject(i);\n JSONObject childData = childObject.getJSONObject(\"fields\");\n\n //String url = childData.getString(\"item_name\");\n //String title = childData.getString(\"title\");\n String productname = childData.getString(\"item_name\");\n String calories = childData.getString(\"nf_calories\");\n String fats = childData.getString(\"nf_total_fat\");\n\n nutritionixs.add(new Nutritionix(productname,calories,fats));\n }\n return nutritionixs;\n }", "public void generateVehicles(JSONObject resp) throws JSONException {\n birds = new ArrayList<Vehicle>();\n JSONArray items = resp.getJSONArray(\"birds\");\n double lat = 0;\n double lng = 0;\n String id = \"\";\n int bat = 0;\n System.out.println(items.toString());\n System.out.println(\"parsing.....\");\n for(int i=0;i<items.length();++i){\n JSONObject current = (JSONObject) items.get(i);\n //Vehicle(String vendor,String id, int battery, double lat, double lng, double startPrice, double minutePrice)\n //birds.add(new Vehicle(\"bird\",items.get(i).getString(\"id\");\n if(current.getString(\"captive\").equals(\"false\")) {\n JSONObject loc = current.getJSONObject(\"location\");\n lat = loc.getDouble(\"latitude\");\n lng = loc.getDouble(\"longitude\");\n bat = Integer.parseInt(current.getString(\"battery_level\"));\n id = current.getString(\"id\");\n\n Vehicle veh = new Vehicle(\"bird\",id,bat,lat,lng,\"$1 to unlock $0.27 / 1 min\");\n veh.setType(\"scooter\");\n System.out.print(veh);\n\n birds.add(veh);\n }\n }\n/* for(int i=0;i<birds.size();++i){\n System.out.println(birds.get(i));\n }\n */\n\n }", "public void jsonParse () {\n\n //URL with JSON\n String url = \"https://static-ri.ristack-3.nn4maws.net/v1/plp/en_gb/2506/products.json\";\n\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n response -> {\n try {\n JSONArray products = response.getJSONArray(\"Products\");\n\n //Iterating over the list of products in JSON file, using first visible item\n //and last visible item variables from scroll listener\n for(int i = firstItemVisible; i < lastItemVisible; i++){\n JSONObject product = products.getJSONObject(i);\n\n //Extracting the needed data\n String name = product.getString(\"name\");\n String price = product.getString(\"cost\");\n String prodid = product.getString(\"prodid\");\n\n //Extracting the image of product based on its ID from different URL\n String imageURLString = \"http://riverisland.scene7.com/is/image/RiverIsland/\" + product.getString(\"prodid\") + \"_main\";\n URL imageURL = new URL(imageURLString);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 2; //Changing the size of the image\n Bitmap bmp = BitmapFactory.decodeStream(imageURL.openConnection().getInputStream(),null, options);\n\n //Creating new product with necessary parameters\n product newProduct = new product(name,price,prodid,bmp,imageURLString);\n\n //Adding the product to the Array with products\n listOfProducts.add(newProduct);\n }\n\n } catch (JSONException | IOException e) {\n e.printStackTrace();\n }\n\n //Running method to add the adapter\n if(recyclerView.getAdapter()==null) {\n //New adapter if starting\n productAdapter = new Adapter(this, listOfProducts);\n recyclerView.setAdapter(productAdapter);\n }\n else{\n productAdapter.notifyDataSetChanged(); //notifies View reflecting data to refresh\n }\n\n\n }, Throwable::printStackTrace);\n mQueue.add(request);\n }", "@Override\n\t\tprotected ArrayList<HashMap<String, String>> doInBackground(\n\t\t\t\tString... params) {\n\t\t\tDefaultHttpClient httpclient = new DefaultHttpClient(\n\t\t\t\t\tnew BasicHttpParams());\n\t\t\tHttpGet httpget = new HttpGet(\n\t\t\t\t\t\"http://frozen-waters-2700.herokuapp.com/restaurants.json\");\n\t\t\t// this is the URL to our rails server\n\n\t\t\thttpget.setHeader(\"Content-type\", \"application/json\");\n\t\t\t// END\n\t\t\tInputStream inputStream = null;\n\t\t\tString result = null;\n\t\t\tHttpResponse response;\n\t\t\tString value = \"\";\n\t\t\tArrayList<HashMap<String, String>> result_array = new ArrayList<HashMap<String, String>>();\n\t\t\t// This part sends the request and receives the JSON response from\n\t\t\t// the server\n\t\t\t// START\n\t\t\ttry {\n\t\t\t\tresponse = httpclient.execute(httpget);\n\t\t\t\tHttpEntity entity = response.getEntity();\n\n\t\t\t\tinputStream = entity.getContent();\n\t\t\t\t// json is UTF-8 by default i believe\n\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\tnew InputStreamReader(inputStream, \"UTF-8\"), 8);\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\t\tString line = null;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t}\n\t\t\t\tresult = sb.toString();\n\t\t\t\t// END\n\n\t\t\t\t// This part parses the JSON into a a list of dictionaries. Each\n\t\t\t\t// list item is a restaurant, and the dict holds the restuarant\n\t\t\t\t// info\n\t\t\t\t// START\n\t\t\t\tJSONArray json = new JSONArray(result);\n\t\t\t\tfor (int i = 0; i < json.length(); ++i) {\n\t\t\t\t\tHashMap<String, String> dict = new HashMap<String, String>();\n\t\t\t\t\tJSONObject jObject = new JSONObject(json.get(i).toString());\n\t\t\t\t\tvalue = jObject.getString(\"name\");\n\t\t\t\t\tdict.put(\"name\", value);\n\t\t\t\t\tvalue = jObject.getString(\"lat\");\n\t\t\t\t\tdict.put(\"lat\", value);\n\t\t\t\t\tvalue = jObject.getString(\"lng\");\n\t\t\t\t\tdict.put(\"lng\", value);\n\t\t\t\t\tvalue = jObject.getString(\"wait\");\n\t\t\t\t\tdict.put(\"wait\", value);\n\t\t\t\t\tresult_array.add(dict);\n\t\t\t\t\t// END\n\t\t\t\t}\n\n\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result_array;\n\t\t}", "private static List<Debate> extractFeatureFromJson(String debateJSON) {\n if (TextUtils.isEmpty(debateJSON)) {\n return null;\n }\n\n // Create an empty ArrayList that we can start adding earthquakes to\n List<Debate> debates = new ArrayList<>();\n\n\n // Try to parse the JSON response string. If there's a problem with the way the JSON\n // is formatted, a JSONException exception object will be thrown.\n // Catch the exception so the app doesn't crash, and print the error message to the logs.\n try {\n\n // Create a JSONObject from the JSON response string\n JSONObject baseJsonResponse = new JSONObject(debateJSON);\n JSONObject secondJsonResponse = baseJsonResponse.getJSONObject(\"response\");\n\n\n // Extract the JSONArray associated with the key called \"features\",\n // which represents a list of features (or earthquakes).\n JSONArray resultArray = secondJsonResponse.getJSONArray(\"results\");\n\n\n // For each earthquake in the earthquakeArray, create an {@link Earthquake} object\n for (int i = 0; i < resultArray.length(); i++) {\n\n // Get a single earthquake at position i within the list of earthquakes\n JSONObject currentDebate = resultArray.getJSONObject(i);\n\n // For a given earthquake, extract the JSONObject associated with the\n // key called \"properties\", which represents a list of all properties\n // for that earthquake.\n\n // Extract the value for the key called \"mag\"\n String section = currentDebate.getString(\"sectionName\");\n\n // Extract the value for the key called \"place\"\n String articleName = currentDebate.getString(\"webTitle\");\n\n // Extract the value for the key called \"time\"\n String url = currentDebate.getString(\"webUrl\");\n\n // Extract the value for the key called \"url\"\n String time = currentDebate.getString(\"webPublicationDate\");\n\n JSONArray tagsArray = currentDebate.getJSONArray(\"tags\");\n\n String author = null;\n if (tagsArray != null) {\n\n\n for(int j=0;j< tagsArray.length();j++) {\n JSONObject currentTag = tagsArray.getJSONObject(j);\n author = currentTag.getString(\"webTitle\");\n }\n\n }\n\n\n Debate debate = new Debate(section, articleName,author, time, url);\n\n // Add the new {@link Earthquake} to the list of earthquakes.\n debates.add(debate);\n }\n\n } catch (JSONException e) {\n // If an error is thrown when executing any of the above statements in the \"try\" block,\n // catch the exception here, so the app doesn't crash. Print a log message\n // with the message from the exception.\n Log.e(\"QueryUtils\", \"Problem parsing the earthquake JSON results\", e);\n }\n\n // Return the list of earthquakes\n return debates;\n }", "@Override\n protected Void doInBackground(Void... params) {\n manufatures = new ArrayList<Manufatures>();\n // Create an array to populate the spinner\n manufatureslist = new ArrayList<String>();\n // JSON file URL address\n jsonobject = JSONfunctions\n .getJSONfromURL(Config.URL_GET_MANUFACTURE_LIST);\n\n try {\n // Locate the NodeList name\n jsonarray = jsonobject.getJSONArray(\"manufacture\");\n for (int i = 0; i < jsonarray.length(); i++) {\n jsonobject = jsonarray.getJSONObject(i);\n\n Manufatures manufaturesOpt = new Manufatures();\n\n manufaturesOpt.setId(jsonobject.optInt(\"id\"));\n manufaturesOpt.setName(jsonobject.optString(\"name\"));\n\n manufatures.add(manufaturesOpt);\n\n // Populate spinner with country names\n manufatureslist.add(jsonobject.optString(\"name\"));\n\n }\n } catch (Exception e) {\n Log.e(\"Error\", e.getMessage());\n e.printStackTrace();\n }\n return null;\n }", "private static ArrayList<ParsedRestaurant> parseResults(StringBuilder jsonResults){\r\n\t\tboolean validObject = true;\r\n\t\tArrayList<ParsedRestaurant> resultsList = null;\r\n\t\ttry{ \r\n\t\t\tJSONObject jsonObj = new JSONObject(jsonResults.toString());\r\n\r\n\t\t\t//CREATES results from array with tag \"results\" \r\n\t\t\tJSONArray prediJsonArr = jsonObj.getJSONArray(\"results\");\r\n\r\n\t\t\tif(prediJsonArr!=null){\r\n\t\t\t\tresultsList = new ArrayList<ParsedRestaurant>();\r\n\t\t\t\tfor(int i=0; i<prediJsonArr.length(); i++){\r\n\t\t\t\t\tJSONObject objInArr = prediJsonArr.getJSONObject(i);\r\n\r\n\t\t\t\t\t// Create Restaurant instance\r\n\t\t\t\t\tParsedRestaurant newRest = new ParsedRestaurant();\r\n\t\t\t\t\tnewRest.setName(objInArr.getString(\"name\"));\r\n\t\t\t\t\tnewRest.setId(objInArr.getString(\"place_id\"));\r\n\t\t\t\t\tif(objInArr.has(\"rating\"))\r\n\t\t\t\t\t\tnewRest.setRating(objInArr.getDouble(\"rating\"));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tnewRest.setRating(-1);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Here we can check for types and remove those who\r\n\t\t\t\t\t * are not of interest, that we have saved in UNWANTED_TYPES list.\r\n\t\t\t\t\t * else we set the id to 0\r\n\t\t\t\t\t */\r\n\t\t\t\t\tJSONArray taggedTypes = objInArr.getJSONArray(\"types\");\r\n\t\t\t\t\tfor(int j=0; j<taggedTypes.length(); j++){\r\n\t\t\t\t\t\tif(!UNWANTED_TYPES.contains(taggedTypes.getString(j)))\r\n\t\t\t\t\t\t\tnewRest.addTypes(taggedTypes.getString(j));\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tvalidObject = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if the place id is not 0, the object is valid to add\r\n\t\t\t\t\t * else we don't add it.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif(validObject){\r\n\t\t\t\t\t\t//Create location instance\r\n\t\t\t\t\t\tParsedLocation loc = new ParsedLocation();\r\n\t\t\t\t\t\tloc.setLattitude(objInArr.getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lat\"));\r\n\t\t\t\t\t\tloc.setLongitude(objInArr.getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lng\"));\r\n\t\t\t\t\t\tif(objInArr.has(\"vicinity\"))\r\n\t\t\t\t\t\t\tloc.setAddress(objInArr.getString(\"vicinity\")); //VICINITY OR FORMATTED ADDRESS\r\n\t\t\t\t\t\telse if (objInArr.has(\"formatted_address\"))\r\n\t\t\t\t\t\t\tloc.setAddress(objInArr.getString(\"formatted_address\"));\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tloc.setAddress(\"not avaliable..\");\r\n\t\t\t\t\t\tnewRest.setLocation(loc);\r\n\t\t\t\t\t\tresultsList.add(newRest);\r\n\t\t\t\t\t\tLogger.debug(\"Pared restaurant: \"+ newRest.getId() +\" \"+ newRest.getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalidObject = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * the time from the JSON results is delivered to when the next page is\r\n\t\t\t * created is slightly delayed, this allows the method to sleep for 1 second\r\n\t\t\t * and then runs search for the nextPage \r\n\t\t\t * \r\n\t\t\t * UNCOMMENT TO ALLOW +20 PLACES TO BE FETCHED\r\n\t\t\t */\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.MILLISECONDS.sleep(2000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tSystem.out.println(\"TIMEUNIT REST ERROR \"+ e);\r\n\t\t\t}\r\n\r\n\t\t\tString nextPageToken = null;\r\n\r\n\t\t\tif (jsonObj.has(NEXT_PAGE_TOKEN)) {\r\n\t\t\t\tnextPageToken = jsonObj.getString(\"next_page_token\");\r\n\t\t\t\tresultsList.addAll(parseResults(searchNextPage(nextPageToken)));\r\n\t\t\t}\r\n\t\t}catch(JSONException e){\r\n\t\t\tSystem.out.println(\"JSON ERROR \"+ e);\r\n\t\t}\r\n\t\treturn resultsList;\r\n\t}", "private static List<News> extractFeaturesFromJsonResponse(String jsonResponse) {\n List<News> newsList = new ArrayList<>();\n\n try {\n JSONObject baseJsonObject = new JSONObject(jsonResponse);\n // If JSON object does not contain \"response\" return null object\n if (!baseJsonObject.has(Keys.JSON_NEWS_OBJECT_KEY)) {\n return null;\n }\n\n JSONObject response = baseJsonObject.getJSONObject(Keys.JSON_NEWS_OBJECT_KEY);\n JSONArray resultsArray = response.getJSONArray(Keys.JSON_NEWS_ARRAY_KEY);\n\n for (int i = 0; i < resultsArray.length(); i++) {\n JSONObject newsObject = resultsArray.getJSONObject(i);\n\n // Get section name\n String sectionName = newsObject.getString(Keys.JSON_NEWS_SECTION_KEY);\n // Get Headline\n String newsHeadline = newsObject.getString(Keys.JSON_NEWS_HEADLINE_KEY);\n // Get published time\n String publishedTime = newsObject.getString(Keys.JSON_NEWS_PUBLISHED_TIME_KEY);\n // Get web Url\n String webUrl = newsObject.getString(Keys.JSON_NEWS_URL_KEY);\n\n // Get thumbnail URL string\n String newsThumbnailUrlString = null;\n if (newsObject.has(Keys.JSON_NEWS_FIELDS_KEY)) {\n JSONObject field = newsObject.getJSONObject(Keys.JSON_NEWS_FIELDS_KEY);\n\n if (field.has(Keys.JSON_NEWS_THUMBNAIL_KEY)) {\n newsThumbnailUrlString = field.getString(Keys.JSON_NEWS_THUMBNAIL_KEY);\n }\n }\n\n // Get author name\n String authorName = null;\n if (newsObject.has(Keys.JSON_NEWS_TAGS_KEY)) {\n JSONArray tags = newsObject.getJSONArray(Keys.JSON_NEWS_TAGS_KEY);\n if (!tags.isNull(0)) {\n // If first element of array is not null then get the author name\n JSONObject tagsObject = tags.getJSONObject(0);\n if (tagsObject.has(Keys.JSON_NEWS_AUTHOR_NAME_KEY)) {\n authorName = tagsObject.getString(Keys.JSON_NEWS_AUTHOR_NAME_KEY);\n }\n }\n }\n newsList.add(new News(newsHeadline, sectionName, authorName, publishedTime, webUrl, newsThumbnailUrlString));\n }\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Error creating JSON object : extractFeaturesFromJsonResponse() method\", e);\n }\n return newsList;\n }", "private void parse(){\n\t\tfor (Object res : book_results){\n\t\t\tString author = JsonPath.read(res,\"$.name\").toString();\n\t\t\tRole role = new Role(author, \"Author\");\n\t\t\tList<String> books = JsonPath.read(res,\"$./book/author/works_written[*].a:name\");\n\t\t\tmql_map.put(role, books);\n\t\t}\n\t\t\n\t\tfor (Object res : organization_results){\n\t\t\tString businessperson = JsonPath.read(res,\"$.name\").toString();\n\t\t\tRole role = new Role(businessperson, \"Businessperson\");\n\t\t\tList<String> organizations = JsonPath.read(res,\"$./organization/organization_founder/organizations_founded[*].a:name\");\n\t\t\tmql_map.put(role, organizations);\n\t\t}\n\t}", "private void parseJSONResponse(String response) {\n try {\n JSONObject volume = new JSONObject(response);\n String title = volume.getJSONObject(\"volumeInfo\").optString(\"title\");\n String desc = volume.getJSONObject(\"volumeInfo\").optString(\"description\");\n if(desc == \"\"){\n desc = \"no description\";\n }\n JSONObject imageLinks = volume.getJSONObject(\"volumeInfo\").optJSONObject(\"imageLinks\");\n String imageUrl = \"\";\n if(imageLinks != null) {\n imageUrl = imageLinks.optString(\"medium\");\n if(imageUrl == \"\"){\n imageUrl = imageLinks.optString(\"thumbnail\");\n }\n }\n String authors = \"\";\n JSONArray arr = volume.getJSONObject(\"volumeInfo\").optJSONArray(\"authors\");\n\n if(arr != null) {\n for (int i = 0; i < arr.length(); i++) {\n authors += arr.getString(i);\n }\n }\n\n // Save these details in a Volume object.\n currentVolume = new Volume(title, authors, id, desc, imageUrl);\n\n updateViews();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public List<HashMap<String, String>> parse(JSONObject jObject) {\n\n JSONArray jPlaces = null;\n try {\n /** Retrieves all the elements in the 'places' array */\n jPlaces = jObject.getJSONArray(\"predictions\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n /** Invoking getPlaces with the array of json object\n * where each json object represent a place\n */\n return getPlaces(jPlaces);\n }", "@GET(Url.END_POINT)\n Call<ArrayList<Recipe>> getRecipes();", "public void getRestaurants () throws JSONException {\n\t\tint debug = 0; \n\t\tJSONObject js = new JSONObject(console.nextLine());\n\t\tfor (String name : JSONObject.getNames(js)) {\n\t\t\tJSONObject rest = js.getJSONObject(name);\n\t\t\tRestaurant r = new Restaurant(name);\n\t\t\tfor (String s : attributes) {\n\t\t\t\tif (rest.has(s)) {\n\t\t\t\t\tString v = rest.getString(s);\n\t\t\t\t\tif (v.contains(\"&amp;\")) {\n\t\t\t\t\t\tv =v.replace(\"&amp;\", \"and\");\n\t\t\t\t\t}\n\t\t\t\t\tif (v.contains(\"'\")) {\n\t\t\t\t\t\tv = v.replace(\"'\",\"\");\n\t\t\t\t\t}\n\t\t\t\t\tr.add(s,v);\n\t\t\t\t} else {\n\t\t\t\t\tr.add(s,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\trestaurants.add(r);\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "@Override\n public void onUpdateJSONObject(JSONObject root) throws JSONException\n {\n JSONObject itemTypes = root.getJSONObject(\"items\");\n Iterator<String> it = itemTypes.keys();\n HashMap<String, HashMap<String, String>> itemBroadMap = new HashMap<>();\n\n while (it.hasNext())\n {\n //current key\n String itemTypeLabel = it.next();\n\n //use current key to pull JSON Object\n JSONObject item = itemTypes.getJSONObject(itemTypeLabel);\n\n //hashmaps to be saved to our Character object\n HashMap<String, String> itemDetailsMap = new HashMap<>();\n\n //load the most nested hashmap\n itemDetailsMap.put(\"name\", item.getString(\"name\"));\n itemDetailsMap.put(\"icon\", item.getString(\"icon\"));\n itemDetailsMap.put(\"tooltipParams\", item.getString(\"tooltipParams\"));\n\n //now that we have the icon, go ahead and load the imageview with it\n loadImage(item.getString(\"icon\"), itemTypeLabel);\n\n //save detailed hashmap to broad one\n itemBroadMap.put(itemTypeLabel, itemDetailsMap);\n }\n\n //now load broadmap to the character's object\n currentCharacter.setItems(itemBroadMap);\n\n }", "public List<Recipe> getRecipe()\n {\n SQLiteDatabase db = getReadableDatabase();\n SQLiteQueryBuilder qb = new SQLiteQueryBuilder();\n\n //Attributes as they appear in the database\n String[] sqlSelect = {\"recipeid\",\"name\",\"type\",\"description\",\"ingredients\",\"instruction\",\"imageid\",\"nutritionimage\",\"cookingtime\",\"totalcost\"};\n String RECIPE_TABLE = \"Recipe\"; //Table name as it is in database\n\n qb.setTables(RECIPE_TABLE);\n Cursor cursor = qb.query(db,sqlSelect, null,null, null, null, null);\n List<Recipe> result = new ArrayList<>();\n if(cursor.moveToFirst())\n {\n do{\n Recipe recipe = new Recipe();\n recipe.setRecipeid(cursor.getInt(cursor.getColumnIndex(\"recipeid\")));\n recipe.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n recipe.setType(cursor.getString(cursor.getColumnIndex(\"type\")));\n recipe.setDescription(cursor.getString(cursor.getColumnIndex(\"description\")));\n recipe.setIngredients(cursor.getString(cursor.getColumnIndex(\"ingredients\")));\n recipe.setInstruction(cursor.getString(cursor.getColumnIndex(\"instruction\")));\n recipe.setImageid(cursor.getString(cursor.getColumnIndex(\"imageid\")));\n recipe.setNutritionimage(cursor.getString(cursor.getColumnIndex(\"nutritionimage\")));\n recipe.setCookingtime(cursor.getInt(cursor.getColumnIndex(\"cookingtime\")));\n recipe.setTotalcost(cursor.getFloat(cursor.getColumnIndex(\"totalcost\")));\n\n result.add(recipe);\n }while(cursor.moveToNext());\n }\n return result;\n }", "private void parseJsonF1 (String fromAsset) {\n try {\n JSONObject jsonObj = new JSONObject(fromAsset);\n JSONObject jsonObject = jsonObj.getJSONObject(\"data\");\n JSONObject details = jsonObject.getJSONObject(\"details\");\n Iterator<String> itr = details.keys();\n while (itr.hasNext()) {\n String key = itr.next();\n if (key.equals(\"minimumAmount\") || key.equals(\"minimumAmount\") || key.equals(\"suggestedAmount\")) {\n JSONArray jsonArray = details.getJSONArray(key);\n for (int i = 0; i < jsonArray.length(); i++) { // **line 2**\n JSONObject childJSONObject = jsonArray.getJSONObject(i);\n int amount = childJSONObject.getInt(\"amount\");\n String currency = childJSONObject.getString(\"currency\");\n DetailsBean details1 = new DetailsBean();\n details1.setAmout(amount);\n details1.setCurrency(currency);\n detailsList.add(details1);\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void addIngredientRecipe(ArrayList<IngredientRecipePOJO> ingr);", "public Recipe getRecipe(){\n\t\tRecipe recipe = new Recipe();\n\t\trecipe.setName(name);\n\t\trecipe.setNumPersons(numPersons);\n\t\trecipe.setPrepTime(prepTime);\n\t\trecipe.setRestTime(restTime);\n\t\trecipe.setCookingTime(cookingTime);\n\t\tHashMap<Ingredient, Quantity> ingredients = new HashMap<Ingredient,Quantity>();\n\t\tfor(int i = 0; i<ingredientsList.size(); i++){\n\t\t\tingredients.put(ingredientsList.get(i), quantities.get(i));\n\t\t}\n\t\trecipe.setIngredients(ingredients);\n\t\trecipe.setSteps(steps);\n\t\treturn recipe;\n\t}", "private ArrayList<Photo> buildListFromJSON(HttpURLConnection httpURLConnection) {\n ArrayList<Photo> photos = new ArrayList<Photo>();\n BufferedReader bufferedReader = null;\n\n try {\n bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), \"UTF-8\"));\n StringBuilder stringBuilder = new StringBuilder();\n\n String inputStr;\n while ((inputStr = bufferedReader.readLine()) != null) {\n stringBuilder.append(inputStr);\n }\n\n String jsonString = stringBuilder.toString();\n if(jsonString.startsWith(\"jsonFlickrApi\")) {\n // Remove the \"jsonFlickrApi\" tag from the begining of the string\n jsonString = jsonString.substring(13);\n // Remove the enclosing parenthesis from the JSON object\n jsonString = jsonString.substring(1, (jsonString.length() - 1));\n // Remove the response status\n }\n\n JSONObject jsonRoot = new JSONObject(jsonString);\n JSONObject jsonPhotoResult = jsonRoot.getJSONObject(\"photos\");\n JSONArray jsonPhotos = jsonPhotoResult.getJSONArray(\"photo\");\n\n Photo photo = null;\n for(int index = 0; index < jsonPhotos.length(); index++) {\n try {\n photo = new Photo(jsonPhotos.getJSONObject(index));\n photo.setBitmap(this.pullImageAsBitmapFromUrl(photo.getAsUrl()));\n\n photos.add(photo);\n Log.i(\"Success\", \"Photo successfully added to photos list\");\n } catch(JSONException e) {\n Log.e(\"ParsingError\", \"There was an error when trying to create a Photo from the JSONObject\");\n Log.e(\"JSONException\", e.getMessage());\n }\n }\n } catch(IOException e) {\n Log.e(\"IOException\", e.getMessage());\n } catch (JSONException e) {\n Log.e(\"JSONException\", e.getMessage());\n } finally {\n if(bufferedReader != null) {\n try { bufferedReader.close(); }\n catch(IOException e) {}\n }\n }\n\n return photos;\n }", "public HashMap<String,Trail> getJSONData() {\n\t\tHashMap<String,Trail> trailList1 = new HashMap<String,Trail>();\n\t\tString jsonStr;\n\t\tint counter=0;\n\t\n\t\t\ttry {\n\t\t\t\tInputStream is = getResources().openRawResource(\n\t\t\t\t\t\tgetResources().getIdentifier(\"trail_detail\", \"raw\",\n\t\t\t\t\t\t\t\tgetPackageName()));\n\t\t\t\tint size = is.available();\n\t\t\t\tbyte[] buffer = new byte[size];\n\t\t\t\tis.read(buffer);\n\t\t\t\tis.close();\n\t\t\t\tjsonStr = new String(buffer, \"UTF-8\");\n\n\t\t\t\tLog.d(\"Response: \", \"> \" + jsonStr);\n\n\t\t\t\tJSONArray jsonArray = new JSONArray(jsonStr);\n\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\tJSONObject jsonObj = jsonArray.getJSONObject(i);\n counter++;\n\t\t\t\t\tString name =jsonObj.getString(TAG_NAME);\n\t\t\t\t\tDouble length = Double.parseDouble(jsonObj.getString(TAG_LENGTH));\n\t\t\t\t\tString type = jsonObj.getString(TAG_TYPE);\n\t\t\t\t\tString surface = jsonObj.getString(TAG_SURFACE);\n\t\t\t\t\tString amenities = jsonObj.getString(TAG_AMENITIES);\n\t\t\t\t\tString parking = jsonObj.getString(TAG_PARKING);\n\t\t\t\t\tString season = jsonObj.getString(TAG_SEASON);\n\t\t\t\t\tString lighting = jsonObj.getString(TAG_LIGHTING);\n\t\t\t\t\tString maintenance = jsonObj.getString(TAG_MAINTENANCE);\n\t\t\t\t\tString pets = jsonObj.getString(TAG_PETS);\n\t\t\t\t\tString notes = jsonObj.getString(TAG_NOTES);\n\t\t\t\t\tString city = jsonObj.getString(TAG_CITY);\n\n\t\t\t\t\ttrailList1.put(name, new Trail(name, length, type, surface,\n\t\t\t\t\t\t\tamenities, parking, season, lighting, maintenance,\n\t\t\t\t\t\t\tpets, notes, city));\n//\t\t\t trailList.add(new Trail(name, length, type, surface,\n//\t\t\t\t\t\t\tamenities, parking, season, lighting, maintenance,\n//\t\t\t\t\t\t\tpets, notes, city));\n\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\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\n\t\treturn trailList1;\n\t}", "public void addIngredientRecipe(IngredientRecipePOJO ingr);", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "public ArrayList<IngredientRecipePOJO> getAllIngredientRecipeByIdRecipe(String idRecipe);", "private static ArrayList<Question> extractQuestions(Context context, String level) {\n\n // Create an empty ArrayList to store the questions.\n ArrayList<Question> questionList = new ArrayList<>();\n\n try{\n //Create a JSON object to deal with question data\n JSONObject jsonObject = JsonUtils.jsonFileToJSONObject(context, EXTERNAL);\n JSONArray questionArray = jsonObject.getJSONArray(level.toLowerCase());\n\n int numberOfQuestions = questionArray.length();\n for(int i = 0; i < numberOfQuestions; i++){\n JSONObject jsonQuestion = questionArray.getJSONObject(i);\n\n questionList.add(JsonUtils.convertJsonObjectToQuestionObject(jsonQuestion));\n\n }\n\n }catch(IOException | JSONException e){\n // If an error is thrown when executing any of the above statements in the \"try\" block,\n // catch the exception here, so the app doesn't crash. Print a log message\n // with the message from the exception.\n Log.e(\"QueryUtils\", \"Problem parsing the question JSON results\", e);\n }\n\n return questionList;\n }", "@Override\n public void parseJSON(JSONObject jsonObject) {\n if (jsonObject.has(\"business\"))\n try {\n JSONObject businessJsonObject = jsonObject.getJSONObject(\"business\");\n this.businessId = businessJsonObject.getString(\"_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"_id\"))\n try {\n this.foodlogiqId = jsonObject.getString(\"_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"name\"))\n try {\n this.name = jsonObject.getString(\"name\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"associateWith\"))\n try {\n this.associateWith = jsonObject.getString(\"associateWith\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (jsonObject.has(\"attributes\"))\n try {\n this.attributes = new ArrayList<>();\n JSONArray attributesJson = jsonObject.getJSONArray(\"attributes\");\n for (int i = 0; i < attributesJson.length(); i++) {\n JSONObject attributeJson = attributesJson.getJSONObject(i);\n CustomAttribute attribute = new CustomAttribute();\n attribute.parseJSON(attributeJson);\n this.attributes.add(attribute);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private static ArrayList<String> ingredientParse (JSONArray array) {\n\n ArrayList<String> list = new ArrayList<>();\n\n for (int index = 0; index < array.length(); index++) {\n try {\n JSONObject ingredientObject = array.getJSONObject(index);\n double quantity = ingredientObject.optDouble(JSON_QUANTITY);\n String measure = ingredientObject.optString(JSON_MEASURE);\n String ingredient = ingredientObject.optString(JSON_INGREDIENT);\n list.add(quantity + \" \" + measure + \" \" + ingredient + \"\\n\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return list;\n }", "public void restock() {\n List<String> bmwModels = new ArrayList<String>();\n bmwModels.add(\"1 Series\");\n bmwModels.add(\"2 Series\");\n bmwModels.add(\"3 Series\");\n bmwModels.add(\"4 Series\");\n bmwModels.add(\"M4\");\n cars.put(\"BMW\", bmwModels);\n List<String> vauxhallModels = new ArrayList<String>();\n vauxhallModels.add(\"Corsa\");\n vauxhallModels.add(\"Viva\");\n vauxhallModels.add(\"Astra\");\n vauxhallModels.add(\"Insignia\");\n cars.put(\"Vauxhall\", vauxhallModels);\n List<String> fordModels = new ArrayList<String>();\n fordModels.add(\"KA\");\n fordModels.add(\"Fiesta\");\n fordModels.add(\"Focus\");\n fordModels.add(\"Mondea\");\n fordModels.add(\"Kuga\");\n cars.put(\"Ford\", fordModels);\n }", "public ClientModel modelFromJSON(JSONObject newModelJSON) throws JsonSyntaxException {\n\n //Break up ClientModel pieces and build a new ClientModel object manually:\n//GET MAP\n JSONObject newMapJSON = newModelJSON.getJSONObject(\"map\");\n\n //GET RADIUS\n int newCMRadius = newMapJSON.getInt(\"radius\");\n\n//GET HEXES\n JSONArray newHexesJSONArr = newMapJSON.getJSONArray(\"hexes\");\n HashMap<HexLocation, Hex> newHexesMap = parseHexesFromJSON(newHexesJSONArr);\n //HashMap<Hexes> complete! Ready to add to Map obj.\n\n//GET PORTS\n JSONArray newPortsJSONArr = newMapJSON.getJSONArray(\"ports\");\n HashMap<HexLocation, Port> newPortsMap = parsePortsFromJSON(newPortsJSONArr);\n //HashMap<Ports> complete! Ready to add to Map obj.\n\n//GET ROADS\n JSONArray newRoadsJSONArr = newMapJSON.getJSONArray(\"roads\");\n HashMap<EdgeLocation, EdgeValue> newRoadsMap = parseRoadsFromJSON(newRoadsJSONArr);\n //HashMap<Roads> complete! Ready to add to Map obj.\n\n//GET SETTLEMENTS AND CITIES\n JSONArray newStlmtsJSONArr = newMapJSON.getJSONArray(\"settlements\");\n JSONArray newCitiesJSONArr = newMapJSON.getJSONArray(\"cities\");\n\n //THIS HASHMAP HOLDS BOTH CITIES *AND* SETTLEMENTS!! **********\n HashMap<VertexLocation, VertexObject> newCitiesStlmtsMap = parseCitiesAndStlmtsFromJSON(newStlmtsJSONArr, newCitiesJSONArr);\n\n //Settlements/Cities Hashmap<> complete! Ready to add to new Map obj.\n\n//GET ROBBER\n //it's just a HexLocation, but the Robber obj type needs a reference to the Map...?\n //maybe add this Robber obj to the Map after the rest of it has been built up\n JSONObject newRobberJSON = newMapJSON.getJSONObject(\"robber\");\n String newRobberJSONString = newRobberJSON.toString();\n //System.out.println(\"newRobberJSON= \" + newRobberJSON);\n int rX = newRobberJSON.getInt(\"x\");\n int rY = newRobberJSON.getInt(\"y\");\n HexLocation newRobberHexLoc = new HexLocation(rX, rY);\n //try building the actual Robber object after building the Map object,\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//BUILD NEW MAP OBJECT\n Map newCMMap = new Map(newHexesMap, newPortsMap, newCitiesStlmtsMap, newRoadsMap, newRobberHexLoc);\n newCMMap.setRadius(newCMRadius);\n newCMMap.populatePortVertexLocations(); //these are static across the whole game\n Robber newRobber = new Robber(newCMMap);\n\n //Map object is complete! ready to add to new clientModel obj.\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n//GET RESOURCE BANK\n JSONObject newResourceListJSON = newModelJSON.getJSONObject(\"bank\");\n JSONObject newDevCardListJSON = newModelJSON.getJSONObject(\"deck\");\n ResourceBank newCMResourceBank = parseResourceBankFromJSON(newResourceListJSON, newDevCardListJSON);\n //ResourceBank is complete! Ready to add to new ClientModel obj.\n\n//GET PLAYERS ARRAY\n //the ClientModel obj wants these in a Player[].\n JSONArray newPlayersJSONArr = newModelJSON.getJSONArray(\"players\");\n Player[] newPlayersArray = parsePlayersArrFromJSON(newPlayersJSONArr);\n //Player[] is complete! Ready to add to new ClientModel obj.\n\n //GET MESSAGEMANAGER out of CHAT and LOG\n //GET CHAT\n JSONObject newCMChatJSONObj = newModelJSON.getJSONObject(\"chat\");\n MessageList newChatMsgList = parseMsgListFromJSON(newCMChatJSONObj);\n //GET LOG\n JSONObject newCMLogJSONObj = newModelJSON.getJSONObject(\"log\");\n MessageList newLogMsgList = parseMsgListFromJSON(newCMLogJSONObj);\n\n //Put the new Chat and Log MsgListObjs into a new MessageManager object:\n MessageManager newCMMsgMgr = new MessageManager();\n newCMMsgMgr.setChat(newChatMsgList);\n newCMMsgMgr.setLog(newLogMsgList);\n //MessageManager is complete! Ready to add to the new ClientModel obj.\n\n//GET TURNTRACKER\n JSONObject newTurnTrackerJSONObj = newModelJSON.getJSONObject(\"turnTracker\");\n String newTTrackerJSONString = newTurnTrackerJSONObj.toString();\n TurnTracker newCMTurnTracker = gsonConverter.fromJson(newTTrackerJSONString, TurnTracker.class);\n // System.out.println(\">newTTrackerObj= \" + newCMTurnTracker);\n //TurnTracker is complete! Ready to add to the new ClientModel obj.\n\n//GET TRADE OFFER\n TradeOffer newCMTradeOffer = new TradeOffer();\n if (newModelJSON.has(\"tradeOffer\")){\n JSONObject newTradeOfferJSONObj = newModelJSON.getJSONObject(\"tradeOffer\");\n String newTradeOfferJSONString = newTradeOfferJSONObj.toString();\n // System.out.println(\"newTradeOfferString= \" + newTradeOfferJSONString);\n newCMTradeOffer = gsonConverter.fromJson(newTradeOfferJSONString, TradeOffer.class);\n // System.out.println(\">newTradeOfferObj= \" + newCMTradeOffer);\n }\n\n //TradeOffer is complete! Ready to add to the new ClientModel obj.\n\n\n//GET ADDITIONAL INTS/OTHER CLIENTMODEL DATA\n int newCMVersion = newModelJSON.getInt(\"version\");\n int newCMWinner = newModelJSON.getInt(\"winner\");\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//BUILD NEW CLIENTMODEL OBJECT\n newClientModel = new ClientModel(0);\n newClientModel.setVersion(newCMVersion);\n newClientModel.setWinner(newCMWinner);\n newClientModel.setResourceBank(newCMResourceBank);\n newClientModel.setMessageManager(newCMMsgMgr);\n newClientModel.setTurnTracker(newCMTurnTracker);\n newClientModel.setChat(newChatMsgList);\n newClientModel.setLog(newLogMsgList);\n newClientModel.setTradeOffer(newCMTradeOffer);\n newClientModel.setPlayers(newPlayersArray);\n newClientModel.setMap(newCMMap);\n\n System.out.println(\"===== MODEL TRANSLATION COMPLETE ====\");\n\n return newClientModel;\n }", "public void parseProductFromJson(String jsonData) { \r\n\t\t \r\n Type typeList = new TypeToken<ArrayList<Product>>(){}.getType(); \r\n Gson gson = new Gson(); \r\n ArrayList<Product> products = gson.fromJson(jsonData, typeList); \r\n for(Product product:products) { \r\n System.out.println(\"name---------->\" + product.getpName()); \r\n System.out.println(\"price---------->\" + product.getpPrice()); \r\n } \r\n }", "protected String doInBackground(String... args) {\n // Building Parameters\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(\"idcliente\", pid));\n // getting JSON string from URL\n JSONObject json = jParser.makeHttpRequest(url_products_details, \"GET\", params);\n\n // Check your log cat for JSON reponse\n Log.d(\"All Products: \", json.toString());\n\n try {\n // Checking for SUCCESS TAG\n int success = json.getInt(TAG_SUCCESS);\n\n if (success == 1) {\n // products found\n // Getting Array of Products\n residencia = json.getJSONArray(TAG_RESIDENCIA);\n\n // looping through All Products\n for (int i = 0; i < residencia.length(); i++) {\n JSONObject c = residencia.getJSONObject(i);\n\n // Storing each json item in variable\n String id = c.getString(TAG_PID);\n String address = c.getString(TAG_ADDRESS);\n String hood = c.getString(TAG_HOOD);\n String zip_code = c.getString(TAG_ZIP);\n String city = c.getString(TAG_CITY);\n String state = c.getString(TAG_STATE);\n String begindate = c.getString(TAG_BEGIN);\n String enddate = c.getString(TAG_END);\n String idresp = c.getString(TAG_RESPID);\n\n\n // creating new HashMap\n HashMap<String, String> map = new HashMap<String, String>();\n\n // adding each child node to HashMap key => value\n map.put(TAG_PID, id);\n map.put(TAG_ADDRESS, address);\n map.put(TAG_HOOD, hood);\n map.put(TAG_ZIP, zip_code);\n map.put(TAG_CITY, city);\n map.put(TAG_STATE, state);\n map.put(TAG_BEGIN, begindate);\n map.put(TAG_END, enddate);\n map.put(TAG_RESPID, idresp);\n\n //db.addResidencia(id,address,hood,zip_code,city,state,begindate,enddate,null,null);\n\n\n // adding HashList to ArrayList\n productsList.add(map);\n }\n } else {\n // no products found\n // Launch Add New product Activity\n// Intent i = new Intent(getApplicationContext(),\n// NewProductActivity.class);\n// // Closing all previous activities\n// i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// startActivity(i);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (isOnline()) {\n // Getting recipies through Firebase\n final DatabaseReference recipeRef = FirebaseDatabase.getInstance().getReference(\"ingredients\");\n recipeRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot child : dataSnapshot.getChildren()) {\n arrayList.add(child.getKey());\n ArrayList r = (ArrayList) child.getValue();\n hm.put(child.getKey(), r);\n }\n fillList();\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getCode());\n }\n });\n }\n\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n listView =(ListView) findViewById(R.id.listview);\n }", "public static void main(String[] args) throws Exception {\n JSONParser jsonParser = new JSONParser();\n \nFileReader reader = new FileReader(\"C:\\\\Users\\\\Training\\\\eclipse-workspace\\\\venkatesh\\\\src\\\\main\\\\java\\\\venkatesh\\\\cars.json\");\n \n //Read JSON file\n Object obj = jsonParser.parse(reader);\n \n JSONArray carsList = (JSONArray) obj;\n System.out.println(carsList);\n \n /* \n //Iterate over employee array\n carsList.forEach( emp -> parseEmployeeObject( (JSONObject) emp ) );\n \n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n \n private static void parseEmployeeObject(JSONObject employee)\n {\n //Get employee object within list\n \t\n \t//JSONObject site = (JSONObject)jsonSites.get(i);\n JSONObject employeeObject = (JSONObject) employee.get(\"metadata\");\n \n //Get employee first name\n String firstName = (String) employeeObject.get(\"make\"); \n System.out.println(firstName);\n \n //Get employee last name\n String lastName = (String) employeeObject.get(\"model\"); \n System.out.println(lastName);\n \n //Get employee website name\n String website = (String) employeeObject.get(\"price\"); \n System.out.println(website);\n }\n */\n}", "private void parseItems(List<FlickrPhoto> items, JSONObject jsonBody) throws IOException, JSONException {\n Gson gson = new Gson(); // got gson parsing\n JSONObject photosJsonObject =jsonBody.getJSONObject(\"photos\");\n JSONArray photosJsonArray =photosJsonObject.getJSONArray(\"photo\");\n\n for (int i = 0; i< photosJsonArray.length(); i++){\n JSONObject photoJsonObject = photosJsonArray.getJSONObject(i);\n FlickrPhoto item = gson.fromJson(photoJsonObject.toString(), FlickrPhoto.class);\n int index = item.getDescription().indexOf(getTravelTrackerSignaturePrefixStringWithNL());\n if (index < 0 ) {\n index = item.getDescription().indexOf(getTravelTrackerSignaturePrefixString());\n }\n if (index >= 0 ) {\n item.setDescription(item.getDescription().substring(0, index));\n }\n items.add(item);\n }\n }", "@Override\n public void onClick(View view) {\n recipes = new ArrayList<>();\n\n // Setup url\n if(!etSearch.getText().toString().isEmpty()) {\n query = etSearch.getText().toString();\n }\n\n url = \"https://api.edamam.com/search?q=\" + query + \"&app_id=\" + APP_ID + \"&app_key=\" + APP_KEY + \"&to=30\";\n\n // Grab the data from the recipes website, populating the recipes list\n getData();\n }", "public synchronized String composeJSONfromSQLite(){\n ArrayList<HashMap<String, String>> wordList;\n wordList = new ArrayList<HashMap<String, String>>();\n String selectQuery = \"SELECT * FROM farmers where updateStatus = '\"+\"no\"+\"' LIMIT 10\";\n SQLiteDatabase database = this.getWritableDatabase();\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n HashMap<String, String> map = new HashMap<String, String>();\n map.put(\"userId\", cursor.getString(0));\n map.put(\"title\", cursor.getString(1));\n map.put(\"farmerID\", cursor.getString(2));\n map.put(\"surname\", cursor.getString(3));\n map.put(\"firstname\", cursor.getString(4));\n map.put(\"middlename\", cursor.getString(5));\n map.put(\"gender\", cursor.getString(6));\n map.put(\"dob\", cursor.getString(7));\n map.put(\"educationlevel\", cursor.getString(8));\n map.put(\"phoneNumber\", cursor.getString(9));\n map.put(\"phoneNumber2\", cursor.getString(10));\n\n map.put(\"village\", cursor.getString(11));\n map.put(\"farmersaddress\", cursor.getString(12));\n map.put(\"maritalstatus\", cursor.getString(13));\n map.put(\"preferredlanguage\", cursor.getString(14));\n map.put(\"county\", cursor.getString(15));\n map.put(\"district\", cursor.getString(16));\n map.put(\"area\", cursor.getString(17));\n map.put(\"vcr\", cursor.getString(18));\n\n map.put(\"primary_crop\", cursor.getString(19));\n map.put(\"farmerscrop\", cursor.getString(20));\n map.put(\"tree_crops\", cursor.getString(21));\n map.put(\"roots\", cursor.getString(22));\n map.put(\"fruits\", cursor.getString(23));\n map.put(\"legumes\", cursor.getString(24));\n map.put(\"vegetables\", cursor.getString(25));\n\n map.put(\"farmsize\", cursor.getString(26));\n map.put(\"farmlocation\", cursor.getString(27));\n map.put(\"farmerslivestock\", cursor.getString(28));\n map.put(\"farmersfisheries\", cursor.getString(29));\n\n map.put(\"member_question\", cursor.getString(30));\n map.put(\"groupname\", cursor.getString(31));\n map.put(\"groupleadername\", cursor.getString(32));\n map.put(\"groupleaderphone\", cursor.getString(33));\n map.put(\"picture\", cursor.getString(34));\n map.put(\"adminfullName\", cursor.getString(35));\n map.put(\"adminphoneNumber\", cursor.getString(36));\n map.put(\"admincounty\", cursor.getString(37));\n map.put(\"admindistrict\", cursor.getString(38));\n map.put(\"imei\", cursor.getString(39));\n map.put(\"dateCreated\", cursor.getString(40));\n map.put(\"updateStatus\", cursor.getString(41));\n\n wordList.add(map);\n } while (cursor.moveToNext());\n }\n database.close();\n Gson gson = new GsonBuilder().create();\n //Use GSON to serialize Array List to JSON\n return gson.toJson(wordList);\n }", "private static List<News> extractFeatureFromJson(String newsJSON){\n if (TextUtils.isEmpty(newsJSON)) {\n return null;\n }\n\n // Create an empty ArrayList that we can start adding news to\n ArrayList<News> news = new ArrayList<>();\n\n // Try to parse the SAMPLE_JSON_RESPONSE. If there's a problem with the way the JSON\n // is formatted, a JSONException exception object will be thrown.\n // Catch the exception so the app doesn't crash, and print the error message to the logs.\n try {\n\n JSONObject baseJsonObject = new JSONObject(newsJSON);\n\n JSONArray articlesJsonArray = baseJsonObject.getJSONArray(\"articles\");\n\n for (int i=0;i<articlesJsonArray.length();i++){\n JSONObject currentNews = articlesJsonArray.getJSONObject(i);\n\n String title = currentNews.getString(\"title\");\n String description = currentNews.getString(\"description\");\n String url = currentNews.getString(\"url\");\n String urlImage = currentNews.getString(\"urlToImage\");\n\n News exactNews = new News(title,description,url,urlImage);\n news.add(exactNews);\n }\n\n } catch (JSONException e) {\n Log.e(\"QueryUtils\", \"Problem parsing the earthquake JSON results\", e);\n }\n return news;\n }", "public GradeBook readIpGradeBook() throws IOException, ParseException {\n\t\tList<String> cList = new ArrayList<>(); \n Map<String, String> gradeItem = new HashMap<>();\n JSONParser parser = new JSONParser();\t\n Object obj = parser.parse(new FileReader(\"src/inputandOutput/input.json\"));\n JSONArray jsonArray;\n JSONObject jsonObject = null;\n if (obj instanceof JSONArray) {\n \tjsonArray = (JSONArray) obj; \n \tjsonObject=(JSONObject) jsonArray.get(0);\n } else if (obj instanceof JSONObject) {\n jsonObject = (JSONObject)obj;\n }\n JSONArray grdBookArray;\n JSONObject grdBookObject = null;\n if(jsonObject.get(\"GradeBook\") instanceof JSONArray){\n \tgrdBookArray = (JSONArray) jsonObject.get(\"GradeBook\");\n grdBookObject=(JSONObject) grdBookArray.get(0);\n } else if(jsonObject.get(\"GradeBook\") instanceof JSONObject){\n \tgrdBookObject=(JSONObject) jsonObject.get(\"GradeBook\");\n }\n \n\n JSONArray gradingSchemaArray;\n JSONObject gradingSchemaObject = null;\n if(grdBookObject.get(\"GradingSchema\") instanceof JSONArray){\n \tgradingSchemaArray = (JSONArray) grdBookObject.get(\"GradingSchema\");\n \tgradingSchemaObject=(JSONObject) gradingSchemaArray.get(0);\n } else if(grdBookObject.get(\"GradingSchema\") instanceof JSONObject){\n \tgradingSchemaObject=(JSONObject) grdBookObject.get(\"GradingSchema\");\n }\n\n JSONArray grdItemArray;\n JSONObject grdItemObject = null;\n if(gradingSchemaObject.get(\"GradeItem\") instanceof JSONArray){\n \tgrdItemArray = (JSONArray) gradingSchemaObject.get(\"GradeItem\");\n \tfor(int i=0; i<grdItemArray.size();i++){\n \t grdItemObject=(JSONObject) grdItemArray.get(i);\n \t String category = (String) grdItemObject.get(\"Category\");\n \t String percentage = (String) grdItemObject.get(\"Percentage\");\n \t cList.add(category);\n \t gradeItem.put(category, percentage);\n } \n } else if(gradingSchemaObject.get(\"GradeItem\") instanceof JSONObject){\n \tgrdItemObject = (JSONObject) gradingSchemaObject.get(\"GradeItem\");\n \tString category = (String) grdItemObject.get(\"Category\");\n\t String percentage = (String) grdItemObject.get(\"Percentage\");\n\t cList.add(category);\n\t gradeItem.put(category, percentage);\n }\n \n grdBook.setGradeItem(gradeItem);\n \tgrdBook.setCategory(cList);\n return grdBook;\n\t}", "public void getNutritionixIngredientInfo(Recipe curRecipe) {\r\n\r\n ArrayList<NutritionixInfo> nutritionixIngredientList = new ArrayList<NutritionixInfo>();\r\n List<RecipeIngredient> ingredients = this.recipe.getIngredients();\r\n\r\n try {\r\n\r\n // Use the Nutritionix API to lookup nutrition facts info for each one of our ingredients\r\n for (RecipeIngredient ingredient : ingredients) {\r\n String ingredientName = ingredient.getIngredient().getIngredientName();\r\n nutritionixIngredientList.add(nutritionixBean.searchForIngredient(ingredientName, 0, 1));\r\n }\r\n\r\n // Calculate and set the nutrition attributes for this class\r\n for (RecipeIngredient ingredient : ingredients) {\r\n int servings = Math.round(ingredient.getIngredientAmount());\r\n for (NutritionixInfo ni : nutritionixIngredientList) {\r\n this.setCalories(servings * (this.getCalories() + ni.getNfCalories()));\r\n this.setCaloriesFromFat(servings * (this.getCaloriesFromFat() + ni.getNfCaloriesFromFat()));\r\n this.setCholesterol(servings * (this.getCholesterol() + ni.getNfCholesterol()));\r\n this.setDietaryFiber(servings * (this.getDietaryFiber() + ni.getNfDietaryFiber()));\r\n this.setProtein(servings * (this.getProtein() + ni.getNfProtein()));\r\n this.setSaturatedFat(servings * (this.getSaturatedFat() + ni.getNfSaturatedFat()));\r\n this.setSodium(servings * (this.getSodium() + ni.getNfSodium()));\r\n this.setSugars(servings * (this.getSugars() + ni.getNfSugars()));\r\n this.setTotalCarbohydrates(servings * (this.getTotalCarbohydrates() + ni.getNfTotalCarbohydrate()));\r\n this.setTotalFat(servings * (this.getTotalFat() + ni.getNfTotalFat()));\r\n this.setTransFat(servings * (this.getTransFat() + ni.getNfTransFat()));\r\n\r\n this.setCalciumPercentage(servings * (this.getCalciumPercentage() + ni.getNfCalciumDv()));\r\n this.setIronPercentage(servings * (this.getIronPercentage() + ni.getNfIronDv()));\r\n this.setVitaminAPercentage(servings * (this.getVitaminAPercentage() + ni.getNfVitaminADv()));\r\n this.setVitaminCPercentage(servings * (this.getVitaminCPercentage() + ni.getNfVitaminCDv()));\r\n }\r\n }\r\n\r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public static List<DataItem> importFromJSON(Context context){\n FileReader reader = null;\n File file = new File(Environment.getExternalStorageDirectory(), FILE_NAME);\n\n try {\n //Instantiate FileReader with file\n reader = new FileReader(file);\n //Populate DataItems class and return result\n Gson gson = new Gson();\n DataItems dataItems = gson.fromJson(reader, DataItems.class);\n return dataItems.getDataItems();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "public void buildFromCursor(Cursor cursor) throws JSONException {\n\t\tthis.id = cursor.getString(cursor.getColumnIndex(\"id\"));\n\t\tthis.access_token = cursor.getString(cursor.getColumnIndex(\"access_token\"));\n\t\tthis.service = cursor.getString(cursor.getColumnIndex(\"service\"));\n\t\tthis.action = cursor.getString(cursor.getColumnIndex(\"action\"));\n\t\tthis.create_date = cursor.getString(cursor.getColumnIndex(\"create_date\"));\n\n\t\tthis.objects = new JSONObject(cursor.getString(cursor.getColumnIndex(\"objects\")));\n\t}", "public void readInventoryMainJsonFile() throws IOException, ParseException {\n\n\t\t// Providing read-only access to JSON data.\n\t\tJSONParser parser = new JSONParser();\n\n\t\t// Reading the external JSON file.\n\t\tFileReader reader = new FileReader(\".\\\\resources\\\\InventoryMain.json\");\n\n\t\t// Creating main object to store JSONParser, JSONObject and JSONArray.\n\t\tObject inventoryMain = parser.parse(reader);\n\n\t\t// Parsing object to JSONObject from InventoryMain.json file.\n\t\tJSONObject inventoryObj = (JSONObject) inventoryMain;\n\n\t\t// Getting the arrays of JSON file.\n\t\tJSONArray riceArray = (JSONArray) inventoryObj.get(\"Rice\");\n\t\tJSONArray pulseArray = (JSONArray) inventoryObj.get(\"Pulses\");\n\t\tJSONArray wheatArray = (JSONArray) inventoryObj.get(\"Wheat\");\n\n\t\t// Getting details of rice.\n\t\tSystem.out.println(\"Details of Rice are: \");\n\t\tfor (int i = 0; i < riceArray.size(); i++) {\n\t\t\tJSONObject riceDetails = (JSONObject) riceArray.get(i);\n\n\t\t\tString name = (String) riceDetails.get(\"name\");\n\t\t\tlong weight = (long) riceDetails.get(\"weight\");\n\t\t\tlong price = (long) riceDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\n\t\t\t// Calculating price of different types of rice.\n\t\t\tlong ricePrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + riceDetails.get(\"name\") + \" is \" + ricePrice);\n\n\t\t}\n\n\t\t// Getting details of Pulse.\n\t\tSystem.out.println(\"\\nDetails of Pulse are: \");\n\t\tfor (int j = 0; j < pulseArray.size(); j++) {\n\t\t\tJSONObject pulseDetails = (JSONObject) pulseArray.get(j);\n\n\t\t\tString name = (String) pulseDetails.get(\"name\");\n\t\t\tlong weight = (long) pulseDetails.get(\"weight\");\n\t\t\tlong price = (long) pulseDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\n\t\t\t// Calculating price of different types of Pulses.\n\t\t\tlong pulsePrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + pulseDetails.get(\"name\") + \" is \" + pulsePrice);\n\n\t\t}\n\t\t// Getting details of Wheat.\n\t\tSystem.out.println(\"\\nDetails of Wheat are: \");\n\t\tfor (int i = 0; i < wheatArray.size(); i++) {\n\t\t\tJSONObject wheatDetails = (JSONObject) wheatArray.get(i);\n\n\t\t\tString name = (String) wheatDetails.get(\"name\");\n\t\t\tlong weight = (long) wheatDetails.get(\"weight\");\n\t\t\tlong price = (long) wheatDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\t\t\t// Calculating price of different types of Wheat.\n\t\t\tlong wheatPrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + wheatDetails.get(\"name\") + \" is \" + wheatPrice);\n\n\t\t}\n\n\t}", "public List<List<HashMap<String,String>>> parse(JSONObject jObject){\n // Khoi tao cac mang\n List<List<HashMap<String, String>>> routes = new ArrayList<List<HashMap<String,String>>>() ;\n JSONArray jRoutes = null;\n JSONArray jLegs = null;\n JSONArray jSteps = null;\n try {\n // Truy cap vao phan tu chua danh sach tuyen duong\n jRoutes = jObject.getJSONArray(\"routes\");\n for(int i = 0; i < jRoutes.length(); i++){\n jLegs = ((JSONObject)jRoutes.get(i)).getJSONArray(\"legs\");\n List path = new ArrayList<HashMap<String, String>>();\n // Phan tich cac buoc\n for(int j = 0; j < jLegs.length(); j++){\n jSteps = ( (JSONObject)jLegs.get(j)).getJSONArray(\"steps\");\n // Phan tich cac diem\n for(int k = 0; k < jSteps.length(); k++){\n // Danh sach cac duong thang\n String polyline = \"\";\n polyline = (String)((JSONObject)((JSONObject)jSteps.get(k)).get(\"polyline\")).get(\"points\");\n // Giai ma cac duong thang duoc ve tren ban do\n List list = decodePoly(polyline);\n // Gan danh sach cac diem\n for(int l=0;l <list.size();l++){\n HashMap<String, String> hm = new HashMap<String, String>();\n hm.put(\"lat\", Double.toString(((LatLng)list.get(l)).latitude) );\n hm.put(\"lng\", Double.toString(((LatLng)list.get(l)).longitude) );\n path.add(hm);\n }\n }\n routes.add(path);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }catch (Exception e){\n }\n return routes;\n }", "public void retrieveInformation() {\n\n new GetYourJsonTask2().execute(new ApiConnector());\n\n// Retrieve Info from ThingSpeak\n// String lightApi = \"https://api.thingspeak.com/channels/595680/fields/1.json?results=2\";\n// JsonObjectRequest objectRequest =new JsonObjectRequest(Request.Method.GET, lightApi, null,\n// new Response.Listener<JSONObject>() {\n// @Override\n// public void onResponse(JSONObject response) {\n// textView.append(\"lala\");\n// try {\n// JSONArray feeds = response.getJSONArray(\"feeds\");\n// for(int i=0; i<feeds.length();i++){\n// JSONObject jo = feeds.getJSONObject(i);\n// String l=jo.getString(\"field1\");\n// Toast.makeText(getApplicationContext(),l,Toast.LENGTH_SHORT).show();\n// textView.append(l);\n//\n// }\n// } catch (JSONException e) {\n// textView.append(\"error\");\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n//\n// }\n// });\n\n\n\n }", "static void buildCatsList(int zipCode, ArrayList<PetModel> pets) {\n\n String zip = \"\" + zipCode;\n String key = System.getenv(\"PETFINDER_KEY\");\n String urlString = \"http://api.petfinder.com/pet.find?key=\" + key + \"&animal=cat&location=\" + zip\n + \"&format=json\";\n\n System.out.println(\"URL to 'get' from: \" + urlString);\n\n URL url = null;\n try {\n url = new URL(urlString);\n } catch (MalformedURLException e) {\n System.out.println(\"URL malformed\");\n }\n HttpURLConnection connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"oh no\");\n }\n // because we are retrieving...\n try {\n connection.setRequestMethod(\"GET\");\n } catch (ProtocolException e) {\n System.out.println(\"cannot set request method\");\n }\n try {\n connection.connect();\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"ahh\");\n }\n try {\n int responseCode = connection.getResponseCode();\n } catch (IOException e) {\n System.out.println(\"response code failed\");\n }\n\n\n Scanner sc = null;\n try {\n sc = new Scanner(url.openStream());\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"crap\");\n }\n String inline = \"\";\n while (sc.hasNext()) {\n inline += sc.nextLine();\n }\n sc.close();\n\n JSONObject json = new JSONObject(inline);\n json = (JSONObject) json.get(\"petfinder\");\n json = (JSONObject) json.get(\"pets\");\n\n JSONArray json_pets = (JSONArray) json.get(\"pet\");\n for (int i = 0; i < json_pets.length(); i++) {\n PetModel pet = new PetModel();\n JSONObject json_pet = (JSONObject) json_pets.get(i);\n JSONObject json_pet_name = (JSONObject) json_pet.get(\"name\");\n JSONObject json_pet_gender = (JSONObject) json_pet.get(\"sex\");\n JSONObject json_pet_description = (JSONObject) json_pet.get(\"description\");\n JSONObject json_pet_img = (JSONObject) json_pet.get(\"media\");\n\n if (json_pet_img.length() != 0) {\n json_pet_img = (JSONObject) json_pet_img.get(\"photos\");\n JSONArray json_pet_img_arr = (JSONArray) json_pet_img.get(\"photo\");\n\n if (json_pet_img_arr.length() != 0) {\n for (int k = 0; k < json_pet_img_arr.length(); k++) {\n json_pet_img = (JSONObject) json_pet_img_arr.get(k);\n //search for one with better quality...\n //JSONObject json_img_size = (JSONObject) json_pet_img.get(\"@size\");\n if (Objects.equals(json_pet_img.get(\"@size\").toString(), \"x\")) {\n break;\n }\n }\n }\n\n pet.img = json_pet_img.get(\"$t\").toString();\n }\n\n //System.out.println(json_pet_name.get(\"$t\"));\n if (json_pet_name.length() != 0) {\n pet.name = json_pet_name.get(\"$t\").toString();\n }\n if (json_pet_description.length() != 0) {\n pet.description = json_pet_description.get(\"$t\").toString();\n }\n if (json_pet_gender.length() != 0) {\n pet.gender = json_pet_gender.get(\"$t\").toString();\n }\n\n //System.out.println(\"name: \" + pet.name);\n //System.out.println(\"gender: \" + pet.gender);\n //System.out.println(\"description: \" + pet.description);\n\n pets.add(pet);\n }\n }", "@Override\n\t\t\tpublic void process(String key, int status, List<JSONObject> lst) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void process(String key, int status, List<JSONObject> lst) {\n\n\t\t\t}", "private static List<Book> parseServerResponse(String serverResponse) {\n if (TextUtils.isEmpty(serverResponse)) {\n Log.e(LOG_TAG, \"Provided server response is empty, exiting method early\");\n return null;\n }\n\n ArrayList<Book> foundBooks = new ArrayList<>();\n JSONObject response = null;\n try {\n response = new JSONObject(serverResponse);\n JSONArray items = response.getJSONArray(\"items\");\n\n for (int i = 0; i < items.length();\n i++) {\n\n JSONObject currentItem = items.getJSONObject(i);\n JSONObject volumeInfo = currentItem.getJSONObject(\"volumeInfo\");\n\n String infoLink = getInfoLink(volumeInfo);\n Bitmap image = getImage(volumeInfo);\n String title = getFullTitle(volumeInfo);\n String authors = getAuthors(volumeInfo);\n String categories = getCategories(volumeInfo);\n\n foundBooks.add(new Book(infoLink, image, title, authors, categories));\n }\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Problem occured while parsing server response\");\n e.printStackTrace();\n }\n return foundBooks;\n }", "public static ArrayList<Produto> parserJsonProdutos(JSONArray response, Context context){\n\n System.out.println(\"--> Produto: \" + response);\n ArrayList<Produto> tempListaProdutos = new ArrayList<Produto>();\n\n try {\n for (int i = 0; i < response.length(); i++){\n\n JSONObject produto = (JSONObject)response.get(i);\n\n int id = produto.getInt(\"id\");\n int preco_unitario = produto.getInt(\"preco_unitario\");\n int id_tipoproduto = produto.getInt(\"id_tipo\");\n String designacao = produto.getString(\"designacao\");\n\n Produto auxProduto = new Produto(id, preco_unitario, id_tipoproduto, designacao);\n\n tempListaProdutos.add(auxProduto);\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n Toast.makeText(context, \"Error: \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n return tempListaProdutos;\n }", "private static void parseBookObject(JSONObject book){\r\n BookManager.books.add(new Book(Integer.parseInt((String) book.get(\"id\")),(String) book.get(\"name\"),(String) book.get(\"author\")));\r\n }", "List<Map<String, Object>> searchIngredient(String name);", "private void jsonParse() {\n String url = \"http://coms-309-sb-4.misc.iastate.edu:8080/getroommembers\";\n url = url + \"/\" + sessionManager.getRoomid() + \"/\" + sessionManager.getID() + \"/\";\n\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONArray jsonArray = response.getJSONArray(\"Users\");\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject List = jsonArray.getJSONObject(i);\n String temp = List.getString(\"Role\");\n if(temp.equals(\"VIEWER\")){\n temp = \"Viewer\";\n }else if(temp.equals(\"ROOMMATE\")){\n temp = \"Editor\";\n } else{\n temp = \"Owner\";\n }\n items.add(List.getString(\"Name\") + \": \" + temp);\n permissions.add(temp);\n users.add(List.getString(\"Name\"));\n usersID.add(List.getString(\"UserId\"));\n }\n adapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }\n });\n mQueue.add(request);\n }", "public List<Item> parseItemHierJSON(String response) {\n\n\t\tJSONObject jsonObj = new JSONObject(response.trim());\n\t\tJSONObject responseJsonObj = jsonObj.getJSONObject(\"response\");\n\t\tJSONObject outputJSON = new JSONObject();\n\t\tJSONObject ancestorOutputJSON = null, parentOutputJson = null, childOutputJSON = null, actionOutputJSON = null, parentJSON = null;\n\t\tItem itemObj = null;\n\t\tList<Item> itemsList = new ArrayList();\n\n\t\ttry {\n\t\t\tfor (Iterator keys = responseJsonObj.keys(); keys.hasNext();) {\n\t\t\t\t// getting the action\n\t\t\t\tString action = (String) keys.next();\n\n\t\t\t\tJSONObject actionJSON = (JSONObject) responseJsonObj\n\t\t\t\t\t\t.getJSONObject(action);\n\n\t\t\t\t// getting the parent\n\t\t\t\tfor (Iterator parents = actionJSON.keys(); parents.hasNext();) {\n\n\t\t\t\t\tString parentId = (String) parents.next();\n\t\t\t\t\tparentJSON = actionJSON.getJSONObject(parentId);\n\n\t\t\t\t\tJSONObject ancestorJSON = parentJSON\n\t\t\t\t\t\t\t.getJSONObject(\"ANCESTORS\");\n\t\t\t\t\tancestorOutputJSON = new JSONObject();\n\t\t\t\t\tchildOutputJSON = new JSONObject();\n\t\t\t\t\tfor (Iterator childKey = ancestorJSON.keys(); childKey\n\t\t\t\t\t\t\t.hasNext();) {\n\t\t\t\t\t\tString childKeyValue = (String) childKey.next();\n\t\t\t\t\t\tJSONObject thisObj = ancestorJSON\n\t\t\t\t\t\t\t\t.getJSONObject(childKeyValue);\n\t\t\t\t\t\titemObj = new Item();\n\t\t\t\t\t\titemObj.setParentId(parentId);\n\n\t\t\t\t\t\titemObj.setItemName(childKeyValue);\n\t\t\t\t\t\titemObj.setStatusLevel(thisObj\n\t\t\t\t\t\t\t\t.getString(\"status_level\"));\n\t\t\t\t\t\titemObj.setStatusMessage(thisObj\n\t\t\t\t\t\t\t\t.getString(\"status_message\"));\n\t\t\t\t\t\titemObj.setItemType(thisObj.getString(\"itemType\"));\n\n\t\t\t\t\t\titemsList.add(itemObj);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// }\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"exception parseItemHierJSON\" + ex.getMessage());\n\t\t\treturn null;\n\t\t} finally {\n\n\t\t}\n\n\t\treturn itemsList;\n\n\t}", "public List<List<HashMap<String, String>>> parseRouteFormJSON(JSONObject jObject) {\n List<List<HashMap<String, String>>> routes = new ArrayList<List<HashMap<String, String>>>();\n JSONArray jRoutes = null;\n JSONArray jLegs = null;\n JSONArray jSteps = null;\n try {\n jRoutes = jObject.getJSONArray(\"routes\");\n /** Traversing all routes */\n for (int i = 0; i < jRoutes.length(); i++) {\n jLegs = ((JSONObject) jRoutes.get(i)).getJSONArray(\"legs\");\n List<HashMap<String, String>> path = new ArrayList<HashMap<String, String>>();\n\n /** Traversing all legs */\n for (int j = 0; j < jLegs.length(); j++) {\n jSteps = ((JSONObject) jLegs.get(j)).getJSONArray(\"steps\");\n\n /** Traversing all steps */\n for (int k = 0; k < jSteps.length(); k++) {\n String polyline = \"\";\n polyline = (String) ((JSONObject) ((JSONObject) jSteps\n .get(k)).get(\"polyline\")).get(\"points\");\n List<LatLng> list = decodePoly(polyline);\n\n /** Traversing all points */\n for (int l = 0; l < list.size(); l++) {\n HashMap<String, String> hm = new HashMap<String, String>();\n hm.put(\"lat\",\n Double.toString(((LatLng) list.get(l)).latitude));\n hm.put(\"lng\",\n Double.toString(((LatLng) list.get(l)).longitude));\n path.add(hm);\n }\n }\n routes.add(path);\n }\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n }\n return routes;\n }", "public void parseData(JSONObject jsonObject, String title) { \n JSONArray value = jsonObject.getJSONArray(\"docs\"); \n\n //println(\"Size: \" + value.size());\n\n //-----Goes through all entries-----// \n if (value.size() != 0) {\n //MyEntries newEntry = new MyEntries(title);\n //AnimalList newList = new AnimalList(title);\n for (int i = 0; i < value.size (); i++) {\n //println(i);\n JSONObject entry = value.getJSONObject(i); \n DplaItem item = new DplaItem(entry);\n //newList.add(item);\n\n String country = item.getCountry();\n if (!country.equals(\"NA\")) { //if has a country info\n println(\"[\" + item.getCountry() + \"]\");\n AnimalList tempList;\n try {\n HashMap<String, AnimalList> animals = directory.get(country); //get the map by country name key\n try {\n tempList = animals.get(title); //get the list of one kind of animal by animal name key\n tempList.add(item);\n //println(\"Added \" + title + \" in \" + country);\n }\n catch (Exception f) {\n tempList = new AnimalList(title);\n tempList.add(item);\n animals.put(title, tempList);\n //println(\"Created \" + title + \" for \" + country);\n println(\"Loading images, please be patient\");\n tempList.getImageCSV();\n// if (tempList.getImageUrl().equals(\"NA\") ) { //search weird images on DPLA\n// tempList.searchImage(country);\n// }\n }\n } \n catch (Exception e) {\n HashMap<String, AnimalList> newMap = new HashMap();\n tempList = new AnimalList(title);\n tempList.add(item);\n newMap.put(title, tempList);\n directory.put(country, newMap);\n //println(\"Created \" + country + \" with \" + title );\n println(\"Loading images, please be patient\");\n tempList.getImageCSV();\n// if (tempList.getImageUrl().equals(\"NA\") ) {\n// tempList.searchImage(country);\n// } \n }\n }//if\n }//end outer for loop\n }//if\n }", "public void onClickSearchRecipe(View view, String searchIngredients) {\n resultsText.setText(\"\");\n searchQuery = searchIngredients;\n //Log.d(\"test\",searchQuery);\n resultPagination = 0;\n //create string for allowedIngredients\n String result[] = searchQuery.trim().split(\"\\\\s*,\\\\s*\");\n String urlString = \"/v1/api/recipes?_app_id=\" + APP_ID + \"&_app_key=\" + APP_KEY + \"&maxResult=20\" + \"&start=\" + resultPagination;\n //goes through array and append allowedIngredient onto it if matches alphabet\n int numberOfIngredients = 0;\n for (String s : result) {\n numberOfIngredients ++;\n //Log.i(\"Word\",s);\n //matches correctly even if user enters garlic, , cognac\n if (s.matches(\"[a-zA-Z]+\")) {\n //Log.i(\"DING\",\"DING\");\n s = s.toLowerCase();\n urlString = urlString + \"&allowedIngredient[]=\" + s;\n }\n }\n Log.i(\"STRING\", urlString);\n\n GetRecipeDataService service = RetrofitInstance.getRetrofitInstance().create(GetRecipeDataService.class);\n\n /*Call the method with parameter in the interface to get the recipe data*/\n //Call<RecipeList> call = service.searchForRecipe(APP_ID, APP_KEY, \"soup\", 2, 0);\n //Call<RecipeList> call = service.searchForRecipe(APP_ID, APP_KEY, searchQuery);\n Call<RecipeList> call = service.allowedIngredients(urlString);\n\n /*Log the URL called*/\n Log.wtf(\"URL Called\", call.request().url() + \"\");\n\n\n // Utilize call object via async or sync\n // let's use the Call asynchronously\n final int finalNumberOfIngredients = numberOfIngredients;\n call.enqueue(new Callback<RecipeList>() {\n\n // 1. Need onResponse\n @Override\n public void onResponse(Call<RecipeList> call, Response<RecipeList> response) {\n// Log.d(TAG, \"Total number of questions fetched : \" + response.body());\n// Log.e(\"OnResponse\", \"OK\");\n// Log.d(\"TEST\", response.message());\n //check if results are empty.\n if (response.body().getMatches().isEmpty()){\n resultsText.setText(\"No Results\");\n }\n generateRecipeList(response.body().getMatches(), finalNumberOfIngredients);\n //loadBar.setVisibility(View.INVISIBLE);\n }\n\n // 2. Need onFailure\n @Override\n public void onFailure(Call<RecipeList> call, Throwable t) {\n Log.e(\"OnFailure\", \"Fail\");\n Toast.makeText(getContext(), \"Error\", Toast.LENGTH_SHORT).show();\n //loadBar.setVisibility(View.INVISIBLE);\n }\n });\n }", "public Iterable<Map<String,String>> get() {\n\t\tList<Map<String,String>> mapList = new ArrayList<Map<String,String>>();\n\t\tJsonParser parser = new JsonParser(); \n\t\tJsonObject json ;\n\t\tfor(String jsonString:jsonArr) {\n\t\t\tMap<String,String> sourceMap = new HashMap<String,String>();\n\t\t\tjson = (JsonObject) parser.parse(jsonString);\n\t\t\tsourceMap.put(\"SENSORID\", json.get(\"taxi_identifier\").toString());\n\t\t\tsourceMap.put(\"trip_time_in_secs\", json.get(\"trip_time_in_secs\").toString());\n\t\t\tsourceMap.put(\"trip_distance\", json.get(\"trip_distance\").toString());\n\t\t\tsourceMap.put(\"fare_amount\", json.get(\"fare_amount\").toString());\n\t\t\tsourceMap.put(\"tip_amount\", json.get(\"tip_amount\").toString());\n\t\t\tsourceMap.put(\"surcharge\", json.get(\"surcharge\").toString());\n\t\t\tmapList.add(sourceMap);\n\t\t}\n\t\t\n\t\t\n\t\treturn mapList;\n\t}", "public void convert() throws IOException {\n URL url = new URL(SERVICE + City + \",\" + Country + \"&\" + \"units=\" + Type + \"&\" + \"APPID=\" + ApiID);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = reader.readLine();\n // Pobieranie JSON\n\n // Wyciąganie informacji z JSON\n //*****************************************************************\n //Temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"{\\\"temp\\\"\") + 8;\n int endIndex = line.indexOf(\",\\\"feels_like\\\"\");\n temperature = line.substring(startIndex, endIndex);\n // System.out.println(temperature);\n }\n //Min temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\",\\\"temp_min\\\"\") + 12;\n int endIndex = line.indexOf(\",\\\"temp_max\\\"\");\n temperatureMin = line.substring(startIndex, endIndex);\n // System.out.println(temperatureMin);\n }\n //Max temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"\\\"temp_max\\\":\") + 11;\n int endIndex = line.indexOf(\",\\\"pressure\\\"\");\n temperatureMax = line.substring(startIndex, endIndex);\n //System.out.println(temperatureMax);\n }//todo dodaj więcej informacji takich jak cisnienie i takie tam\n //*****************************************************************\n }", "public interface Jsonkey {\n\n /*Basic key*/\n public static final String statusCode = \"status_code\";\n public static final String message = \"message\";\n\n\n\n public static final String KEY_CarDeatils = \"cardetail\";\n public static final String Id= \"carId\";\n public static final String Vin = \"vin\";\n public static final String rfid= \"rfid\";\n public static final String make = \"make\";\n public static final String modelYear = \"modelYear\";\n public static final String lotCode = \"lotCode\";\n public static final String color = \"color\";\n public static final String modelNumber = \"modelNumber\";\n public static final String price = \"KEY_price\";\n public static final String miles = \"miles\";\n public static final String fuel = \"fuel\";\n public static final String driveType = \"driveType\";\n public static final String cylinder = \"cylinder\";\n public static final String vehicleType = \"vehicleType\";\n public static final String hasTitle = \"hasTitle\";\n public static final String locationTitle = \"locationTitle\";\n public static final String company = \"company\";\n public static final String stockNumber = \"stockNumber\";\n public static final String purchasedFrom = \"purchasedFrom\";\n public static final String note = \"note\";\n public static final String noteDate = \"noteDate\";\n public static final String gpsInstalled = \"gpsInstalled\";\n public static final String vehicleStatus = \"vehicleStatus\";\n public static final String hasRfid = \"hasRfid\";\n public static final String vacancy = \"vacancy\";\n public static final String vehicleStage = \"vehicleStage\";\n public static final String serviceStage = \"serviceStage\";\n public static final String problem = \"problem\";\n public static final String doneDate = \"doneDate\";\n public static final String doneDateLotCode = \"doneDateLotCode\";\n public static final String mechanic = \"mechanic\";\n public static final String auctionName = \"auctionName\";\n public static final String auctionDate = \"auctionDate\";\n public static final String carReadyForAuction = \"carReadyForAuction\";\n public static final String carAtAuction = \"carAtAuction\";\n public static final String companyInsuranceImage = \"companyInsuranceImage\";\n public static final String registrationDate = \"registrationDate\";\n public static final String insuranceDate = \"insuranceDate\";\n public static final String gasTank = \"gasTank\";\n public static final String hasLocation = \"hasLocation\";\n public static final String model = \"model\";\n public static final String maxHp = \"maxHp\";\n public static final String maxTorque = \"maxTorque\";\n public static final String fuelType = \"fuelType\";\n public static final String oilCapacity = \"oilCapacity\";\n public static final String gps = \"gps\";\n public static final String title = \"title\";\n public static final String count = \"count\";\n public static final String inGps = \"inGps\";\n public static final String images= \"images\";\n public static final String stage= \"stage\";\n public static final String salesPrice= \"salesPrice\";\n\n\n /* \"images\": [\n \"http://drivehere.com/inventory2/app/webroot/files/images/1480782684373Image.jpeg\",\n \"http://drivehere.com/inventory2/app/webroot/files/images/1480782687411.jpg\",\n \"http://drivehere.com/inventory2/app/webroot/files/images/1480974299633Image.jpeg\"\n ],\n \"imageCompanyInsurance\": null,\n \"imageCount\": 3,\n \"userId\": \"0\",\n \"purchasePrice\": \"6295.00\",\n \"reconExp\": \"\",\n \"tradeInAmount\": \"0.00\",\n \"cost\": \"0.00\",\n \"salesPrice\": \"0.00\",\n \"userWhoUploaded\": \"50\",\n \"dateSold\": \"0000-00-00 00:00:00\",\n \"customerFullName\": \"\",\n \"mpgCity\": \"\",\n \"mpgHighway\": \"\",\n \"transmissionType\": \"\",\n \"gears\": \"\",\n \"\": \"Ready\",\n \"dateoneInformation\": \"\",\n \"createdDate\": \"2016-11-29 05:50:42\",\n \"modifiedDate\": \"2017-01-13 11:31:20\",\n \"atTheAuction\": \"\",\n \"floorPrice\": \"\",\n \"condition\": \"\",\n \"auctionMile\": \"\",\n \"auctionNote\": \"\",\n \"carReady\": \"\",\n \"status\": \"0\",\n \"scannDate\": \"2017-01-13 09:31:10\",\n \"stageDate\": \"12/05/2016\",\n \"insuranceExpirationDate\": \"0000-00-00\",\n \"inspectionExperationDate\": \"0000-00-00\",\n \"isDecode\": \"false\",\n \"greetingMiles\": \"\",\n \"missing\": null*/\n}", "private void addItemToList(String name, String cookedDate) {\n// HashMap<String, String> item = new HashMap<>();\n// item.put(RECIPE_NAME, name);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date expired = new Date();\n try {\n Date cooked = format.parse(cookedDate);\n long date = cooked.getTime() + 4*24*60*60*1000;\n expired = new Date(date);\n } catch (Exception e) {\n e.printStackTrace();\n }\n//\n// item.put(EXPIRE_DATE, format.format(expired));\n// fridgeItems.add(item);\n\n JSONObject fridgeJSON = new JSONObject();\n try {\n fridgeJSON.put(RECIPE_NAME, name);\n fridgeJSON.put(EXPIRE_DATE, format.format(expired));\n fridgeJSON.put(USERNAME, username);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n addIntoServer(fridgeJSON);\n\n }", "public List<Response> getObjectList(String key) {\n Object value = get(key);\n List<Response> responseList;\n if ((value instanceof List) && !((List)value).isEmpty() && (((List)value).get(0) instanceof JSONObject)) {\n responseList = new ArrayList<>(((List)value).size());\n ((List)value).forEach(obj -> responseList.add(new Response((JSONObject<String, Object>)obj)));\n } else {\n responseList = emptyObjectList;\n }\n return responseList;\n }", "private ArrayList<Club> parseClubJSONInfo(String clubJSONInfo)\n\t{\n\t\tArrayList<Club> clubs = new ArrayList<Club>();\n\t\tClub c;\n\t\ttry\n\t\t{\n\t\t\tJSONObject jsonObject = new JSONObject(clubJSONInfo); //a big string of values\n\t\t\t\n\t\t\t//Club Data -- contains ALL clubs\n \t\tJSONArray clubsArray = jsonObject.getJSONArray(\"clubs\");\n \t\t\n \t\tif(clubsArray.length() > 0)\n \t\t{\n\t \t\t// Grab the first club\n \t\t\tfor(int y = 0; y < clubsArray.length(); y++) \n\t\t\t\t{\n \t\t\t\tJSONObject club = clubsArray.getJSONObject(y);\n\t\t\t\t\n\t\t\t\t\t// Take all the info from the club JSON file\n\t\t\t\t\t\n\t\t\t\t\t//get the geopoint from the lat and lon\n\t\t\t\t\tdouble latitude = Double.parseDouble(club.getString(\"lat\"));\n\t\t\t double lonitude = Double.parseDouble(club.getString(\"lon\"));\n\t\t\t LatLng marker = new LatLng(latitude, lonitude);\n\t\t\t\t\tGeoPoint geo = new GeoPoint((int) (latitude * 1E6), (int) (lonitude * 1E6));\n\t\t\t\t\t\n\t\t\t\t\tString name = club.getString(\"name\");\n\t\t\t\t\tString grounds = club.getString(\"grounds\");\n\t\t\t\t\tString description = club.getString(\"description\");\n\t\t\t\t\tString colours = club.getString(\"colours\");\n\t\t\t\t\tString website = club.getString(\"website\");\n\t\t\t\t\tString facebook = club.getString(\"facebook\");\n\t\t\t\t\tString twitter = club.getString(\"twitter\");\n\t\t\t\t\tString email = club.getString(\"email\");\n\t\t\t\t\tString phone = club.getString(\"phone\");\n\t\t\t\t\t\n\t\t\t\t\t//now fill out the description\n\t\t\t\t\tString info = \"\"; \n\t\t\t\t\tif(grounds.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Log.i(\"log_tag\", \"Grounds = \\\"\" + grounds + \"\\\"\");\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += grounds.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\n\" + grounds.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(description.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += description.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\n\" + description.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(colours.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += \"Colours: \" + colours.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\nColours: \" + colours.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(website.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += \"Web: \" + website.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\nWeb: \" + website.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(facebook.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += \"Facebook: \" + facebook.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\nFacebook: \" + facebook.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(twitter.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += \"Twitter: \" + twitter.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\nTwitter: \" + twitter.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(email.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += \"Email: \" + email.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\nEmail: \" + email.toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(phone.length() != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(info == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinfo += \"Phone: \" + phone.toString();\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tinfo += \"\\nPhone: \" + phone.toString();\n\t\t\t\t\t}\n\t\t\t\t\t//Log.i(\"log_tag\", \"Info = \\\"\" + info + \"\\\"\");\n\t\t\t\t\tc = new Club(name.toString(), info, geo, marker);\n\t\t\t\t\tclubs.add(c);\n\t \t\t}\n \t\t\t\n \t\t\tCollections.sort(clubs);\n \t\t}\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tLog.e(\"log_tag\", \"Error creating JSON Objects:\" + e.toString());\n\t\t}\n\t\t\n\t\treturn clubs;\n\t}", "public Producto[] parseResponse(String jsonAsString){\r\n\r\n //manually parsing to productos\r\n JsonParser parser = new JsonParser();\r\n JsonObject rootObject = parser.parse(jsonAsString).getAsJsonObject();\r\n JsonElement projectElement = rootObject.get(\"productos\");\r\n\r\n Producto [] productos = null;\r\n\r\n if(projectElement != null){\r\n\r\n QuantityDictionay.debugLog(\"LOS PRODUCTOS--->\"+projectElement.toString());\r\n\r\n //Use Gson to map response\r\n Gson gson = new Gson();\r\n //set type of response\r\n Type collectionType = new TypeToken<Producto[]>(){}.getType();\r\n //get java objects from json string\r\n productos = gson.fromJson(projectElement.toString(),collectionType);\r\n\r\n QuantityDictionay.debugLog(\"PARSING SIZE---->\"+productos.length);\r\n\r\n }\r\n\r\n\r\n return productos;\r\n\r\n }", "private static void loadJson(JsonObject object, ConfigImpl config, String key) {\n for (Entry<String, JsonElement> entry : object.entrySet()) {\n String newKey = addToKey(key, entry.getKey());\n loadJson(entry.getValue(), config, newKey);\n }\n }", "@Override\n\t\tprotected Void doInBackground(Void... args) {\n\t\t\t// getting JSON string from URL\n\t\t\tJSONObject json = findFood(tenquan, phuong, duong, thongtinchung);\n\t\t\t// Check your log cat for JSON reponse\n//\t\t\tLog.d(\"Food: \", json.toString());\n\t\t\ttry {\n\t\t\t\tint success = json.getInt(FOOD_TAG_SUCCESS);\n\t\t\t\tif (success == 1) {\n\t\t\t\t\tjArrayFood = json.getJSONArray(FOOD_TAG_FOOD);\n\t\t\t\t\tfor (int i = 0; i < jArrayFood.length(); i++) {\n\t\t\t\t\t\tJSONObject a = jArrayFood.getJSONObject(i);\n\t\t\t\t\t\tMyFood food = new MyFood();\n\t\t\t\t\t\tfood.set_id(Integer.parseInt(a.getString(FOOD_TAG_ID)));\n\t\t\t\t\t\tfood.set_lat(a.getString(FOOD_TAG_LAT));\n\t\t\t\t\t\tfood.set_lng(a.getString(FOOD_TAG_LNG));\n\t\t\t\t\t\tfood.set_name(a.getString(FOOD_TAG_NAME));\n\t\t\t\t\t\tfood.set_address(a.getString(FOOD_TAG_ADDRESS));\n\t\t\t\t\t\tfood.set_ward(a.getString(FOOD_TAG_WARD));\n\t\t\t\t\t\tfood.set_district(a.getString(FOOD_TAG_DISTRICT));\n\t\t\t\t\t\tfood.set_city(a.getString(FOOD_TAG_CITY));\n\t\t\t\t\t\tfood.set_open(a.getString(FOOD_TAG_OPEN));\n\t\t\t\t\t\tfood.set_close(a.getString(FOOD_TAG_CLOSE));\n\t\t\t\t\t\tfood.set_info(a.getString(FOOD_TAG_INFO));\n\t\t\t\t\t\tfood.set_price(Integer.parseInt(a\n\t\t\t\t\t\t\t\t.getString(FOOD_TAG_PRICE)));\n\t\t\t\t\t\tfood.set_favorites(Boolean.parseBoolean(a\n\t\t\t\t\t\t\t\t.getString(FOOD_TAG_FAVORITES)));\n\t\t\t\t\t\tfood.set_Image(a.getString(FOOD_TAG_IMAGE).getBytes());\n//\t\t\t\t\t\tLog.d(\"FOOD\", Integer.toString(food.get_id()));\n\t\t\t\t\t\t_foodList.add(food);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tLog.e(\"ClientConnect\", e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n public void onTaskCompleted(String result, int statusCode) {\n try {\n // TODO: remove the logs\n Log.i(TAG, \"onTaskCompleted: Response code from the API: \" + statusCode);\n if (result != null) {\n this.jsonResponse = result;\n\n } else {\n throw new Exception(\"JsonResponse string is empty\");\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n // Should i create a new class called listing for the \"listings\" ?\n try {\n JSONObject jsonObject = new JSONObject(this.jsonResponse);\n // The listing is actually an array of JsonObjects and not an object of objects, using an array is better than an iterator, i guess\n JSONArray dataArray = jsonObject.getJSONArray(\"data\");\n\n // iterate over the data objects\n for (int index = 0; index < dataArray.length(); index++)\n {\n JSONObject dataArrayObject = dataArray.getJSONObject(index);\n int id = 0;\n // check if values are actually defined\n if (!(dataArrayObject.isNull(\"id\"))) {\n id = dataArrayObject.getInt(\"id\");\n }\n\n String name = \"No name\";\n // check if values are actually defined\n if (!(dataArrayObject.isNull(\"name\"))) {\n name = dataArrayObject.getString(\"name\");\n }\n\n String symbol = \"No symbol\";\n // check if values are actually defined\n if (!(dataArrayObject.isNull(\"symbol\"))) {\n symbol = dataArrayObject.getString(\"symbol\");\n }\n\n String website_slug = \"No website_slug\";\n // check if values are actually defined\n if (!(dataArrayObject.isNull(\"website_slug\"))) {\n website_slug = dataArrayObject.getString(\"website_slug\");\n }\n\n Listing listing = new Listing(id, name, symbol, website_slug);\n\n this.listingList.add(listing);\n\n // TODO: maybe look for somewhere else to put this code\n recyclerView.setAdapter(searchAdapter);\n recyclerView.setLayoutManager(linearLayoutManager);\n // Set any required events listeners (probably scroll, for the endless scroll effect)\n }\n } catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "public String postData() {\n //Post Data\n List<NameValuePair> postParams = new ArrayList<NameValuePair>(1);\n postParams.add(new BasicNameValuePair(\"option\", \"addrecipe\"));\n postParams.add(new BasicNameValuePair(\"recipename\", txtName.getText().toString()));\n postParams.add(new BasicNameValuePair(\"description\", txtDesc.getText().toString()));\n postParams.add(new BasicNameValuePair(\"catid\", catIDs[categories.getSelectedItemPosition()]));\n postParams.add(new BasicNameValuePair(\"cuisineid\", String.valueOf(cuisines.getSelectedItemPosition()+1)));\n postParams.add(new BasicNameValuePair(\"ingredients\", txtIng.getText().toString()));\n postParams.add(new BasicNameValuePair(\"procedure\", txtSteps.getText().toString()));\n postParams.add(new BasicNameValuePair(\"author\", mainActivity.getUser().getId()));\n\n try {\n\n // Execute HTTP Post Request\n String response = HttpUtil.getJSONData(Constants.URL_FUNCTIONS, postParams, Constants.TIMEOUT_CONN, Constants.TIMEOUT_SOCKET);\n\n if(response != null)\n {\n //Log.d(\"Http Post Response:\", response);\n return response;\n }\n }catch (Exception e) {\n Log.e(\"RECIPEBOOK\", \"update recipe\", e);\n }\n return null;\n }", "private static List<CityData> extractFeatureFromJson(String cityDataJSON) {\n // Si la String cityDataJSON es nula o está vacía, se devuelve el resultado.\n if (TextUtils.isEmpty(cityDataJSON)) {\n return null;\n }\n // Crea una ArrayList vacía a la que podemos añadir datos de ciudad.\n ArrayList<CityData> cityDatas = new ArrayList<>();\n\n // Intenta hacer parse a la JSON response.\n try {\n // Crea un JSONObject que es el root de la API.\n JSONObject baseJsonObject = new JSONObject(cityDataJSON);\n\n // Extrae la JSONArray asociada la key \"list\".\n JSONArray cityDataArray = baseJsonObject.getJSONArray(\"list\");\n\n // Por cada ciudad en la cityData JSONArray crea un objeto CityData.\n for (int i = 0; i < cityDataArray.length(); i++) {\n // Escoge únicamente un elemento de la lista.\n JSONObject currentCityData = cityDataArray.getJSONObject(i);\n\n // Extrae el valor de la key llamada \"name\".\n String nombre = currentCityData.getString(\"name\");\n\n // Por cada dato de ciudad escoge el JSONObject asociado a la key \"coord\".\n JSONObject coordinates = currentCityData.getJSONObject(\"coord\");\n\n // Extrae el valor de la key llamada \"lon\".\n double longitud = coordinates.getDouble(\"lon\");\n // Extrae el valor de la key llamada \"lat\":\n double latitud = coordinates.getDouble(\"lat\");\n\n // Crea un nuevo objeto CityData con los valores requeridos.\n CityData cityData = new CityData(nombre, longitud, latitud);\n\n // Añade este nuevo objeto a la ArrayList.\n cityDatas.add(cityData);\n }\n } catch (JSONException e) {\n // Si ocurre algún error dentro del bloque try se capta aquí para evitar un cierre de la\n // App.\n Log.e(\"QueryUtils\", \"Problema parsing los resultados del terremoto en JSON\", e);\n\n }\n return cityDatas;\n }", "public static HashMap CreateDbObjByParams(String recipeName, String imageLocation, String usernameId, String imageToken, ArrayList<String> ingredientsArr, String instructions) throws JSONException {\n JsonObject json = new JsonObject();\n json.addProperty(\"imageLocation\", imageLocation);\n json.addProperty(\"imageToken\", imageToken);\n// JSONArray jsArray = new JSONArray(ingredientsArr);\n String arr = new Gson().toJson(ingredientsArr);\n json.addProperty(\"ingredients\", arr);\n json.addProperty(\"instructions\", instructions);\n json.addProperty(\"recipeName\", recipeName);\n json.addProperty(\"usernameId\", usernameId);\n JsonArray jsonArray = new JsonArray();\n jsonArray.add(json);\n\n\n HashMap<String, Object> js = new HashMap();\n js.put(\"imageLocation\", imageLocation);\n js.put(\"imageToken\", imageToken);\n js.put(\"ingredients\", ingredientsArr);\n js.put(\"instructions\", instructions);\n js.put(\"recipeName\", recipeName);\n js.put(\"usernameId\", usernameId);\n\n return js;\n }", "private ArrayList<Weather> parseJSON(String json) throws JSONException {\n ArrayList<Weather> forecast = new ArrayList<>();\n JSONArray jsonArray = new JSONObject(json).getJSONArray(\"list\");\n for (int i = 0; i < jsonArray.length(); i++) {\n Weather weather = new Weather();\n JSONObject jsonDay = jsonArray.getJSONObject(i);\n weather.setTimeStamp(jsonDay.getInt(\"dt\"));\n weather.setHigh(jsonDay.getJSONObject(\"temp\").getDouble(\"max\"));\n weather.setLow(jsonDay.getJSONObject(\"temp\").getDouble(\"min\"));\n JSONObject jsonWeather = jsonDay.getJSONArray(\"weather\").getJSONObject(0);\n weather.setWeathCondition(jsonWeather.getString(\"main\"));\n forecast.add(weather);\n }\n return forecast;\n }", "private void parseObjectSubclass(JSONObject x) {\n //Get BalanceOperation Id\n int balanceId = Integer.parseInt((String) x.get(\"balanceId\"));\n //Get description\n String description = (String) x.get(\"description\");\n //Get money\n double money = Double.parseDouble((String) x.get(\"money\"));\n //Get date\n LocalDate date = LocalDate.parse((String) x.get(\"date\"));\n\n /*//based on the \"sub\" field, present only in JSON version of the object, instantiates different subclasses\n String sub = (String) x.get(\"sub\");*/\n if(description.equals(\"Order\")){\n\n String productCode = (String) x.get(\"productCode\");\n double pricePerUnit = Double.parseDouble((String) x.get(\"pricePerUnit\"));\n int quantity = Integer.parseInt((String) x.get(\"quantity\"));\n String status = (String) x.get(\"status\");\n\n //building order with the full constructor\n OrderImpl order = new OrderImpl(balanceId, description, money, date, productCode, quantity, pricePerUnit, status);\n //adding the loaded order back into the operationsMap checking for duplicates\n if(!this.operationsMap.containsKey(balanceId)){\n this.operationsMap.put(balanceId, order);\n if( status.equals(\"PAYED\") || status.equals(\"COMPLETED\")){this.changeBalance(money);}\n }\n }\n else if(description.equals(\"SaleTransaction\")){\n\n double discountRate = Double.parseDouble((String) x.get(\"discountRate\"));\n String status = (String) x.get(\"status\");\n //JSON array to iterate over TicketEntries \"entries\"\n JSONArray jEntries = (JSONArray) x.get(\"entries\");\n //loading TicketEntries list of the sale transaction\n List<TicketEntry> entries = new ArrayList<>();\n jEntries.forEach(e -> addEntry(entries, (JSONObject) e));\n\n //JSON array to iterate over RFIDS of sold products \"rfids\"\n JSONArray jRfids = (JSONArray) x.get(\"rfids\");\n if(jRfids==null){\n jRfids = new JSONArray();\n jRfids.clear();\n }\n //loading RIFDS list of the sale transaction\n ArrayList<ProductRfid> rfids = new ArrayList<>();\n jRfids.forEach(e -> addRfid(rfids, (JSONObject) e));\n\n //building saleTransaction with the full constructor\n SaleTransactionImplementation sale = new SaleTransactionImplementation(balanceId,description,money,date,discountRate,status,entries,rfids);\n //adding the sale transaction back into the operationsMap checking for duplicates\n if(!this.operationsMap.containsKey(balanceId)){\n this.operationsMap.put(balanceId, sale);\n if( status.equals(\"PAYED\") ){this.changeBalance(money);}\n }\n }\n else if(description.equals(\"ReturnTransaction\")){\n String status = (String) x.get(\"status\");\n Integer saleId = Integer.parseInt((String) x.get(\"saleId\"));\n //JSON array to iterate over TicketEntries \"entries\"\n double saleDiscount = Double.parseDouble((String) x.get(\"saleDiscount\"));\n JSONArray jEntries = (JSONArray) x.get(\"entries\");\n //loading TicketEntries list of the sale transaction\n List<TicketEntry> entries = new ArrayList<>();\n jEntries.forEach(e -> addEntry(entries, (JSONObject) e));\n\n //JSON array to iterate over RFIDS of sold products \"rfids\"\n JSONArray jRfids = (JSONArray) x.get(\"rfids\");\n if(jRfids==null){\n jRfids = new JSONArray();\n jRfids.clear();\n }\n //loading RIFDS list of the sale transaction\n ArrayList<ProductRfid> rfids = new ArrayList<>();\n jRfids.forEach(e -> addRfid(rfids, (JSONObject) e));\n\n //building returnTransaction with the full constructor\n ReturnTransaction retTrans = new ReturnTransaction(balanceId,description,money,date,saleId,status,entries,saleDiscount,rfids);\n //adding the Return Transaction back into the operationsMap checking for duplicates\n if(!this.operationsMap.containsKey(balanceId)){\n this.operationsMap.put(balanceId,retTrans);\n }\n }\n else if(description.equals(\"Credit\") || description.equals(\"Debit\")){\n //Simple Balance Update Operation (credit or debit)\n BalanceOperation operation = new BalanceOperationImpl(balanceId,description,money,date);\n //adding the operation (credit or debit) back into the operationsMap checking for duplicates\n if(!this.operationsMap.containsKey(balanceId)){\n this.operationsMap.put(balanceId, operation);\n this.changeBalance(money);\n }\n }\n\n\n }", "@Override\n public void actionPerformed(NetworkEvent evt) {\n JSONParser jsonp = new JSONParser();\n\n try {\n Map<String, Object> r = jsonp.parseJSON(new CharArrayReader(new String(con.getResponseData()).toCharArray()));\n System.out.println(\"rrrrrrrrrrrrrr\" + r);\n //System.out.println(tasks);\n List<Map<String, Object>> list = (List<Map<String, Object>>) r.get(\"root\");\n for (Map<String, Object> obj : list) {\n Reservation reserv = new Reservation();\n\n float idR = Float.parseFloat(obj.get(\"id_reservation\").toString());\n reserv.setId_reservation((int) idR);\n float idE = Float.parseFloat(obj.get(\"id_even\").toString());\n reserv.setId_even((int) idE);\n\n float idU = Float.parseFloat(obj.get(\"id_client\").toString());\n reserv.setId_client((int) idU);\n\n float idT = Float.parseFloat(obj.get(\"nbre_ticket\").toString());\n\n reserv.setNbre_ticket((int) idT);\n reserv.setDate_reservation((String) obj.get(\"date_reservation\"));\n\n listresrvation.add(reserv);\n\n }\n } catch (IOException ex) {\n }\n\n }", "public Recipe(String id, String title, String url, ArrayList<String> ingredients,ArrayList<String> category, String image) {\n this.id = id;\n this.title = title;\n this.url = url;\n this.tag = tag;\n this.ingredients = ingredients;\n this.category = category;\n this.image = image;\n }", "void obj_list()\n {\n // Exceptions are returned by JSONObject when the object cannot be created\n try\n {\n // Convert the string returned to a JSON object\n JSONObject jsonObject=new JSONObject(getJson());\n // Get Json array\n JSONArray array=jsonObject.getJSONArray(\"array\");\n // Navigate through an array item one by one\n for(int i=0;i<array.length();i++)\n {\n // select the particular JSON data\n JSONObject object=array.getJSONObject(i);\n String city=object.getString(\"name\");\n String state=object.getString(\"state\");\n // add to the lists in the specified format\n listSpinner.add(city);\n listStateSpinner.add(state);\n\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }" ]
[ "0.65890646", "0.658738", "0.5983225", "0.597028", "0.58252907", "0.56983626", "0.5688938", "0.54676974", "0.5386742", "0.5284537", "0.52415204", "0.52164733", "0.51558805", "0.50306666", "0.50223154", "0.5020367", "0.5011275", "0.5000616", "0.49621657", "0.49583206", "0.49544328", "0.495252", "0.49158528", "0.48994032", "0.4890381", "0.48848212", "0.48745376", "0.4872897", "0.48523033", "0.48370698", "0.48295796", "0.48182958", "0.48168874", "0.4811046", "0.48042202", "0.47926888", "0.47887844", "0.4782599", "0.47694325", "0.47619817", "0.47548005", "0.47400504", "0.47320879", "0.47219536", "0.47002468", "0.4683054", "0.46773687", "0.46717536", "0.4670048", "0.46687323", "0.46540374", "0.46530855", "0.46466744", "0.4643153", "0.46387315", "0.46363282", "0.463603", "0.46325284", "0.46226734", "0.4621992", "0.46147892", "0.46045768", "0.45889896", "0.45765412", "0.45755216", "0.4573438", "0.45725253", "0.45723945", "0.45682743", "0.4560067", "0.45567122", "0.45555124", "0.45555124", "0.4552914", "0.4552164", "0.45520273", "0.455127", "0.45493552", "0.45476928", "0.45436588", "0.45301062", "0.45056045", "0.44833148", "0.4482433", "0.44767696", "0.4475518", "0.44712222", "0.44622007", "0.44581148", "0.44515574", "0.44313625", "0.44274998", "0.4417827", "0.44096103", "0.4408022", "0.4406543", "0.44043761", "0.4400948", "0.43897182", "0.4382799" ]
0.6808225
0
HELPER METHODS Parse the list of Ingredient Objects and create an ArrayList
private static ArrayList<String> ingredientParse (JSONArray array) { ArrayList<String> list = new ArrayList<>(); for (int index = 0; index < array.length(); index++) { try { JSONObject ingredientObject = array.getJSONObject(index); double quantity = ingredientObject.optDouble(JSON_QUANTITY); String measure = ingredientObject.optString(JSON_MEASURE); String ingredient = ingredientObject.optString(JSON_INGREDIENT); list.add(quantity + " " + measure + " " + ingredient + "\n"); } catch (JSONException e) { e.printStackTrace(); } } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Ingredient> toIngredient(List<String> ingredientsList) {\n\t\tList<Ingredient> ingredients = new ArrayList<Ingredient>();\n\t\tfor (int i = 0; i < ingredientsList.size(); i++) {\n\t\t\tingredients.add(new Ingredient(ingredientsList.get(i)));\n\t\t}\n\t\treturn ingredients;\n\t}", "public ArrayList<String> arrayListFromIngredient(List<IngredientModel> ingredientModelList){\n ArrayList<String> ingredientList = new ArrayList<>();\n\n //Loops through List<IngredientModel>, retrieves ingredient name and adds to ArrayList<String>\n for(int i = 0; i<ingredientModelList.size(); i++){\n String ingredient = ingredientModelList.get(i).getName();\n ingredientList.add(ingredient);\n }\n\n return ingredientList;\n }", "static ArrayList<Ingredient> getIngredients() {\n\t\tArrayList<Ingredient> Ingredients = new ArrayList<Ingredient>();\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\taddIngredient(Ingredients, ing);\n\t\t\t}\n\t\t}\n\t\treturn Ingredients;\n\t}", "public void addIngredientRecipe(ArrayList<IngredientRecipePOJO> ingr);", "ArrayList<RecipeObject> getRecipes();", "public List<Ingrediente> verIngredientes(){\n\t\t// Implementar\n\t\treturn ingredientes;\n\t}", "public List<Ingredient> readAllIngredients() {\n\t\tIngredientDataMapper idm = new IngredientDataMapper();\n\t\tList<Ingredient> allIngredients = new ArrayList<Ingredient>();\n\t\tallIngredients = idm.readAll();\n\t\treturn allIngredients;\n\t\t\n\t}", "public IngredientAdapter(@NonNull Context context, ArrayList<Ingredient> list){\n super(context, 0, list);\n mContext = context;\n ingredientList = list;\n }", "public interface IngredientList {\r\n\r\n}", "@Override\n\t\tpublic String toString() {\n\t\t\tString theList = \"\";\n\t\t\tfor (int i = 0; i < this.getSize(); i++) {\n\t\t\t\ttheList += \"Ingredient \" + (i+1) + \": \" + this.getList()[i].toString() + \"\\n\";\n\t\t\t}\n\t\t\treturn theList;\n\t\t}", "@JsonIgnore\n public ArrayList<Ingredient> getShoppingList() {\n ArrayList<Ingredient> results = new ArrayList<>();\n for (Location location : route) {\n for (PreOrder preOrder : location.getPreOrders()) {\n for (DishWrapper dishWrapper : preOrder.getItems()) {\n for (Ingredient ingredient : dishWrapper.getDish().getIngredients()) {\n if (results.contains(ingredient)) {\n results.get(results.indexOf(ingredient)).addAmount(ingredient.getAmount() * dishWrapper.getAmount());\n } else {\n ingredient.setAmount(ingredient.getAmount() * dishWrapper.getAmount());\n }\n results.add(ingredient);\n }\n }\n }\n }\n return results;\n }", "public void setIngredientes(java.util.ArrayList<Ingrediente> ingredientes){\n this.ingredientes = ingredientes;\n }", "public java.util.ArrayList<Ingrediente> getIngredientes(){\n return this.ingredientes;\n }", "ArrayList<RecipeObject> getRecipes(String recipeName);", "@Override\r\n\tpublic List<String> getIngredients() {\r\n\t\treturn ingredients;\r\n\t}", "public List<Ingredient> findAllIngredients() {\n\t\treturn null;\n\t}", "public IntermediateIngredient(){\n ingredients=new ArrayList<>();\n intermediateIngredients=new ArrayList<>();\n }", "static void addIngredient(ArrayList<Ingredient> Ingredients,\n\t\t\tString ingredient) {\n\t\tboolean ingredientAdded = false;\n\t\t// check if ingredient is already present and add count accordingly\n\t\tfor (Ingredient ing : Ingredients) {\n\t\t\tif (!ingredientAdded) {\n\t\t\t\tif (ing.equals(ingredient)) {\n\t\t\t\t\ting.addCount();\n\t\t\t\t\tingredientAdded = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add new ingredient to list if not already present\n\t\tif (!ingredientAdded) {\n\t\t\tIngredients.add(new Ingredient(ingredient));\n\t\t}\n\t}", "public ArrayList<Item> createItemList() {\n return itemLines\n .stream()\n .map(this::writeLineItemNumber)\n .map(this::createItem)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "public ArrayList<IngredientRecipePOJO> getAllIngredientRecipeByIdRecipe(String idRecipe);", "public ArrayList<Ingrediente> buscarTodos() {\n\n\t\tConnection conn = null;\n\t\tResultSet resultSet = null;\n\t\tPreparedStatement stmt = null;\n\t\tconn = getConnection();\n\t\tArrayList<Ingrediente> listaIngredientes = null;\n\n\t\ttry {\n\n\t\t\tstmt = conn\n\t\t\t\t\t.prepareStatement(\"SELECT * FROM IDINGREDIENTE ORDER BY ID\");\n\t\t\tresultSet = stmt.executeQuery();\n\t\t\tlistaIngredientes = new ArrayList<Ingrediente>();\n\t\t\tIngrediente ingrediente = null;\n\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tingrediente = new Ingrediente();\n\t\t\t\tingrediente.setNome(resultSet.getString(\"nome\"));\n\t\t\t\tlistaIngredientes.add(ingrediente);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlistaIngredientes = null;\n\t\t} finally {\n\t\t\tcloseConnection(conn, stmt, resultSet);\n\t\t}\n\t\treturn listaIngredientes;\n\t}", "@Test\n public void getAllRecipeIngredients_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returned);\n assertNotEquals(\"getAllRecipeIngredients - Non-empty List Returned\", 0, allIngredients.size());\n }", "public ArrayList<String> recipeNameList(){\n\t\t\n\t\tLog.d(TAG, \"Create list of recipe names\");\n\t\t\n\t\t//Temp variable to hold the recipe names\n\t\tArrayList<String> recipeNames = new ArrayList<String>();\n\t\t\n\t\t//Iterator for moving through the recipe list\n\t\tIterator<Recipe> iterator = RECIPES.iterator();\n\t\t\n\t\t// Gather the names of all of the recipes\n\t\twhile(iterator.hasNext()){\n\t\t\trecipeNames.add(((Recipe) iterator.next()).getName());\n\t\t}\n\t\t\n\t\t// If the recipe box is empty return null\n\t\tif (recipeNames.size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Return the ArrayList of recipe names\n\t\treturn recipeNames;\n\t}", "public static void main(String[] args) {\n Recipe recipe ;\n Scanner keyboard= new Scanner (System.in);\n ArrayList<Recipe> recipeArrayList= new ArrayList<> ();\n ArrayList<String> ingridetList= new ArrayList<>();\n ArrayList<String>directionsList= new ArrayList<>();\n String answer;\n\n do{\n recipe = new Recipe ();\n System.out.println (\"Enter the ingredient :\" );\n recipe.setIngredients ( keyboard.nextLine () );\n\n\n\n\n System.out.println (\"Do you want to add more ingredients?(yes/no)\" );\n answer=keyboard.nextLine ();\n ingridetList.add(recipe.getIngredients());\n recipe.setArrayIngredients(ingridetList);\n\n }while(answer.equalsIgnoreCase ( \"yes\" )||!answer.equalsIgnoreCase ( \"no\" ));\n\n\n\n System.out.println (\"Enter the directions for the ingredients: \" );\n recipe.setDirections ( keyboard.nextLine () );\n // directionsList.add(recipe.getIngredients());\n\n\n\n recipeArrayList.add ( recipe );\n\n for(Recipe recipe1:recipeArrayList) {\n\n\n for(String ingRec: recipe1.getArrayIngredients())\n {\n System.out.println ( \"The Ingredients is : \" + ingRec );\n }\n System.out.println (\"The Directions is : \" + recipe1.getDirections () );\n }\n\n }", "public static ArrayList<Recipe> getAllRecipes() {\n allRecipes.add(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients2\"));\n allRecipes.add(new Recipe(\"Pasta\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n\n return allRecipes;\n }", "static ArrayList<RecipeList> GetRegionalRecipes() {\n\t\tArrayList<RecipeList> RegionalRecipes = new ArrayList<RecipeList>();\n\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tboolean added = false;\n\t\t\tfor (RecipeList recList : RegionalRecipes) {\n\t\t\t\tif (rec.Region.equalsIgnoreCase(recList.Region)) {\n\t\t\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\t\t\trecList.addIngredient(ing);\n\t\t\t\t\t\tadded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (added == false) {\n\t\t\t\tRecipeList newList = new RecipeList(rec.Region);\n\t\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\t\tnewList.addIngredient(ing);\n\t\t\t\t}\n\t\t\t\tRegionalRecipes.add(newList);\n\t\t\t\tadded = true;\n\t\t\t\tSystem.out.println(\"add\");\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * for(RecipeList a:RegionalRecipes){ System.out.println(a.get(2)); }\n\t\t */\n\t\treturn RegionalRecipes;\n\t}", "List<Map<String, Object>> searchIngredient(String name);", "@ApiModelProperty(value = \"recipe ingredients by id\")\n @JsonProperty(\"ingredients\")\n public List<BigDecimal> getIngredients() {\n return ingredients;\n }", "@Override\n public ArrayList<String> toArrayList()\n {\n ArrayList<String> list = new ArrayList<>();\n list.add(\"SHOP\");\n list.addAll(super.toArrayList());\n list.add(address);\n list.add(city);\n list.add(zip);\n list.add(String.valueOf(latitude));\n list.add(String.valueOf(longitude));\n list.add(String.valueOf(averageReviews));\n list.add(String.valueOf(numReviews));\n list.add(String.valueOf(intLongitude));\n list.add(new Gson().toJson(tags));\n list.add(new Gson().toJson(hours));\n return list;\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public Ingredient(){\r\n\t}", "public abstract java.util.List extractListItems (Object obj, String countProp, String itemProp) \n\t throws SAFSException;", "public Ingredient() { }", "public Ingredient(){\r\n \r\n }", "private ArrayList<SearchModel> initData() {\n // items in the arraylist\n ArrayList<SearchModel> foodList = new ArrayList<>();\n List<FoodModel> foods = foodModelList;\n for(int i=0; i< foods.size(); i++)\n {\n foodList.add(new SearchModel(foods.get(i).getName()));\n }\n return foodList;\n }", "public ArrayList<String> getObjects(){\n ArrayList<String> objs = new ArrayList<>();\n for (int i = 0; i < field.length; i++){\n objs.add(\"Asteroid\");\n }\n return objs;\n }", "ArrayList<String> createList(String finalInput);", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.add_ingredient:\n addEmptyEditTextView();\n break;\n case R.id.save_ingredients:\n Intent intent = new Intent();\n\n newIngredients = new ArrayList<>();\n\n for (int i = 0; i < (dragLinearLayout != null ? dragLinearLayout.getChildCount() : 0); i++) {\n View child = dragLinearLayout.getChildAt(i);\n EditText editTextChild = (EditText) child;\n\n if (!isEditTextEmpty(editTextChild)) {\n// newIngredients.add(decodeIngredientString(editTextChild.getText().toString()));\n// decodeString(editTextChild.getText().toString());\n newIngredients.add(new Ingredients.Ingredient(editTextChild.getText().toString()));\n }\n }\n\n intent.putParcelableArrayListExtra(\"INGREDIENTS\", newIngredients);\n setResult(Activity.RESULT_OK, intent);\n finish();\n break;\n }\n }", "public List<Ingredient> retrieveIngredientsFromDB() throws SQLException { \r\n\r\n\t\tString ingredientName = null;\r\n\t\tint quantity = 0;\r\n\t\tingredientsList = new ArrayList<>();\r\n\t\tString query = \"select name, quantity from stock_ingredients order by orderthiscolumnby asc\"; //returns all stock within stock_ingredients table\r\n\r\n\t\tConnection connection = connectToDB(databaseUser, databasePass);\r\n\r\n\t\tStatement s = connection.createStatement();\r\n\r\n\t\tResultSet rs = s.executeQuery(query);\r\n\r\n\t\twhile(rs.next()) {\r\n\r\n\t\t\tingredientName = rs.getString(\"name\");\r\n\r\n\t\t\tquantity = rs.getInt(\"quantity\");\r\n\r\n\t\t\tIngredient ingredient = new Ingredient(ingredientName, quantity);\r\n\r\n\t\t\tingredientsList.add(ingredient);\r\n\r\n\t\t}\r\n\r\n\t\trs.close();\r\n\t\ts.close();\r\n\t\tconnection.close();\r\n\r\n\t\treturn ingredientsList;\r\n\t\t\r\n\t}", "private List<Item> extractItems(String input) {\n String[] i = input.split(\" \");\n List<Item> items = new ArrayList<>();\n\n for(String s: i) {\n int itemNo = extractItemNo(s);\n double weight = extractWeight(s);\n int price = extractCost(s);\n items.add(new Item(itemNo, weight, price));\n }\n\n items.sort(Comparator.comparingDouble(Item::getWeight));\n return items;\n }", "public void agregarIngrediente(Ingrediente ingrediente){\n\t\tingredientes.add(ingrediente);\n\t}", "DirectionIngredientsAdapter(List<Ingredient> ingredients) {\n this.ingredients = ingredients;\n }", "public ArrayList<PackObject> parseObjects(final String ObjectList) {\r\n\t\tfinal ArrayList<PackObject> toReturn = new ArrayList<PackObject>();\r\n\t\ttoReturn.clear();\r\n\t\tfor (final String Object : ObjectList.split(\"\\\\|\")) // On charge les packets d'objets\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tfinal String[] Args = Object.split(\",\");\r\n\t\t\t\tint bool = 0;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbool = Integer.parseInt(Args[2]);\r\n\t\t\t\t} catch (final Exception e) {\r\n\t\t\t\t\tbool = 0;\r\n\t\t\t\t}\r\n\t\t\t\tfinal PackObject Obj = new PackObject(\r\n\t\t\t\t\t\tInteger.parseInt(Args[0]),\r\n\t\t\t\t\t\tInteger.parseInt(Args[1]),\r\n\t\t\t\t\t\tbool);\r\n\t\t\t\ttoReturn.add(Obj);\r\n\t\t\t} catch (final Exception e) {}\r\n\t\t}\r\n\t\treturn toReturn;\r\n\t}", "public List<Ingredient> getAll() {\n return ingredientRepository.findAll();\n }", "public Ingredient() {\n }", "protected ArrayList<Object[]> genObjectArrayListFromIDElementList(ArrayList<? extends IDElement> pIDElementList) throws Exception{\r\n\t\tObject[] vElement;\r\n\t\tArrayList<Object[]> vRet;\r\n \t\t\r\n \t\tif (pIDElementList != null) {\r\n \t\t\tvRet = new ArrayList<Object[]>();\r\n \t\t\t\r\n \t\t\tfor (IDElement vCur : pIDElementList) {\r\n \t\t\t\tvElement = new Object[2];\r\n \t \t\t\t\r\n \t \t\t\tvElement[0] = vCur.getId();\r\n \t \t\t\tvElement[1] = vCur.getName();\r\n \t \t\t\t\r\n \t \t\t\tvRet.add(vElement);\r\n \t\t\t}\r\n \t\t} else throw new Exception(\"04; gOALfIDEL,Edi\");\r\n \t\t\r\n \t\treturn vRet;\r\n\t}", "static List<Intervall> handleInput(String input) {\n\t\tList<Intervall> listIntervall = new ArrayList<>();\n\t\tif (input.length() > 0) {\n\t\t\tString[] inputArray = input.split(\" \");\n\n\t\t\tfor (String s : inputArray) {\n\t\t\t\tString sTrimmed = s.substring(1, s.length() - 1);\n\t\t\t\tString[] inputValues = sTrimmed.split(\",\");\n\t\t\t\tlistIntervall.add(new Intervall(Integer.parseInt(inputValues[0]), Integer.parseInt(inputValues[1])));\n\t\t\t}\n\t\t}\n\t\treturn listIntervall;\n\t}", "private ArrayList parseList(String localData){\n int localPointer = 0;\n ArrayList temp = new ArrayList();\n char c = localData.charAt(localPointer++);\n while (c != ']'){\n String item = \"\";\n Object itemObj = null;\n item_loop :\n while (c != ']'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break item_loop;\n case '{' :\n String tempItem = this.getFull(localData.substring(localPointer),0);\n localPointer += tempItem.length();\n item += tempItem;\n break ;\n case '[' :\n String tempItem2 = this.getFull(localData.substring(localPointer),1);\n localPointer += tempItem2.length();\n item += tempItem2;\n break ;\n default :\n item += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n item = item.trim();\n switch (this.getDataType(item.trim())){\n case String:\n itemObj = item.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n itemObj = Long.parseLong(item.trim());\n break ;\n case Float:\n itemObj = Float.parseFloat(item.trim());\n break ;\n case Boolean:\n itemObj = Boolean.parseBoolean(item.trim());\n break ;\n case Map:\n itemObj = this.parseMap(item.trim());\n break ;\n case List:\n itemObj = this.parseList(item.trim());\n }\n temp.add(itemObj);\n }\n return temp;\n }", "private List<Ingredient> fillFirstMeal(List<Ingredient> ingredients) throws Exception {\n List<Ingredient> availableIngredients = new ArrayList<Ingredient>(ingredients);\n mMeals.get(0).fillCarbs(ingredients);\n mMeals.get(0).fillSauce(ingredients);\n availableIngredients.removeAll(mMeals.get(0).getIngredients());\n return availableIngredients;\n }", "public void addItemToList(Ingredient ing) {\n for (int i = 0; i < ingredientList.size(); i++) {\n if (ingredientList.get(i).getName().toLowerCase().equals(ing.getName().toLowerCase())) {\n //ask what the user wants to do\n boolean sameUnit = ingredientList.get(i).getUnit().toLowerCase().equals(ing.getUnit().toLowerCase());\n confirmPopUp(sameUnit, i, ing);\n return;\n }\n }\n ingredientList.add(ing);\n }", "private void populateIngredientView() {\n\t\tListView ingredientsLV = (ListView) findViewById(R.id.lv_Ingredients);\n\t\tregisterForContextMenu(ingredientsLV);\n\n\t\tArrayList<String> combined = RecipeView\n\t\t\t\t.formCombinedArray(currentRecipe);\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n\t\t\t\tR.layout.list_item, combined);\n\t\tingredientsLV.setAdapter(adapter);\n\t\tsetListViewHeightBasedOnChildren(ingredientsLV);\n\t}", "public ArrayList<Item> getItems(){\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\t\tcreateFile(itemsFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(itemsFile));\n\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\n\t\t\t\tItem item = new Item(Integer.parseInt(data[0]), data[1],data[2],Integer.parseInt(data[3]), data[4], data[5], data[6],data[7]);\n\t\t\t\titems.add(item);\n\n\t\t\t}\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t\treturn items;\n\t}", "public void addItem(View v){\n //Creates a new IngredientModel, adds it to the List<IngredientModel>\n IngredientModel ingredientModel = new IngredientModel(ingredientEditText.getText().toString());\n ingredientModelList.add(ingredientModel);\n //Notifies the adapter the data set has changed in order to update the recyclerView\n ingredientSearchAdapter.notifyDataSetChanged();\n }", "private org.json.simple.JSONArray createJsonArrayList() {\n org.json.simple.JSONArray list = new org.json.simple.JSONArray();\n for (VoteOption v : voteOptions) {\n list.add(v.getText());\n }\n return list;\n }", "private ArrayList parseStringToList(String data){\n ArrayList<String> result = new ArrayList<String>();\n String[] splitResult = data.split(\",\");\n for(String substring : splitResult){\n result.add(substring);\n }\n return result;\n }", "private void generateRecipeList(List<Match> recipeDataList, int ingredients) {\n allMatches.clear();\n // Produces numerical score for each recipe\n weightedSearchByIngredients(recipeDataList, ingredients);\n allMatches.addAll(recipeDataList);\n adapter = new IngredientSearchAdapter(allMatches);\n recyclerView.setAdapter(adapter);\n for (Match recipe : recipeDataList){\n System.out.println(\"Recipe: \" + recipe.getRecipeName()\n + \"| Weight: \" + recipe.getWeight()\n + \"| Ingredients: \" + recipe.getIngredients().size());\n }\n }", "public ArrayList<Employee> parseData(ArrayList<String> data) {\n ArrayList<Employee> employees = new ArrayList<>();\n String[] buf;\n\n for (String line : data) {\n buf = line.split(delimiter);\n employees.add(new Employee(buf[1], buf[0], Integer.parseInt(buf[2])));\n }\n\n return employees;\n }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "@Override\n\tpublic List<Recipe> findByIngredients(List<String> ingredients) {\n\t\treturn null;\n\t}", "@Override\n\tprotected ListEntity parseList(InputStream is) throws Exception {\n\t\tVipStudentList studentList = VipStudentList.parse(is);\n\t\treturn studentList;\n\t}", "ArrayList<Restaurant> getRestaurantListByType(String type);", "public List<BaseObject> getAllItems() {\n ArrayList<BaseObject> list = new ArrayList<BaseObject>(ufos);\n list.add(ship);\n list.addAll(bombs);\n list.addAll(rockets);\n return list;\n }", "public JsonObject getRecipesByIngredients(String ingredients) throws Exception\n {\n URL url = new URL(baseUrl+\"i=\"+ingredients);\n/* TODO \nYou have to use the url to retrieve the contents of the website. \nThis will be a String, but in JSON format. */\n String contents = \"\";\n Scanner urlScanner = new Scanner(url.openStream());\n while (urlScanner.hasNextLine()){\n contents += urlScanner.nextLine();\n }\n urlScanner.close();\n JsonObject recipes = (JsonObject)Jsoner.deserialize(contents,new JsonObject());\n\n return recipes;\n }", "ArrayList<Product> ListOfProducts();", "public Ingredient(String name, BigDecimal amount, String unitmeasure, List<Recipe> recipes) {\n this.name = name;\n this.amount = amount;\n this.unitMeasure = unitmeasure;\n this.recipes = recipes;\n }", "public interface Recipe {\n\n String getTitle();\n\n String getDescription();\n\n List<String> getMealType();\n\n List<String> getFoodType();\n\n List<String> getIngredients();\n}", "public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }", "public static ArrayList<ScannedItem> getScannedItems() {\n\n String baseUrl = REST_BASE_URL + INCOMING_TAGS;\n ArrayList<ScannedItem> scannedItems = new ArrayList<>();\n\n URL url = null;\n\n try {\n url = new URL(baseUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n ScannedItem newItem = new ScannedItem(jo.getString(RFID_TAG));\n scannedItems.add(newItem);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return scannedItems;\n }", "List<IFeature> getFeatureList();", "ArrayList getAttributes();", "public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }", "List<SimpleInventory> getInventories();", "public IngredientsAdapter(Context context, ArrayList ingredientsArray) {\n super(context, R.layout.ingredients_list, ingredientsArray);\n this.context = context;\n this.ingredientsArray = ingredientsArray;\n }", "List<Goods> getGoodsList();", "List<String> getRecipeByIngredients(CharSequence query);", "public String getIngredients() {\n return ingredients;\n }", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }", "public Ingredient(String name){\r\n\t\tthis.name = name;\r\n\t}", "public Recipes()\n {\n\t\titems = new ArrayList<food>();\n }", "protected static ArrayList<Resource> asList(Resource... bundles) {\n\t\treturn new ArrayList<>(Arrays.asList(bundles));\n\t}", "public String toString()\n\t{\n\t\treturn ingredients;\n\t}", "private ArrayList<String> getEquipment() throws IOException {\n\t// System.out.println(\"ROVER_02 method getEquipment()\");\n\tGson gson = new GsonBuilder().setPrettyPrinting().create();\n\tout.println(\"EQUIPMENT\");\n\n\tString jsonEqListIn = in.readLine(); // grabs the string that was\n\t\t\t\t\t\t\t\t\t\t\t// returned first\n\tif (jsonEqListIn == null) {\n\t\tjsonEqListIn = \"\";\n\t}\n\tStringBuilder jsonEqList = new StringBuilder();\n\t// System.out.println(\"ROVER_02 incomming EQUIPMENT result - first\n\t// readline: \" + jsonEqListIn);\n\n\tif (jsonEqListIn.startsWith(\"EQUIPMENT\")) {\n\t\twhile (!(jsonEqListIn = in.readLine()).equals(\"EQUIPMENT_END\")) {\n\t\t\tif (jsonEqListIn == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// System.out.println(\"ROVER_02 incomming EQUIPMENT result: \" +\n\t\t\t// jsonEqListIn);\n\t\t\tjsonEqList.append(jsonEqListIn);\n\t\t\tjsonEqList.append(\"\\n\");\n\t\t\t// System.out.println(\"ROVER_02 doScan() bottom of while\");\n\t\t}\n\t} else {\n\t\t// in case the server call gives unexpected results\n\t\tclearReadLineBuffer();\n\t\treturn null; // server response did not start with \"EQUIPMENT\"\n\t}\n\n\tString jsonEqListString = jsonEqList.toString();\n\tArrayList<String> returnList;\n\treturnList = gson.fromJson(jsonEqListString, new TypeToken<ArrayList<String>>() {\n\t}.getType());\n\t// System.out.println(\"ROVER_02 returnList \" + returnList);\n\n\treturn returnList;\n}", "public ArrayList<ItemListElement> formatOutputForList() {\n \t\n \tArrayList<ItemListElement> item = new ArrayList<ItemListElement>();\n \t\n \tfor (int i = 0;i < currentTaskItems.size(); i++) {\n \t\n \t\t//map for item\n \t\t//0 -> number of item\n \t\t//1 -> item type\n \t\t//2 -> description\n \t\tString[] s = currentTaskItems.get(i);\n \t\tString top = s[0] + \" \" + s[1] + \" file(s)\";\n \t\tString bottom = \"Description: \" + s[2];\n \t\t\n \t\t//add the item to the list\n \t\titem.add(new ItemListElement(\n \t\t Utility.getIconFromString(s[1]), \n \t\t top, bottom));\n \t} \t\n \treturn item; \t\n }", "public void rebajoIngredientes() {\n }", "private static Inventory[] createInventoryList() {\n Inventory[] inventory = new Inventory[3];\r\n \r\n Inventory potion = new Inventory();\r\n potion.setDescription(\"potion\");\r\n potion.setQuantityInStock(0);\r\n inventory[Item.potion.ordinal()] = potion;\r\n \r\n Inventory powerup = new Inventory();\r\n powerup.setDescription(\"powerup\");\r\n powerup.setQuantityInStock(0);\r\n inventory[Item.powerup.ordinal()] = powerup;\r\n \r\n Inventory journalclue = new Inventory();\r\n journalclue.setDescription(\"journalclue\");\r\n journalclue.setQuantityInStock(0);\r\n inventory[Item.journalclue.ordinal()] = journalclue;\r\n \r\n return inventory;\r\n }", "public static ItemIngredient of(String input) {\n\t\treturn new OreItemIngredient(input, 1);\n\t}", "private Recipe mapToRecipeObject(RecipeEntity recipeEntity) {\n\t\tRecipe recipe = new Recipe();\n\t\t//Map primitive fields\n\t\trecipe.setId(recipeEntity.getId());\n\t\trecipe.setName(recipeEntity.getName());\n\t\trecipe.setType(recipeEntity.getType());\n\t\trecipe.setServingCapacity(recipeEntity.getServingCapacity());\n\t\t\n\t\t//Format creation date time to required format\n\t\tif(recipeEntity.getCreationDateTime() != null)\n\t\t\trecipe.setCDateTimeString(Util.formatDateTime(recipeEntity.getCreationDateTime()));\n\t\trecipe.setCreationDateTime(recipeEntity.getCreationDateTime());\n\t\t\n\t\t//Convert ingredients string into list and set to recipe object \n\t\tlog.debug(\"Ingredients String from DB: \"+recipeEntity.getIngredients());\n\t\tList<Ingredient> ingredientsList = Util.convertJSONStringToIngredientsList(recipeEntity.getIngredients());\n\t\tlog.debug(\"Ingredients List size after conversion: \"+ingredientsList.size());\n\t\trecipe.setIngredientsList(ingredientsList);\n\n\t\trecipe.setInstructions(recipeEntity.getInstructions());\n\n\t\treturn recipe;\n\t}", "public String toString(ObservableList<Item> filteredItemList) {\n HashMap<Integer, String> ingredientsMap = new HashMap<>();\n // Store each item id and name as a pair into the hashmap\n filteredItemList.forEach(item -> ingredientsMap.put(item.getId(), item.getName()));\n if (!ingredientsMap.containsKey(this.getKey())) {\n throw new IngredientNotFoundException();\n }\n // ingredient must be found in item list\n return ingredientsMap.get(this.getKey()) + \" [\" + this.getValue() + \"]\";\n }", "public void loadItems() {\n\t\tArrayList<String> lines = readData();\n\t\tfor (int i = 1; i < lines.size(); i++) {\n\t\t\tString line = lines.get(i);\n\t\t\t\n\t\t\tString[] parts = line.split(\",\");\n\t\t\t\n//\t\t\tSystem.out.println(\"Name: \" + parts[0]);\n//\t\t\tSystem.out.println(\"Amount: \" + parts[1]);\n//\t\t\tSystem.out.println(\"Price: \" + parts[2]);\n//\t\t\tSystem.out.println(\"-------\");\n\t\t\t\n\t\t\tString name = parts[0].trim();\n\t\t\tint amount = Integer.parseInt(parts[1].trim());\n\t\t\tdouble price = Double.parseDouble(parts[2].trim());\n\t\t\t\n\t\t\tItem item = new Item(name, amount, price);\n\t\t\titemsInStock.add(item);\n\t\t}\n\t}", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }", "public static ArrayList<Recipe> convertJsonToRecipeObjects() throws JSONException {\n //Convert fullJsonMoviesData to JsonObject\n String urlResponse = null;\n URL jsonURL = buildUrl();\n try {\n urlResponse = getResponseFromHttpUrl(jsonURL);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JSONArray bakingDataArray = new JSONArray(urlResponse);\n ArrayList<Recipe> results = new ArrayList<>();\n for (int i = 0; i < bakingDataArray.length(); i++) {\n Recipe recipe = new Recipe();\n recipe.setId(bakingDataArray.getJSONObject(i).getInt(ID));\n recipe.setName(bakingDataArray.getJSONObject(i).getString(NAME));\n recipe.setImage(getDefaultorActualImage(bakingDataArray.getJSONObject(i).getString(IMAGE)));\n recipe.setServings(bakingDataArray.getJSONObject(i).getString(SERVINGS));\n JSONArray ingredientsJSONArray = bakingDataArray.getJSONObject(i).getJSONArray(INGREDIENTS);\n ArrayList<Ingredient> ingredientsArray = new ArrayList<>();\n for (int j = 0; j < ingredientsJSONArray.length(); j++) {\n Ingredient ingredient = new Ingredient();\n ingredient.setIngredient(ingredientsJSONArray.getJSONObject(j).getString(INGREDIENT));\n ingredient.setMeasure(ingredientsJSONArray.getJSONObject(j).getString(MEASURE));\n ingredient.setQuantity(ingredientsJSONArray.getJSONObject(j).getString(QUANTITY));\n ingredientsArray.add(ingredient);\n }\n recipe.setIngredients(ingredientsArray);\n JSONArray stepJSONArray = bakingDataArray.getJSONObject(i).getJSONArray(STEPS);\n ArrayList<Step> stepArray = new ArrayList<>();\n for (int k = 0; k < stepJSONArray.length(); k++) {\n Step step = new Step();\n step.setId(stepJSONArray.getJSONObject(k).getString(STEP_ID));\n step.setDescription(stepJSONArray.getJSONObject(k).getString(DESCRIPTION));\n step.setShortDescription(stepJSONArray.getJSONObject(k).getString(SHORT_DESCRIPTION));\n step.setThumbnailURL(stepJSONArray.getJSONObject(k).getString(thumbnailURL));\n step.setVideoURL(stepJSONArray.getJSONObject(k).getString(videoURL));\n stepArray.add(step);\n }\n recipe.setSteps(stepArray);\n results.add(recipe);\n }\n return results;\n }", "public static List<String> getResourceList(Context context, String ingredientId){\n String[] ingredientList = null;\n int ingredientIdentifier = context.getResources().getIdentifier(ingredientId, \"array\", context.getPackageName());\n try {\n if(ingredientIdentifier != 0) {\n ingredientList = context.getResources().getStringArray(ingredientIdentifier);\n return Arrays.asList(ingredientList);\n }\n }catch(Exception e){\n }\n return null;\n }", "private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}", "@Test\n public void validAdd1() {\n assertEquals(i3, isl.get(2));\n\n //checks the amount of ingredient 4\n assertEquals(2.39, ((Ingredient) isl.get(3)).amountNeed, 0);\n assertEquals(1.01, ((Ingredient) isl.get(3)).amountHave, 0);\n\n //add an ingredient that is already present in the list\n //the amount should be added to the current amount 2.39 + 0.45 = 2.84\n //ignores the fact that category and unit don't match\n assertFalse(isl.add(new Ingredient(\"vANiLle\", \"niks\", 0.45, 0.69, \"none\")));\n assertEquals(2.84, ((Ingredient) isl.get(3)).amountNeed, 0.00001);\n assertEquals(1.7, ((Ingredient) isl.get(3)).amountHave, 0.00001);\n assertEquals(\"kruiden\", ((Ingredient) isl.get(3)).category);\n assertEquals(Unit.GRAMS, ((Ingredient) isl.get(3)).unit);\n\n //add a new ingredient and check if it's added correctly\n assertTrue(isl.add(new Ingredient(\"cookies\", \"yum\", 3, 4, \"none\")));\n assertEquals(\"cookies\", isl.get(5).name);\n assertEquals(\"yum\", ((Ingredient) isl.get(5)).category);\n assertEquals(3, ((Ingredient) isl.get(5)).amountNeed, 0);\n assertEquals(4, ((Ingredient) isl.get(5)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl.get(5)).unit);\n }", "private static ArrayList<Prefix> getListOfPrefix(Prefix... prefixes) {\n return new ArrayList<>(Arrays.asList(prefixes));\n }", "private void createLocations(ArrayList<String> locations) {\n for (String line : locations) {\n String[] entry = line.split(\",\");\n for(int i = 0; i < entry.length; i++) {\n Log.i(\"ec\", entry[i]);\n Log.d(\"debugExtra\", entry[i]);\n }\n //Log.i(\"entry length\", Integer.toString(entry.length));\n if (entry.length == 5) {\n locationList.add(new Location(entry[0], Double.parseDouble(entry[1]), Double.parseDouble(entry[2]), entry[3], entry[4]));\n }\n }\n }", "public static List<BakingRecipe> getBakingRecipes(String bakingJsonStr) throws JSONException {\n // Declare and initialize variables to return results\n\n List<BakingRecipe> bakingRecipes = new ArrayList<>();\n\n // Check if there are actual results\n JSONArray bakingJsonArray = new JSONArray(bakingJsonStr);\n if (bakingJsonArray.length() == 0) {\n return null;\n }\n for (int i = 0; i < bakingJsonArray.length(); i++) {\n // Create a bakingRecipe object to put data\n BakingRecipe bakingRecipe = new BakingRecipe();\n // Get the current json recipe\n JSONObject currentRecipeJson = bakingJsonArray.getJSONObject(i);\n // Get information for this recipe\n bakingRecipe.setId(currentRecipeJson.getInt(ID));\n bakingRecipe.setName(currentRecipeJson.getString(NAME));\n // Get ingredients array\n JSONArray ingredientJsonArray = currentRecipeJson.getJSONArray(INGREDIENTS);\n // Create List to hold the recipe ingredients\n List<BakingIngredient> bakingIngredients = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < ingredientJsonArray.length(); j++) {\n // Create a baking ingredient object to hold the ingredient data\n BakingIngredient bakingIngredient = new BakingIngredient();\n // Get the current json ingredient\n JSONObject currentIngredientJson = ingredientJsonArray.getJSONObject(j);\n // Get ingredient data\n bakingIngredient.setQuantity(currentIngredientJson.getDouble(QUANTITY));\n bakingIngredient.setMeasure(currentIngredientJson.getString(MEASURE));\n bakingIngredient.setIngredient(currentIngredientJson.getString(INGREDIENT));\n // Add recipe key to baking ingredient\n bakingIngredient.setRecipeKey(bakingRecipe.getId());\n // add ingredient to ingredients list\n bakingIngredients.add(bakingIngredient);\n }\n // Add ingredients list to baking recipe\n bakingRecipe.setIngredientList(bakingIngredients);\n // Get steps array\n JSONArray stepJsonArray = currentRecipeJson.getJSONArray(STEPS);\n // Create List to hold the recipe ingredients\n List<BakingStep> bakingSteps = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < stepJsonArray.length(); j++) {\n // Create a baking step object to hold the step data\n BakingStep bakingStep = new BakingStep();\n // Get the current JSON step\n JSONObject currentStepJson = stepJsonArray.getJSONObject(j);\n // Get step data\n bakingStep.setId(currentStepJson.getInt(ID));\n bakingStep.setShortDescription(currentStepJson.getString(SHORT_DESCRIPTION));\n bakingStep.setDescription(currentStepJson.getString(DESCRIPTION));\n bakingStep.setVideoURL(currentStepJson.getString(VIDEO_URL));\n bakingStep.setThumbnailURL(currentStepJson.getString(THUMBNAIL_URL));\n // add recipe key to baking step\n bakingStep.setRecipeKey(bakingRecipe.getId());\n // add step to steps list\n bakingSteps.add(bakingStep);\n }\n // add steps list to baking recipe\n bakingRecipe.setStepList(bakingSteps);\n bakingRecipe.setServings(currentRecipeJson.getInt(SERVINGS));\n bakingRecipe.setImage(currentRecipeJson.getString(IMAGE));\n // add baking recipe to baking recipe list\n bakingRecipes.add(bakingRecipe);\n }\n // return completed recipe list\n return bakingRecipes;\n }", "public List<Item> getItemList();" ]
[ "0.70530283", "0.69459885", "0.68255764", "0.6789682", "0.64043576", "0.63074696", "0.63025", "0.62431544", "0.6168134", "0.6147892", "0.6068835", "0.6034965", "0.59928024", "0.597532", "0.585606", "0.583377", "0.58201236", "0.5784021", "0.57557476", "0.5719643", "0.5711928", "0.5669206", "0.5617802", "0.5568707", "0.55655676", "0.5558384", "0.5524219", "0.55072504", "0.5492883", "0.54907787", "0.5487171", "0.54860276", "0.54491496", "0.5428519", "0.5405442", "0.5385891", "0.5379446", "0.5378632", "0.537411", "0.5368747", "0.5363272", "0.5352414", "0.53183854", "0.5294911", "0.52896446", "0.5286192", "0.52631474", "0.5258221", "0.5253883", "0.5251012", "0.5240684", "0.5202912", "0.5202375", "0.5193695", "0.5192303", "0.51896113", "0.51893556", "0.5173071", "0.5158854", "0.5147682", "0.5131331", "0.50971544", "0.5094035", "0.508469", "0.5080429", "0.507792", "0.5075208", "0.50685996", "0.5058837", "0.5058307", "0.5054578", "0.5045281", "0.50447625", "0.5041593", "0.50374234", "0.5022607", "0.50203025", "0.50197756", "0.5018396", "0.5011547", "0.5005433", "0.50054187", "0.50052124", "0.49944142", "0.49909568", "0.4967696", "0.4959736", "0.49595276", "0.49538288", "0.49525443", "0.49408165", "0.49407625", "0.49398613", "0.4934585", "0.49126968", "0.49094337", "0.49056038", "0.4897494", "0.4892958", "0.48851728" ]
0.6820602
3
this will never be called
@Override public void onClick(DialogInterface dialog, int which) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \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}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\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}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void einkaufen() {\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\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void prot() {\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\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "protected void onFirstUse() {}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void preRun() {\n super.preRun();\n }", "private void m50366E() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public Object preProcess() {\n return null;\n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "protected Doodler() {\n\t}", "@Override\n void init() {\n }", "private final void i() {\n }", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "protected boolean func_70041_e_() { return false; }", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "protected Problem() {/* intentionally empty block */}", "@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}", "public final void mo91715d() {\n }", "public static void SelfCallForLoading() {\n\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "public boolean method_218() {\r\n return false;\r\n }", "private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}", "@Override\r\n\tprotected void doFirst() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "private void offer() {\n\t\t\t\n\t\t}" ]
[ "0.7095382", "0.70567584", "0.6876691", "0.6728307", "0.6722757", "0.67088574", "0.67019296", "0.6681685", "0.6681685", "0.66792643", "0.6627785", "0.6602804", "0.6521864", "0.65211284", "0.6513337", "0.6484387", "0.6484387", "0.6455773", "0.6437185", "0.64234835", "0.6402153", "0.6400082", "0.63944936", "0.63921195", "0.63921195", "0.63844454", "0.63532084", "0.6346765", "0.633721", "0.63182735", "0.6316238", "0.6314272", "0.6296756", "0.6296756", "0.6296756", "0.6296756", "0.6296756", "0.6296756", "0.6272696", "0.6271765", "0.6265782", "0.6260971", "0.62448406", "0.6239608", "0.6239608", "0.6224654", "0.62114435", "0.62033266", "0.61818826", "0.61735016", "0.61715734", "0.6168665", "0.6167692", "0.6148473", "0.61472535", "0.614203", "0.61407804", "0.6140003", "0.6137742", "0.6137277", "0.6126237", "0.61249816", "0.6124878", "0.61236537", "0.61236537", "0.61148363", "0.61076427", "0.61075985", "0.6102346", "0.60942733", "0.6089348", "0.60879093", "0.60868925", "0.6079023", "0.6079023", "0.60779375", "0.60778004", "0.60719854", "0.6071185", "0.606795", "0.6064521", "0.6060705", "0.6060705", "0.6054609", "0.605288", "0.60379434", "0.60371685", "0.6037048", "0.60334194", "0.60310805", "0.60282", "0.60282", "0.60282", "0.60264516", "0.6025661", "0.60238314", "0.60220265", "0.601335", "0.60108733", "0.6009705", "0.6006996" ]
0.0
-1
this will never be called
@Override public void onClick(DialogInterface dialog, int which) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \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}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\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}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void einkaufen() {\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\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void prot() {\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\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "protected void onFirstUse() {}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void preRun() {\n super.preRun();\n }", "private void m50366E() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public Object preProcess() {\n return null;\n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "protected Doodler() {\n\t}", "@Override\n void init() {\n }", "private final void i() {\n }", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "protected boolean func_70041_e_() { return false; }", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "protected Problem() {/* intentionally empty block */}", "@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}", "public final void mo91715d() {\n }", "public static void SelfCallForLoading() {\n\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "public boolean method_218() {\r\n return false;\r\n }", "private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}", "@Override\r\n\tprotected void doFirst() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "private void offer() {\n\t\t\t\n\t\t}" ]
[ "0.7095382", "0.70567584", "0.6876691", "0.6728307", "0.6722757", "0.67088574", "0.67019296", "0.6681685", "0.6681685", "0.66792643", "0.6627785", "0.6602804", "0.6521864", "0.65211284", "0.6513337", "0.6484387", "0.6484387", "0.6455773", "0.6437185", "0.64234835", "0.6402153", "0.6400082", "0.63944936", "0.63921195", "0.63921195", "0.63844454", "0.63532084", "0.6346765", "0.633721", "0.63182735", "0.6316238", "0.6314272", "0.6296756", "0.6296756", "0.6296756", "0.6296756", "0.6296756", "0.6296756", "0.6272696", "0.6271765", "0.6265782", "0.6260971", "0.62448406", "0.6239608", "0.6239608", "0.6224654", "0.62114435", "0.62033266", "0.61818826", "0.61735016", "0.61715734", "0.6168665", "0.6167692", "0.6148473", "0.61472535", "0.614203", "0.61407804", "0.6140003", "0.6137742", "0.6137277", "0.6126237", "0.61249816", "0.6124878", "0.61236537", "0.61236537", "0.61148363", "0.61076427", "0.61075985", "0.6102346", "0.60942733", "0.6089348", "0.60879093", "0.60868925", "0.6079023", "0.6079023", "0.60779375", "0.60778004", "0.60719854", "0.6071185", "0.606795", "0.6064521", "0.6060705", "0.6060705", "0.6054609", "0.605288", "0.60379434", "0.60371685", "0.6037048", "0.60334194", "0.60310805", "0.60282", "0.60282", "0.60282", "0.60264516", "0.6025661", "0.60238314", "0.60220265", "0.601335", "0.60108733", "0.6009705", "0.6006996" ]
0.0
-1
setting the fonts, colours, images and titles in the window and for the buttons as well as the frame. adding all of these features to the main menu GUI
public Window(){ //character is updated File fi=new File("./config/character"); _character=(new FileHandling()).readFromFile(fi); txtrHiThere.setFont(new Font("Lucida Sans", Font.BOLD, 13)); txtrHiThere.setText(" "); txtrHiThere.setBackground(new Color(255, 250, 205)); txtrHiThere.setBounds(252, 470, 198, 100); txtrHiThere.setEditable(false); panel.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseMoved(MouseEvent e) { //updates speech bubble txtrHiThere.setText(null); txtrHiThere.append("Hi guys! I am "+_character+"\nLet's learn words together\nwith VOXSPELL."+" Move your\nmouse over each of these\n buttons to see what they do"); } }); panel.add(txtrHiThere); txtrHiThere.append("Hi guys! I am "+_character+"\nLet's learn words together\nwith VOXSPELL."+" Move your\nmouse over each of these\n buttons to see what they do"); panel.setBackground(new Color(0, 128, 128)); panel.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 100, 0))); panel.setPreferredSize(new Dimension(800, 880)); panel.setLayout(null); btnN.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseMoved(MouseEvent e) { //updates speech bubble txtrHiThere.setText(null); txtrHiThere.append("You will be asked to\nspell 10 words"+"from the level you\npick when you click on the\nlittle arrow below the button"); } }); btnN.setBounds(509, 593, 263, 65); btnN.setFont(new Font("Purisa", Font.BOLD, 18)); btnN.setBackground(new Color(255, 250, 205)); //adding buttons panel.add(btnN); btnN.addActionListener(this); btnR.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseMoved(MouseEvent e) { //updates speech bubble txtrHiThere.setText(null); txtrHiThere.append("You will be asked to review\nsome of the mistakes in the\npast quizzes. If you haven't\nstarted one already,don't\nworry about it. Start\na new quiz instead. :)"); } }); btnR.setBounds(568, 792, 204, 65); btnR.setFont(new Font("Purisa", Font.BOLD, 18)); btnR.setBackground(new Color(255, 250, 205)); panel.add(btnR); comboBox.setModel(new DefaultComboBoxModel(new String[] {"1", "2", "3","4","5","6","7","8","9","10","11"})); comboBox.setBounds(509, 705, 263, 24); panel.add(comboBox); btnS.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseMoved(MouseEvent e) { //updates speech bubble txtrHiThere.setText(null); txtrHiThere.append(" Here you can change\n all your settings: like\n deleting saved progress,\n changing voices and\n getting a new wordlist"); } }); btnS.setBounds(25, 792, 170, 65); btnS.setFont(new Font("Purisa", Font.BOLD, 19)); btnS.setBackground(new Color(255, 250, 205)); panel.add(btnS); btnR.addActionListener(this); btnS.addActionListener(this); getContentPane().add(panel, BorderLayout.SOUTH); JLabel lblSelectLevel = new JLabel("Select Level"); lblSelectLevel.setBounds(334, 696, 157, 33); lblSelectLevel.setForeground(new Color(255, 250, 240)); lblSelectLevel.setFont(new Font("Purisa", Font.BOLD, 20)); panel.add(lblSelectLevel); JLabel lblNewLabel = new JLabel(""); lblNewLabel.setBounds(-231, -25, 1056, 436); lblNewLabel.setIcon(new ImageIcon("./resources/main_menu_image.jpg")); panel.add(lblNewLabel); JLabel lblNewLabel_1 = new JLabel(""); lblNewLabel_1.setIcon(new ImageIcon("./resources/"+_character+"_2.png")); lblNewLabel_1.setBounds(54, 485, 180, 297); panel.add(lblNewLabel_1); //window listener to show a pop up when user tries to close the application addWindowListener(new WindowAdapter() { //code obtained from http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html public void windowClosing(WindowEvent e) { Object[] options = {"Yes, Please", "No I want to stay!"}; int num = JOptionPane.showOptionDialog(panel, "Are you sure you want to leave the game already?", "Attention!", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options,null); //if yes if(num==0){ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } //otherwise else{ setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); } } }); JLabel lblNewLabel_2 = new JLabel(""); lblNewLabel_2.setIcon(new ImageIcon("./resources/bubble_main.png")); lblNewLabel_2.setBounds(207, 423, 281, 200); panel.add(lblNewLabel_2); JButton progbutton = new JButton("See how you're going!"); progbutton.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseMoved(MouseEvent e) { //speech bubble updated txtrHiThere.setText(null); txtrHiThere.append(" Here, you can see how you\n are going! It will show you\n how many words you have\n mastered as well as a cool\n graph to help you see\n your performance"); } }); progbutton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //leads to the statistics window PersonalBests s=new PersonalBests(); dispose(); s.setVisible(true); } }); progbutton.setBackground(new Color(255, 250, 205)); progbutton.setFont(new Font("Purisa", Font.BOLD, 16)); progbutton.setBounds(231, 792, 292, 65); panel.add(progbutton); pack(); setTitle("Welcome to the VOXSPELL Spelling Aid"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLocationRelativeTo(null); setResizable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void initGUI(){\n\t\t// use border layout for our main frame\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\t// create a new TitlePage and add it to the GUI. This is initially the only instantiated item\n\t\ttitlePage = new TitlePage(this);\n\t\tadd(titlePage);\n\t\t\n\t\tsetBackground( new Color(30, 130, 76) );\t// set a green background\n\t\tsetResizable(false); \t\t\t\t\t\t// User can't change the window's size.\n\t\tsetDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\t// exit when we close\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\t\t\t\t\t// set size of JFrame\n\t\t// set it to visible\n\t\tsetVisible(true);\n\t}", "public GUI() {\n\t\t// sets up file choosers\n\t\tsetFileChoosers();\n\t\t// initialises JFrame\n\t\tsetContent();\n\t\t// sets default window attributes\n\t\tthis.setDefaultAttributes();\n\t\t// instantiates controller object\n\t\tsetController();\n\t\t// sets toolbar to go over frame\n\t\tJPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\t\tToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);\n\t\t// sets antialiasing\n\t\t((Graphics2D) this.getGraphics()).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\t}", "public void setDefaultAttributes() {\n\t\t// sets window information and basic graphical attributes\n\t\tthis.setBounds(50, 50, 1000, 700);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setVisible(true);\n\t\tthis.setTitle(\"Siemens Intuitive Interface\");\n\t\tthis.setBackground(Color.WHITE);\n\t\tthis.setForeground(Color.BLACK);\n\t\tgetContentPane().setLayout(null);\n\t\tthis.setFont(new Font(\"Tahoma\", Font.PLAIN, 24));\n\n\t\t// adds menu items\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu fileMenu = new JMenu(\"File\");\n\t\tsubMenuFrameDock = new JMenu(\"Frames Dock/UnDock\");\n\t\tsubMenuGenFrame = new JMenu(\"Show Frames\");\n\n\t\tmItemNew = fileMenu.add(\"New\");\n\t\tmItemNew.addActionListener(this);\n\t\tmItemNew.setActionCommand(\"new\");\n\n\t\tmItemLoad = fileMenu.add(\"Open\");\n\t\tmItemLoad.addActionListener(this);\n\t\tmItemLoad.setActionCommand(\"open\");\n\n\t\tmItemSave = fileMenu.add(\"Save\");\n\t\tmItemSave.addActionListener(this);\n\t\tmItemSave.setActionCommand(\"save\");\n\n\t\tmItemRun = fileMenu.add(\"Run\");\n\t\tmItemRun.addActionListener(this);\n\t\tmItemRun.setActionCommand(\"run\");\n\n\t\t\n\t\tmItemGenCode = new JMenuItem(\"Generate Code\");\n\t\tmItemGenCode.addActionListener(this);\n\t\tmItemGenCode.setActionCommand(\"genCode\");\n\t\t\n\t\tmItemPreferences = fileMenu.add(\"Preferences\");\n\t\tmItemPreferences.addActionListener(this);\n\t\tmItemPreferences.setActionCommand(\"settings\");\n\n\t\t// ------------------------------------------------------------------------------------------------------------------------------\n\t\ti_console_DockFrame = new JMenuItem(\"i_console Dock/Undock\");\n\t\tsubMenuFrameDock.add(i_console_DockFrame);\n\t\ti_console_DockFrame.addActionListener(this);\n\t\ti_console_DockFrame.setActionCommand(\"i_console_Dock/Undock\");\n\n\t\ti_palette_DockFrame = new JMenuItem(\"i_palette Dock/Undock\");\n\t\tsubMenuFrameDock.add(i_palette_DockFrame);\n\t\ti_palette_DockFrame.addActionListener(this);\n\t\ti_palette_DockFrame.setActionCommand(\"i_palette_Dock/Undock\");\n\n\t\t// --------------------------------------------------------------------------------------------------------------------------------\n\n\t\tshow_i_console = new JMenuItem(\"show i_console\");\n\t\tsubMenuGenFrame.add(show_i_console);\n\t\tshow_i_console.addActionListener(this);\n\t\tshow_i_console.setActionCommand(\"show i_console\");\n\n\t\tshow_i_palette = new JMenuItem(\"show i_palette\");\n\t\tsubMenuGenFrame.add(show_i_palette);\n\t\tshow_i_palette.addActionListener(this);\n\t\tshow_i_palette.setActionCommand(\"show i_palette\");\n\n\t\tfileMenu.add(subMenuFrameDock);\n\t\tfileMenu.add(subMenuGenFrame);\n\n\t\tfileMenu.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\trightMenuClick = true;\n\t\t\t}\n\t\t});\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(mItemGenCode);\n\t\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(Color.DARK_GRAY);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setUndecorated(true);\r\n\t\tframe.setAlwaysOnTop(true);\r\n\t\tframe.setSize(300, 200);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tURL url = Widget.class.getResource(\"/images/nhlLogo.png\");\r\n\t\tImageIcon img = new ImageIcon(url);\r\n\t\t\r\n\t\tframe.setIconImage(img.getImage());\r\n\t\t\r\n\t\tJButton menuButton = new JButton(\"Menu\");\r\n\t\tmenuButton.setBounds(10, 11, 89, 23);\r\n\t\tmenuButton.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n\t\tmenuButton.setForeground(new Color(240, 248, 255));\r\n\t\tmenuButton.setBackground(new Color(47, 79, 79));\r\n\t\tmenuButton.setVisible(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tframe.getContentPane().add(menuButton);\r\n\r\n\t\tJComboBox<ComboItem> comboBox = new JComboBox<ComboItem>();\r\n\t\tcomboBox.setBounds(82, 79, 149, 32);\r\n\t\tcomboBox.setBackground(new Color(47, 79, 79));\r\n\t\tcomboBox.setForeground(new Color(240, 248, 255));\r\n\t\tcomboBox.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tcomboBox.setEditable(true);\r\n\t\tcomboBox.setSelectedItem(\"Select Team\");\r\n\t\tcomboBox.addItem(new ComboItem(\"Anaheim Ducks\", 24));\r\n\t\tcomboBox.addItem(new ComboItem(\"Arizona Coyotes\", 53));\r\n\t\tcomboBox.addItem(new ComboItem(\"Boston Bruins\", 6));\r\n\t\tcomboBox.addItem(new ComboItem(\"Buffalo Sabres\", 7));\r\n\t\tcomboBox.addItem(new ComboItem(\"Calgary Flames\", 20));\r\n\t\tcomboBox.addItem(new ComboItem(\"Carolina Hurricanes\", 12));\r\n\t\tcomboBox.addItem(new ComboItem(\"Chicago Blackhawks\", 16));\r\n\t\tcomboBox.addItem(new ComboItem(\"Colorado Avalanche\", 21));\r\n\t\tcomboBox.addItem(new ComboItem(\"Columbus Blue-Jackets\", 29));\r\n\t\tcomboBox.addItem(new ComboItem(\"Dallas Stars\", 25));\r\n\t\tcomboBox.addItem(new ComboItem(\"Detroit Red Wings\", 17));\r\n\t\tcomboBox.addItem(new ComboItem(\"Edmonton Oilers\", 22));\r\n\t\tcomboBox.addItem(new ComboItem(\"Florida Panthers\", 13));\r\n\t\tcomboBox.addItem(new ComboItem(\"Los Angeles Kings\", 26));\r\n\t\tcomboBox.addItem(new ComboItem(\"Minnesota Wild\", 30));\r\n\t\tcomboBox.addItem(new ComboItem(\"Montreal Canadiens\", 8));\r\n\t\tcomboBox.addItem(new ComboItem(\"Nashville Predators\", 18));\r\n\t\tcomboBox.addItem(new ComboItem(\"New Jersey Devils\", 1));\r\n\t\tcomboBox.addItem(new ComboItem(\"New York Islanders\", 2));\r\n\t\tcomboBox.addItem(new ComboItem(\"New York Rangers\", 3));\r\n\t\tcomboBox.addItem(new ComboItem(\"Ottawa Senators\", 9));\r\n\t\tcomboBox.addItem(new ComboItem(\"Philadelphia Flyers\", 4));\r\n\t\tcomboBox.addItem(new ComboItem(\"Pittsburgh Penguins\", 5));\r\n\t\tcomboBox.addItem(new ComboItem(\"San Jose Sharks\", 28));\r\n\t\tcomboBox.addItem(new ComboItem(\"St. Louis Blues\", 19));\r\n\t\tcomboBox.addItem(new ComboItem(\"Tampa Bay Lightning\", 14));\r\n\t\tcomboBox.addItem(new ComboItem(\"Toronto Maple Leafs\", 10));\r\n\t\tcomboBox.addItem(new ComboItem(\"Vancouver Canucks\", 23));\r\n\t\tcomboBox.addItem(new ComboItem(\"Vegas Golden Knights\", 54));\r\n\t\tcomboBox.addItem(new ComboItem(\"Washington Capitals\", 15));\r\n\t\tcomboBox.addItem(new ComboItem(\"Winnipeg Jets\", 52));\r\n\t\tframe.getContentPane().add(comboBox);\r\n\t\tcomboBox.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcomboBox.setVisible(false);\r\n\t\t\t\tComboItem choice = (ComboItem) comboBox.getSelectedItem();\r\n\t\t\t\tteamId = choice.getId();\r\n\t\t\t\tsetupTeamInfo();\r\n\t\t\t\tmenuButton.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmenuButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\thideTeamInfo();\r\n\t\t\t\tcomboBox.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// create labels for the scores and team names but dont show them yet\r\n\t\thomeTeam = new JLabel(homeName);\r\n\t\thomeTeam.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\thomeTeam.setBounds(-11, 27, 159, 75);\r\n\t\thomeTeam.setForeground(new Color(255, 255, 240));\r\n\t\thomeTeam.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\thomeTeam.setVisible(false);\r\n\t\tframe.getContentPane().add(homeTeam);\r\n\r\n\t\tawayTeam = new JLabel(awayName);\r\n\t\tawayTeam.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tawayTeam.setBounds(157, 34, 143, 60);\r\n\t\tawayTeam.setForeground(new Color(255, 255, 240));\r\n\t\tawayTeam.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tawayTeam.setVisible(false);\r\n\t\tframe.getContentPane().add(awayTeam);\r\n\r\n\t\thomeScoreDisplay = new JLabel(homeScore + \"\");\r\n\t\thomeScoreDisplay.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\thomeScoreDisplay.setBounds(26, 79, 80, 80);\r\n\t\thomeScoreDisplay.setForeground(new Color(255, 255, 240));\r\n\t\thomeScoreDisplay.setFont(new Font(\"Tahoma\", Font.BOLD, 90));\r\n\t\thomeScoreDisplay.setVisible(false);\r\n\t\tframe.getContentPane().add(homeScoreDisplay);\r\n\r\n\t\tawayScoreDisplay = new JLabel(awayScore + \"\");\r\n\t\tawayScoreDisplay.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tawayScoreDisplay.setBounds(187, 79, 80, 80);\r\n\t\tawayScoreDisplay.setForeground(new Color(255, 255, 240));\r\n\t\tawayScoreDisplay.setFont(new Font(\"Tahoma\", Font.BOLD, 90));\r\n\t\tawayScoreDisplay.setVisible(false);\r\n\t\tframe.getContentPane().add(awayScoreDisplay);\r\n\t\t\r\n\t\texitButton = new JButton(\"Exit\");\r\n\t\texitButton.setBounds(201, 12, 89, 23);\r\n\t\texitButton.setForeground(new Color(240, 248, 255));\r\n\t\texitButton.setBackground(new Color(47, 79, 79));\r\n\t\texitButton.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\r\n\t\texitButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(exitButton);\r\n\t\t\r\n\t\tURL url2 = Widget.class.getResource(\"/images/resize.jpg\");\r\n\t\tJLabel bground = new JLabel(new ImageIcon(url2));\r\n\t\tbground.setBounds(0, 0, 300, 200);\r\n\t\tframe.getContentPane().add(bground);\r\n\t\t\r\n\t\t\r\n\r\n\t\tframe.addMouseListener(new MouseAdapter() {\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tposX = e.getX();\r\n\t\t\t\tposY = e.getY();\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseDragged(MouseEvent evt) {\r\n\t\t\t\t// sets frame position when mouse dragged\r\n\t\t\t\tframe.setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tTimer timer = new Timer(3000,new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif ( teamId != -1 ) {\r\n\t\t\t\t\tHTTPGetRequest(teamId);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttimer.start();\r\n\r\n\t}", "void initGUI(int width, int height) {\r\n setSize(width, height); // set the frame size, width: 800, height: 600\r\n setBackground(Color.white); // set the background color to white\r\n Container cp = getContentPane(); // set the container\r\n cp.setBackground(getBackground()); // set the background of the container\r\n cp.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n\r\n createMenus(cp);\r\n\r\n addMouseListener(this); // add a mouse listener\r\n addMouseMotionListener(this); // add a mouse motion listener\r\n setVisible(true); // set the attribute visible true\r\n }", "private static void createAndShowGUI() {\n //Create and set up the window.\n //JFrame frame = new JFrame(\"Basics of Color\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Add content to the window.\n frame.add(new ColorBasics(), BorderLayout.CENTER);\n Menu menu = new Menu();\n frame.setJMenuBar(menu.createMenuBar());\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n }", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "private void initialize() {\r\n\t\tsetTitle(\"The Amazing Malaysia\");\r\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(MenuMWF.class.getResource(\"/A_3/icon.png\")));\r\n\t\tsetBounds(100, 100, 764, 636);\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tgetContentPane().setLayout(null);\r\n\t\t//frmTheAmazingMalaysia = new JFrame();\r\n\t\t//frmTheAmazingMalaysia.setTitle(\"The Amazing Malaysia\");\r\n\t\t//frmTheAmazingMalaysia.setIconImage(Toolkit.getDefaultToolkit().getImage(MenuMWF.class.getResource(\"/A_3/icon.png\")));\r\n\t\t//frmTheAmazingMalaysia.setBounds(100, 100, 764, 636);\r\n\t\t//frmTheAmazingMalaysia.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"The Amazing Malaysia\");\r\n\t\tlblNewLabel.setForeground(Color.WHITE);\r\n\t\tlblNewLabel.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 35));\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel.setBounds(68, 0, 587, 56);\r\n\t\tgetContentPane().add(lblNewLabel);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_1.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/nl1.jpg\")));\r\n\t\tlblNewLabel_1.setBounds(36, 115, 179, 172);\r\n\t\tgetContentPane().add(lblNewLabel_1);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"New label\");\r\n\t\tlabel.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/r1.png\")));\r\n\t\tlabel.setBounds(290, 115, 179, 172);\r\n\t\tgetContentPane().add(label);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label);\r\n\t\t\r\n\t\tJLabel label_1 = new JLabel(\"New label\");\r\n\t\tlabel_1.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/rc1.jpg\")));\r\n\t\tlabel_1.setBounds(529, 115, 179, 172);\r\n\t\tgetContentPane().add(label_1);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_1);\r\n\t\t\r\n\t\tJLabel label_2 = new JLabel(\"New label\");\r\n\t\tlabel_2.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/ll1.png\")));\r\n\t\tlabel_2.setBounds(290, 363, 179, 172);\r\n\t\tgetContentPane().add(label_2);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_2);\r\n\t\t\r\n\t\tJLabel label_3 = new JLabel(\"New label\");\r\n\t\tlabel_3.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/s1.jpg\")));\r\n\t\tlabel_3.setBounds(36, 363, 179, 172);\r\n\t\tgetContentPane().add(label_3);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_3);\r\n\t\t\r\n\t\tJLabel label_4 = new JLabel(\"New label\");\r\n\t\tlabel_4.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/ck1.png\")));\r\n\t\tlabel_4.setBounds(529, 363, 179, 172);\r\n\t\tgetContentPane().add(label_4);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(label_4);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Nasi Lemak\");\r\n\t\tlblNewLabel_2.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_2.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel_2.setBounds(36, 287, 179, 56);\r\n\t\tgetContentPane().add(lblNewLabel_2);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel_2);\r\n\t\t\r\n\t\tJLabel lblRendang = new JLabel(\"Rendang\");\r\n\t\tlblRendang.setForeground(Color.WHITE);\r\n\t\tlblRendang.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblRendang.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblRendang.setBounds(290, 287, 179, 56);\r\n\t\tgetContentPane().add(lblRendang);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblRendang);\r\n\t\t\r\n\t\tJButton btnExit = new JButton(\"Exit\");\r\n\t\tbtnExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnExit.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/e1.png\")));\r\n\t\tbtnExit.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tbtnExit.setForeground(Color.WHITE);\r\n\t\tbtnExit.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 15));\r\n\t\tbtnExit.setBackground(Color.BLACK);\r\n\t\tbtnExit.setBounds(608, 0, 138, 60);\r\n\t\tgetContentPane().add(btnExit);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(btnExit);\r\n\t\t\r\n\t\tJLabel lblRotiCanai = new JLabel(\"Roti Canai\");\r\n\t\tlblRotiCanai.setForeground(Color.WHITE);\r\n\t\tlblRotiCanai.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblRotiCanai.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblRotiCanai.setBounds(529, 287, 179, 56);\r\n\t\tgetContentPane().add(lblRotiCanai);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblRotiCanai);\r\n\t\t\r\n\t\tJLabel lblHighlightDishes = new JLabel(\"Highlight dishes: \");\r\n\t\tlblHighlightDishes.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblHighlightDishes.setForeground(Color.WHITE);\r\n\t\tlblHighlightDishes.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblHighlightDishes.setBounds(236, 46, 233, 56);\r\n\t\tgetContentPane().add(lblHighlightDishes);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblHighlightDishes);\r\n\t\t\r\n\t\tJLabel lblSatay = new JLabel(\"Satay\");\r\n\t\tlblSatay.setForeground(Color.WHITE);\r\n\t\tlblSatay.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblSatay.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblSatay.setBounds(36, 533, 179, 56);\r\n\t\tgetContentPane().add(lblSatay);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblSatay);\r\n\t\t\r\n\t\tJLabel lblCurryLaksa = new JLabel(\"Curry Laksa\");\r\n\t\tlblCurryLaksa.setForeground(Color.WHITE);\r\n\t\tlblCurryLaksa.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCurryLaksa.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 27));\r\n\t\tlblCurryLaksa.setBounds(290, 533, 179, 56);\r\n\t\tgetContentPane().add(lblCurryLaksa);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblCurryLaksa);\r\n\t\t\r\n\t\tJLabel lblChar = new JLabel(\"Char Kuey Teow\");\r\n\t\tlblChar.setForeground(Color.WHITE);\r\n\t\tlblChar.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblChar.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 25));\r\n\t\tlblChar.setBounds(529, 533, 179, 56);\r\n\t\tgetContentPane().add(lblChar);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblChar);\r\n\t\t\r\n\t\tJLabel lblNewLabel_3 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_3.setIcon(new ImageIcon(MenuMWF.class.getResource(\"/A_3/m2.png\")));\r\n\t\tlblNewLabel_3.setBounds(0, 0, 746, 589);\r\n\t\tgetContentPane().add(lblNewLabel_3);\r\n\t\t//frmTheAmazingMalaysia.getContentPane().add(lblNewLabel_3);\r\n\t}", "private void initGUI(){\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n setLayout(new GridLayout(3,1));\r\n setSize(896,504);\r\n setLocation(150,80);\r\n\r\n\r\n\r\n //Setting background img\r\n try{\r\n backGroundImg = javax.imageio.ImageIO.read(new File(\"MenuBackGround.jpg\"));\r\n setContentPane(new JPanel(new GridLayout(3,1)){\r\n @Override public void paintComponent(Graphics graphics){\r\n graphics.drawImage(backGroundImg,0,0,getWidth(),getHeight(),null);\r\n }\r\n });\r\n }catch(IOException ioe){\r\n System.out.println(\"Background image not found!\");\r\n }\r\n\r\n //Setting logo img\r\n try{\r\n logoImg = javax.imageio.ImageIO.read(new File(\"QuizAppLogo.jpg\"));\r\n logoLabel = new JLabel(new ImageIcon(logoImg));\r\n }catch (IOException ioe){\r\n System.out.println(\"Logo img not found!\");\r\n }\r\n\r\n //Setting-up the buttons\r\n solve = new JButton(Language.SOLVE_BUTTON_TEXT);\r\n solve.addActionListener(new SolveAction(this));\r\n\r\n create = new JButton(Language.CREATE_BUTTON_TEXT);\r\n create.addActionListener(new CreateAction());\r\n\r\n options = new JButton(Language.OPTIONS_BUTTON_TEXT);\r\n options.setEnabled(false);\r\n\r\n\r\n //Joining them all together\r\n buttonsPanel = new JPanel(new GridLayout(3,1));\r\n buttonsPanel.setOpaque(false);\r\n buttonsPanel.add(solve);\r\n buttonsPanel.add(create);\r\n //buttonsPanel.add(options);\r\n\r\n topPanel = new JPanel(new GridLayout(1,3));\r\n topPanel.add(logoLabel);\r\n topPanel.add(Box.createHorizontalGlue());\r\n topPanel.add(buttonsPanel);\r\n topPanel.setOpaque(false);\r\n\r\n\r\n\r\n add(topPanel);\r\n add(Box.createVerticalGlue());\r\n add(Box.createVerticalGlue());\r\n setVisible(true);\r\n }", "public mainmen() {\n try {\n this.setContentPane(new javax.swing.JLabel(new javax.swing.ImageIcon(getClass().getResource(\"/splash-bg.jpg\"))));\n initComponents();\n RobotoText = Font.createFont(Font.TRUETYPE_FONT, getClass().getResource(\"/Roboto/Roboto-Regular.ttf\").openStream());\n ge.registerFont(RobotoText);\n RobotoTitle = Font.createFont(Font.TRUETYPE_FONT, getClass().getResource(\"/Roboto/Roboto-Bold.ttf\").openStream());\n ge.registerFont(RobotoTitle);\n } catch (Exception e ) {\n e.printStackTrace();\n }\n }", "public Mainwindow(){\n \n try \n {\n //LookAndFeel asd = new SyntheticaAluOxideLookAndFeel();\n //UIManager.setLookAndFeel(asd);\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n initComponents();\n \n \n userinitComponents();\n \n \n }", "public Menu() {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tMenu.setAlwaysOnTop(true);\r\n\t\tMenu.setBackground(Color.LIGHT_GRAY);\r\n\t\tMenu.setResizable(false);\r\n\t\t\r\n\t\tMenu.setIconImage(Toolkit.getDefaultToolkit().getImage(Menu.class.getResource(\"/images/iconoTT.png\")));\r\n\t\t\r\n\t\tMenu.setTitle(\"TText v1.0\");\r\n\t\tMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tMenu.setBounds(100, 100, 405, 293);\r\n\t\t\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBackground(Color.DARK_GRAY);\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tcontentPane.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tMenu.setContentPane(contentPane);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\t\r\n\t\tpanel.setBackground(Color.DARK_GRAY);\r\n\t\tcontentPane.add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJButton btnNewFile = new JButton(\"\");\r\n\t\tbtnNewFile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfunc.NewFile(Menu);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtnNewFile.setToolTipText(\"New file...\");\r\n\t\tbtnNewFile.setIcon(new ImageIcon(Menu.class.getResource(\"/images/new_document.png\")));\r\n\t\tbtnNewFile.setBounds(72, 35, 42, 51);\r\n\t\tpanel.add(btnNewFile);\r\n\t\t\r\n\t\tJButton Button_OpenFile = new JButton(\"\");\r\n\t\tButton_OpenFile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfunc.OpenFileIni(Menu);\r\n\t\t\t}\r\n\t\t});\r\n\t\tButton_OpenFile.setToolTipText(\"Open file...\");\r\n\t\tButton_OpenFile.setIcon(new ImageIcon(Menu.class.getResource(\"/images/open_document.png\")));\r\n\t\tButton_OpenFile.setBounds(276, 35, 62, 51);\r\n\t\tpanel.add(Button_OpenFile);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setToolTipText(\"Menu\");\r\n\t\tlabel.setBounds(0, 0, 389, 255);\r\n\t\tlabel.setIcon(new ImageIcon(Menu.class.getResource(\"/images/home.png\")));\r\n\t\tpanel.add(label);\r\n\t\t\r\n\t\tImageIcon background = new ImageIcon(Menu.class.getResource(\"/images/home.png\"));\r\n\t\t\r\n\t\tMenu.setVisible(true);\r\n\t}", "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "private void designGUI() {\n\t\tmnb= new JMenuBar();\r\n\t\tFileMenu=new JMenu(\"file\");\r\n\t\tEditMenu=new JMenu(\"edit\");\r\n\t\timg1=new ImageIcon(\"s.gif\");\r\n\t\tNew=new JMenuItem(\"new\",img1);\r\n\t\topen=new JMenuItem(\"open\");\r\n\t\tsave=new JMenuItem(\"save\");\r\n\t\tquit=new JMenuItem(\"quit\");\r\n\t\tcut=new JMenuItem(\"cut\");\r\n\t\tcopy=new JMenuItem(\"copy\");\r\n\t\tpaste=new JMenuItem(\"paste\");\r\n\t\t\r\n\t\tFileMenu.add(New);\r\n\t\tFileMenu.add(save);\r\n\t\tFileMenu.add(open);\r\n\t\tFileMenu.add(new JSeparator());\r\n\t\tFileMenu.add(quit);\r\n\t\tEditMenu.add(cut);\r\n\t\tEditMenu.add(copy);\r\n\t\tEditMenu.add(paste);\r\n\t\t\r\n\t\tmnb.add(FileMenu);\r\n\t\tmnb.add(EditMenu);\r\n\t\tsetJMenuBar(mnb);\r\n\t\t\r\n\t\t//to add shortcut\r\n\t\tquit.setMnemonic('q');\r\n\t\t//quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,ActionEvent.CTRL_MASK));\r\n\t\tquit.addActionListener((ActionEvent e)->\r\n\t\t\t\t{\r\n\t\t\tSystem.exit(0);\r\n\t\t\t\t});\r\n\t\t\r\n\t\t//moving the mouse near to it we get this\r\n\t\tcut.setToolTipText(\"cut the text\");\r\n\t\t//new way fro get domension\r\n\t\tdim=getToolkit().getScreenSize();\r\n\t\tint x=(int) dim.getHeight();\r\n\t\tint y=(int) dim.getWidth();\r\n\t\tc=getContentPane();\r\n\t\tc.setLayout(new BorderLayout());\r\n\t\tmainpanel=new JPanel();\r\n\t\tta1=new JTextArea(x/18,y/12);\r\n\t\tmainpanel.add(new JScrollPane(ta1));\r\n\t\tc.add(mainpanel,BorderLayout.CENTER);\r\n\t\tmymethods();\r\n\t\topen.addActionListener(this);\r\n\t\tsave.addActionListener(this);\r\n\t\tcut.addActionListener(this);\r\n\t\tcopy.addActionListener(this);\r\n\t\tpaste.addActionListener(this);\r\n\t\t\r\n\t}", "private void initGUI() {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetTitle(\"Patient Menu\");\n\t\tsetPreferredSize(new Dimension(800, 700));\n\t\tsetIconImage(new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/heisenbug.png\")).getImage());\n\t\t\n\t\tlblPatient = new JLabel(\"Patient Menu\");\n\t\tlblPatient.setFont(new Font(\"Tahoma\", Font.PLAIN, 40));\n\t\t\n\t\t// A panel for the buttons are defined\n\t\tJPanel buttonsPanel = new JPanel();\n\t\tbuttonsPanel.setLayout(new GridBagLayout());\n\t\t\n\t\t// buttons\n\t\tJButton btnSearch = new JButton(\"Search Patient\");\n\t\tImage searchImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/search.png\")).getImage();\n\t\tbtnSearch.setIcon(new ImageIcon(searchImg));\n\t\tbtnSearch.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnSearch.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnRegister = new JButton(\"Register Patient\");\n\t\tImage registerImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/register.png\")).getImage();\n\t\tbtnRegister.setIcon(new ImageIcon(registerImg));\n\t\tbtnRegister.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnRegister.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnMove = new JButton(\"Move Between Departs\");\n\t\tImage moveImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/move.png\")).getImage();\n\t\tbtnMove.setIcon(new ImageIcon(moveImg));\n\t\tbtnMove.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnMove.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnEdit = new JButton(\"Edit Patient\");\n\t\tImage editImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/edit.png\")).getImage();\n\t\tbtnEdit.setIcon(new ImageIcon(editImg));\n\t\tbtnEdit.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnEdit.setHorizontalTextPosition(SwingConstants.CENTER); \n\t\t\n\t\tJButton btnDischarge = new JButton(\"Discharge Patient\");\n\t\tImage dischargeImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/discharge.png\")).getImage();\n\t\tbtnDischarge.setIcon(new ImageIcon(dischargeImg));\n\t\tbtnDischarge.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnDischarge.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnAdmit = new JButton(\"Admit Patient\");\n\t\tImage admitImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/admit.png\")).getImage();\n\t\tbtnAdmit.setIcon(new ImageIcon(admitImg));\n\t\tbtnAdmit.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnAdmit.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnMoveBed = new JButton(\"Move Between Beds\");\n\t\tImage moveBedImg = new ImageIcon(this.getClass().getClassLoader().getResource(\"icons/Patient menu/movebed.png\")).getImage();\n\t\tbtnMoveBed.setIcon(new ImageIcon(moveBedImg));\n\t\tbtnMoveBed.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnMoveBed.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\t\n\t\tJButton btnBack = new JButton(\"Back\");\n\t\tbtnBack.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tbtnBack.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\t\n\t\t//Listeners:\n\t\tbtnBack.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.Back2Main();\n\t\t\t}\n\t\t});\n\t\tbtnAdmit.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToAdmit();\n\t\t\t}\n\t\t});\n\t\tbtnMoveBed.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToMoveBed();\n\t\t\t}\n\t\t});\n\t\tbtnEdit.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToEdit();\n\t\t\t}\n\t\t});\n\t\tbtnRegister.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToRegister();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnSearch.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToSearch();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnMove.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToDepartmentMove();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnDischarge.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToDischarge();\n\t\t\t}\n\t\t});\n\t\t\n\t\tmenuTop.btnAdd.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.ToAddPassword();\n\t\t\t}\n\t\t});\n\t\t\n\t\tmenuTop.btnChange.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tcontroller.ToChangePassword();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Buttons are added to the button panel and the users clearance is checked\n\t\tbuttonsPanel.add(btnEdit, GridBagLayoutUtils.constraint(1, 1, 0, 0, 0,10,50,10));\n\t\t\n\t\tif(clear == JobTypes.Nurse || clear == JobTypes.ICTOfficer || clear == JobTypes.Clerk ) {\n\t\tbuttonsPanel.add(btnRegister, GridBagLayoutUtils.constraint(2, 1, 0, 0, 0,10,50,10));}\n\t\t\n\t\tif(clear == JobTypes.Clerk || clear == JobTypes.ICTOfficer ) {\n\t\tbuttonsPanel.add(btnAdmit, GridBagLayoutUtils.constraint(2, 2, 0, 0, 0,10,50,10));}\n\n\t\tif(clear == JobTypes.Doctor || clear == JobTypes.ICTOfficer || clear == JobTypes.Nurse ) {\n\t\tbuttonsPanel.add(btnMove, GridBagLayoutUtils.constraint(4, 1, 0, 0, 0,10,50,10));\n\t\tbuttonsPanel.add(btnSearch, GridBagLayoutUtils.constraint(3, 1, 0, 0, 0,10,50,10));\n\t\tbuttonsPanel.add(btnDischarge, GridBagLayoutUtils.constraint(1, 2, 0, 0, 0,10,50,10));\n\t\tbuttonsPanel.add(btnMoveBed, GridBagLayoutUtils.constraint(3, 2, 0, 0, 0,10,50,10));\t\n\t\t}\n\t\t\n\t\t\n\t\t// all the components are added to the frame\n\t\tadd(buttonsPanel, BorderLayout.CENTER);\n\t\tadd(menuTop, BorderLayout.NORTH);\n\t\tadd(btnBack, BorderLayout.SOUTH);\n\t\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t\t\n\t}", "public static void MainMenuComponents(){\n\t\tInterface.menu = new JPanel(new GridBagLayout()) {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic void paintComponent(Graphics g) {\n\n\t\t\t\tg.drawImage(Interface.img, 0, 0, null);\n\t\t\t}\n\t\t};\n\t\tInterface.single.setPreferredSize(Interface.dim);\n\t\tInterface.single.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.single.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.single.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.single.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.multi.setPreferredSize(Interface.dim);\n\t\tInterface.multi.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.multi.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.multi.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.multi.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.options.setPreferredSize(Interface.dim);\n\t\tInterface.options.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.options.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.options.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.options.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.exit.setPreferredSize(Interface.dim);\n\t\tInterface.exit.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.exit.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.exit.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.exit.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.game.setFocusable(true);\n\t\tInterface.menu.setFocusable(true);\n\t\t\n\t\t\n\t\tInterface.backtosingle.setPreferredSize(Interface.dim);\n\t\tInterface.backtosingle.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtosingle.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtosingle.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtosingle.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.backtomulti.setPreferredSize(Interface.dim);\n\t\tInterface.backtomulti.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtomulti.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtomulti.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtomulti.setForeground(Color.white);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\t\n\t\tJLabel lblDesignCopyrights = new JLabel(\"design copyrights \\u00A9 chinmaya\");\n\t\tlblDesignCopyrights.setFont(new Font(\"Times New Roman\", Font.PLAIN, 14));\n\t\tlblDesignCopyrights.setForeground(new Color(255, 255, 224));\n\t\tlblDesignCopyrights.setBounds(1711, 1018, 183, 23);\n\t\tframe.getContentPane().add(lblDesignCopyrights);\n\t\t\n\t\tJPanel background = new JPanel();\n\t\tbackground.setLayout(null);\n\t\tbackground.setBackground(Color.DARK_GRAY);\n\t\tbackground.setBounds(14, 200, 1880, 809);\n\t\tframe.getContentPane().add(background);\n\t\t\n\t\t\n\t\tJLabel lblTypesOfMachine = new JLabel(\"MACHINE NAME\");\n\t\tlblTypesOfMachine.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblTypesOfMachine.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblTypesOfMachine.setForeground(Color.WHITE);\n\t\tlblTypesOfMachine.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblTypesOfMachine.setBounds(69, 378, 178, 30);\n\t\tbackground.add(lblTypesOfMachine);\n\t\t\n\t\t\n\t\tJLabel lblAppointment = new JLabel(\"LIST TO DO\");\n\t\tlblAppointment.setForeground(Color.WHITE);\n\t\tlblAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblAppointment.setBounds(69, 117, 319, 48);\n\t\tbackground.add(lblAppointment);\n\t\t\n\t\tJLabel lblQuantity = new JLabel(\"QUANTITY\");\n\t\tlblQuantity.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblQuantity.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblQuantity.setForeground(Color.WHITE);\n\t\tlblQuantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblQuantity.setBounds(69, 428, 178, 30);\n\t\tbackground.add(lblQuantity);\n\t\t\n\t\tPanel panel = new Panel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setBounds(0, 30, 1880, 67);\n\t\tbackground.add(panel);\n\t\t\n\t\tJButton cusbtn = new JButton(\"CUSTOMER\");\n\t\tcusbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t customer cr = new customer();\n\t\t cr.csStart();\n\t\t frame.dispose();\n\t\t\t}\n\t\t});\n\t\tcusbtn.setForeground(Color.WHITE);\n\t\tcusbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcusbtn.setBackground(Color.BLACK);\n\t\tcusbtn.setBounds(1257, 11, 613, 44);\n\t\tpanel.add(cusbtn);\n\t\t\n\t\tJButton bilbtn = new JButton(\"INVOICE\");\n\t\tbilbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tadminInvoice inv= new adminInvoice();\n\t\t\t\tinv. adminInvoiceStart();\n\t\t\t\tframe.dispose();\n\n\t\t\t}\n\t\t});\n\t\tbilbtn.setForeground(Color.WHITE);\n\t\tbilbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbilbtn.setBackground(Color.BLACK);\n\t\tbilbtn.setBounds(633, 11, 613, 44);\n\t\tpanel.add(bilbtn);\n\t\t\n\t\tJButton prdbtn = new JButton(\"PRODUCTS\");\n\t\tprdbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tadminproducts prd = new adminproducts();\n\t\t\t\tprd.adminPrd();\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprdbtn.setForeground(Color.WHITE);\n\t\tprdbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tprdbtn.setBackground(Color.BLACK);\n\t\tprdbtn.setBounds(10, 11, 613, 44);\n\t\tpanel.add(prdbtn);\n\t\t\n\t\tJLabel lblCustomerName = new JLabel(\"CUSTOMER NAME\");\n\t\tlblCustomerName.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblCustomerName.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblCustomerName.setForeground(Color.WHITE);\n\t\tlblCustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblCustomerName.setBounds(69, 278, 178, 30);\n\t\tbackground.add(lblCustomerName);\n\t\t\n\t\tJLabel lblMachineType = new JLabel(\"MACHINE TYPE\");\n\t\tlblMachineType.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblMachineType.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblMachineType.setForeground(Color.WHITE);\n\t\tlblMachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblMachineType.setBounds(69, 328, 178, 30);\n\t\tbackground.add(lblMachineType);\n\t\t\n\t\t\n\t\tJButton btnStore = new JButton(\"STORE\");\n\t\tbtnStore.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tString dateEntry=date.getText();\n\t\t\t\tString cusname= customerName.getText();\t\n\t\t\t\tString machType=machineType.getText();\n\t\t\t\tString machName=machineName.getText();\n\t\t\t\tString quan=quantity.getText();\n\t\t\t\tString dl= deadline.getText();\n\t\t\t\tConnection con;\n\t\t\t\tPreparedStatement insert;\n\t\t\t\t\n\t\t\t\tif(dateEntry.isEmpty()||cusname.isEmpty()||machName.isEmpty()||machType.isEmpty()||quan.isEmpty()||dl.isEmpty()) \n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"no field must be left empty\",\"registration error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\t\n\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \" Appointment added!!\");\n\t\t\t\t}\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t\t\t\tinsert = con.prepareStatement(\"insert into appointment (date,cusname,machType,machName,quan,deadline) values (?,?,?,?,?,?)\");\n\t\t insert.setString(1, dateEntry);\n\t\t insert.setString(2, cusname);\n\t\t insert.setString(3, machType);\n\t\t insert.setString(4, machName);\n\t\t insert.setString(5, quan);\n\t\t insert.setString(6, dl);\n\t\t insert.executeUpdate();\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnStore.setForeground(Color.WHITE);\n\t\tbtnStore.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnStore.setBackground(Color.BLACK);\n\t\tbtnStore.setBounds(580, 578, 116, 44);\n\t\tbackground.add(btnStore);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setBounds(1000, 230, 613, 267);\n\t\tbackground.add(scrollPane);\n\t\t\n\t\tinvoice = new JTable();\n\t\tscrollPane.setViewportView(invoice);\n\t\t\n\t\tJLabel lblInvoice = new JLabel(\"VIEW TO-DO LIST\");\n\t\tlblInvoice.setForeground(Color.WHITE);\n\t\tlblInvoice.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblInvoice.setBounds(1010, 117, 387, 48);\n\t\tbackground.add(lblInvoice);\n\t\t\n\t\tquantity = new JTextField();\n\t\tquantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tquantity.setColumns(10);\n\t\tquantity.setBounds(279, 428, 289, 30);\n\t\tbackground.add(quantity);\n\t\t\n\t\tmachineName = new JTextField();\n\t\tmachineName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineName.setColumns(10);\n\t\tmachineName.setBounds(279, 328, 289, 30);\n\t\tbackground.add(machineName);\n\t\t\n\t\tmachineType = new JTextField();\n\t\tmachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineType.setColumns(10);\n\t\tmachineType.setBounds(279, 378, 289, 30);\n\t\tbackground.add(machineType);\n\t\t\n\t\tcustomerName = new JTextField();\n\t\tcustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcustomerName.setColumns(10);\n\t\tcustomerName.setBounds(279, 278, 289, 30);\n\t\tbackground.add(customerName);\n\t\t\n\t\tJLabel deadlineLbl = new JLabel(\"DEADLINE\");\n\t\tdeadlineLbl.setVerticalAlignment(SwingConstants.TOP);\n\t\tdeadlineLbl.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tdeadlineLbl.setForeground(Color.WHITE);\n\t\tdeadlineLbl.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tdeadlineLbl.setBounds(69, 481, 178, 30);\n\t\tbackground.add(deadlineLbl);\n\t\t\n\t\tJLabel lblDate = new JLabel(\"DATE\");\n\t\tlblDate.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblDate.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblDate.setForeground(Color.WHITE);\n\t\tlblDate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblDate.setBounds(69, 228, 178, 30);\n\t\tbackground.add(lblDate);\n\t\t\n\t\tdate = new JTextField();\n\t\tdate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdate.setColumns(10);\n\t\tdate.setBounds(279, 228, 289, 30);\n\t\tbackground.add(date);\n\t\t\n\t\tJButton btnView = new JButton(\"VIEW\");\n\t\tbtnView.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tConnection con = null;\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t String query=\"select * from appointment \";\n\t\t\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnView.setForeground(Color.WHITE);\n\t\tbtnView.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnView.setBackground(Color.BLACK);\n\t\tbtnView.setBounds(1584, 578, 116, 44);\n\t\tbackground.add(btnView);\n\t\t\n\t\tdeadline = new JTextField();\n\t\tdeadline.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdeadline.setColumns(10);\n\t\tdeadline.setBounds(279, 481, 289, 30);\n\t\tbackground.add(deadline);\n\t\t\n\t\tJPanel header = new JPanel();\n\t\theader.setLayout(null);\n\t\theader.setBackground(Color.DARK_GRAY);\n\t\theader.setBounds(14, 23, 1880, 163);\n\t\tframe.getContentPane().add(header);\n\t\t\n\t\tJPanel mwtitle = new JPanel();\n\t\tmwtitle.setLayout(null);\n\t\tmwtitle.setForeground(Color.WHITE);\n\t\tmwtitle.setBackground(Color.BLACK);\n\t\tmwtitle.setBounds(209, 7, 649, 151);\n\t\theader.add(mwtitle);\n\t\t\n\t\tJLabel label = new JLabel(\"MACHINE WORKS\");\n\t\tlabel.setForeground(Color.WHITE);\n\t\tlabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 69));\n\t\tlabel.setBounds(20, 11, 605, 72);\n\t\tmwtitle.add(label);\n\t\t\n\t\tJLabel lblWhereAllThe = new JLabel(\"Where all the WORK is done by MACHINE\");\n\t\tlblWhereAllThe.setForeground(Color.ORANGE);\n\t\tlblWhereAllThe.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblWhereAllThe.setBounds(38, 94, 581, 48);\n\t\tmwtitle.add(lblWhereAllThe);\n\t\t\n\t\tJLabel logolbl = new JLabel(\"\");\n\t\tlogolbl.setIcon(new ImageIcon(\"C:\\\\Users\\\\CHINMAYA SH\\\\Pictures\\\\download.png\"));\n\t\tlogolbl.setBounds(58, 7, 151, 151);\n\t\theader.add(logolbl);\n\t\t\n\t\tJButton lgbtn = new JButton(\"LOGOUT\");\n\t\tlgbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Logged out Successfull !!\");\n\t\t\t\tindex ind = new index();\n\t\t\t\tind.indexStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tlgbtn.setForeground(Color.WHITE);\n\t\tlgbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tlgbtn.setBackground(Color.BLACK);\n\t\tlgbtn.setBounds(1674, 60, 116, 44);\n\t\theader.add(lgbtn);\n\t\t\n\t\tJButton button_1 = new JButton(\"SIGN UP\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tsignup sg = new signup();\n\t\t\t\tsg.signupStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton_1.setForeground(Color.WHITE);\n\t\tbutton_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbutton_1.setBackground(Color.BLACK);\n\t\tbutton_1.setBounds(1488, 60, 116, 44);\n\t\theader.add(button_1);\n\t\t\n\t\tJButton btnAppointment = new JButton(\"TO-DO\");\n\t\tbtnAppointment.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tappointments ap = new appointments();\n\t\t\t\tap.appointmentList();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAppointment.setForeground(Color.WHITE);\n\t\tbtnAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnAppointment.setBackground(Color.BLACK);\n\t\tbtnAppointment.setBounds(1309, 60, 125, 44);\n\t\theader.add(btnAppointment);\n\t\tframe.setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 1920\t, 1080);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"考试系统后台管理\");\n\t\tframe.setBounds(100, 100, 1000, 543);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tmenuBar.setBackground(Color.LIGHT_GRAY);\n\t\tmenuBar.setBounds(0, 0, 1114, 43);\n\t\tframe.getContentPane().add(menuBar);\n\n\t\tJMenu mnNewMenu = new JMenu(\"\\u9898\\u5E93\\u7BA1\\u7406\");\n\t\tmnNewMenu.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/question.png\")));\n\t\tmnNewMenu.setFont(new Font(\"Microsoft YaHei UI\", Font.PLAIN, 20));\n\t\tmenuBar.add(mnNewMenu);\n\t\t\n\t\t//添加\n\t\tJMenuItem mntmNewMenuItem = new JMenuItem(\"\\u6DFB\\u52A0\\u8BD5\\u9898\");\n\t\tmntmNewMenuItem.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/add.png\")));\n\t\tmntmNewMenuItem.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// 跳转到修改删除界面\n\t\t\t\t// 销毁该界面\n\t\t\t\tframe.dispose();\n\t\t\t\tnew AddTitleFrm().getFrame().setVisible(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJMenuItem mntmNewMenuItem_2 = new JMenuItem(\"\\u6DFB\\u52A0\\u8BD5\\u5377\");\n\t\tmntmNewMenuItem_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.dispose();\n\t\t\t\tnew AddpaperFrm().getFrame().setVisible(true);\n\t\t\t}\n\t\t});\n\t\tmntmNewMenuItem_2.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/add.png\")));\n\t\tmntmNewMenuItem_2.setFont(new Font(\"Microsoft YaHei UI\", Font.PLAIN, 18));\n\t\tmnNewMenu.add(mntmNewMenuItem_2);\n\t\tmntmNewMenuItem.setFont(new Font(\"Microsoft YaHei UI\", Font.PLAIN, 18));\n\t\tmnNewMenu.add(mntmNewMenuItem);\n\t\t// 修改 删除\n\t\tJMenuItem mntmNewMenuItem_1 = new JMenuItem(\"\\u4FEE\\u6539/\\u5220\\u9664\\u8BD5\\u9898\");\n\t\tmntmNewMenuItem_1.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/dl.png\")));\n\t\tmntmNewMenuItem_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// 跳转到修改删除界面\n\t\t\t\t// 销毁该界面\n\t\t\t\tframe.dispose();\n\t\t\t\tnew testPaperFrm().getFrame().setVisible(true);\n\n\t\t\t}\n\t\t});\n\t\tmntmNewMenuItem_1.setFont(new Font(\"Microsoft YaHei UI\", Font.PLAIN, 18));\n\t\tmnNewMenu.add(mntmNewMenuItem_1);\n\n\t\tJLabel lblNewLabel = new JLabel(\"\\u67E5\\u8BE2\\u6761\\u4EF6\\uFF1A\");\n\t\tlblNewLabel.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tlblNewLabel.setBounds(207, 96, 90, 21);\n\t\tframe.getContentPane().add(lblNewLabel);\n\n\t\t// 下拉框\n\t\tcomboBox = new JComboBox();\n\t\tcomboBox.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tcomboBox.addItem(\"--请选择--\");\n\t\tcomboBox.addItem(\"考生id\");\n\t\tcomboBox.addItem(\"考生姓名\");\n\n\t\tcomboBox.setBounds(315, 96, 129, 24);\n\t\tframe.getContentPane().add(comboBox);\n\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\\u67E5\\u8BE2\\u503C\\uFF1A\");\n\t\tlblNewLabel_1.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tlblNewLabel_1.setBounds(474, 99, 90, 21);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(542, 96, 172, 24);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\n\t\tJButton btnNewButton = new JButton(\"\\u67E5\\u8BE2\");\n\t\tbtnNewButton.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/query.png\")));\n\t\t// 查询时间\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tqueryScoreAction();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tbtnNewButton.setBounds(728, 93, 113, 27);\n\t\tframe.getContentPane().add(btnNewButton);\n\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(204, 142, 672, 323);\n\t\tframe.getContentPane().add(scrollPane);\n\n\t\ttable = new JTable();\n\t\ttable.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\ttable.setModel(new DefaultTableModel(new Object[][] {\n\n\t\t}, new String[] { \"\\u8003\\u751Fid\", \"\\u8003\\u751F\\u59D3\\u540D\", \"\\u5355\\u9009\\u9898\\u5F97\\u5206\",\n\t\t\t\t\"\\u591A\\u9009\\u9898\\u5F97\\u5206\", \"\\u603B\\u5206\", \"\\u8003\\u8BD5\\u65F6\\u95F4\" }) {\n\t\t\tClass[] columnTypes = new Class[] { Integer.class, Object.class, Object.class, Integer.class, Object.class,\n\t\t\t\t\tObject.class };\n\n\t\t\tpublic Class getColumnClass(int columnIndex) {\n\t\t\t\treturn columnTypes[columnIndex];\n\t\t\t}\n\t\t});\n\t\ttable.getColumnModel().getColumn(2).setPreferredWidth(93);\n\t\ttable.getColumnModel().getColumn(3).setPreferredWidth(92);\n\t\ttable.getColumnModel().getColumn(4).setPreferredWidth(58);\n\t\ttable.getColumnModel().getColumn(5).setPreferredWidth(253);\n\t\tscrollPane.setViewportView(table);\n\n\t\tJButton btnD = new JButton(\"\\u5BFC\\u51FA\\u8868\\u683C\");\n\t\tbtnD.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/exporter.png\")));\n\t\t\n\t\t//导出表格\n\t\tbtnD.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//导出表格方法\n\t\t\t\tjButtonActionPerformed();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnD.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tbtnD.setBounds(38, 272, 152, 27);\n\t\tframe.getContentPane().add(btnD);\n\n\t\tJButton btnNewButton_2 = new JButton(\"\\u8FD4\\u56DE\\u4E3B\\u754C\\u9762\");\n\t\tbtnNewButton_2.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/out.png\")));\n\t\t//返回主页\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//销毁本窗口\n\t\t\t\tframe.dispose();\n\t\t\t\t//显示主窗口\n\t\t\t\tnew Index().getFrame().setVisible(true);\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tbtnNewButton_2.setBounds(38, 364, 152, 27);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"\\u5237\\u65B0\");\n\t\tbtnNewButton_1.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/de.png\")));\n\t\t//刷新\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfillScore();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setFont(new Font(\"宋体\", Font.PLAIN, 18));\n\t\tbtnNewButton_1.setBounds(855, 93, 113, 27);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"\\u5206\\u6570\\u6392\\u5E8F\");\n\t\tbtnNewButton_3.setFont(new Font(\"宋体\", Font.PLAIN, 20));\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttotalFrm to = new totalFrm(); \n\t\t\t\tto.getFrame().setVisible(true);\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_3.setIcon(new ImageIcon(AdminFrm.class.getResource(\"/images/\\u6392\\u5E8F.png\")));\n\t\tbtnNewButton_3.setBounds(38, 190, 152, 27);\n\t\tframe.getContentPane().add(btnNewButton_3);\n\t\t// 设置窗体居中\n\t\tframe.setLocationRelativeTo(null);\n\t\tfillScore();\n\t}", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }", "public static void createAndShowStartWindow() {\n\n\t\t// Create and set up the window.\n\n\t\tstartMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// panel will hold the buttons and text\n\t\tJPanel panel = new JPanel() {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t// Fills the panel with a red/black gradient\n\t\t\tprotected void paintComponent(Graphics grphcs) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) grphcs;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\t\t\tColor color1 = new Color(119, 29, 29);\n\t\t\t\tColor color2 = Color.BLACK;\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, color1, 0, getHeight() - 100, color2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(grphcs);\n\t\t\t}\n\t\t};\n\n\t\tpanel.setOpaque(false);\n\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\n\t Font customFont = null;\n\t \n\n\t\ttry {\n\t\t customFont = Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")).deriveFont(32f);\n\n\t\t GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\t ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")));\n\t\t\n\n\t\t} catch (IOException|FontFormatException e) {\n\t\t //Handle exception\n\t\t}\n\t\t\n\n\t\t\n\t\t// Some info text at the top of the window\n\t\tJLabel welcome = new JLabel(\"<html><center><font color='white'> Welcome to <br> Ultimate Checkers! </font></html>\",\n\t\t\t\tSwingConstants.CENTER);\n\t\twelcome.setFont(customFont);\n\t\n\n\t\twelcome.setPreferredSize(new Dimension(200, 25));\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\n\t\t// \"Rigid Area\" is used to align everything\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 40)));\n\t\tpanel.add(welcome);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 50)));\n\t\t//panel.add(choose);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\n\t\t// The start Window will have four buttons\n\t\t// Button1 will open a new window with a standard checkers board\n\t\tJButton button1 = new JButton(\"New Game (Standard Setup)\");\n\n\t\tbutton1.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\tNewGameSettings.createAndShowGameSettings();\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\t\t// Setting up button1\n\t\tbutton1.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton1.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button2 will open a new window where a custom setup can be created\n\t\tJButton button2 = new JButton(\"New Game (Custom Setup)\");\n\t\tbutton2.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Begin creating custom game board setup for checkers\n\t\t\t\t\t\tNewCustomWindow.createAndShowCustomGame();\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button2\n\t\tbutton2.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton2.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button3 is not implemented yet, it will be used to load a saved game\n\t\tJButton button3 = new JButton(\"Load A Saved Game\");\n\t\tbutton3.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton3.setMaximumSize(new Dimension(250, 40));\n\t\tbutton3.addActionListener(new ActionListener() {\n\n\t\t\tfinal JFrame popupWrongFormat = new PopupFrame(\n\t\t\t\t\t\"Wrong Format!\",\n\t\t\t\t\t\"<html><center>\"\n\t\t\t\t\t\t\t+ \"The save file is in the wrong format! <br><br>\"\n\t\t\t\t\t\t\t+ \"Please make sure the load file is in csv format with an 8x8 table, \"\n\t\t\t\t\t\t\t+ \"followed by whose turn it is, \"\n\t\t\t\t\t\t\t+ \"the white player type and the black player type.\"\n\t\t\t\t\t\t\t+ \"</center></html>\");\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This will create the file chooser\n\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\n\n\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"CSV Files\", \"csv\");\n\t\t\t\t\t\tchooser.setFileFilter(filter);\n\n\t\t\t\t\t\tint returnVal = chooser.showOpenDialog(startMenu);\n\t\t\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t\tFile file = chooser.getSelectedFile();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheckAndPlay(file);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tpopupWrongFormat.setVisible(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Do nothing. Load cancelled by user.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Button4 closes the game\n\t\tJButton button4 = new JButton(\"Exit Ultimate Checkers\");\n\t\tbutton4.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button4\n\t\tbutton4.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton4.setMaximumSize(new Dimension(250, 40));\n\n\t\t// The four buttons are added to the panel and aligned\n\t\tpanel.add(button1);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button2);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button3);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 80)));\n\t\tpanel.add(button4);\n\n\t\t// Setting up the start Menu\n\t\tstartMenu.setSize(400, 600);\n\t\tstartMenu.setResizable(false);\n\n\t\t// Centers the window with respect to the user's screen resolution\n\t\tDimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint x = (int) ((dimension.getWidth() - startMenu.getWidth()) / 2);\n\t\tint y = (int) ((dimension.getHeight() - startMenu.getHeight()) / 2);\n\t\tstartMenu.setLocation(x, y);\n\n\t\tstartMenu.add(panel, BorderLayout.CENTER);\n\t\tstartMenu.setVisible(true);\n\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 678, 450);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\t\t\n\t\tmnuAcciones = new JMenu(\"Acciones\");\n\t\tmenuBar.add(mnuAcciones);\n\t\t\n\t\tmnuABMCPersona = new JMenuItem(\"ABMC de Personas\");\n\t\tmnuABMCPersona.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(mnuABMCPersona);\n\t\t\n\t\tnuABMCTipoElemento = new JMenuItem(\"ABMC de Tipos de Elemento\");\n\t\tnuABMCTipoElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCTipoElementoClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCTipoElemento);\n\t\t\n\t\tnuABMCElemento = new JMenuItem(\"ABMC de Elementos\");\n\t\tnuABMCElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuABMCElementoClick();\n\t\t\t\t} catch (Exception 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\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCElemento);\n\t\t\n\t\tnuAReserva = new JMenuItem(\"Hacer una Reserva\");\n\t\tnuAReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuAReservaClick();\n\t\t\t\t} catch (Exception 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\t}\n\t\t});\n\t\tmnuAcciones.add(nuAReserva);\n\t\t\n\t\tnuCBReserva = new JMenuItem(\"Listado de Reservas\");\n\t\tnuCBReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuListadoPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuCBReserva);\n\t\t\n\t\tnuSalir = new JMenuItem(\"Salir\");\n\t\tnuSalir.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsalir();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuSalir);\n\t\tframe.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tdesktopPane = new JDesktopPane();\n\t\tframe.getContentPane().add(desktopPane, BorderLayout.CENTER);\n\t}", "private void initComponents() {\n\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n miSave = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n miUndo = new javax.swing.JMenuItem();\n miRedo = new javax.swing.JMenuItem();\n bgMode = new javax.swing.ButtonGroup();\n bgStrength = new javax.swing.ButtonGroup();\n bgColor = new javax.swing.ButtonGroup();\n jToggleButton1 = new javax.swing.JToggleButton();\n jPanel1 = new javax.swing.JPanel();\n jToolBar1 = new javax.swing.JToolBar();\n btnSave = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JToolBar.Separator();\n jToggleButton2 = new javax.swing.JToggleButton();\n jToggleButton3 = new javax.swing.JToggleButton();\n jToggleButton4 = new javax.swing.JToggleButton();\n jSeparator1 = new javax.swing.JToolBar.Separator();\n jToggleButton9 = new javax.swing.JToggleButton();\n jToggleButton5 = new javax.swing.JToggleButton();\n jToggleButton6 = new javax.swing.JToggleButton();\n jToggleButton7 = new javax.swing.JToggleButton();\n jToggleButton8 = new javax.swing.JToggleButton();\n jSeparator3 = new javax.swing.JToolBar.Separator();\n btnUndo = new javax.swing.JButton();\n btnRedo = new javax.swing.JButton();\n tbColor = new javax.swing.JToolBar();\n btnColor = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n miSave = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n miUndo = new javax.swing.JMenuItem();\n miRedo = new javax.swing.JMenuItem();\n\n jMenu1.setText(\"File\");\n\n miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\n miSave.setText(\"Item\");\n jMenu1.add(miSave);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n\n miUndo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK));\n miUndo.setText(\"Item\");\n jMenu2.add(miUndo);\n\n miRedo.setText(\"Item\");\n jMenu2.add(miRedo);\n\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n bgMode.add(jToggleButton1);\n jToggleButton1.setText(\"\\u9078\\u629e\");\n jToggleButton1.setEnabled(false);\n jToggleButton1.setFocusable(false);\n jToggleButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"\\u3089\\u3075\\u305f\\u3093\");\n\n jPanel1.setLayout(new java.awt.GridLayout(0, 1));\n\n jToolBar1.setRollover(true);\n\n btnSave.setText(\"\\u4fdd\\u5b58\");\n btnSave.setFocusable(false);\n btnSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(btnSave);\n jToolBar1.add(jSeparator2);\n\n bgMode.add(jToggleButton2);\n jToggleButton2.setSelected(true);\n jToggleButton2.setText(\"\\u7dda\");\n jToggleButton2.setActionCommand(\"LINE\");\n jToggleButton2.setFocusable(false);\n jToggleButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton2);\n\n bgMode.add(jToggleButton3);\n jToggleButton3.setText(\"\\u5857\\u308a\");\n jToggleButton3.setActionCommand(\"FILL\");\n jToggleButton3.setFocusable(false);\n jToggleButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton3);\n\n bgMode.add(jToggleButton4);\n jToggleButton4.setText(\"\\u6d88\\u3057\\u30b4\\u30e0\");\n jToggleButton4.setActionCommand(\"ERASE\");\n jToggleButton4.setFocusable(false);\n jToggleButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton4);\n jToolBar1.add(jSeparator1);\n\n bgStrength.add(jToggleButton9);\n jToggleButton9.setText(\"\\u6975\\u7d30\");\n jToggleButton9.setActionCommand(\"1\");\n jToggleButton9.setFocusable(false);\n jToggleButton9.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton9.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton9);\n\n bgStrength.add(jToggleButton5);\n jToggleButton5.setSelected(true);\n jToggleButton5.setText(\"\\u7d30\");\n jToggleButton5.setActionCommand(\"3\");\n jToggleButton5.setFocusable(false);\n jToggleButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton5);\n\n bgStrength.add(jToggleButton6);\n jToggleButton6.setText(\"\\u4e2d\");\n jToggleButton6.setActionCommand(\"8\");\n jToggleButton6.setFocusable(false);\n jToggleButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton6);\n\n bgStrength.add(jToggleButton7);\n jToggleButton7.setText(\"\\u592a\");\n jToggleButton7.setActionCommand(\"15\");\n jToggleButton7.setFocusable(false);\n jToggleButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton7);\n\n bgStrength.add(jToggleButton8);\n jToggleButton8.setText(\"\\u6975\\u592a\");\n jToggleButton8.setActionCommand(\"32\");\n jToggleButton8.setFocusable(false);\n jToggleButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jToggleButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jToggleButton8);\n jToolBar1.add(jSeparator3);\n\n btnUndo.setText(\"\\u5143\\u306b\\u623b\\u3059\");\n btnUndo.setFocusable(false);\n btnUndo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnUndo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(btnUndo);\n\n btnRedo.setText(\"\\u518d\\u5b9f\\u884c\");\n btnRedo.setFocusable(false);\n btnRedo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnRedo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(btnRedo);\n\n jPanel1.add(jToolBar1);\n\n tbColor.setRollover(true);\n\n btnColor.setText(\"\\u8272\");\n btnColor.setFocusable(false);\n btnColor.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnColor.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnColor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnColorActionPerformed(evt);\n }\n });\n tbColor.add(btnColor);\n\n jPanel1.add(tbColor);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);\n\n jMenu1.setText(\"File\");\n\n miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\n miSave.setText(\"Item\");\n jMenu1.add(miSave);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n\n miUndo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK));\n miUndo.setText(\"Item\");\n jMenu2.add(miUndo);\n\n miRedo.setText(\"Item\");\n jMenu2.add(miRedo);\n\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n setBounds((screenSize.width-622)/2, (screenSize.height-502)/2, 622, 502);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setResizable(false);\n\t\tframe.setUndecorated(true);\n\t\tframe.setBounds(100, 100, 587, 465);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblName = new JLabel(\"\");\n\t\tlblName.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Name.png\")));\n\t\tlblName.setBackground(Color.WHITE);\n\t\tlblName.setForeground(new Color(102, 102, 51));\n\t\tlblName.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblName.setBounds(26, 60, 117, 40);\n\t\tframe.getContentPane().add(lblName);\n\t\t\n\t\tJLabel lblLevel = new JLabel(\"\");\n\t\tlblLevel.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Level.png\")));\n\t\tlblLevel.setBackground(Color.WHITE);\n\t\tlblLevel.setForeground(new Color(102, 102, 51));\n\t\tlblLevel.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblLevel.setBounds(26, 105, 117, 40);\n\t\tframe.getContentPane().add(lblLevel);\n\t\t\n\t\tJLabel lblHp = new JLabel(\"\");\n\t\tlblHp.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_HP.png\")));\n\t\tlblHp.setBackground(Color.WHITE);\n\t\tlblHp.setForeground(new Color(102, 102, 51));\n\t\tlblHp.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\t\n\t\tlblHp.setBounds(26, 150, 117, 40);\n\t\tframe.getContentPane().add(lblHp);\n\t\t\n\t\tJLabel lblMp = new JLabel(\"\");\n\t\tlblMp.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_MP.png\")));\n\t\tlblMp.setBackground(Color.WHITE);\n\t\tlblMp.setForeground(new Color(102, 102, 51));\n\t\tlblMp.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblMp.setBounds(26, 195, 117, 40);\n\t\tframe.getContentPane().add(lblMp);\n\t\t\n\t\tJLabel lblStrength = new JLabel(\"\");\n\t\tlblStrength.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Strength.png\")));\n\t\tlblStrength.setBackground(Color.WHITE);\n\t\tlblStrength.setForeground(new Color(102, 102, 51));\n\t\tlblStrength.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblStrength.setBounds(26, 245, 127, 40);\n\t\tframe.getContentPane().add(lblStrength);\n\t\t\n\t\tJLabel lblAttack = new JLabel(\"\");\n\t\tlblAttack.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Attack.png\")));\n\t\tlblAttack.setBackground(Color.WHITE);\n\t\tlblAttack.setForeground(new Color(102, 102, 51));\n\t\tlblAttack.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblAttack.setBounds(26, 290, 127, 40);\n\t\tframe.getContentPane().add(lblAttack);\n\t\t\n\t\tJLabel lblDefence = new JLabel(\"\");\n\t\tlblDefence.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/Sprite_Defence.png\")));\n\t\tlblDefence.setBackground(Color.WHITE);\n\t\tlblDefence.setForeground(new Color(102, 102, 51));\n\t\tlblDefence.setFont(new Font(\"Comic Sans MS\", Font.ITALIC, 23));\n\t\tlblDefence.setBounds(26, 335, 127, 40);\n\t\tframe.getContentPane().add(lblDefence);\n\t\t\n\t\tJLabel name = new JLabel(\"name\");\n\t\tname.setText(sprite.getName());\n\t\tname.setFont(new Font(\"Comic Sans MS\", Font.BOLD, 21));\n\t\tname.setForeground(new Color(204, 102, 0));\n\t\tname.setBounds(163, 71, 110, 18);\n\t\tframe.getContentPane().add(name);\n\t\t\n\t\tJLabel level = new JLabel(\"level\");\n\t\tlevel.setText(\"\" + sprite.getLevel());\n\t\tlevel.setForeground(new Color(0, 204, 0));\n\t\tlevel.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tlevel.setBounds(163, 117, 72, 18);\n\t\tframe.getContentPane().add(level);\n\t\t\n\t\tJLabel hp = new JLabel(\"hp\");\n\t\thp.setText(sprite.getHp() + \"/\" + sprite.getMaxHp());\n\t\thp.setForeground(new Color(255, 0, 0));\n\t\thp.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\thp.setBounds(163, 160, 110, 18);\n\t\tframe.getContentPane().add(hp);\n\t\t\n\t\tJLabel mp = new JLabel(\"mp\");\n\t\tmp.setText(sprite.getMp() + \"/\" + sprite.getMaxMp());\n\t\tmp.setForeground(new Color(51, 51, 255));\n\t\tmp.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tmp.setBounds(163, 209, 110, 18);\n\t\tframe.getContentPane().add(mp);\n\t\t\n\t\tJLabel strength = new JLabel(\"strength\");\n\t\tstrength.setText(\"\" + sprite.getStrength());\n\t\tstrength.setForeground(new Color(153, 0, 255));\n\t\tstrength.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tstrength.setBounds(163, 258, 72, 18);\n\t\tframe.getContentPane().add(strength);\n\t\t\n\t\tJLabel attack = new JLabel(\"attack\");\n\t\tattack.setText(\"\" + sprite.getAttack());\n\t\tattack.setForeground(new Color(153, 51, 255));\n\t\tattack.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tattack.setBounds(163, 303, 72, 18);\n\t\tframe.getContentPane().add(attack);\n\t\t\n\t\tJLabel defence = new JLabel(\"defence\");\n\t\tdefence.setText(\"\" + sprite.getDefence());\n\t\tdefence.setForeground(new Color(153, 51, 255));\n\t\tdefence.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 21));\n\t\tdefence.setBounds(163, 348, 72, 18);\n\t\tframe.getContentPane().add(defence);\n\t\t\n\t\tJButton btnBack = new JButton(\"\");\n\t\tbtnBack.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/menu/Back.png\")));\n\t\tbtnBack.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(menuBar == null)\n\t\t\t\t\tmenuBar = new MenuBar(sprite);\n\t\t\t\telse\n\t\t\t\t\tmenuBar.updateSprite(sprite);\n\t\t\t\tmenuBar.main();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnBack.setIcon(new ImageIcon(MenuBar.class.getResource(\"/pic/menu/back_1.png\")));\n\t\tbtnBack.setRolloverIcon(new ImageIcon(MenuBar.class.getResource(\"/pic/menu/back_2.png\")));\n\t\tbtnBack.setBorderPainted(false);\n\t\tbtnBack.setOpaque(false);\t\n\t\tbtnBack.setBounds(14, 385, 110, 59);\n\t\tbtnBack.setBackground(Color.BLACK);\n\t\tframe.getContentPane().add(btnBack);\n\t\t\n\t\tJLabel lblBackground = new JLabel(\"\");\n\t\tlblBackground.setIcon(new ImageIcon(SpriteBar.class.getResource(\"/pic/common/demo1.png\")));\n\t\tlblBackground.setBounds(0, 0, 587, 465);\n\t\tframe.getContentPane().add(lblBackground);\n\t}", "public frameMenu() {\n initComponents();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(new Color(0, 204, 204));\r\n\t\tframe.setBounds(100, 100, 527, 371);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnJunior = new JButton(\"Junior\");\r\n\t\tbtnJunior.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJunior.JrMenu(null);\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnJunior.setBounds(50, 124, 97, 25);\r\n\t\tframe.getContentPane().add(btnJunior);\r\n\t\t\r\n\t\tJButton btnSenior = new JButton(\"Senior\");\r\n\t\tbtnSenior.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSenior.SRMenu(null);\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSenior.setBounds(210, 124, 97, 25);\r\n\t\tframe.getContentPane().add(btnSenior);\r\n\t\t\r\n\t\tJButton btnNonmember = new JButton(\"Non-Member\");\r\n\t\tbtnNonmember.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tNon_Member.NonMenu(null);\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNonmember.setBounds(369, 124, 107, 25);\r\n\t\tframe.getContentPane().add(btnNonmember);\r\n\t\t\r\n\t\tJButton btnMenu = new JButton(\"Menu\");\r\n\t\tbtnMenu.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tMenu.MainMenu(null);\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMenu.setBounds(210, 207, 97, 25);\r\n\t\tframe.getContentPane().add(btnMenu);\r\n\t\t\r\n\t\tJLabel lblRegister = new JLabel(\"Register\");\r\n\t\tlblRegister.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblRegister.setBounds(223, 35, 82, 36);\r\n\t\tframe.getContentPane().add(lblRegister);\r\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "private void InitGUI() {\n\n\t\t//Configuraciones de la ventana principal\n\t\tcontenedor = getContentPane();\n\t\tcontenedor.removeAll();\n\t\tgetContentPane().setLayout(null);\n\t\tthis.setUndecorated(true);\n\t\tlistener = new ManejadorDeBotones();\n\t\tmanejadorDesplazamientoVentana(this);\n\n\t\t// Logo del sofa\n\t\tJLabel imagenSofa = new JLabel(\"\");\n\t\timagenSofa.setIcon(new ImageIcon(GUIMenuAdmin.class.getResource(\"/images/sofa.png\")));\n\t\timagenSofa.setBounds(199, 15, 120, 80);\n\t\tgetContentPane().add(imagenSofa);\n\n\t\t// Etiqueta para el nombre al ladpo del logo\n\t\tJLabel lblMueblesYMuebles = new JLabel(\" Muebles y Muebles\");\n\t\tlblMueblesYMuebles.setFont(font);\n\t\tlblMueblesYMuebles.setForeground(Color.WHITE);\n\t\tlblMueblesYMuebles.setBounds(390, 77, 152, 32);\n\t\tgetContentPane().add(lblMueblesYMuebles);\n\n\t\t// Etiqueta para el logo XYZ\n\t\tJLabel imagenLogo = new JLabel(\"\");\n\t\timagenLogo.setIcon(\n\t\t\t\tnew ImageIcon(GUIMenuAdmin.class.getResource(\"/images/logo_blanco.png\")));\n\t\timagenLogo.setBounds(288, 23, 213, 82);\n\t\tgetContentPane().add(imagenLogo);\n\n\t\t//Boton para inicial crear ordenes de trabajo\n\t\tcrearOrden = new JButton(\"CREAR\");\n\t\tcrearOrden.setForeground(SystemColor.textHighlight);\n\t\tcrearOrden.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tcrearOrden.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tcrearOrden.setIcon(new ImageIcon(GUIMenuAdmin.class.getResource(\"/images/orden_crear.png\")));\n\t\tcrearOrden.setFocusPainted(false);\n\t\tcrearOrden.setBorderPainted(false);\n\t\tcrearOrden.setOpaque(true);\n\t\tcrearOrden.setBackground(new Color(227, 227, 227));\n crearOrden.setFont(font);\n crearOrden.setBounds(117, 219, 140, 120);\n crearOrden.addActionListener(listener);\n getContentPane().add(crearOrden);\n\n\t\t//Boton para modificar ordenes de trabajo\n\t\tmodificarOrden = new JButton(\"MODIFICAR\");\n\t\tmodificarOrden.setForeground(SystemColor.textHighlight);\n\t\tmodificarOrden.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tmodificarOrden.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tmodificarOrden.setIcon(new ImageIcon(GUIMenuAdmin.class.getResource(\"/images/orden_editar.png\")));\n\t\tmodificarOrden.setFocusPainted(false);\n\t\tmodificarOrden.setBorderPainted(false);\n\t\tmodificarOrden.setOpaque(true);\n\t\tmodificarOrden.setBackground(new Color(227, 227, 227));\n\t\tmodificarOrden.setFont(font);\n\t\tmodificarOrden.setBounds(267, 219, 140, 120);\n modificarOrden.addActionListener(listener);\n getContentPane().add(modificarOrden);\n\n\t\t//Boton para inicial la actualizacion de los usuarios\n\t\tconsultarOrden = new JButton(\"CONSULTAR\");\n\t\tconsultarOrden.setForeground(SystemColor.textHighlight);\n\t\tconsultarOrden.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tconsultarOrden.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tconsultarOrden.setIcon(new ImageIcon(GUIMenuAdmin.class.getResource(\"/images/orden_buscar.png\")));\n\t\tconsultarOrden.setFocusPainted(false);\n\t\tconsultarOrden.setBorderPainted(false);\n\t\tconsultarOrden.setOpaque(true);\n\t\tconsultarOrden.setBackground(new Color(227, 227, 227));\n\t\tconsultarOrden.setFont(font);\n\t\tconsultarOrden.setBounds(417, 219, 140, 120);\n consultarOrden.addActionListener(listener);\n getContentPane().add(consultarOrden);\n\n //Boton salir\n\t\tsalir = new JButton(\"\");\n\t\tsalir.setIcon(new ImageIcon(GUIMenuAdmin.class.getResource(\"/images/salir.png\")));\n\t\tsalir.setBorderPainted(false);\n\t\tsalir.setBorder(null);\n\t\tsalir.setMargin(new Insets(0, 0, 0, 0));\n\t\tsalir.setContentAreaFilled(false);\n\t\tsalir.addActionListener(listener);\n\t\tsalir.setBounds(588, 411, 81, 59);\n\t\tgetContentPane().add(salir);\n\n\t\t//-- Eriqueta --//\n\t\tlabel_1 = new JLabel(\"ORDENES DE TRABAJO\");\n\t\tlabel_1.setForeground(SystemColor.textHighlight);\n\t\tlabel_1.setFont(font);\n\t\tlabel_1.setBounds(117, 192, 140, 14);\n\t\tgetContentPane().add(label_1);\n\n\t\t//-- Separadores --//\n\t\tseparator_1 = new JSeparator();\n\t\tseparator_1.setForeground(SystemColor.textHighlight);\n\t\tseparator_1.setBackground(new Color(255, 255, 255));\n\t\tseparator_1.setBounds(260, 199, 297, 9);\n\t\tgetContentPane().add(separator_1);\n\t\t\n\t\t//Etiqueta salir\n\t\tlblSalir = new JLabel(\"SALIR\");\n\t\tlblSalir.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblSalir.setForeground(SystemColor.textHighlight);\n\t\tlblSalir.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblSalir.setBounds(597, 391, 49, 14);\n\t\tgetContentPane().add(lblSalir);\n\t\t//Etiqueta superior azul\n\t\tJLabel fondoAzul = new JLabel(\"\");\n\t\tfondoAzul.setOpaque(true);\n\t\tfondoAzul.setBackground(new Color(45, 118, 232));// azul #2D76E8\n\t\tfondoAzul.setBounds(0, 0, 679, 120);\n\t\tgetContentPane().add(fondoAzul);\n\n\t\t//Titulo para tipo de usuario\n\t\tJLabel titulo = new JLabel(\"JEFE DE TALLER\");\n\t\ttitulo.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\n\t\ttitulo.setForeground(SystemColor.textHighlight);\n\t\ttitulo.setBounds(417, 146, 140, 21);\n\t\tgetContentPane().add(titulo);\n\n\t\t\n\t\t// Etiqueta principal blanca\n\t\tJLabel fondoBlanco = new JLabel(\"\");\n\t\tfondoBlanco.setOpaque(true);\n\t\tfondoBlanco.setBackground(new Color(255, 255, 255));\n\t\tfondoBlanco.setBounds(0, 120, 679, 377);\n\t\tgetContentPane().add(fondoBlanco);\n\n\t\t//Configuraciones adicionales de la ventana principal\n\t\tsetSize(679, 497);\n\t\tsetResizable(false);\n\t\tsetVisible(true);\n\t\tsetLocationRelativeTo(null);\n\t\tsetShape(new java.awt.geom.RoundRectangle2D.Double(0, 0, getWidth(), getHeight(), 5, 5));\n\n }", "private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }", "private void initializeAttributes() {\n\t language.setMinWidth(200);//250\n\t language.setAlignment(Pos.CENTER);\n\t language.getStyleClass().clear();\n\t language.getStyleClass().add(\"menuButton\");\n\t \n\t // Set history button properties\n\t history.setMinWidth(200);//250\n\t history.setAlignment(Pos.CENTER);\n\t history.getStyleClass().clear();\n\t history.getStyleClass().add(\"menuButton\");\n\t \n\t // Set closing button button properties\n\t closingButton.getStyleClass().clear();\n\t closingButton.getStyleClass().add(\"menuButton\");\n\t \n\t // Set reducing button button properties\n\t reducingButton.getStyleClass().clear();\n\t reducingButton.getStyleClass().add(\"menuButton\");\n\t \n\t // Close window/application on click\n\t closingButton.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \tgameMainStage.close();\n }\n });\n\t \n\t // Reduce window/application on click\n\t reducingButton.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \tgameMainStage.setIconified(true);\n }\n });\n\t \n\t // Switch to the language part of the application on click\n\t language.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n if (currentTab == null || currentTab.equals(\"history\")) {\n \tcurrentTab = \"language\";\n \tupdateTabButtons();\n \twindowMainPane.setCenter(new Language());\n }\n }\n });\n\t \n\t\t// Switch to the history part of the application on click\n\t history.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \tif (currentTab == null || currentTab.equals(\"language\")) {\n \t\tcurrentTab = \"history\";\n \t\tupdateTabButtons();\n \t\twindowMainPane.setCenter(new History(0));\n \t}\n }\n });\n\t}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "private void initMenu() {\n\t\tloadImage();\r\n\t\t// Add listeners to buttons\r\n\t\tstartGame.addActionListener(new StartGameListener());\r\n\t\texitGame.addActionListener(new ExitGameListener());\r\n\t\t// Setting buttons in the middle of the screen\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tadd(startGame, gbc);\r\n\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 1;\r\n\t\t// Resize \"exitGame\" button to \"startGame\" button size\r\n\t\texitGame.setPreferredSize(startGame.getPreferredSize());\r\n\t\t// Set insets between two buttons in 100 px\r\n\t\tgbc.insets = new Insets(100, 0, 0, 0);\r\n\t\tadd(exitGame, gbc);\r\n\t}", "public MainFrame() {\n initComponents();\n\n mAlmondUI.addWindowWatcher(this);\n mAlmondUI.initoptions();\n\n initActions();\n init();\n\n if (IS_MAC) {\n initMac();\n }\n\n initMenus();\n mActionManager.setEnabledDocumentActions(false);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 750, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnOpenFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnOpenFile);\n\t\t\n\t\tJMenuItem mntmNewMenuItem = new JMenuItem(\"Open File\");\n\t\tmnOpenFile.add(mntmNewMenuItem);\n\t\t\n\t\tJMenuItem mntmReset = new JMenuItem(\"Reset\");\n\t\tmnOpenFile.add(mntmReset);\n\t\t\n\t\tJMenu mnFunctions = new JMenu(\"Functions\");\n\t\tmenuBar.add(mnFunctions);\n\t\t\n\t\tJMenuItem mntmFindLanguage = new JMenuItem(\"Find Language\");\n\t\tmnFunctions.add(mntmFindLanguage);\n\t\t\n\t\tJMenuItem mntmTopWords = new JMenuItem(\"Top 10 Words\");\n\t\tmnFunctions.add(mntmTopWords);\n\t\t\n\t\tJMenuItem mntmFilterUnwanted = new JMenuItem(\"Filter Unwanted\");\n\t\tmnFunctions.add(mntmFilterUnwanted);\n\t\t\n\t\tJMenuItem mntmDisplayWholeFile = new JMenuItem(\"Display Whole File\");\n\t\tmnFunctions.add(mntmDisplayWholeFile);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tframe.getContentPane().add(panel, BorderLayout.NORTH);\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n\t\t\n\t\tJToolBar toolBar = new JToolBar();\n\t\tpanel.add(toolBar);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Find Lang\");\n\t\tIcon findlangico = new ImageIcon(getClass().getResource(\"findlang.jpg\"));\n\t\tbtnNewButton = new JButton(findlangico);\n\t\t\n\t\ttoolBar.add(btnNewButton);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Top 10 Words\");\n\t\tIcon topwordsico = new ImageIcon(getClass().getResource(\"top10.jpg\"));\n\t\tbtnNewButton_1 = new JButton(topwordsico);\n\t\ttoolBar.add(btnNewButton_1);\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"Display File\");\n\t\tIcon fileico = new ImageIcon(getClass().getResource(\"wholefile.jpg\"));\n\t\tbtnNewButton_2 = new JButton(fileico);\n\t\ttoolBar.add(btnNewButton_2);\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"Filter Words\");\n\t\tIcon filterico = new ImageIcon(getClass().getResource(\"filter.jpg\"));\n\t\tbtnNewButton_3 = new JButton(filterico);\n\t\ttoolBar.add(btnNewButton_3);\n\t\t\n\t\tJButton btnNewButton_4 = new JButton(\"Exit\");\n\t\tIcon exitico = new ImageIcon(getClass().getResource(\"exit.jpg\"));\n\t\tbtnNewButton_4 = new JButton(exitico);\n\t\ttoolBar.add(btnNewButton_4);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tframe.getContentPane().add(panel_1, BorderLayout.EAST);\n\t\tGridBagLayout gbl_panel_1 = new GridBagLayout();\n\t\tgbl_panel_1.columnWidths = new int[]{0, 0, 0, 0, 0, 46, 0, 0, 89, 0, 0, 0};\n\t\tgbl_panel_1.rowHeights = new int[]{23, 0, 0, 0, 0, 0, 0, 0, 0};\n\t\tgbl_panel_1.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, Double.MIN_VALUE, 0.0};\n\t\tgbl_panel_1.rowWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tpanel_1.setLayout(gbl_panel_1);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Display Text\");\n\t\tGridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();\n\t\tgbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblNewLabel_1.gridx = 5;\n\t\tgbc_lblNewLabel_1.gridy = 0;\n\t\tpanel_1.add(lblNewLabel_1, gbc_lblNewLabel_1);\n\t\t\n\t\tJScrollPane scrollPane_1 = new JScrollPane();\n\t\tscrollPane_1.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER);\n\t\tGridBagConstraints gbc_scrollPane_1 = new GridBagConstraints();\n\t\tgbc_scrollPane_1.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_scrollPane_1.fill = GridBagConstraints.BOTH;\n\t\tgbc_scrollPane_1.gridx = 0;\n\t\tgbc_scrollPane_1.gridy = 1;\n\t\tgbc_scrollPane_1.gridwidth = 0;\n\t\tpanel_1.add(scrollPane_1, gbc_scrollPane_1);\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setLineWrap(true);\n\t\tscrollPane_1.setViewportView(textArea);\n\n\t\tJLabel lblNewLabel = new JLabel(\"\");\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\n\t\tgbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblNewLabel.gridx = 4;\n\t\tgbc_lblNewLabel.gridy = 5;\n\t\tpanel_1.add(lblNewLabel, gbc_lblNewLabel);\n\t\t\n\t\tJPanel panel_3 = new JPanel();\n\t\tframe.getContentPane().add(panel_3, BorderLayout.WEST);\n\t\tGridBagLayout gbl_panel_3 = new GridBagLayout();\n\t\tgbl_panel_3.columnWidths = new int[]{46, 0, 0, 0, 86, 0};\n\t\tgbl_panel_3.rowHeights = new int[]{20, 0, 0, 0, 0, 0};\n\t\tgbl_panel_3.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tgbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\n\t\tpanel_3.setLayout(gbl_panel_3);\n\t\t\n\t\tJLabel lblLanguage = new JLabel(\"Language\");\n\t\tGridBagConstraints gbc_lblLanguage = new GridBagConstraints();\n\t\tgbc_lblLanguage.insets = new Insets(5, 5, 5, 5); // the distance from the sides ie padding (top, left, bottom, right)\n\t\tgbc_lblLanguage.gridx = 0; // gridx is row\n\t\tgbc_lblLanguage.gridy = 0; // gridy is column\n\t\tpanel_3.add(lblLanguage, gbc_lblLanguage);\n\t\t\n\t\ttextField = new JTextField();\n\t\tGridBagConstraints gbc_textField = new GridBagConstraints();\n\t\tgbc_textField.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_textField.insets = new Insets(5, 5, 5, 0); // the distance from the sides ie padding (top, left, bottom, right)\n\t\tgbc_textField.gridx = 3;\n\t\tgbc_textField.gridy = 0;\n\t\tgbc_textField.gridwidth = 2;\n\t\tpanel_3.add(textField, gbc_textField);\n\t\ttextField.setColumns(20);\n\t\ttextField.setEnabled(false);\n\t\t\n\t\tJLabel lblTopWords = new JLabel(\"Top 10 Words\");\n\t\tGridBagConstraints gbc_lblTopWords = new GridBagConstraints();\n\t\tgbc_lblTopWords.anchor = GridBagConstraints.NORTH;\n\t\tgbc_lblTopWords.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_lblTopWords.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblTopWords.gridx = 2;\n\t\tgbc_lblTopWords.gridy = 2;\n\t\tpanel_3.add(lblTopWords, gbc_lblTopWords);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tGridBagConstraints gbc_scrollPane = new GridBagConstraints();\n\t\tgbc_scrollPane.fill = GridBagConstraints.BOTH;\n\t\tgbc_scrollPane.gridx = 0;\n\t\tgbc_scrollPane.gridy = 3;\n\t\tgbc_scrollPane.gridwidth = 5;\n\t\tgbc_scrollPane.gridheight = 3;\n\t\tpanel_3.add(scrollPane, gbc_scrollPane);\n\n\t\ttable = new JTable();\n\t\ttable.setModel(new DefaultTableModel(\n\t\t\tnew Object[][] {\n\t\t\t\t{\"1.\", null},\n\t\t\t\t{\"2.\", null},\n\t\t\t\t{\"3.\", null},\n\t\t\t\t{\"4.\", null},\n\t\t\t\t{\"5.\", null},\n\t\t\t\t{\"6.\", null},\n\t\t\t\t{\"7.\", null},\n\t\t\t\t{\"8.\", null},\n\t\t\t\t{\"9.\", null},\n\t\t\t\t{\"10.\", null},\n\t\t\t},\n\t\t\tnew String[] {\n\t\t\t\t\"Number\", \"Word\"\n\t\t\t}\n\t\t));\n\t\t\n\t\tbtnNewButton.addActionListener(new ActionListener() { // creates an action listener and adds it to the button\n\t\t\tpublic void actionPerformed(ActionEvent arg0) { // Receives an action event so it can carry out the stuff inside it\n\t\t\t\tFileManager read_2 = new FileManager(\"Z:\\\\Java\\\\R\\\\src\\\\Example1.txt\");\n\t\t \t\tread_2.connectToFile();\n\t\t \t\tArrayList<String> fileRead = read_2.readFile();\n\t\t \t\tread_2.closeReadFile();\n\t\t\t\tFindLan t3 = new FindLan(fileRead);\n\t \t\t \tString lang = t3.cLang();\n\t \t\t \ttextField.setText(lang);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tFileManager read_1 = new FileManager(\"Z:\\\\Java\\\\R\\\\src\\\\punctuation.txt\");\n\t\t \t\tread_1.connectToFile();\n\t\t \t\tpunctMarks = read_1.readFile();\n\t\t \t\tread_1.closeReadFile();\n\t\t\t\tFileManager read_2 = new FileManager(\"Z:\\\\Java\\\\R\\\\src\\\\Example1.txt\");\n\t\t \t\tread_2.connectToFile();\n\t\t \t\tArrayList<String> fileRead = read_2.readFile();\n\t\t \t\tread_2.closeReadFile();\n\t\t\t\tRemovePunct t1 = new RemovePunct(punctMarks, fileRead);\n\t \t\t\t//Calling the EndArray(Remove) method to clean an array of punctuation marks\n\t \t\t \tArrayList<String> cleanWords = t1.EndArray();\n\t \t\t\t\n\t \t\t \ttable.setModel(new DefaultTableModel(\n\t \t\t\t\t\tnew Object[][] {\n\t \t\t\t\t\t\t{\"1.\", cleanWords.get(0)},\n\t \t\t\t\t\t\t{\"2.\", cleanWords.get(1)},\n\t \t\t\t\t\t\t{\"3.\", cleanWords.get(2)},\n\t \t\t\t\t\t\t{\"4.\", cleanWords.get(3)},\n\t \t\t\t\t\t\t{\"5.\", cleanWords.get(4)},\n\t \t\t\t\t\t\t{\"6.\", cleanWords.get(5)},\n\t \t\t\t\t\t\t{\"7.\", cleanWords.get(6)},\n\t \t\t\t\t\t\t{\"8.\", cleanWords.get(7)},\n\t \t\t\t\t\t\t{\"9.\", cleanWords.get(8)},\n\t \t\t\t\t\t\t{\"10.\", cleanWords.get(9)},\n\t \t\t\t\t\t},\n\t \t\t\t\t\tnew String[] {\n\t \t\t\t\t\t\t\"Number\", \"Word\"\n\t \t\t\t\t\t}\n\t \t\t\t\t));\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tFileManager read_2 = new FileManager(\"Z:\\\\Java\\\\R\\\\src\\\\Example1.txt\");\n\t\t \t\tread_2.connectToFile();\n\t \t\t \tArrayList<String> readlines = read_2.readLines();\n\t\t \t\tread_2.closeReadFile();\n\t \t\t \tString str = \"\";\n\t \t\t \tfor(String temp: readlines){\n\t \t\t \t\tstr = str + temp + \"\\n\";\n\t \t\t \t}\n\t \t\t \ttextArea.setText(str);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnNewButton_4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0); // exit\n\t\t\t}\n\t\t});\n\t\tscrollPane.setViewportView(table);\n\t}", "protected void init(){\n ac = new ButtonEventManager(this);\n \n nameField = new JTextField();\n \n done = new JButton(\"DONE\");\n back = new JButton(\"MAIN MENU\");\n quit = new JButton(\"QUIT\");\n \n done.setActionCommand(\"go to game menu after saving\");\n back.setActionCommand(\"go to the main menu\");\n quit.setActionCommand(\"quit the game\");\n \n Font font = new Font(\"Arial\", Font.PLAIN, 10);\n \n nameField.setFont(font);\n \n nameField.setBounds(2 * this.getWidth() / 3 - buttonWidth / 2, (int)(0.4 * this.getHeight() - textFieldHeight / 2), buttonWidth, textFieldHeight);\n \n done.setBounds((this.getWidth() / 2 - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n back.setBounds((this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n quit.setBounds(3 * (this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n \n done.addActionListener(ac);\n back.addActionListener(ac);\n quit.addActionListener(ac);\n \n add(nameField);\n \n add(done);\n add(back);\n add(quit);\n }", "private void setupGUI() {\r\n\t\tPaperToolkit.initializeLookAndFeel();\r\n\t\tgetMainFrame();\r\n\t}", "public Menu() {\n initComponents();\n getContentPane().setBackground(Color.WHITE);\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(messageIcons.getFrameIcon())));\n Customer_Panel.setVisible(false);\n Employee_Panel.setVisible(false);\n Report_Panel.setVisible(false);\n Report_Summary.setVisible(false);\n }", "private void init() {\n\t\tthis.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setResizable(false);\n\t\tlbl1.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tlbl2.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tlbl3.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tlbl4.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tlbl5.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tlbl6.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tlbl7.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tbtncanel.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\tbtnsave.setFont(new Font(\"微软雅黑\",Font.PLAIN,14));\n\t\t\n\t\tpnlInfo.setBounds(10,5,320,220);\n//\t\tpnlInfo.setBackground(Color.cyan);\n//\t\tpnlMain.setBackground(Color.green);\n//\t\tbtnsave.setBackground(Color.pink);\n//\t\tbtncanel.setBackground(Color.yellow);\n\t\tbtnsave.setBounds(120, 230, 70, 25);\n\t\tbtncanel.setBounds(210, 230, 70, 25);\n\t\t\n\t\tbtncanel.addActionListener(new AddRederTypeFrame_btncanel_ActionListener(this));\n\t\tbtnsave.addActionListener(new AddRederTypeFrame_btnsave_ActionListener(this));\n\t\t\n//\t\tpnlInfo.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, Color.cyan));\n\t\t\n\t\tpnlInfo.add(lbl1);\n\t\tpnlInfo.add(txtname);\n\t\tpnlInfo.add(lbl2);\n\t\tpnlInfo.add(txtcount);\n\t\tpnlInfo.add(lbl3);\n\t\tpnlInfo.add(txtdate);\n\t\tpnlInfo.add(lbl4);\n\t\tpnlInfo.add(txtmtp);\n\t\tpnlInfo.add(lbl5);\n\t\tpnlInfo.add(txtstcharge);\n\t\tpnlInfo.add(lbl6);\n\t\tpnlInfo.add(txtoutcharge);\n\t\tpnlInfo.add(lbl7);\n\t\tpnlInfo.add(txtqty);\n\t\t\n\t\tpnlMain.add(pnlInfo);\n\t\tpnlMain.add(btnsave);\n\t\tpnlMain.add(btncanel);\n\t\tthis.add(pnlMain);\n\t\tthis.setTitle(\"新增用户\");\n\t\tGlobal.setCenterByWindow(this);\n\t\tthis.setVisible(true);\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "public MainFrame() {\n super(\"Gestione Concessionaria\");\n this.initComponents();\n this.generaFasciaPrezzo();\n this.pack();\n this.setLocationRelativeTo(null);\n this.initPanels();\n this.ToggleMenu.addActionListener(this);\n }", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\\u5E78\\u8FD0\\u8F6C\\u76D8\");\n\t\tlblNewLabel.setBounds(131, 13, 208, 35);\n\t\tlblNewLabel.setIcon(new ImageIcon(RandomCall.class.getResource(\"/images/\\u968F\\u673A\\u7528\\u6237.png\")));\n\t\tlblNewLabel.setFont(new Font(\"宋体\", Font.BOLD, 30));\n\t\t\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\t/*\n\t\t *名字显示区域\n\t\t */\n\t\tlblNewLabel_1 = new JLabel(\"name\");\n\t\tlblNewLabel_1.setFont(new Font(\"宋体\", Font.ITALIC, 30));\n\t\tlblNewLabel_1.setBounds(178, 91, 113, 52);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\t/*\n\t\t * 开始按钮\n\t\t */\n\t\tstart = new JButton(\"\\u5F00\\u59CB\");\n\t\tstart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstartAction(e); \n\t\t\t}\n\t\t});\n\t\tstart.setBounds(14, 198, 113, 27);\n\t\tframe.getContentPane().add(start);\n\t\t\n\t\t/*\n\t\t * 停止按钮\n\t\t */\n\t\tJButton stop = new JButton(\"\\u6682\\u505C\");\n\t\tstop.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstopAction(e); \n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\tstop.setBounds(165, 198, 113, 27);\n\t\tframe.getContentPane().add(stop);\n\t\t\n\t\tJButton back = new JButton(\"\\u8FD4\\u56DE\\u4E3B\\u754C\\u9762\");\n\t\tback.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tIndex index = new Index(); \n\t\t\t\tindex.getFrame().setVisible(true);\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tback.setBounds(305, 198, 113, 27);\n\t\tframe.getContentPane().add(back);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public MenuFrame() {\n initComponents();\n }", "public void initGui()\n {\n this.buttonList.clear();\n this.multilineMessage = this.fontRendererObj.listFormattedStringToWidth(this.message.getFormattedText(), this.width - 50);\n this.field_175353_i = this.multilineMessage.size() * this.fontRendererObj.FONT_HEIGHT;\n this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 2 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, I18n.format(\"gui.toMenu\", new Object[0])));\n if(!TabGUI.openTabGUI) return;\n this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Reconnect\"));\n this.buttonList.add(new GuiButton(2, this.width / 2, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Random Alt\"));\n }", "private void initComponents() {\n\n jPopupMenu = new javax.swing.JPopupMenu();\n jMenuItemNewKeyFrame = new javax.swing.JMenuItem();\n jMenuItemNewTransition = new javax.swing.JMenuItem();\n jMenuItemPaste = new javax.swing.JMenuItem();\n\n jMenuItemNewKeyFrame.setText(\"New KeyFrame\");\n jMenuItemNewKeyFrame.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemNewKeyFrameMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemNewKeyFrame);\n\n jMenuItemNewTransition.setText(\"New Transition\");\n jMenuItemNewTransition.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemNewTransitionMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemNewTransition);\n\n jMenuItemPaste.setText(\"Paste\");\n jMenuItemPaste.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemPasteMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemPaste);\n\n setBackground(new java.awt.Color(255, 255, 255));\n setComponentPopupMenu(jPopupMenu);\n setOpaque(true);\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n formComponentResized(evt);\n }\n });\n addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n formPropertyChange(evt);\n }\n });\n }", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "public GUI()\n {\n //Initializes the variables and UI aspects\n UI.initialise();\n UI.addTextField(\"Search Title/Director/Genre\", this::searchEither);\n UI.addButton(\"Add Movie\", this::newMovie);\n UI.addButton(\"Rate Movie\", this::rateMovie);\n UI.addButton(\"Show All Movies\", this::printAll);\n UI.addButton(\"Recommend Movies\", this::recommendMovie);\n UI.setMouseListener(r::manageMouse);\n UI.addButton(\"Quit\", UI::quit);\n \n // Sets the size of the whole window and the divider\n UI.setWindowSize(CANVASWIDTH, CANVASHEIGHT);\n UI.setDivider(0.4);\n this.drawMain();\n }", "private void paintMenu(){ \n\t\t\n\t\t//Idee: Vllt. lieber Menü auf unsichtbar setzen und immer wieder anzeigen, wenn benötigt? Vllt. auch praktisch für Pause...Aber was mit entsprechenden Labels?\n\t\tif(spiel_status == 3){ //Spiel noch gar nicht gestartet\n\t\t\tframe3 = new JFrame(\"Spiel starten?\");\n\t\t\tframe3.setLocation(650,300);\n\t\t\tframe3.setSize(100, 100);\n\t\t\tJButton b1 = new JButton(\"Einzelspieler\");\n\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\tJButton b2 = new JButton(\"Beenden\");\n\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\tJButton b3 = new JButton(\"Mehrspieler\");\n\t\t\tJButton b4 = new JButton(\"Einstellungen\");\n\t\t\tJButton b5 = new JButton(\"Handbuch\");\n\t\t\t\n\t\t\t//Neues Layout. 4 Zeilen, 1 Spalte. \n\t\t\tframe3.setLayout(new GridLayout(5,1));\n\t\t\tframe3.add(b1);\n\t\t\tframe3.add(b3);\n\t\t\tframe3.add(b4);\n\t\t\tframe3.add(b5);\n\t\t\tframe3.add(b2);\n\n\t\t\tframe3.pack();\n\t\t\tframe3.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\t\tsingleplayer = true;\n\t\t\t\t\tdoInitializations(frame3);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tb3.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tmultiplayer = true;\n\t\t\t\t\tpaintNetworkMenu();\n\t\t\t\t}\n\t\t\t});\t\t\t\n\t\t\t\n\t\t\tb4.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tpaintSettingMenu();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tb5.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \"+ \"resources\\\\handbuch\\\\Handbuch.pdf\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\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\t\n\t\t}\n\t\t\n\t\tif(spiel_status == 1|| spiel_status == 0){ //Wenn Spiel gewonnen oder verloren\n//\t\t\tif (!multiplayer){\n\t\t\t\tframe2 = new JFrame(\"Neues Einzelspielerspiel?\");\n\t\t\t\tframe2.setLocation(500,300);\n\t\t\t\tframe2.setSize(100, 100);\n\t\t\t\tJLabel label;\n\t\t\t\tif(spiel_status == 1){\n\t\t\t\t\tlabel = new JLabel(\"Bravo, du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t}else{\n\t\t\t\t\tif(player.getLifes() == 0){\n\t\t\t\t\t\tlabel = new JLabel(\"Schade, du hast verloren! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlabel = new JLabel(\"Du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tframe2.add(BorderLayout.NORTH, label);\n\t\t\t\tJButton b1 = new JButton(\"Neues Einzelspielerspiel\");\n\t\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tdoInitializations(frame2);\n\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n\t\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tspiel_status=3;\n\t\t\t\t\t\tpaintMenu();\n\t\t\t\t\t\tframe2.setVisible(false);\n\t\t\t\t\t\t\n\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});\n\t\t\t\tframe2.add(BorderLayout.CENTER, b1);\n\t\t\t\tframe2.add(BorderLayout.SOUTH, b2);\n\t\t\t\tframe2.pack();\n\t\t\t\tframe2.setVisible(true);\n\t\t\t\tspiel_status = 0;\n\t\t\t}\n//\t\t}else{\n//\t\t\tframe2 = new JFrame(\"Ende\");\n//\t\t\tframe2.setLocation(500,300);\n//\t\t\tframe2.setSize(100, 100);\n//\t\t\tJLabel label;\n//\t\t\tif(player.getLifes() == 0){\n//\t\t\t\tlabel = new JLabel(\"Du Lusche hast verloren!\");\n//\t\t\t}else{\n//\t\t\t\tlabel = new JLabel(\"Boom-Headshot! Du hast gewonnen!\");\n//\t\t\t}\n//\t\t\t\n//\t\t\tframe2.add(BorderLayout.NORTH, label);\n//\t\t\t\n//\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n//\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n//\t\t\tb2.addActionListener(new ActionListener(){\n//\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n//\t\t\t\t\tif(sound_running){\n//\t\t\t\t\t\tsoundlib.stopLoopingSound();\n//\t\t\t\t\t}\n//\t\t\t\t\tspiel_status=3;\n//\t\t\t\t\tpaintMenu();\n//\t\t\t\t\tframe2.setVisible(false);\n//\t\t\t\t\tframe2.dispose();\n//\t\t\t\t\t\n//\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\tframe2.add(BorderLayout.CENTER, b2);\n//\t\t\tframe2.pack();\n//\t\t\tframe2.setVisible(true);\n//\t\t\tspiel_status = 0;\n//\t\t}\n\t\tspiel_status = 0; // Daraus folgt, dass wenn man das Spiel per ESC-taste verlässt, man verliert.\n\t\t\n\t}", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "public void initGui()\r\n\t{\r\n\t\tthis.viewportTexture = new DynamicTexture(256, 256);\r\n\t\tthis.backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation(\"background\", this.viewportTexture);\r\n\t\tthis.widthCopyright = this.fontRenderer.getStringWidth(\"Copyright Mojang AB. Do not distribute!\");\r\n\t\tthis.widthCopyrightRest = this.width - this.widthCopyright - 2;\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(new Date());\r\n\r\n\t\tif (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)\r\n\t\t{\r\n\t\t\tthis.splashText = \"Merry X-mas!\";\r\n\t\t}\r\n\t\telse if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)\r\n\t\t{\r\n\t\t\tthis.splashText = \"Happy new year!\";\r\n\t\t}\r\n\t\telse if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)\r\n\t\t{\r\n\t\t\tthis.splashText = \"OOoooOOOoooo! Spooky!\";\r\n\t\t}\r\n\r\n\t\tint i = 24;\r\n\t\tint j = this.height / 4 + 48;\r\n\r\n\t\tif (this.mc.isDemo())\r\n\t\t{\r\n\t\t\tthis.addDemoButtons(j, 24);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.addSingleplayerMultiplayerButtons(j, 24);\r\n\t\t}\r\n\r\n\t\tthis.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 + 12, 98, 20, I18n.format(\"menu.options\")));\r\n\t\tthis.buttonList.add(new GuiButton(4, this.width / 2 + 2, j + 72 + 12, 98, 20, I18n.format(\"menu.quit\")));\r\n\r\n\t\tsynchronized (this.threadLock)\r\n\t\t{\r\n\t\t\tthis.openGLWarning1Width = this.fontRenderer.getStringWidth(this.openGLWarning1);\r\n\t\t\tthis.openGLWarning2Width = this.fontRenderer.getStringWidth(this.openGLWarning2);\r\n\t\t\tint k = Math.max(this.openGLWarning1Width, this.openGLWarning2Width);\r\n\t\t\tthis.openGLWarningX1 = (this.width - k) / 2;\r\n\t\t\tthis.openGLWarningY1 = (this.buttonList.get(0)).y - 24;\r\n\t\t\tthis.openGLWarningX2 = this.openGLWarningX1 + k;\r\n\t\t\tthis.openGLWarningY2 = this.openGLWarningY1 + 24;\r\n\t\t}\r\n\r\n\t\tthis.mc.setConnectedToRealms(false);\r\n\r\n\t\tif (Minecraft.getMinecraft().gameSettings.getOptionOrdinalValue(GameSettings.Options.REALMS_NOTIFICATIONS) && !this.hasCheckedForRealmsNotification)\r\n\t\t{\r\n\t\t\tRealmsBridge realmsbridge = new RealmsBridge();\r\n\t\t\tthis.realmsNotification = realmsbridge.getNotificationScreen(this);\r\n\t\t\tthis.hasCheckedForRealmsNotification = true;\r\n\t\t}\r\n\r\n\t\tif (this.areRealmsNotificationsEnabled())\r\n\t\t{\r\n\t\t\tthis.realmsNotification.setGuiSize(this.width, this.height);\r\n\t\t\tthis.realmsNotification.initGui();\r\n\t\t}\r\n\t}", "private void initGUI() {\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\t// This is the story we took from Wikipedia.\n\t\tString story = \"The Internet Foundation Classes (IFC) were a graphics \"\n\t\t\t\t+ \"library for Java originally developed by Netscape Communications \"\n\t\t\t\t+ \"Corporation and first released on December 16, 1996.\\n\\n\"\n\t\t\t\t+ \"On April 2, 1997, Sun Microsystems and Netscape Communications\"\n\t\t\t\t+ \" Corporation announced their intention to combine IFC with other\"\n\t\t\t\t+ \" technologies to form the Java Foundation Classes. In addition \"\n\t\t\t\t+ \"to the components originally provided by IFC, Swing introduced \"\n\t\t\t\t+ \"a mechanism that allowed the look and feel of every component \"\n\t\t\t\t+ \"in an application to be altered without making substantial \"\n\t\t\t\t+ \"changes to the application code. The introduction of support \"\n\t\t\t\t+ \"for a pluggable look and feel allowed Swing components to \"\n\t\t\t\t+ \"emulate the appearance of native components while still \"\n\t\t\t\t+ \"retaining the benefits of platform independence. This feature \"\n\t\t\t\t+ \"also makes it easy to have an individual application's appearance \"\n\t\t\t\t+ \"look very different from other native programs.\\n\\n\"\n\t\t\t\t+ \"Originally distributed as a separately downloadable library, \"\n\t\t\t\t+ \"Swing has been included as part of the Java Standard Edition \"\n\t\t\t\t+ \"since release 1.2. The Swing classes are contained in the \"\n\t\t\t\t+ \"javax.swing package hierarchy.\\n\\n\";\n\t\t// We create the TextArea and pass the story in as an argument.\n\t\tJTextArea storyArea = new JTextArea(story);\n\t\tstoryArea.setEditable(true);\n\t\tstoryArea.setWrapStyleWord(true);\n\t\t// We create the ScrollPane and instantiate it with the TextArea as an argument\n\t\tJScrollPane area = new JScrollPane(storyArea);\t\t\t\n\t\tmainPanel.add(area);\t\n\t\tthis.setContentPane(mainPanel);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setIconImage(Toolkit.getDefaultToolkit().getImage(ModifyRoomBorder.class.getResource(\"/images/ktv2.jpg\")));\n\t\tframe.setTitle(\"\\u4FEE\\u6539\\u623F\\u95F4\\u754C\\u9762\");\n\t\tframe.getContentPane().setBackground(new Color(255, 204, 204));\n\t\tframe.setBounds(800, 200, 450, 300);\n\t\tframe.setVisible(true);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tcomboBox = new JComboBox<String>();\n\t\tcomboBox.setFont(new Font(\"华文楷体\", Font.BOLD, 20));\n\t\tcomboBox.setBackground(Color.WHITE);\n\t\tcomboBox.setBounds(48, 119, 127, 43);\n\t\tframe.getContentPane().add(comboBox);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttextField.setFont(new Font(\"微软雅黑 Light\", Font.BOLD, 16));\n\t\ttextField.setColumns(10);\n\t\ttextField.setBounds(261, 119, 113, 43);\n\t\tframe.getContentPane().add(textField);\n\t\t\n\t\tJButton button = new JButton(\"\\u6539\\u623F\\u95F4\\u53F7\");\n\t\tbutton.addActionListener(\n\t\t\t\tnew ModifyRoomBorder_event()\n\t\t\t\t);\n\t\tbutton.setFont(new Font(\"微软雅黑\", Font.BOLD, 18));\n\t\tbutton.setBackground(Color.WHITE);\n\t\tbutton.setBounds(63, 197, 113, 43);\n\t\tframe.getContentPane().add(button);\n\t\t\n\t\tJButton button_1 = new JButton(\"\\u8FD4\\u56DE\\r\\n\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton_1.setFont(new Font(\"微软雅黑\", Font.BOLD, 18));\n\t\tbutton_1.setBackground(Color.WHITE);\n\t\tbutton_1.setBounds(261, 197, 113, 43);\n\t\tframe.getContentPane().add(button_1);\n\t\t\n\t\tlabel = new JLabel(\"\\u65B0\\u623F\\u95F4\\u53F7\");\n\t\tlabel.setForeground(new Color(255, 255, 204));\n\t\tlabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel.setFont(new Font(\"楷体\", Font.BOLD, 18));\n\t\tlabel.setBounds(277, 79, 97, 27);\n\t\tframe.getContentPane().add(label);\n\t\t\n\t\tlabel_1 = new JLabel(\"\\u65E7\\u623F\\u95F4\\u53F7\");\n\t\tlabel_1.setForeground(new Color(255, 255, 204));\n\t\tlabel_1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel_1.setFont(new Font(\"楷体\", Font.BOLD, 18));\n\t\tlabel_1.setBounds(57, 79, 97, 27);\n\t\tframe.getContentPane().add(label_1);\n\t\t\n\t\tlabel_2 = new JLabel(\"\\u89C4\\u5B9A:\\u623F\\u95F4\\u53F7\\u5728101~399\\u4E4B\\u95F4\");\n\t\tlabel_2.setFont(new Font(\"楷体\", Font.BOLD, 18));\n\t\tlabel_2.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel_2.setBounds(82, 24, 271, 42);\n\t\tframe.getContentPane().add(label_2);\n\t}", "public NewMenu (final Navigator navi, NewApp father) {\r\n\t\tthis.navi = navi;\r\n\t\tthis.theApp = father;\r\n\t\tsetFocusable(true);\r\n\t\ttry {\r\n \t\tbackground = ImageIO.read(new File(theApp.getLoc()+\"background.png\"));\r\n \t} catch (IOException e) {\r\n \t}\r\n setLayout(null);\r\n \r\n Font buttons = new Font(\"Impact\", Font.BOLD, 20);\r\n hard.setFont(buttons);\r\n medium.setFont(buttons);\r\n easy.setFont(buttons);\r\n funky.setFont(buttons);\r\n quit.setFont(buttons);\r\n settings.setFont(buttons);\r\n help.setFont(buttons);\r\n \r\n easy.setBounds(320, 250, 160, 50); easy.setVisible(true);\r\n medium.setBounds(320, 300, 160, 50); medium.setVisible(true);\r\n hard.setBounds(320, 350, 160, 50); hard.setVisible(true);\r\n funky.setBounds(320, 400, 160, 50); funky.setVisible(true);\r\n quit.setBounds(720, 610, 80, 50); quit.setVisible(true);\r\n settings.setBounds(0, 610, 80, 50); settings.setVisible(true);\r\n help.setBounds(320, 500, 160, 50); help.setVisible(true);\r\n \r\n JLabel GameTitle = new JLabel(\" Escape The Copyright\");\r\n GameTitle.setFont(new Font(\"Impact\", Font.PLAIN, 50));\r\n GameTitle.setForeground(Color.red);\r\n GameTitle.setBounds(180,100,470,80);\r\n \r\n JLabel GameTitleOutline = new JLabel(\" Escape The Copyright\");\r\n GameTitleOutline.setFont(new Font(\"Impact\", Font.PLAIN, 50));\r\n GameTitleOutline.setForeground(Color.black);\r\n GameTitleOutline.setBounds(184,104,470,80);\r\n \r\n repaint();\r\n \r\n add(GameTitle); GameTitle.setVisible(true);\r\n add(GameTitleOutline); GameTitle.setVisible(true);\r\n add(easy); easy.addActionListener(this);\r\n add(medium); medium.addActionListener(this);\r\n add(hard); hard.addActionListener(this);\r\n add(funky); funky.addActionListener(this);\r\n add(quit); quit.addActionListener(this);\r\n add(settings); settings.addActionListener(this);\r\n add(help); help.addActionListener(this);\r\n }", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n obsahFrame = new cz.wt.convertor.main.gui.ObsahFrame();\n menuBar = new javax.swing.JMenuBar();\n javax.swing.JMenu fileMenu = new javax.swing.JMenu();\n javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();\n javax.swing.JMenu helpMenu = new javax.swing.JMenu();\n helpMenuItem = new javax.swing.JMenuItem();\n javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"cz/wt/convertor/main/gui/Bundle\"); // NOI18N\n setTitle(bundle.getString(\"MainFrame.title\")); // NOI18N\n setMinimumSize(new java.awt.Dimension(300, 30));\n getContentPane().setLayout(new java.awt.GridBagLayout());\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n getContentPane().add(obsahFrame, gridBagConstraints);\n\n fileMenu.setText(bundle.getString(\"MainFrame.fileMenu.text\")); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(MainFrame.class, this);\n exitMenuItem.setAction(actionMap.get(\"quit\")); // NOI18N\n fileMenu.add(exitMenuItem);\n\n menuBar.add(fileMenu);\n\n helpMenu.setText(bundle.getString(\"MainFrame.helpMenu.text\")); // NOI18N\n\n helpMenuItem.setAction(actionMap.get(\"showHelpBox\")); // NOI18N\n helpMenuItem.setText(bundle.getString(\"MainFrame.helpMenuItem.text\")); // NOI18N\n helpMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n napoveda(evt);\n }\n });\n helpMenu.add(helpMenuItem);\n\n aboutMenuItem.setText(bundle.getString(\"MainFrame.aboutMenuItem.text\")); // NOI18N\n aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n about(evt);\n }\n });\n helpMenu.add(aboutMenuItem);\n\n menuBar.add(helpMenu);\n\n setJMenuBar(menuBar);\n\n pack();\n }", "public void initGui()\n {\n Keyboard.enableRepeatEvents(true);\n this.buttons.clear();\n GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format(\"selectWorld.edit.resetIcon\")));\n this.buttons.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format(\"selectWorld.edit.openFolder\")));\n this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectWorld.edit.save\")));\n this.buttons.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\")));\n guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, \"icon.png\").isFile();\n ISaveFormat isaveformat = this.mc.getSaveLoader();\n WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);\n String s = worldinfo == null ? \"\" : worldinfo.getWorldName();\n this.nameEdit = new GuiTextField(2, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);\n this.nameEdit.setFocused(true);\n this.nameEdit.setText(s);\n }", "public void createGui(){\n\t\twindow = this.getContentPane(); \n\t\twindow.setLayout(new FlowLayout());\n\n\t\t//\tAdd \"panel\" to be used for drawing \n\t\t_panel = new ResizableImagePanel();\n\t\tDimension d= new Dimension(1433,642);\n\t\t_panel.setPreferredSize(d);\t\t \n\t\twindow.add(_panel);\n\n\t\t// A menu-bar contains menus. A menu contains menu-items (or sub-Menu)\n\t\tJMenuBar menuBar; // the menu-bar\n\t\tJMenu menu; // each menu in the menu-bar\n\n\t\tmenuBar = new JMenuBar();\n\t\t// First Menu\n\t\tmenu = new JMenu(\"Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A); // alt short-cut key\n\t\tmenuBar.add(menu); // the menu-bar adds this menu\n\n\t\tmenuItem1 = new JMenuItem(\"Fruit\", KeyEvent.VK_F);\n\t\tmenu.add(menuItem1); // the menu adds this item\n\n\t\tmenuItem2 = new JMenuItem(\"Pacman\", KeyEvent.VK_S);\n\t\tmenu.add(menuItem2); // the menu adds this item\n\t\tmenuItem3 = new JMenuItem(\"Run\");\n\t\tmenu.add(menuItem3); // the menu adds this item \n\t\tmenuItem4 = new JMenuItem(\"Save Game\");\n\t\tmenu.add(menuItem4); // the menu adds this item\n\n\t\tmenuItem5 = new JMenuItem(\"Open Game\");\n\t\tmenu.add(menuItem5); // the menu adds this item\n\t\tmenuItem6 = new JMenuItem(\"Clear Game\");\n\t\tmenu.add(menuItem6); // the menu adds this item\n\t\tmenuItem1.addActionListener(this);\n\t\tmenuItem2.addActionListener(this);\n\t\tmenuItem3.addActionListener(this);\n\t\tmenuItem4.addActionListener(this);\n\t\tmenuItem5.addActionListener(this);\n\t\tmenuItem6.addActionListener(this);\n\n\t\tsetJMenuBar(menuBar); // \"this\" JFrame sets its menu-bar\n\t\t// panel (source) fires the MouseEvent.\n\t\t//\tpanel adds \"this\" object as a MouseEvent listener.\n\t\t_panel.addMouseListener(this);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n LogoLbl = new javax.swing.JLabel();\n titleLbl = new javax.swing.JLabel();\n ExamPapersbtn = new javax.swing.JButton();\n Constructionsbtm = new javax.swing.JButton();\n Formulasbtn = new javax.swing.JButton();\n Quizbtn = new javax.swing.JButton();\n backgroundBtn = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n LogoLbl.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mathsapp/purple logo.JPG\"))); // NOI18N\n LogoLbl.setText(\"jLabel1\");\n getContentPane().add(LogoLbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 30, 200, 70));\n\n titleLbl.setFont(new java.awt.Font(\"Tahoma\", 2, 18)); // NOI18N\n titleLbl.setForeground(new java.awt.Color(102, 0, 102));\n titleLbl.setText(\"Main Menu\");\n getContentPane().add(titleLbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 100, 110, 40));\n\n ExamPapersbtn.setBackground(new java.awt.Color(255, 255, 204));\n ExamPapersbtn.setFont(new java.awt.Font(\"Thonburi\", 3, 20)); // NOI18N\n ExamPapersbtn.setForeground(new java.awt.Color(102, 0, 102));\n ExamPapersbtn.setText(\"Exam papers\");\n ExamPapersbtn.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n ExamPapersbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ExamPapersbtnActionPerformed(evt);\n }\n });\n getContentPane().add(ExamPapersbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 300, 170, 40));\n\n Constructionsbtm.setBackground(new java.awt.Color(255, 255, 204));\n Constructionsbtm.setFont(new java.awt.Font(\"Thonburi\", 3, 20)); // NOI18N\n Constructionsbtm.setForeground(new java.awt.Color(102, 0, 102));\n Constructionsbtm.setText(\"Constructions\");\n Constructionsbtm.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n Constructionsbtm.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n Constructionsbtm.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ConstructionsbtmActionPerformed(evt);\n }\n });\n getContentPane().add(Constructionsbtm, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 230, 170, 40));\n\n Formulasbtn.setBackground(new java.awt.Color(255, 255, 204));\n Formulasbtn.setFont(new java.awt.Font(\"Thonburi\", 3, 20)); // NOI18N\n Formulasbtn.setForeground(new java.awt.Color(102, 0, 102));\n Formulasbtn.setText(\"Formulae\");\n Formulasbtn.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n Formulasbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n FormulasbtnActionPerformed(evt);\n }\n });\n getContentPane().add(Formulasbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 160, 170, 40));\n\n Quizbtn.setBackground(new java.awt.Color(255, 255, 204));\n Quizbtn.setFont(new java.awt.Font(\"Thonburi\", 3, 20)); // NOI18N\n Quizbtn.setForeground(new java.awt.Color(102, 0, 102));\n Quizbtn.setText(\"Quiz\");\n Quizbtn.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n Quizbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n QuizbtnActionPerformed(evt);\n }\n });\n getContentPane().add(Quizbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 360, 170, 40));\n\n backgroundBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mathsapp/background.jpg\"))); // NOI18N\n getContentPane().add(backgroundBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 391, 480));\n\n setSize(new java.awt.Dimension(407, 518));\n setLocationRelativeTo(null);\n }", "public FrmMain()\n {\n //Displays the menu bar on the top of the screen (mac style)\n System.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n // Build the GUI\n initComponents();\n // Load the texts\n initTextsI18n();\n }", "public void infoBase()\n {\n this.menu.setBackground(new java.awt.Color(179, 204, 204));\n this.menu.setOpaque(true);\n \n this.semaine.setBackground(new java.awt.Color(224, 235, 235));\n this.semaine.setOpaque(true);\n \n ImageIcon cours_icon = new ImageIcon(new ImageIcon(\"src/Icones/book.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n mes_cours = new JButton(\"Cours\", cours_icon);\n this.iconFont(mes_cours);\n\n ImageIcon search_icon = new ImageIcon(new ImageIcon(\"src/Icones/search.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n rechercher = new JButton(\"Rechercher\", search_icon);\n this.iconFont(rechercher);\n\n ImageIcon delete_icon = new ImageIcon(new ImageIcon(\"src/Icones/quit.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.annule = new JButton(\"Cours annulé(s)\", delete_icon);\n this.iconFont(annule);\n\n ImageIcon report_icon = new ImageIcon(new ImageIcon(\"src/Icones/report.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.report = new JButton(\"Reporting\", report_icon);\n this.iconFont(report);\n\n ImageIcon recap_icon = new ImageIcon(new ImageIcon(\"src/Icones/news-admin.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.summary = new JButton(\"Récapitulatif des cours\", recap_icon);\n this.iconFont(summary);\n \n ImageIcon logout_icon = new ImageIcon(new ImageIcon(\"src/Icones/logout.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.logout = new JButton(\"Se déconnecter\", logout_icon);\n this.iconFont(logout);\n \n ///Affiche le numéro de semaine\n Calendar cal = new GregorianCalendar();\n Date d = new Date();\n cal.setTime(d);\n\n this.num_semaine = cal.get(Calendar.WEEK_OF_YEAR); //Numéro de semaine actuel\n\n JLabel week = new JLabel(\"SEMAINE\");\n f = week.getFont();\n week.setFont(f.deriveFont(f.getStyle() | Font.BOLD));\n semaine.add(week);\n this.week_button = new ArrayList();\n \n //On ajoute les 52 boutons pour chaque numéro de semaine\n for (int i = 0; i < 52; i++) {\n week_button.add(new JButton(Integer.toString(i + 1))); //Dans la arrayList\n semaine.add(week_button.get(i)); //Dans la toolbar\n if (i == num_semaine) { //Si égal à la semaine actuelle\n week_button.get(i - 1).setBackground(Color.red);\n week_button.get(i - 1).setOpaque(true);\n }\n\n }\n JPanel toolbars = new JPanel(new GridLayout(0, 1));\n toolbars.add(menu);\n toolbars.add(semaine);\n\n this.add(toolbars, BorderLayout.NORTH);\n\n String mesInfos = \"HYPERPLANNING 2019-2020\";\n \n info = new JLabel(mesInfos, JLabel.CENTER);\n info.setPreferredSize(new Dimension(20,50));\n info.setBackground( new java.awt.Color(153, 230, 230));\n info.setOpaque(true);\n info.setFont(new Font(\"Verdana\", Font.PLAIN, 18));\n\n this.add(info, BorderLayout.SOUTH);\n\n this.add(panel);\n panel.setLayout(new OverlayLayout(panel));\n this.panel.setBackground(new java.awt.Color(112, 219, 219));\n this.panel.setOpaque(true);\n\n this.setVisible(true);\n }", "public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}", "private static void createGUI(){\r\n\t\tframe = new JFrame(\"Untitled\");\r\n\r\n\t\tBibtexImport bib = new BibtexImport();\r\n\t\tbib.setOpaque(true);\r\n\r\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tframe.setContentPane(bib);\r\n\t\tframe.setJMenuBar(bib.menu);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "private void initFrameComponents()\n\t{\n\t\tmenuBar \t\t\t= new JMenuBar();\n\t\tmenuFile \t\t\t= new JMenu(\"File\");\n\t\tmenuFileSave\t\t= new JMenuItem(\"Save/Commit Changes\");\n\t\tmenuFileExitNoSave \t= new JMenuItem(\"Exit Without Commiting Changes\");\n\t\tmenuHelp \t\t\t= new JMenu(\"Help\");\n\t\tmenuHelpAbout \t\t= new JMenuItem(\"About\");\n\t\tmenuRecord\t\t\t= new JMenu(\"Record\");\n\t\tmenuRecordDelete\t= new JMenuItem(\"Delete Selected Record...\");\n\t\tmenuRecordCreate\t= new JMenuItem(\"Create a New Record...\");\n\t\t/*Instruction Text*/\n\t\tinstructionTxt \t\t= \" Select the criteria, enter search input, and press the 'Submit' button. \";\n\t\twindowImagePath \t= \"./images/NoID_resized.png\";\n\t\twindowImageLabel \t= new JLabel(new ImageIcon(windowImagePath)); \n\t\tinstructionTxtPane \t= new JTextPane();\n\t\t\tinstructionTxtPane.setText(instructionTxt);\n\t\t\tinstructionTxtPane.setEditable(false);\n\t\t\tinstructionTxtPane.setBackground(null);\t\n\t\t/*Radio Buttons - Select category to search.*/\n\t\trBtnID \t\t= new JRadioButton(\"1. Student ID\", true);\t\t\n\t\trBtnLast \t= new JRadioButton(\"2. Last Name\");\n\t\trBtnFirst \t= new JRadioButton(\"3. First Name\");\n\t\trBtnEntries = new JRadioButton(\"4. # Entries (min,max)\");\t\n\t\t/*Input Fields*/\n\t\tinputFieldLabel = new JLabel(\"Search for: \");\n\t\t\tinputFieldLabel.setFocusable(false);\t\t\n\t\tinputField \t\t= new JTextField(30);\n\t\tbtnSubmit \t\t= new JButton(\"Submit.\");\n\t\t/*Further Examination*/\n\t\tbtnExamine \t\t= new JButton(\"Examine Record...\");\n\t\tbtnCreate \t\t= new JButton(\"Create Record...\");\n\t\t/*Status Bar*/\n\t\tstatusBar = new JTextField();\n\t\t\tstatusBar.setEditable(false);\n\t\t\tstatusBar.setBorder(null);\n\t\t\t\n\t\tinputFieldLabel.setDisplayedMnemonic('S');\n\t\tmenuHelp.setMnemonic('H');\n\t\tmenuFile.setMnemonic('F');\n\t\tmenuRecord.setMnemonic('R');\n\t\tmenuHelpAbout.setMnemonic('A');\n\t\tbtnExamine.setMnemonic('E');\n\t\tbtnCreate.setMnemonic('C');\n\t\trBtnID.setMnemonic('1');\n\t\trBtnLast.setMnemonic('2');\n\t\trBtnFirst.setMnemonic('3');\n\t\trBtnEntries.setMnemonic('4');\n\t\t\n\t\tinputField.setFocusAccelerator('S');\n\t\tmenuFileSave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, Event.CTRL_MASK));\n\t\tmenuFileExitNoSave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, Event.CTRL_MASK));\n\t\tmenuRecordCreate.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK));\n\t\tmenuRecordDelete.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK));\n\t\t\n\t\tmenuFile.add(menuFileSave);\n\t\tmenuFile.add(menuFileExitNoSave);\n\t\tmenuHelp.add(menuHelpAbout);\n\t\tmenuBar.add(menuFile);\n\t\tmenuBar.add(menuHelp);\n\t\tmenuBar.add(menuRecord);\n\t\tmenuRecord.add(menuRecordCreate);\n\t\tmenuRecord.add(menuRecordDelete);\n\t\t\n\t\tmenuFileExitNoSave.addActionListener(new MenuFileExitNoSaveListener());\n\t\tmenuFileSave.addActionListener(new MenuFileSaveListener());\n\t\tmenuHelpAbout.addActionListener(new MenuHelpAboutListener());\n\t\tmenuRecordDelete.addActionListener(new MenuRecordDeleteListener());\n\t\tmenuRecordCreate.addActionListener(new BtnCreateSearchListener());\n\t\tinputField.addActionListener(new BtnSubmitSearchListener());\n\t\trBtnID.addActionListener(new RBtnListener());\n\t\trBtnFirst.addActionListener(new RBtnListener());\n\t\trBtnLast.addActionListener(new RBtnListener());\n\t\trBtnEntries.addActionListener(new RBtnListener());\n\t\tbtnCreate.addActionListener(new BtnCreateSearchListener());\n\t\tbtnExamine.addActionListener(new BtnExamineSearchListener());\n\t\tbtnSubmit.addActionListener(new BtnSubmitSearchListener());\n\n\t\trBtnID.setActionCommand(Information.FIELDID+\"\");\n\t\trBtnFirst.setActionCommand(Information.FIELDFIRST+\"\");\n\t\trBtnLast.setActionCommand(Information.FIELDLAST+\"\");\n\t\trBtnEntries.setActionCommand(Information.FIELDENTRIES+\"\");\n\t\n\t\t/*\n\t\t * JTable - Contains the results of the search.\n\t\t */\n\t\trecordTable = new JTable(){/*OVERRIDES METHODS FOR FUNCTIONALITY*/\n\t\t\tstatic final long serialVersionUID=0;\t//Get rid of warning.\n\t\t\tpublic boolean getScrollableTracksViewportWidth()\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\t//Makes it scrollable.\n\t\tmodelDefault = new DefaultTableModel() {/*OVERRIDES METHODS FOR FUNCTIONALITY*/\n\t\t\tstatic final long serialVersionUID=0;\t//Get rid of warning.\n\t\t\tpublic boolean isCellEditable(int row, int col)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};//DefaultTableModel\n\t\t\trecordTable.setModel(modelDefault);\n\t\t\trecordTable.setRowHeight(15);\n\t\t\trecordTable.setFillsViewportHeight(false);\n\t\t\trecordTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\t\trecordTable.setRowSelectionAllowed(true);\n\t\t\trecordTable.getTableHeader().setReorderingAllowed(false);\n\t\t\t//recordTable.setAutoCreateRowSorter(true);\n\t\t\tTableRowSorter<DefaultTableModel> sorter = new TableRowSorter<DefaultTableModel>(modelDefault);\t//Create a sort\n\t\t\trecordTable.setRowSorter(sorter);\t\t\t\t\t\t\t//Sort!\n\t\t\tToolTipManager.sharedInstance().unregisterComponent(recordTable);\n\t\t\tToolTipManager.sharedInstance().unregisterComponent(recordTable.getTableHeader());\n\t\t//Orders the columns according to global settings (prevents mismanipulation due to programmer oversight).\n\t\tfor(int index=0;index<4;index++)\n\t\t{\n\t\t\tswitch(index)\n\t\t\t{\n\t\t\tcase Information.FIELDID:\n\t\t\t\tmodelDefault.addColumn(\"Student ID #\");\n\t\t\t\tbreak;\n\t\t\tcase Information.FIELDFIRST:\n\t\t\t\tmodelDefault.addColumn(\"First Name\");\n\t\t\t\tbreak;\n\t\t\tcase Information.FIELDLAST:\n\t\t\t\tmodelDefault.addColumn(\"Last Name\");\n\t\t\t\tbreak;\n\t\t\tcase Information.FIELDENTRIES:\n\t\t\t\tmodelDefault.addColumn(\"# Entries\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsorter.setComparator(Information.FIELDID, new StudentIDComparator());\n\t\tsorter.setComparator(Information.FIELDLAST, new LastNameComparator());\n\t\tsorter.setComparator(Information.FIELDFIRST, new FirstNameComparator());\n\t\tsorter.setComparator(Information.FIELDENTRIES, new EntriesComparator());\n\n\t\tsetEnabledExamine(false);\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "private void configureUI() {\r\n // UIManager.put(\"ToolTip.hideAccelerator\", Boolean.FALSE);\r\n\r\n Options.setDefaultIconSize(new Dimension(18, 18));\r\n\r\n Options.setUseNarrowButtons(settings.isUseNarrowButtons());\r\n\r\n // Global options\r\n Options.setTabIconsEnabled(settings.isTabIconsEnabled());\r\n UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY,\r\n settings.isPopupDropShadowEnabled());\r\n\r\n // Swing Settings\r\n LookAndFeel selectedLaf = settings.getSelectedLookAndFeel();\r\n if (selectedLaf instanceof PlasticLookAndFeel) {\r\n PlasticLookAndFeel.setPlasticTheme(settings.getSelectedTheme());\r\n PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle());\r\n PlasticLookAndFeel.setHighContrastFocusColorsEnabled(\r\n settings.isPlasticHighContrastFocusEnabled());\r\n } else if (selectedLaf.getClass() == MetalLookAndFeel.class) {\r\n MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());\r\n }\r\n\r\n // Work around caching in MetalRadioButtonUI\r\n JRadioButton radio = new JRadioButton();\r\n radio.getUI().uninstallUI(radio);\r\n JCheckBox checkBox = new JCheckBox();\r\n checkBox.getUI().uninstallUI(checkBox);\r\n\r\n try {\r\n UIManager.setLookAndFeel(selectedLaf);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't change L&F: \" + e);\r\n }\r\n\r\n }", "private void initialize() {\r\n\r\n\t\tfrmHistoriasDeZagas = new JFrame();\r\n\t\tfrmHistoriasDeZagas.getContentPane().setBackground(Color.BLACK);\r\n\t\tfrmHistoriasDeZagas.setTitle(\"Historias de Zagas\");\r\n\t\tfrmHistoriasDeZagas.setBackground(Color.WHITE);\r\n\t\tfrmHistoriasDeZagas\r\n\t\t\t\t.setIconImage(Toolkit\r\n\t\t\t\t\t\t.getDefaultToolkit()\r\n\t\t\t\t\t\t.getImage(\r\n\t\t\t\t\t\t\t\tArmas.class\r\n\t\t\t\t\t\t\t\t\t\t.getResource(\"/images/Historias de Zagas, logo.png\")));\r\n\t\tfrmHistoriasDeZagas.setBounds(100, 100, 439, 462);\r\n\t\tfrmHistoriasDeZagas.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\r\n\t\tfrmHistoriasDeZagas.getContentPane().setLayout(null);\r\n\t\tfrmHistoriasDeZagas.setLocationRelativeTo(null);\r\n\t\tfrmHistoriasDeZagas.setResizable(false);\r\n\r\n\t\tfinal JButton btnNewButton = new JButton(\"JUGAR\");\r\n\t\tif (Loader.usuario.equals(\"\")) {\r\n\t\t\tbtnNewButton.setEnabled(false);\r\n\r\n\t\t}\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJugar window = new Jugar();\r\n\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnNewButton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnNewButton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnNewButton.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\t\t\t\tnull, null));\r\n\t\tbtnNewButton.setForeground(Color.WHITE);\r\n\t\tbtnNewButton.setBackground(new Color(139, 69, 19));\r\n\t\tbtnNewButton.setFont(mf.MyFont(0, 17));\r\n\t\tbtnNewButton.setBounds(10, 51, 414, 34);\r\n\t\tbtnNewButton.setBorderPainted(false);\r\n\t\tbtnNewButton.setContentAreaFilled(false);\r\n\t\tbtnNewButton.setFocusPainted(false);\r\n\t\tbtnNewButton.setOpaque(false);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnNewButton);\r\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnNewButton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t\t\tbtnNewButton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\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\tfinal JButton btnCreadorDeNpcs = new JButton(\"CREADOR DE NPCs\");\r\n\t\tbtnCreadorDeNpcs.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tStartNPC.atrpoints = new AtributePoints();\r\n\t\t\t\tStartNPC.skpoints = new SkillPoints();\r\n\t\t\t\tStartNPC.atributos = new Atributes(StartNPC.atrpoints);\r\n\t\t\t\tStartNPC.combatSkills = new CombatSkills(StartNPC.skpoints);\r\n\t\t\t\tStartNPC.knowledgeSkills = new KnowledgeSkills(\r\n\t\t\t\t\t\tStartNPC.skpoints);\r\n\t\t\t\tStartNPC.magicSkills = new MagicSkills(StartNPC.skpoints);\r\n\t\t\t\tStartNPC.knowhowSkills = new KnowHowSkills(StartNPC.skpoints);\r\n\t\t\t\tBlessing blessing = new Blessing(\"\");\r\n\t\t\t\tSetbacks setbacks = new Setbacks();\r\n\t\t\t\tPrivileges privileges = new Privileges();\r\n\t\t\t\tRace race = new Race(\"\");\r\n\t\t\t\tEquipment equipment = new Equipment();\r\n\t\t\t\tArrayList<String> posarm = new ArrayList<String>();\r\n\t\t\t\tPossesions posss = new Possesions(posarm);\r\n\t\t\t\tArmor armor = new Armor(\"\", \"\", false,false, posss);\r\n\t\t\t\tStartNPC.character = new Characters(null, race, \"\", 0, 2, 10,\r\n\t\t\t\t\t\t20, 20, StartNPC.atributos, StartNPC.combatSkills,\r\n\t\t\t\t\t\tStartNPC.knowledgeSkills, StartNPC.magicSkills,\r\n\t\t\t\t\t\tStartNPC.knowhowSkills, blessing, privileges, setbacks,\r\n\t\t\t\t\t\tfalse, armor, equipment,null,null,null,null,null,null,null,null,null,null,null,null, 0, 1,0,\"\",\"\",\"\");\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\tStartNPC window;\r\n\t\t\t\ttry {\r\n\t\t\t\t\twindow = new StartNPC();\r\n\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDeNpcs.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDeNpcs.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDeNpcs.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDeNpcs.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\r\n\t\tbtnCreadorDeNpcs.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnCreadorDeNpcs.setBorder(new BevelBorder(BevelBorder.RAISED, null,\r\n\t\t\t\tnull, null, null));\r\n\t\tbtnCreadorDeNpcs.setForeground(Color.WHITE);\r\n\t\tbtnCreadorDeNpcs.setBackground(new Color(139, 69, 19));\r\n\t\tbtnCreadorDeNpcs.setFont(mf.MyFont(0, 17));\r\n\t\tbtnCreadorDeNpcs.setBounds(10, 141, 414, 34);\r\n\t\tbtnCreadorDeNpcs.setBorderPainted(false);\r\n\t\tbtnCreadorDeNpcs.setContentAreaFilled(false);\r\n\t\tbtnCreadorDeNpcs.setFocusPainted(false);\r\n\t\tbtnCreadorDeNpcs.setOpaque(false);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnCreadorDeNpcs);\r\n\r\n\t\tfinal JButton btnCreadorDePersonajes = new JButton(\r\n\t\t\t\t\"CREADOR DE PERSONAJES\");\r\n\t\tbtnCreadorDePersonajes.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDePersonajes.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDePersonajes.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDePersonajes.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnCreadorDePersonajes.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnCreadorDePersonajes.setBorder(new BevelBorder(BevelBorder.RAISED,\r\n\t\t\t\tnull, null, null, null));\r\n\t\tbtnCreadorDePersonajes.setForeground(Color.WHITE);\r\n\t\tbtnCreadorDePersonajes.setBackground(new Color(139, 69, 19));\r\n\t\tbtnCreadorDePersonajes.setBorderPainted(false);\r\n\t\tbtnCreadorDePersonajes.setContentAreaFilled(false);\r\n\t\tbtnCreadorDePersonajes.setFocusPainted(false);\r\n\t\tbtnCreadorDePersonajes.setOpaque(false);\r\n\t\tbtnCreadorDePersonajes.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcrear = \"pj\";\r\n\t\t\t\tStart.atrpoints = new AtributePoints();\r\n\t\t\t\tStart.skpoints = new SkillPoints();\r\n\t\t\t\tStart.atributos = new Atributes(Start.atrpoints);\r\n\t\t\t\tStart.combatSkills = new CombatSkills(Start.skpoints);\r\n\t\t\t\tStart.knowledgeSkills = new KnowledgeSkills(Start.skpoints);\r\n\t\t\t\tStart.magicSkills = new MagicSkills(Start.skpoints);\r\n\t\t\t\tStart.knowhowSkills = new KnowHowSkills(Start.skpoints);\r\n\t\t\t\tBlessing blessing = new Blessing(\"\");\r\n\t\t\t\tSetbacks setbacks = new Setbacks();\r\n\t\t\t\tPrivileges privileges = new Privileges();\r\n\t\t\t\tRace race = new Race(\"\");\r\n\t\t\t\tEquipment equipment = new Equipment();\r\n\t\t\t\tArrayList<String> posarm = new ArrayList<String>();\r\n\t\t\t\tPossesions posss = new Possesions(posarm);\r\n\t\t\t\tArmor armor = new Armor(\"\", \"\", false,false, posss);\r\n\t\t\t\tStart.character = new Characters(null, race, \"\", 0, 2, 10, 20,\r\n\t\t\t\t\t\t20, Start.atributos, Start.combatSkills,\r\n\t\t\t\t\t\tStart.knowledgeSkills, Start.magicSkills,\r\n\t\t\t\t\t\tStart.knowhowSkills, blessing, privileges, setbacks,\r\n\t\t\t\t\t\tfalse, armor, equipment,null,null,null,null,null,null,null,null,null,null,null,null, 0, 1,0,\"\",\"\",\"\");\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\tStart window;\r\n\t\t\t\ttry {\r\n\t\t\t\t\twindow = new Start();\r\n\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDePersonajes.setFont(mf.MyFont(0, 17));\r\n\t\tbtnCreadorDePersonajes.setBounds(10, 186, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnCreadorDePersonajes);\r\n\r\n\t\tfinal JButton btnCreditos = new JButton(\"CRÉDITOS\");\r\n\t\tbtnCreditos.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnCreditos.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnCreditos.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreditos.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnCreditos.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnCreditos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tCreditos window = new Creditos();\r\n\t\t\t\twindow.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tfinal JButton btnHistoria = new JButton(\"GESTOR DE PARTIDAS\");\r\n\t\tbtnHistoria.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tGestorMain window = new GestorMain();\r\n\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\r\n\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnHistoria.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t\tbtnHistoria.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t\tbtnHistoria.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnHistoria.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnHistoria.setOpaque(false);\r\n\t\tbtnHistoria.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnHistoria.setForeground(Color.WHITE);\r\n\t\tbtnHistoria.setFont(mf.MyFont(0, 17));\r\n\t\tbtnHistoria.setFocusPainted(false);\r\n\t\tbtnHistoria.setContentAreaFilled(false);\r\n\t\tbtnHistoria.setBorderPainted(false);\r\n\t\tbtnHistoria.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\r\n\t\tnull, null));\r\n\t\tbtnHistoria.setBackground(new Color(139, 69, 19));\r\n\t\tbtnHistoria.setBounds(10, 96, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnHistoria);\r\n\t\tbtnCreditos.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\t\t\t\tnull, null));\r\n\t\tbtnCreditos.setForeground(Color.WHITE);\r\n\t\tbtnCreditos.setBackground(new Color(139, 69, 19));\r\n\t\tbtnCreditos.setFont(mf.MyFont(0, 17));\r\n\t\tbtnCreditos.setBounds(10, 321, 414, 34);\r\n\t\tbtnCreditos.setBorderPainted(false);\r\n\t\tbtnCreditos.setContentAreaFilled(false);\r\n\t\tbtnCreditos.setFocusPainted(false);\r\n\t\tbtnCreditos.setOpaque(false);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnCreditos);\r\n\r\n\t\tfinal JButton button = new JButton(\"SALIR\");\r\n\t\tbutton.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbutton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbutton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tint seleccion = JOptionPane.showOptionDialog(\r\n\t\t\t\t\t\tfrmHistoriasDeZagas,\r\n\t\t\t\t\t\t\"¿Estás seguro de querer cerrar el programa?.\",\r\n\t\t\t\t\t\t\"¡Atención!\", JOptionPane.YES_NO_OPTION,\r\n\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, new Object[] { \"Si\",\r\n\t\t\t\t\t\t\t\t\"No\" }, // null para YES, NO y CANCEL\r\n\t\t\t\t\t\t\"opcion 1\");\r\n\t\t\t\tif (JOptionPane.YES_OPTION == seleccion) {\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\ttxtBienvenidoSeleccioneA = new JLabel();\r\n\t\ttxtBienvenidoSeleccioneA.setOpaque(false);\r\n\t\ttxtBienvenidoSeleccioneA.setForeground(Color.WHITE);\r\n\t\ttxtBienvenidoSeleccioneA.setBackground(new Color(205, 133, 63));\r\n\t\ttxtBienvenidoSeleccioneA.setBorder(null);\r\n\t\ttxtBienvenidoSeleccioneA.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtBienvenidoSeleccioneA.setFont(mf.MyFont(0, 13));\r\n\t\ttxtBienvenidoSeleccioneA\r\n\t\t\t\t.setText(\"Bienvenido, seleccione a qué servicio desea acceder.\");\r\n\t\ttxtBienvenidoSeleccioneA.setBounds(0, 0, 444, 40);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(txtBienvenidoSeleccioneA);\r\n\t\tbutton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbutton.setOpaque(false);\r\n\t\tbutton.setForeground(Color.WHITE);\r\n\t\tbutton.setFont(mf.MyFont(0, 17));\r\n\t\tbutton.setFocusPainted(false);\r\n\t\tbutton.setContentAreaFilled(false);\r\n\t\tbutton.setBorderPainted(false);\r\n\t\tbutton.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null,\r\n\t\t\t\tnull));\r\n\t\tbutton.setBackground(new Color(139, 69, 19));\r\n\t\tbutton.setBounds(10, 366, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(button);\r\n\r\n\t\tfinal JButton btnAyuda = new JButton(\"AYUDA\");\r\n\t\tbtnAyuda.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tAyudaPrincipal window = new AyudaPrincipal();\r\n\t\t\t\twindow.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAyuda.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t\tbtnAyuda.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t\tbtnAyuda.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAyuda.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnAyuda.setOpaque(false);\r\n\t\tbtnAyuda.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnAyuda.setForeground(Color.WHITE);\r\n\t\tbtnAyuda.setFont(mf.MyFont(0, 17));\r\n\t\tbtnAyuda.setFocusPainted(false);\r\n\t\tbtnAyuda.setContentAreaFilled(false);\r\n\t\tbtnAyuda.setBorderPainted(false);\r\n\t\tbtnAyuda.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\r\n\t\tnull, null));\r\n\t\tbtnAyuda.setBackground(new Color(139, 69, 19));\r\n\t\tbtnAyuda.setBounds(10, 276, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnAyuda);\r\n\r\n\t\tfinal JButton btnPerfil = new JButton(\"PERFIL\");\r\n\t\tif (Loader.usuario.equals(\"\")) {\r\n\t\t\tbtnPerfil.setEnabled(false);\r\n\r\n\t\t}\r\n\t\tbtnPerfil.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnPerfil.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnPerfil.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnPerfil.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\t\tPerfil window = new Perfil();\r\n\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t} catch (ClassNotFoundException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (InstantiationException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (IllegalAccessException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnPerfil.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnPerfil.setOpaque(false);\r\n\t\tbtnPerfil.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnPerfil.setForeground(Color.WHITE);\r\n\t\tbtnPerfil.setFont(mf.MyFont(0, 17));\r\n\t\tbtnPerfil.setFocusPainted(false);\r\n\t\tbtnPerfil.setContentAreaFilled(false);\r\n\t\tbtnPerfil.setBorderPainted(false);\r\n\t\tbtnPerfil.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\r\n\t\tnull, null));\r\n\t\tbtnPerfil.setBackground(new Color(139, 69, 19));\r\n\t\tbtnPerfil.setBounds(10, 231, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnPerfil);\r\n\r\n\t\tfinal JButton btnAdministracin = new JButton(\"ADMINISTRACI\\u00D3N\");\r\n\t\tbtnAdministracin.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tAdministracionPrinc window = new AdministracionPrinc();\r\n\t\t\t\twindow.getFrame().setVisible(true);\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAdministracin.setVisible(false);\r\n\t\tbtnAdministracin.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnAdministracin.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnAdministracin.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAdministracin.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnAdministracin.setOpaque(false);\r\n\t\tbtnAdministracin.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnAdministracin.setForeground(Color.WHITE);\r\n\t\tbtnAdministracin.setFont(mf.MyFont(0, 17));\r\n\t\tbtnAdministracin.setFocusPainted(false);\r\n\t\tbtnAdministracin.setContentAreaFilled(false);\r\n\t\tbtnAdministracin.setBorderPainted(false);\r\n\t\tbtnAdministracin.setBorder(new BevelBorder(BevelBorder.RAISED, null,\r\n\t\t\t\tnull,\r\n\r\n\t\t\t\tnull, null));\r\n\t\tbtnAdministracin.setBackground(new Color(139, 69, 19));\r\n\t\tbtnAdministracin.setBounds(10, 321, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnAdministracin);\r\n\t\r\n\r\n\t\tfinal JButton btnNewButton_1 = new JButton(\"(Desconectar)\");\r\n\t\t\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\r\n\t\t\t\tint seleccion = JOptionPane.showOptionDialog(\r\n\t\t\t\t\t\tfrmHistoriasDeZagas,\r\n\t\t\t\t\t\t\"¿Estás seguro de querer desconectarte?.\",\r\n\t\t\t\t\t\t\"¡Atención!\", JOptionPane.YES_NO_OPTION,\r\n\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, new Object[] { \"Si\",\r\n\t\t\t\t\t\t\t\t\"No\" }, // null para YES, NO y CANCEL\r\n\t\t\t\t\t\t\"opcion 1\");\r\n\t\t\t\tif (JOptionPane.YES_OPTION == seleccion) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (Loader.usuario.length() == 0) {\r\n\t\t\t\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\t\t\t\tLoader window = new Loader();\r\n\t\t\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\tLoader.usuario = \"\";\r\n\t\t\t\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\t\t\t\tLoader window = new Loader();\r\n\t\t\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnNewButton_1.setForeground(Color.BLUE);\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnNewButton_1.setForeground(Color.WHITE);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setFont(mf.MyFont(3, 11));\r\n\t\tbtnNewButton_1.setFocusPainted(false);\r\n\t\tbtnNewButton_1.setContentAreaFilled(false);\r\n\t\tbtnNewButton_1.setBorderPainted(false);\r\n\t\tbtnNewButton_1.setForeground(Color.WHITE);\r\n\t\tbtnNewButton_1.setBounds(-10, 416, 125, 17);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnNewButton_1);\r\n\r\n\t\tJLabel lblNewLabel_1 = new JLabel(Loader.usuario);\r\n\t\tlblNewLabel_1.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_1.setFont(mf.MyFont(0, 11));\r\n\t\tlblNewLabel_1.setBounds(104, 416, 86, 17);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(lblNewLabel_1);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"\");\r\n\t\tlblNewLabel.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/background-inicio.jpg\")));\r\n\t\tlblNewLabel.setBackground(Color.BLACK);\r\n\t\tlblNewLabel.setBounds(0, 0, 444, 472);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(lblNewLabel);\r\n\t\tif (Loader.admin==1) {\r\n\t\t\tfrmHistoriasDeZagas.setBounds(100, 100, 439, 500);\r\n\t\t\tfrmHistoriasDeZagas.setLocationRelativeTo(null);\r\n\t\t\tbtnCreditos.setBounds(10, 365, 414, 34);\r\n\t\t\tbutton.setBounds(10, 410, 414, 34);\r\n\t\t\tlblNewLabel_1.setBounds(104, 455, 86, 17);\r\n\t\t\tbtnNewButton_1.setBounds(-10, 455, 125, 17);\r\n\t\t\tbtnAdministracin.setVisible(true);\r\n\t\t}\r\n\t}", "public MediaLibraryGUI() {\r\n initializeFields();\r\n\r\n makeMenu();\r\n\r\n makeCenter();\r\n\r\n makeSouth();\r\n\r\n startGUI();\r\n }", "public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void frameSettings(String title) {\r\n\t\tsetTitle(title);\r\n\r\n\t\tsetSize(400, 720);\r\n\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetUndecorated(true); // Do not display the buttons of the frame\r\n\t\tsetAlwaysOnTop(true);\r\n\t\tsetResizable(false);\r\n\t\tsetBackground(new Color(0, 0, 0, 0));\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t}", "public MainMenu() {\n\t\t\t fs = new Font [3];\n\t\t\t fs[0] = new Font(\"Lato\", Font.BOLD, 36);\n\t\t\t fs[1] = new Font(\"Open Sans\", 0 , 20);\n\t\t\t fs[2] = new Font(\"Open Sans\", 0 , 12);\n\t\t\t searchB = new JButton(\"Search\");\n\t\t\t sortB = new JButton(\"Sort\");\n\t\t\t graphB = new JButton(\"Graph\");\n\t\t\t backB = new JButton(\"Return\");\n\t\t\t menuL = new JLabel (\"Main Menu\");\n\t\t\t tA = new JTextArea ();\n\t\t\t searchB.setFont(fs[1]);\n\t\t\t sortB.setFont(fs[1]);\n\t\t\t graphB.setFont(fs[1]);\n\t\t\t backB.setFont(fs[2]);\n\t\t\t menuL.setFont(fs[0]);\n\t\t\t backB.setVisible(false);\n\t\t\t \n\t\t\t // UI elements to load in view\n\t\t\t add(menuL, BorderLayout.PAGE_START);\n\t\t\t add(searchB, BorderLayout.LINE_START);\n\t\t\t add(sortB, BorderLayout.CENTER);\n\t\t\t add(graphB, BorderLayout.LINE_END);\n\t\t\t add(backB, BorderLayout.PAGE_END);\n\t\t\t \n\t\t\t // listens to buttons pressed\n\t\t\t searchB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(1);\n\t\t\t }\n\t\t\t });\n\t\t\t sortB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(2);\n\t\t\t }\n\t\t\t });\n\t\t\t graphB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(3);\n\t\t\t }\n\t\t\t });\n\t\t\t backB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(0);\n\t\t\t }\n\t\t\t });\n\t\t }", "private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "public mainGUI() {\n initComponents();\n setSize(Toolkit.getDefaultToolkit().getScreenSize());\n }", "private void initialize() {\n\t\talteraFrame = new JFrame();\n\t\talteraFrame.setBounds(100, 100, 800, 548);\n\t\talteraFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\talteraFrame.getContentPane().setLayout(null);\n\t\t\n\t\tJButton button = new JButton(\"Voltar para menu de avalia\\u00E7\\u00F5es\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tMenuAvaliacao window = new MenuAvaliacao();\n\t\t\t\twindow.menuAvaliacaoFrame.setVisible(true);\n\t\t\t\talteraFrame.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton.setBounds(523, 460, 213, 23);\n\t\talteraFrame.getContentPane().add(button);\n\t\t\n\t\tJLabel lblVocEstEm = new JLabel(\"Voc\\u00EA est\\u00E1 em 'Alterar Avalia\\u00E7\\u00E3o'\");\n\t\tlblVocEstEm.setBounds(55, 44, 213, 14);\n\t\talteraFrame.getContentPane().add(lblVocEstEm);\n\t\t\n\t\tJLabel lblDigiteONome = new JLabel(\"Digite o nome da avalia\\u00E7\\u00E3o que deseja alterar:\");\n\t\tlblDigiteONome.setBounds(123, 126, 277, 14);\n\t\talteraFrame.getContentPane().add(lblDigiteONome);\n\t\t\n\t\tbuscaField = new JTextField();\n\t\tbuscaField.setBounds(123, 151, 218, 20);\n\t\talteraFrame.getContentPane().add(buscaField);\n\t\tbuscaField.setColumns(10);\n\t\t\n\t\tJLabel nomeLabel = new JLabel(\"Nome\");\n\t\tnomeLabel.setBounds(123, 147, 0, 14);\n\t\talteraFrame.getContentPane().add(nomeLabel);\n\t\t\n\t\tJLabel pesoLabel = new JLabel(\"Peso\");\n\t\tpesoLabel.setBounds(392, 147, 0, 14);\n\t\talteraFrame.getContentPane().add(pesoLabel);\n\t\t\n\t\tpesoField = new JTextField();\n\t\tpesoField.setColumns(10);\n\t\tpesoField.setBounds(392, 172, 0, 20);\n\t\talteraFrame.getContentPane().add(pesoField);\n\t\t\n\t\tnomeField = new JTextField();\n\t\tnomeField.setColumns(10);\n\t\tnomeField.setBounds(123, 172, 0, 20);\n\t\talteraFrame.getContentPane().add(nomeField);\n\t\t\n\t\tJLabel mediaLabel = new JLabel(\"M\\u00E9dia\");\n\t\tmediaLabel.setBounds(123, 220, 0, 14);\n\t\talteraFrame.getContentPane().add(mediaLabel);\n\t\t\n\t\tmediaField = new JTextField();\n\t\tmediaField.setColumns(10);\n\t\tmediaField.setBounds(123, 245, 0, 20);\n\t\talteraFrame.getContentPane().add(mediaField);\n\t\t\n\t\tJLabel turmaLabel = new JLabel(\"Turma\");\n\t\tturmaLabel.setBounds(392, 220, 0, 14);\n\t\talteraFrame.getContentPane().add(turmaLabel);\n\t\t\n\t\tturmaField = new JTextField();\n\t\tturmaField.setColumns(10);\n\t\tturmaField.setBounds(392, 245, 0, 20);\n\t\talteraFrame.getContentPane().add(turmaField);\n\t\t\n\t\tJLabel dataLabel = new JLabel(\"Data de aplica\\u00E7\\u00E3o (Ex: 10/01/2001)\");\n\t\tdataLabel.setBounds(123, 295, 0, 14);\n\t\talteraFrame.getContentPane().add(dataLabel);\n\t\t\n\t\tdataField = new JTextField();\n\t\tdataField.setColumns(10);\n\t\tdataField.setBounds(123, 320, 0, 20);\n\t\talteraFrame.getContentPane().add(dataField);\n\t\t\n\t\tJLabel tipoLabel = new JLabel(\"Tipo\");\n\t\ttipoLabel.setBounds(392, 295, 0, 14);\n\t\talteraFrame.getContentPane().add(tipoLabel);\n\t\t\n\t\ttipoField = new JTextField();\n\t\ttipoField.setColumns(10);\n\t\ttipoField.setBounds(392, 320, 0, 20);\n\t\talteraFrame.getContentPane().add(tipoField);\n\t\t\n\t\tJLabel erroLabel = new JLabel(\"New label\");\n\t\terroLabel.setBounds(457, 126, 0, 14);\n\t\talteraFrame.getContentPane().add(erroLabel);\n\t\t\n\t\tJButton alteraBotao = new JButton(\"Alterar\");\n\t\talteraBotao.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (nomeField.getText().equals(\"\") || pesoField.getText().equals(\"\") || mediaField.getText().equals(\"\") || turmaField.getText().equals(\"\") || dataField.getText().equals(\"\") || tipoField.getText().equals(\"\")) {\n\t\t\t\t\terroLabel.setText(\"Preencha todos os campos\");\n\t\t\t\t\terroLabel.setBounds(123, 400, 200, 23);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint posicaoTurma[] = new int[2];\n\t\t\t\tfor (int i = 0; i < Aplicacao.bd.getTurmas().size(); i++) {\n\t\t\t\t\tfor (int j = 0; j < Aplicacao.bd.getTurmas().get(i).getAvaliacoesFormativas().size(); j++) {\n\t\t\t\t\t\tif (buscaField.getText().equals(Aplicacao.bd.getTurmas().get(i).getAvaliacoesFormativas().get(j).getNome())) {\n\t\t\t\t\t\t\tposicaoTurma[0] = i;\n\t\t\t\t\t\t\tposicaoTurma[1] = j;\n\t\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\tint posicaoAvaliacao = -1;\n\t\t\t\tfor (int i = 0; i < Aplicacao.bd.getAvaliacoes().size(); i++) {\n\t\t\t\t\tif (buscaField.getText().equals(Aplicacao.bd.getAvaliacoes().get(i).getNome())) {\n\t\t\t\t\t\tposicaoAvaliacao = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString nome = nomeField.getText();\n\t\t\t\t\n\t\t\t\tdouble peso;\n\t\t\t\ttry{\n\t\t\t\t\tpeso = Double.parseDouble(pesoField.getText());\n\t\t\t\t}catch(NumberFormatException e1){\n\t\t\t\t\terroLabel.setText(\"Erro no formato do peso\");\n\t\t\t\t\terroLabel.setBounds(123, 400, 200, 23);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble media;\n\t\t\t\ttry{\n\t\t\t\t\tmedia = Double.parseDouble(mediaField.getText());\n\t\t\t\t}catch(NumberFormatException e2){\n\t\t\t\t\terroLabel.setText(\"Erro no formato da media\");\n\t\t\t\t\terroLabel.setBounds(123, 400, 200, 23);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString turmaNome = turmaField.getText();\n\t\t\t\tboolean encontrou = false;\n\t\t\t\t//int newTurmaPosicao;\n\t\t\t\tfor (int i = 0; i < Aplicacao.bd.getTurmas().size(); i++) {\n\t\t\t\t\tif (turmaNome.equals(Aplicacao.bd.getTurmas().get(i).getNome())) {\n\t\t\t\t\t\tencontrou = true;\n\t\t\t\t\t\t//newTurmaPosicao = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!encontrou) {\n\t\t\t\t\terroLabel.setText(\"Turma não encontrada\");\n\t\t\t\t\terroLabel.setBounds(123, 400, 200, 23);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString tipo = tipoField.getText();\n\t\t\t\t\n\t\t\t\tDate data;\n\t\t\t\tSimpleDateFormat formataData = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\ttry{\n\t\t\t\t\tdata = formataData.parse(dataField.getText());\n\t\t\t\t}catch(ParseException e3){\n\t\t\t\t\terroLabel.setText(\"Data incorreta\");\n\t\t\t\t\terroLabel.setBounds(123, 400, 200, 23);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Avaliacao avaliacao = new Avaliacao(nome, tipo, peso, media, data);\n\t\t\t\t\n\t\t\t\tif(posicaoAvaliacao > -1){\n\t\t\t\t\tAplicacao.bd.getAvaliacoes().get(posicaoAvaliacao).setNome(nome);\n\t\t\t\t\tAplicacao.bd.getAvaliacoes().get(posicaoAvaliacao).setTipo(tipo);\n\t\t\t\t\tAplicacao.bd.getAvaliacoes().get(posicaoAvaliacao).setPeso(peso);\n\t\t\t\t\tAplicacao.bd.getAvaliacoes().get(posicaoAvaliacao).setMedia(media);\n\t\t\t\t\tAplicacao.bd.getAvaliacoes().get(posicaoAvaliacao).setDataAplicacao(data);\n\t\t\t\t\t\n\t\t\t\t\tAplicacao.bd.getTurmas().get(posicaoTurma[0]).getAvaliacoesFormativas().get(posicaoTurma[1]).setNome(nome);\n\t\t\t\t\tAplicacao.bd.getTurmas().get(posicaoTurma[0]).getAvaliacoesFormativas().get(posicaoTurma[1]).setTipo(tipo);\n\t\t\t\t\tAplicacao.bd.getTurmas().get(posicaoTurma[0]).getAvaliacoesFormativas().get(posicaoTurma[1]).setPeso(peso);\n\t\t\t\t\tAplicacao.bd.getTurmas().get(posicaoTurma[0]).getAvaliacoesFormativas().get(posicaoTurma[1]).setMedia(media);\n\t\t\t\t\tAplicacao.bd.getTurmas().get(posicaoTurma[0]).getAvaliacoesFormativas().get(posicaoTurma[1]).setDataAplicacao(data);\n\t\t\t\t\t\n\t\t\t\t\terroLabel.setText(\"Avaliação alterada com sucesso\");\n\t\t\t\t\terroLabel.setBounds(123, 400, 200, 23);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\talteraBotao.setBounds(123, 372, 0, 23);\n\t\talteraFrame.getContentPane().add(alteraBotao);\n\t\t\n\t\tJButton buscaBotao = new JButton(\"Buscar\");\n\t\tbuscaBotao.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (buscaField.getText().equals(\"\")) {\n\t\t\t\t\terroLabel.setBounds(457, 126, 200, 14);\n\t\t\t\t\terroLabel.setText(\"Preencha todos os campos\");\n\t\t\t\t\t\n\t\t\t\t\tlblDigiteONome.setBounds(123, 126, 277, 14);\n\t\t\t\t\tbuscaField.setBounds(123, 151, 218, 20);\n\t\t\t\t\tbuscaBotao.setBounds(123, 195, 89, 23);\n\t\t\t\t\t\n\t\t\t\t\tnomeLabel.setBounds(123, 147, 0, 14);\n\t\t\t\t\tpesoLabel.setBounds(392, 147, 0, 14);\n\t\t\t\t\tpesoField.setBounds(392, 172, 0, 20);\n\t\t\t\t\tnomeField.setBounds(123, 172, 0, 20);\n\t\t\t\t\tmediaLabel.setBounds(123, 220, 0, 14);\n\t\t\t\t\tmediaField.setBounds(123, 245, 0, 20);\n\t\t\t\t\tturmaLabel.setBounds(392, 220, 0, 14);\n\t\t\t\t\tturmaField.setBounds(392, 245, 0, 20);\n\t\t\t\t\tdataLabel.setBounds(123, 295, 0, 14);\n\t\t\t\t\tdataField.setBounds(123, 320, 0, 20);\n\t\t\t\t\ttipoLabel.setBounds(392, 295, 0, 14);\n\t\t\t\t\ttipoField.setBounds(392, 320, 0, 20);\n\t\t\t\t\talteraBotao.setBounds(123, 372, 0, 23);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < Aplicacao.bd.getAvaliacoes().size(); i++) {\n\t\t\t\t\tif (buscaField.getText().equals(Aplicacao.bd.getAvaliacoes().get(i).getNome())) {\n\t\t\t\t\t\terroLabel.setBounds(457, 126, 0, 14);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlblDigiteONome.setBounds(278, 44, 277, 14);\n\t\t\t\t\t\tbuscaField.setBounds(278, 69, 218, 20);\n\t\t\t\t\t\tbuscaBotao.setBounds(278, 113, 89, 23);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnomeLabel.setBounds(123, 147, 46, 14);\n\t\t\t\t\t\tnomeField.setText(Aplicacao.bd.getAvaliacoes().get(i).getNome());\n\t\t\t\t\t\tnomeField.setBounds(123, 172, 212, 20);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpesoLabel.setBounds(392, 147, 46, 14);\n\t\t\t\t\t\tpesoField.setText(\"\"+ Aplicacao.bd.getAvaliacoes().get(i).getPeso());\n\t\t\t\t\t\tpesoField.setBounds(392, 172, 212, 20);\n\t\t\t\t\t\t\n\t\t\t\t\t\tmediaLabel.setBounds(123, 220, 46, 14);\n\t\t\t\t\t\tmediaField.setText(\"\" + Aplicacao.bd.getAvaliacoes().get(i).getMedia());\n\t\t\t\t\t\tmediaField.setBounds(123, 245, 212, 20);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tint posicaoTurma = -1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int j = 0; j < Aplicacao.bd.getTurmas().size(); j++) {\n\t\t\t\t\t\t\tfor (int k = 0; k < Aplicacao.bd.getTurmas().get(j).getAvaliacoesFormativas().size(); k++) {\n\t\t\t\t\t\t\t\tif (buscaField.getText().equals(Aplicacao.bd.getTurmas().get(j).getAvaliacoesFormativas().get(k).getNome())) {\n\t\t\t\t\t\t\t\t\tposicaoTurma = j;\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\t\n\t\t\t\t\t\tif (posicaoTurma > -1) {\n\t\t\t\t\t\t\tturmaLabel.setBounds(392, 220, 46, 14);\n\t\t\t\t\t\t\tturmaField.setText(Aplicacao.bd.getTurmas().get(posicaoTurma).getNome());\n\t\t\t\t\t\t\tturmaField.setBounds(392, 245, 212, 20);\n\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\tMessageDialog.openError(new Shell(), \"Error\", \"Turma não encontrada no sistema\");\n\t\t\t\t\t\t\tlblDigiteONome.setBounds(123, 126, 277, 14);\n\t\t\t\t\t\t\tbuscaField.setBounds(123, 151, 218, 20);\n\t\t\t\t\t\t\tbuscaBotao.setBounds(123, 195, 89, 23);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terroLabel.setBounds(457, 126, 200, 14);\n\t\t\t\t\t\t\terroLabel.setText(\"Erro na turma: não encontrada\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnomeLabel.setBounds(123, 147, 0, 14);\n\t\t\t\t\t\t\tpesoLabel.setBounds(392, 147, 0, 14);\n\t\t\t\t\t\t\tpesoField.setBounds(392, 172, 0, 20);\n\t\t\t\t\t\t\tnomeField.setBounds(123, 172, 0, 20);\n\t\t\t\t\t\t\tmediaLabel.setBounds(123, 220, 0, 14);\n\t\t\t\t\t\t\tmediaField.setBounds(123, 245, 0, 20);\n\t\t\t\t\t\t\tturmaLabel.setBounds(392, 220, 0, 14);\n\t\t\t\t\t\t\tturmaField.setBounds(392, 245, 0, 20);\n\t\t\t\t\t\t\tdataLabel.setBounds(123, 295, 0, 14);\n\t\t\t\t\t\t\tdataField.setBounds(123, 320, 0, 20);\n\t\t\t\t\t\t\ttipoLabel.setBounds(392, 295, 0, 14);\n\t\t\t\t\t\t\ttipoField.setBounds(392, 320, 0, 20);\n\t\t\t\t\t\t\talteraBotao.setBounds(123, 372, 0, 23);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn;\n\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\tSimpleDateFormat formatarData = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\t\tString dataCampo = formatarData.format(Aplicacao.bd.getAvaliacoes().get(i).getDataAplicacao());\n\t\t\t\t\t\t\n\t\t\t\t\t\tdataLabel.setBounds(123, 295, 212, 14);\n\t\t\t\t\t\tdataField.setText(dataCampo);\n\t\t\t\t\t\tdataField.setBounds(123, 320, 212, 20);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttipoLabel.setBounds(392, 295, 212, 14);\n\t\t\t\t\t\ttipoField.setText(Aplicacao.bd.getAvaliacoes().get(i).getTipo());\n\t\t\t\t\t\ttipoField.setBounds(392, 320, 212, 20);\n\t\t\t\t\t\t\n\t\t\t\t\t\talteraBotao.setBounds(123, 372, 89, 23);\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlblDigiteONome.setBounds(123, 126, 277, 14);\n\t\t\t\tbuscaField.setBounds(123, 151, 218, 20);\n\t\t\t\tbuscaBotao.setBounds(123, 195, 89, 23);\n\t\t\t\t\n\t\t\t\terroLabel.setBounds(457, 126, 200, 14);\n\t\t\t\terroLabel.setText(\"Avaliação não encontrada\");\n\t\t\t\t\n\t\t\t\tnomeLabel.setBounds(123, 147, 0, 14);\n\t\t\t\tpesoLabel.setBounds(392, 147, 0, 14);\n\t\t\t\tpesoField.setBounds(392, 172, 0, 20);\n\t\t\t\tnomeField.setBounds(123, 172, 0, 20);\n\t\t\t\tmediaLabel.setBounds(123, 220, 0, 14);\n\t\t\t\tmediaField.setBounds(123, 245, 0, 20);\n\t\t\t\tturmaLabel.setBounds(392, 220, 0, 14);\n\t\t\t\tturmaField.setBounds(392, 245, 0, 20);\n\t\t\t\tdataLabel.setBounds(123, 295, 0, 14);\n\t\t\t\tdataField.setBounds(123, 320, 0, 20);\n\t\t\t\ttipoLabel.setBounds(392, 295, 0, 14);\n\t\t\t\ttipoField.setBounds(392, 320, 0, 20);\n\t\t\t\talteraBotao.setBounds(123, 372, 0, 23);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbuscaBotao.setBounds(123, 195, 89, 23);\n\t\talteraFrame.getContentPane().add(buscaBotao);\n\n\t}", "private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "public void createGUI() {\n\n\t\tcontents = getContentPane();\n\t\tcontents.setLayout(new GridLayout(size, size));\n\n\t\t// Set Up Menu Bar\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu game = new JMenu(\"Game\");\n\t\tmenuBar.add(game);\n\t\tJMenuItem clearBoard = new JMenuItem(\"New Game\");\n\t\tgame.add(clearBoard);\n\t\tJMenuItem boardSize = new JMenuItem(\"Change Size\");\n\t\tgame.add(boardSize);\n\t\tJMenuItem exit = new JMenuItem(\"Exit\");\n\t\tgame.add(exit);\n\n\t\tJMenu help = new JMenu(\"Help\");\n\t\tmenuBar.add(help);\n\t\tJMenuItem rules = new JMenuItem(\"How to Play\");\n\t\thelp.add(rules);\n\t\tJMenuItem about = new JMenuItem(\"About\");\n\t\thelp.add(about);\n\n\t\tJMenu playerSelect = new JMenu(\"Players: \" + players);\n\t\tmenuBar.add(playerSelect);\n\t\tJMenuItem players2 = new JMenuItem(\"2 Player Game\");\n\t\tplayerSelect.add(players2);\n\t\tJMenuItem players3 = new JMenuItem(\"3 Player Game\");\n\t\tplayerSelect.add(players3);\n\t\tJMenuItem players4 = new JMenuItem(\"4 Player Game\");\n\t\tplayerSelect.add(players4);\n\n\t\tmenuBar.add(Box.createHorizontalGlue());\n\n\t\tplayerTurnLbl.setFont(new Font(\"Lucida Grande\", Font.BOLD, 12)); // Player 1's Turn\n\t\tmenuBar.add(playerTurnLbl);\n\t\tplayerTurnLbl.setVisible(true);\n\n\t\tinvalidMoveLbl.setFont(new Font(\"Lucida Grande\", Font.BOLD, 12)); // Invalid Move Alert\n\t\tinvalidMoveLbl.setForeground(Color.RED);\n\t\tmenuBar.add(invalidMoveLbl);\n\t\tinvalidMoveLbl.setVisible(false);\n\n\t\t// Exit Button Action\n\t\texit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\t// Board Size Button Action\n\t\tboardSize.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\trestartGame();\n\t\t\t}\n\t\t});\n\n\t\t// Reset Board Button Action\n\t\tclearBoard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// Rules Button Action\n\t\trules.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"1. Players take turns moving up, down, left, or right to generate a self-avoiding walk.\\n\\tClick on a square to make your move.\\n\\n2. A player who makes a self-intersecting move loses the game. \\n\\n3. A player can win the game by making a self-intersecting move that creates a self-avoiding polygon.\\n\\tThis is only valid after at least 4 moves.\",\n\t\t\t\t\t\t\"Self-Avoiding Walk Game Rules\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\t// About Button Action\n\t\tabout.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Self-Avoiding Walk Multiplayer Game\\nDeveloped by Adam Binder\\nCopyright 2019\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\t// 2 Player Button Action\n\t\tplayers2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 2;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// 3 Player Button Action\n\t\tplayers3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 3;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// 4 Player Button Action\n\t\tplayers4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tplayers = 4;\n\t\t\t\tresetBoard();\n\t\t\t}\n\t\t});\n\n\t\t// Create event handlers:\n\t\tButtonHandler buttonHandler = new ButtonHandler();\n\n\t\t// Create and add board components:\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tsquares[i][j] = new JButton();\n\t\t\t\tsquares[i][j].setBorder(null);\n\t\t\t\tsquares[i][j].setOpaque(true);\n\t\t\t\tsquares[i][j].setBorderPainted(false);\n\t\t\t\tif ((i + j) % 2 != 0) {\n\t\t\t\t\tsquares[i][j].setBackground(colorGray);\n\t\t\t\t\tsquares[i][j].setBorder(null);\n\t\t\t\t\tsquares[i][j].setOpaque(true);\n\t\t\t\t}\n\t\t\t\tcontents.add(squares[i][j]);\n\t\t\t\tsquares[i][j].addActionListener(buttonHandler);\n\t\t\t}\n\t\t}\n\t}", "public void uiBuilder(){\n fontLoader();\n\n jfFrame = new JFrame(String.format(\"Coronos - %s\", username));\n jfFrame.setLayout(new BorderLayout());\n //Instantiate JFrame, add Title, add LayoutManager GridLayout\n\n\n jmMenuBar = new JMenuBar();\n //Instantiate JMenuBar\n\n jmFile = new JMenu(\"File\");\n jmHelp = new JMenu(\"Help\");\n //Adding Menus to JMenuBar\n\n jmExit = new JMenuItem(\"Exit\");\n jmAbout = new JMenuItem(\"About\");\n //Instantiating Options for JMenus\n\n jmExit.addActionListener(this);\n jmAbout.addActionListener(this);\n\n jmFile.add(jmExit);\n jmHelp.add(jmAbout);\n //adding Options to JMenus\n\n jmMenuBar.add(jmFile);\n jmMenuBar.add(jmHelp);\n //adding JMenus to JMenuBar\n\n jfFrame.setJMenuBar(jmMenuBar);\n //adding JMenuBar to JFrame\n\n jpClockPanel = new JPanel(new FlowLayout());\n jpContainerPanel = new JPanel(new FlowLayout());\n Border blackLine = BorderFactory.createTitledBorder(\"Current Time\");\n jpClockPanel.setBorder(blackLine);\n //instantiate JPanel for clock\n\n clockLabelOne = new JLabel();\n clockLabelOne.setFont(customFont);\n clockLabelOne.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelOne);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n clockLabelTwo = new JLabel();\n clockLabelTwo.setFont(customFont);\n clockLabelTwo.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelTwo);\n clockLabelTwo.setVisible(false);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n jpGridPanel1 = new JPanel(new GridLayout(4, 1, 15, 15));\n jpGridPanel2 = new JPanel(new GridLayout(4, 1, 15, 15));\n\n jbPunchIn = new JButton(\"Punch In\");\n jbReport = new JButton(\"View Report\");\n jbProfile = new JButton(\"View Profile\");\n jbSave = new JButton(\"Save\");\n jbPunchOut = new JButton(\"Punch Out\");\n jbViewPunches = new JButton(\"View Punches\");\n jbFormatTime = new JButton(\"12/24HR Time\");\n jbHideChat = new JButton(\"Hide Chat\");\n\n jbHideChat.setToolTipText(\"Hate your co-workers? Want to hide from your boss? Just close chat!\");\n\n jbPunchIn.addActionListener(this);\n jbReport.addActionListener(this);\n jbProfile.addActionListener(this);\n jbSave.addActionListener(this);\n jbPunchOut.addActionListener(this);\n jbViewPunches.addActionListener(this);\n jbFormatTime.addActionListener(this);\n jbHideChat.addActionListener(this);\n\n jpGridPanel1.add(jbPunchIn);\n jpGridPanel1.add(jbReport);\n jpGridPanel1.add(jbProfile);\n jpGridPanel1.add(jbSave);\n\n jpGridPanel2.add(jbPunchOut);\n jpGridPanel2.add(jbViewPunches);\n jpGridPanel2.add(jbFormatTime);\n jpGridPanel2.add(jbHideChat);\n\n jpActionPanel = new JPanel(new FlowLayout());\n Border actionBorder = BorderFactory.createTitledBorder(\"Employee Actions\");\n jpActionPanel.setBorder(actionBorder);\n jpActionPanel.add(jpGridPanel1);\n jpActionPanel.add(jpGridPanel2);\n jpContainerPanel.add(jpActionPanel);\n\n jpChatPanel = new JPanel(new BorderLayout());\n jpAreaPanel = new JPanel(new FlowLayout());\n jtaChatArea = new JTextArea(10, 10);\n jtaChatArea.setLineWrap(true);\n jtaChatArea.setWrapStyleWord(true);\n jtaChatArea.setEditable(false);\n jspChatPane = new JScrollPane(jtaChatArea);\n jtfChatField = new JTextField(12);\n jtfChatField.addActionListener(this);\n jtfChatField.setActionCommand(\"Send\");\n chatButton = new JButton(\"Send\");\n chatButton.addActionListener(this);\n jpSendPanel = new JPanel(new FlowLayout());\n jpSendPanel.add(jtfChatField);\n jpSendPanel.add(chatButton);\n Border chatBorder = BorderFactory.createTitledBorder(\"Chat\");\n jpChatPanel.setBorder(chatBorder);\n jpChatPanel.add(jspChatPane, BorderLayout.NORTH);\n jpChatPanel.add(jpSendPanel, BorderLayout.SOUTH);\n jpContainerPanel.add(jpChatPanel);\n\n // jfFrame.add(clockPanelTwo, BorderLayout.NORTH);\n jfFrame.add(jpClockPanel, BorderLayout.NORTH);\n jfFrame.add(jpContainerPanel, BorderLayout.SOUTH);\n\n //adding JPanels to JFrame\n\n jfFrame.setLocationRelativeTo(null);\n jfFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jfFrame.setVisible(false);\n jfFrame.pack();\n jfFrame.setSize(600, 375);\n jfFrame.setResizable(false);\n \n //settings for frame\n\n ActionListener clockUpdateOne = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerOne = new javax.swing.Timer(0, clockUpdateOne);\n clockTimerOne.start();\n //timer to update clockLabel\n ActionListener clockUpdateTwo = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerTwo = new javax.swing.Timer(0, clockUpdateTwo);\n clockTimerTwo.start();\n\n }", "public GUI(GUIListener gl) {\n // Load certain necessary resources.\n map = getClass().getResource(\"/res/map.html\").toString();\n start = createImageIcon(\"play_16.png\");\n stop = createImageIcon(\"stop_16.png\");\n MIN_FRAME_DIM = new Dimension(960, 540);\n popup = new PopupMenu();\n trayIcon = new TrayIcon(createImageIcon(\"map_16.png\").getImage());\n languageCodes.put(\"English\", \"en\");\n languageCodes.put(\"Dutch\", \"nl\");\n languageCodes.put(\"German\", \"de\");\n languageCodes.put(\"French\", \"fr\");\n languageCodes.put(\"Spanish\", \"es\");\n languageCodes.put(\"Italian\", \"it\");\n languageCodes.put(\"Russian\", \"ru\");\n languageCodes.put(\"Lithuanian\", \"lt\");\n languageCodes.put(\"Hindi\", \"hi\");\n languageCodes.put(\"Tamil\", \"ta\");\n languageCodes.put(\"Arabic\", \"ar\");\n languageCodes.put(\"Chinese\", \"zh\");\n languageCodes.put(\"Japanese\", \"ja\");\n languageCodes.put(\"Korean\", \"ko\");\n languageCodes.put(\"Vietnamese\", \"vi\");\n\n // Create a browser, its associated UI view object and the browser listener.\n browser = new Browser();\n browserView = new BrowserView(browser);\n listener = gl;\n \n /* set link load handler to load all links in the running system's \n default browser.*/\n browser.setLoadHandler(new DefaultLoadHandler(){\n\n @Override\n public boolean onLoad(LoadParams lp) {\n String url = lp.getURL();\n boolean cancel = !url.endsWith(\"map.html\");\n if(cancel) {\n try {\n // open up any other link on the system's default browser.\n UIutils.openWebpage(new java.net.URL(url));\n } catch (MalformedURLException ex) {\n JDialog.setDefaultLookAndFeelDecorated(true);\n JOptionPane.showMessageDialog(null, \"Could not open link.\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }\n return cancel;\n }\n \n });\n\n /* Set the Windows look and feel and initialize all the GUI components. */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html\n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Windows\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n initComponents();\n\n // Select english as a filter language by default.\n String[] sel = new String[] {\"English\", \"en\"};\n selectedLanguages.put(sel[0], sel[1]);\n ((DefaultTableModel) selectedLangTable.getModel()).addRow(sel);\n\n // Load certain variables.\n timeScale = 60000; // 1min = 60000ms\n\n // Add the map view to the GUI frame and load the map URL.\n mapPanel.add(browserView, BorderLayout.CENTER);\n browser.loadURL(map);\n\n // Adding support for minimizing window to system tray if supported.\n if (SystemTray.isSupported()) {\n systrayCheckBox.setEnabled(true);\n try {\n systrayCheckBox.setSelected(Boolean.parseBoolean(\n listener.getProperties().getProperty(\"MINIMIZE_TO_TRAY\")));\n } catch (Exception ex) {}\n systrayCheckBox.setToolTipText(\"Enable/Disable minimizing to system tray.\");\n\n // Context menu items to system tray icon.\n final MenuItem exitItem = new MenuItem(\"Exit\");\n exitItem.addActionListener((ActionEvent e) -> {\n GUI.this.exitMenuItemActionPerformed(e);\n });\n popup.add(exitItem);\n trayIcon.setPopupMenu(popup);\n trayIcon.addActionListener((ActionEvent e) -> {\n GUI.this.setVisible(true);\n GUI.this.setExtendedState(GUI.NORMAL);\n SystemTray.getSystemTray().remove(trayIcon);\n });\n } else {\n systrayCheckBox.setEnabled(false);\n systrayCheckBox.setToolTipText(\"OS does not support this function.\");\n }\n\n // add a text field change listener to the twitter credentials input dialog.\n DocumentListener dl1 = new DocumentListener() {\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n applyKeysButton.setEnabled(true);\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n applyKeysButton.setEnabled(true);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n consumerKeyTextField.getDocument().addDocumentListener(dl1);\n consumerSecretTextField.getDocument().addDocumentListener(dl1);\n apiKeyTextField.getDocument().addDocumentListener(dl1);\n apiSecretTextField.getDocument().addDocumentListener(dl1);\n\n // add a text field change listener to the MySQL credentials input dialog.\n DocumentListener dl2 = new DocumentListener() {\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n sqlApplyButton.setEnabled(true);\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n sqlApplyButton.setEnabled(true);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n sqlUserTextField.getDocument().addDocumentListener(dl2);\n sqlPasswordField.getDocument().addDocumentListener(dl2);\n sqlLinkTextField.getDocument().addDocumentListener(dl2);\n \n // Set and start the connection to the MySQL database if USE_MYSQL is true.\n try {\n Properties p = listener.getProperties();\n boolean isSelected = Boolean.parseBoolean(p.getProperty(\"USE_MYSQL\"));\n useDBCheckBox.setSelected(isSelected);\n dbInputDialogShown(null);\n if(isSelected)\n sqlApplyButtonActionPerformed(null);\n } catch (Exception ex) {}\n\n // Display the keywords dialog at start\n keywordsDialog.setVisible(true);\n }", "public static void OptionsComponents() {\n\t\tInterface.controls.setPreferredSize(Interface.dim);\n\t\tInterface.controls.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.controls.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.controls.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.controls.setForeground(Color.white);\n\t\t\n\t\tInterface.controls2.setPreferredSize(Interface.dim);\n\t\tInterface.controls2.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.controls2.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.controls2.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.controls2.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.sound.setPreferredSize(Interface.dim);\n\t\tInterface.sound.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.sound.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.sound.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.sound.setForeground(Color.white);\n\t\t\n\t\tInterface.soundOn.setPreferredSize(Interface.dim);\n\t\tInterface.soundOn.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.soundOn.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.soundOn.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.soundOn.setForeground(Color.white);\n\t\t\n\t\tInterface.soundOff.setPreferredSize(Interface.dim);\n\t\tInterface.soundOff.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.soundOff.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.soundOff.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.soundOff.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.backtomain.setPreferredSize(Interface.dim);\n\t\tInterface.backtomain.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtomain.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtomain.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtomain.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.save.setPreferredSize(Interface.dim);\n\t\tInterface.save.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.save.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.save.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.save.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.backtooptions.setPreferredSize(Interface.dim);\n\t\tInterface.backtooptions.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.backtooptions.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.backtooptions.setVerticalTextPosition(JButton.CENTER);\n\t\tInterface.backtooptions.setForeground(Color.white);\n\t\t\n\t\t\n\t\tInterface.player1.setForeground(Color.white);\n\t\tInterface.player2.setForeground(Color.white);\n\t\tInterface.up1.setForeground(Color.white);\n\t\tInterface.up2.setForeground(Color.white);\n\t\tInterface.down1.setForeground(Color.white);\n\t\tInterface.down2.setForeground(Color.white);\n\t\tInterface.right1.setForeground(Color.white);\n\t\tInterface.right2.setForeground(Color.white);\n\t\tInterface.left1.setForeground(Color.white);\n\t\tInterface.left2.setForeground(Color.white);\n\t\tInterface.bomb1.setForeground(Color.white);\n\t\tInterface.bomb2.setForeground(Color.white);\n\t\tInterface.boxNumber.setForeground(Color.white);\n\t\tInterface.getUp1.setEditable(false);\n\t\tInterface.getUp2.setEditable(false);\n\t\tInterface.getDown1.setEditable(false);\n\t\tInterface.getDown2.setEditable(false);\n\t\tInterface.getRight1.setEditable(false);\n\t\tInterface.getRight2.setEditable(false);\n\t\tInterface.getLeft1.setEditable(false);\n\t\tInterface.getLeft2.setEditable(false);\n\t\tInterface.getBomb1.setEditable(false);\n\t\tInterface.getBomb2.setEditable(false);\n\t}", "public void initialize() {\r\n\r\n\t\tJLabel labelBackground = new JLabel();\r\n\t\t//imagem retirada do site https://www.univercidade.net/wp-content/uploads/2015/12/Inaugurac%CC%A7a%CC%83o-EDIFI%CC%81CIO-CONVI%CC%81VIO_ISCTE-768x510.jpg\r\n\t\tImage imagem3 = new ImageIcon(this.getClass().getResource(\"/Imagens/iscte_wm_1.png\")).getImage();\r\n\t\tlabelBackground.setIcon(new ImageIcon(imagem3));\r\n\t\tlabelBackground.setForeground(SystemColor.window);\r\n\t\tlabelBackground.setBackground(SystemColor.activeCaption);\r\n\t\tlabelBackground.setBounds(0, 48, 863, 594);\r\n\r\n\t\tframe.setBounds(100, 100, 863, 594);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setResizable(false);\r\n\t\tImage imagem = new ImageIcon(this.getClass().getResource(\"/Imagens/frameImage.png\")).getImage();\r\n\t\tframe.setIconImage(imagem);\r\n\t\t\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tmenuBar.setBackground(SystemColor.window);\r\n\t\tmenuBar.setBounds(0, 0, 881, 47);\r\n\t\tframe.getContentPane().add(menuBar);\r\n\r\n\t\tImage icone = new ImageIcon(this.getClass().getResource(\"/Imagens/icone.png\")).getImage();\r\n\r\n\t\tJButton button2 = new JButton(\"\");\r\n\t\tbutton2.setBounds(774, 499, 59, 35);\r\n\t\tbutton2.setIcon(new ImageIcon(icone));\r\n\t\tmenuBar.add(button2);\r\n\t\tbutton2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tframe.getContentPane().removeAll();\r\n\t\t\t\tframe.repaint();\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tTimeline tm = new Timeline(frame, Email);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tImage logout = new ImageIcon(this.getClass().getResource(\"/Imagens/logout.png\")).getImage();\r\n\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(new Color(240, 255, 255));\r\n\t\tpanel.setBounds(130, 73, 603, 431);\r\n\r\n\t\tJButton button = new JButton(\"\");\r\n\t\tbutton.setBounds(774, 499, 59, 35);\r\n\t\tframe.getContentPane().add(button);\r\n\t\tbutton.setIcon(new ImageIcon(logout));\r\n\t\t\r\n\t\tJButton setPassword = new JButton(\"Alterar Password\");\r\n\t\t//btnListarremoverContas.setBounds(315, 499, 190, 23);\r\n\t\tsetPassword.setBounds(200, 499, 190, 23);\r\n\t\tframe.getContentPane().add(setPassword);\r\n\t\tsetPassword.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tSetPasswordPage sp= new SetPasswordPage();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tJScrollPane scrollPane = new JScrollPane();\r\n\t\tscrollPane.setBounds(170, 430, 557, -346);\r\n\t\tframe.getContentPane().add(scrollPane);\r\n\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\");\r\n\t\tlblNewLabel_1.setBounds(91, 70, 130, 121);\r\n\t\tImage twitter = new ImageIcon(this.getClass().getResource(\"/Imagens/twittericone.png\")).getImage();\r\n\t\tlblNewLabel_1.setIcon(new ImageIcon(twitter));\r\n\t\tframe.getContentPane().add(lblNewLabel_1);\r\n\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tImage facebook = new ImageIcon(this.getClass().getResource(\"/Imagens/facebookicone.png\")).getImage();\r\n\t\tlabel.setIcon(new ImageIcon(facebook));\r\n\t\tlabel.setBounds(91, 202, 130, 126);\r\n\t\tframe.getContentPane().add(label);\r\n\r\n\t\tJLabel label_1 = new JLabel(\"New label\");\r\n\t\tImage email = new ImageIcon(this.getClass().getResource(\"/Imagens/emailicone.png\")).getImage();\r\n\t\tlabel_1.setIcon(new ImageIcon(email));\r\n\t\tlabel_1.setBounds(91, 339, 130, 126);\r\n\t\tlabel_1.setOpaque(false);\r\n\t\tframe.getContentPane().add(label_1);\r\n\r\n\t\t// TWITTER\r\n\r\n\t\t/**\r\n\t\t * Creates a form for entering twitter data\r\n\t\t */\r\n\r\n\t\tif (!xml.haveTwitter(Email)) {\r\n\t\t\tJLabel AuthConsumerKey = new JLabel(\"AuthConsumerKey:\");\r\n\t\t\tAuthConsumerKey.setBounds(261, 110, 150, 14);\r\n\t\t\tframe.getContentPane().add(AuthConsumerKey);\r\n\r\n\t\t\tJLabel AuthConsumerSecret = new JLabel(\"AuthConsumerSecret:\");\r\n\t\t\tAuthConsumerSecret.setBounds(261, 140, 150, 14);\r\n\t\t\tframe.getContentPane().add(AuthConsumerSecret);\r\n\r\n\t\t\tJLabel AuthAccessToken = new JLabel(\"AuthAccessToken:\");\r\n\t\t\tAuthAccessToken.setBounds(261, 170, 150, 14);\r\n\t\t\tframe.getContentPane().add(AuthAccessToken);\r\n\r\n\t\t\tJLabel AuthAccessTokenSecret = new JLabel(\"AuthAccessTokenSecret:\");\r\n\t\t\tAuthAccessTokenSecret.setBounds(261, 200, 150, 14);\r\n\t\t\tframe.getContentPane().add(AuthAccessTokenSecret);\r\n\r\n\t\t\ttextFieldACK = new JTextField();\r\n\t\t\ttextFieldACK.setBounds(420, 110, 130, 20);\r\n\t\t\tframe.getContentPane().add(textFieldACK);\r\n\t\t\ttextFieldACK.setColumns(10);\r\n\r\n\t\t\ttextFieldACKS = new JTextField();\r\n\t\t\ttextFieldACKS.setBounds(420, 140, 130, 20);\r\n\t\t\tframe.getContentPane().add(textFieldACKS);\r\n\t\t\ttextFieldACKS.setColumns(10);\r\n\r\n\t\t\ttextFieldAATS = new JTextField();\r\n\t\t\ttextFieldAATS.setBounds(420, 170, 130, 20);\r\n\t\t\tframe.getContentPane().add(textFieldAATS);\r\n\t\t\ttextFieldAATS.setColumns(10);\r\n\r\n\t\t\ttextFieldAAT = new JTextField();\r\n\t\t\ttextFieldAAT.setBounds(420, 200, 130, 20);\r\n\t\t\tframe.getContentPane().add(textFieldAAT);\r\n\t\t\ttextFieldAAT.setColumns(10);\r\n\r\n\t\t\tJButton btnAdicionarConta = new JButton(\"Adicionar Conta\");\r\n\t\t\tbtnAdicionarConta.setBounds(555, 136, 158, 23);\r\n\t\t\tframe.getContentPane().add(btnAdicionarConta);\r\n\t\t\tbtnAdicionarConta.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\txml.changeAttributte(Email, \"AuthConsumerKeyTwitter\", textFieldACK.getText());\r\n\t\t\t\t\txml.changeAttributte(Email, \"AuthConsumerSecretTwitter\", textFieldACKS.getText());\r\n\t\t\t\t\txml.changeAttributte(Email, \"AuthAccessTokenTwitter\", textFieldAATS.getText());\r\n\t\t\t\t\txml.changeAttributte(Email, \"AuthAccessTokenSecretTwitter\", textFieldAAT.getText());\r\n\t\t\t\t\tJOptionPane optionPane = new JOptionPane(\"Twitter adicionado com sucesso!\",\r\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\tJDialog dialog = optionPane.createDialog(\"Alerta!\");\r\n\t\t\t\t\tdialog.setAlwaysOnTop(true);\r\n\t\t\t\t\tdialog.setVisible(true);\r\n\t\t\t\t\tframe.getContentPane().removeAll();\r\n\t\t\t\t\tframe.repaint();\r\n\t\t\t\t\tinitialize();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tJLabel lblEmail = new JLabel(\"Já tem uma conta de Twitter adicionada!\");\r\n\t\t\tlblEmail.setBounds(261, 140, 265, 14);\r\n\t\t\tframe.getContentPane().add(lblEmail);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Creates a form for entering facebook data\r\n\t\t */\r\n\r\n// FACEBOOK (555, 265, 158, 23);\r\n\r\n\t\tif (!xml.haveFacebook(Email)) {\r\n\t\t\tJLabel lblEmail = new JLabel(\"tokenAccess:\");\r\n\t\t\tlblEmail.setBounds(261, 265, 150, 14);\r\n\t\t\tframe.getContentPane().add(lblEmail);\r\n\r\n\t\t\ttextField_1 = new JTextField();\r\n\t\t\ttextField_1.setBounds(420, 265, 130, 20);\r\n\t\t\tframe.getContentPane().add(textField_1);\r\n\t\t\ttextField_1.setColumns(10);\r\n\r\n\t\t\tJButton button_1 = new JButton(\"Adicionar Conta\");\r\n\t\t\tbutton_1.setBounds(555, 265, 158, 23);\r\n\t\t\tframe.getContentPane().add(button_1);\r\n\t\t\tbutton_1.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\txml.changeAttributte(Email, \"TokenAccessFacebook\", textField_1.getText());\r\n\t\t\t\t\tJOptionPane optionPane = new JOptionPane(\"Facebook adicionado com sucesso!\",\r\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\tJDialog dialog = optionPane.createDialog(\"Alerta!\");\r\n\t\t\t\t\tdialog.setAlwaysOnTop(true);\r\n\t\t\t\t\tdialog.setVisible(true);\r\n\t\t\t\t\tframe.getContentPane().removeAll();\r\n\t\t\t\t\tframe.repaint();\r\n\t\t\t\t\tinitialize();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tJLabel lblEmail = new JLabel(\"Já tem uma conta de Facebook adicionada!\");\r\n\t\t\tlblEmail.setBounds(261, 265, 265, 14);\r\n\t\t\tframe.getContentPane().add(lblEmail);\r\n\t\t}\r\n\t\t/**\r\n\t\t * Creates a form for entering email data\r\n\t\t */\r\n\r\n\t\tif (!xml.haveEmail(Email)) {\r\n\t\t\tpasswordField = new JPasswordField();\r\n\t\t\tpasswordField.setBounds(420, 402, 130, 20);\r\n\t\t\tframe.getContentPane().add(passwordField);\r\n\r\n\t\t\tJLabel labelemail = new JLabel(Email);\r\n\t\t\tlabelemail.setBounds(420, 371, 130, 20);\r\n\t\t\tframe.getContentPane().add(labelemail);\r\n\r\n\t\t\tJLabel lblEmail_1 = new JLabel(\"Email:\");\r\n\t\t\tlblEmail_1.setBounds(261, 374, 76, 14);\r\n\t\t\tframe.getContentPane().add(lblEmail_1);\r\n\r\n\t\t\tJLabel label_3 = new JLabel(\"Password:\");\r\n\t\t\tlabel_3.setBounds(261, 405, 65, 14);\r\n\t\t\tframe.getContentPane().add(label_3);\r\n\r\n\t\t\tJButton button_2 = new JButton(\"Adicionar Conta\");\r\n\t\t\tbutton_2.setBounds(555, 391, 158, 23);\r\n\t\t\tframe.getContentPane().add(button_2);\r\n\t\t\tbutton_2.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tString pass = new String(passwordField.getPassword());\r\n\t\t\t\t\txml.changeAttributte(Email, \"PassEmail\", pass);\r\n\t\t\t\t\tJOptionPane optionPane = new JOptionPane(\"Email adicionado com sucesso!\",\r\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\tJDialog dialog = optionPane.createDialog(\"Alerta!\");\r\n\t\t\t\t\tdialog.setAlwaysOnTop(true);\r\n\t\t\t\t\tdialog.setVisible(true);\r\n\t\t\t\t\tframe.getContentPane().removeAll();\r\n\t\t\t\t\tframe.repaint();\r\n\t\t\t\t\tinitialize();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t} else {\r\n\t\t\tJLabel lblEmail = new JLabel(\"Já tem uma conta de Email adicionada!\");\r\n\t\t\tlblEmail.setBounds(261, 405, 265, 14);\r\n\t\t\tframe.getContentPane().add(lblEmail);\r\n\t\t}\r\n\r\n\t\tJButton btnListarremoverContas = new JButton(\"Listar/Remover Contas\");\r\n\t\tbtnListarremoverContas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tframe.getContentPane().removeAll();\r\n\t\t\t\tframe.repaint();\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tConfigurationsRem nova = new ConfigurationsRem(frame, Email);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnListarremoverContas.setBounds(450, 499, 190, 23);\r\n\t\tframe.getContentPane().add(btnListarremoverContas);\r\n\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tframe.dispose();\r\n\t\t\t\tMainWindow.main(null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().add(labelBackground);\r\n\t}", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jFrame1 = new javax.swing.JFrame();\n jPanel1 = new javax.swing.JPanel();\n jlb_menu = new javax.swing.JLabel();\n jtbtn_mat = new javax.swing.JToggleButton();\n jtbtn_ingles = new javax.swing.JToggleButton();\n jtbtn_historia = new javax.swing.JToggleButton();\n jtbtn_esp = new javax.swing.JToggleButton();\n jtbtn_ciencias = new javax.swing.JToggleButton();\n jtbtn_geograf = new javax.swing.JToggleButton();\n btn_exit = new javax.swing.JButton();\n imag_menu = new javax.swing.JLabel();\n\n javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());\n jFrame1.getContentPane().setLayout(jFrame1Layout);\n jFrame1Layout.setHorizontalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n jFrame1Layout.setVerticalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(250, 250, 250));\n setLocation(new java.awt.Point(380, 350));\n setMinimumSize(new java.awt.Dimension(380, 350));\n setPreferredSize(new java.awt.Dimension(380, 350));\n setSize(new java.awt.Dimension(380, 350));\n\n jPanel1.setBackground(new java.awt.Color(250, 250, 250));\n jPanel1.setLayout(null);\n\n jlb_menu.setBackground(new java.awt.Color(0, 0, 0));\n jlb_menu.setFont(new java.awt.Font(\"MV Boli\", 1, 24)); // NOI18N\n jlb_menu.setForeground(new java.awt.Color(255, 0, 0));\n jlb_menu.setText(\"MENU\");\n jPanel1.add(jlb_menu);\n jlb_menu.setBounds(250, 10, 100, 40);\n\n jtbtn_mat.setBackground(new java.awt.Color(0, 0, 0));\n jtbtn_mat.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n jtbtn_mat.setForeground(new java.awt.Color(255, 255, 255));\n jtbtn_mat.setText(\"Matemáticas\");\n jtbtn_mat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtbtn_matActionPerformed(evt);\n }\n });\n jPanel1.add(jtbtn_mat);\n jtbtn_mat.setBounds(230, 90, 130, 37);\n\n jtbtn_ingles.setBackground(new java.awt.Color(0, 0, 0));\n jtbtn_ingles.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n jtbtn_ingles.setForeground(new java.awt.Color(255, 255, 255));\n jtbtn_ingles.setText(\"Ingles\");\n jtbtn_ingles.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtbtn_inglesActionPerformed(evt);\n }\n });\n jPanel1.add(jtbtn_ingles);\n jtbtn_ingles.setBounds(230, 130, 130, 37);\n\n jtbtn_historia.setBackground(new java.awt.Color(0, 0, 0));\n jtbtn_historia.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n jtbtn_historia.setForeground(new java.awt.Color(255, 255, 255));\n jtbtn_historia.setText(\"Historia\");\n jtbtn_historia.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtbtn_historiaActionPerformed(evt);\n }\n });\n jPanel1.add(jtbtn_historia);\n jtbtn_historia.setBounds(230, 210, 130, 37);\n\n jtbtn_esp.setBackground(new java.awt.Color(0, 0, 0));\n jtbtn_esp.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n jtbtn_esp.setForeground(new java.awt.Color(255, 255, 255));\n jtbtn_esp.setText(\"Español\");\n jtbtn_esp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtbtn_espActionPerformed(evt);\n }\n });\n jPanel1.add(jtbtn_esp);\n jtbtn_esp.setBounds(230, 50, 130, 37);\n\n jtbtn_ciencias.setBackground(new java.awt.Color(0, 0, 0));\n jtbtn_ciencias.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n jtbtn_ciencias.setForeground(new java.awt.Color(255, 255, 255));\n jtbtn_ciencias.setText(\"Ciencias\");\n jtbtn_ciencias.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtbtn_cienciasActionPerformed(evt);\n }\n });\n jPanel1.add(jtbtn_ciencias);\n jtbtn_ciencias.setBounds(230, 170, 130, 37);\n\n jtbtn_geograf.setBackground(new java.awt.Color(0, 0, 0));\n jtbtn_geograf.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 14)); // NOI18N\n jtbtn_geograf.setForeground(new java.awt.Color(255, 255, 255));\n jtbtn_geograf.setText(\"Geografía\");\n jtbtn_geograf.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtbtn_geografActionPerformed(evt);\n }\n });\n jPanel1.add(jtbtn_geograf);\n jtbtn_geograf.setBounds(230, 250, 130, 37);\n\n btn_exit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/bomba/exit.png\"))); // NOI18N\n btn_exit.setBorderPainted(false);\n btn_exit.setContentAreaFilled(false);\n btn_exit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_exitActionPerformed(evt);\n }\n });\n jPanel1.add(btn_exit);\n btn_exit.setBounds(40, 260, 50, 44);\n\n imag_menu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/bomba/imagen_menu.jpg\"))); // NOI18N\n jPanel1.add(imag_menu);\n imag_menu.setBounds(0, 0, 440, 320);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void initGUI() {\n\t\tContainer cp = getContentPane();\n\t\tcp.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel top = new JPanel(new GridLayout(0, 1));\n\t\tcp.add(top, BorderLayout.PAGE_START);\n\t\t\n\t\ttop.add(createMenuBar());\n\n\t\tJTabbedPane tabs = new JTabbedPane();\n\t\ttabs.add(\"Encryptor\", encryptorPanel);\n\t\ttabs.add(\"Decryptor\", decryptorPanel);\n\t\ttabs.setSelectedComponent(encryptorPanel);\n\t\t\n\t\tcp.add(tabs);\n\t}", "public void setupGUI() {\t\n\t\t\n\t\t// Menu Frame\n\t\tmenuFrame = new JFrame();\n\t\t\n\t\t// ContentPane\n\t\tmenuFrame.getContentPane().setEnabled(false);\n\t\tmenuFrame.setBounds(100, 100, 1000, 680);\n\t\tmenuFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tmenuFrame.getContentPane().setLayout(null);\t\n\t\t\n\t\t// Label username\n\t\tusernameLabel = new JLabel(\"Username:\");\n\t\tusernameLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tusernameLabel.setBounds(58, 80, 117, 35);\n\t\tmenuFrame.getContentPane().add(usernameLabel);\n\t\t\n\t\t// Label password\n\t\tpasswordLabel = new JLabel(\"Password:\");\n\t\tpasswordLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tpasswordLabel.setBounds(357, 77, 122, 41);\n\t\tmenuFrame.getContentPane().add(passwordLabel);\n\t\t\n\t\t// Textfield for username\n\t\tusernameTextField = new JTextField();\n\t\tusernameTextField.setBounds(159, 88, 169, 19);\n\t\tmenuFrame.getContentPane().add(usernameTextField);\n\t\tusernameTextField.setColumns(10);\n\t\t\n\t\t// Passwordfield for password\n\t\tpasswordField = new JPasswordField();\n\t\tpasswordField.setBounds(447, 88, 169, 19);\n\t\tmenuFrame.getContentPane().add(passwordField);\n\t\t\n\t\t// Label currently logged in as\n\t\tcurrentUserLabel = new JLabel(\"You are currently logged in as an anonymous Player\");\n\t\tcurrentUserLabel.setFont(new Font(\"Dialog\", Font.BOLD, 18));\n\t\tcurrentUserLabel.setBounds(12, 12, 580, 33);\n\t\tmenuFrame.getContentPane().add(currentUserLabel);\n\t\t\n\t\t// Button login\n\t\tloginButton = new JButton(\"Login\");\n\t\tloginButton.addActionListener(new ActionListener() {\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString name = usernameTextField.getText();\n\t\t\t\tString password = passwordField.getText();\t\n\t\t\t\t\n\t\t\t\tif(login(name, password)) {\n\t\t\t\t\tisLoggedIn = true;\n\t\t\t\t\tplayerName = name;\n\t\t\t\t\tJOptionPane.showMessageDialog(menuFrame, \"your login was successful\");\n\t\t\t\t\tcurrentUserLabel.setText(\"You are currently logged in as \" + playerName);\n\n\t\t\t\t\tupdateSetupGUI();\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid username or password\", \"Login Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\tpasswordField.setText(null);\n\t\t\t\t\tusernameTextField.setText(null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\tloginButton.setBounds(277, 130, 117, 25);\n\t\tmenuFrame.getContentPane().add(loginButton);\n\t\t\n\t\t// Sperator\n\t\tseparator_2 = new JSeparator();\n\t\tseparator_2.setBounds(12, 57, 604, 11);\n\t\tmenuFrame.getContentPane().add(separator_2);\n\t\t\n\t\t// Button create account\n\t\tcreateAccountButton = new JButton(\"Create Account\");\n\t\tcreateAccountButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString newUser = JOptionPane.showInputDialog(\"Enter your user name:\");\n\t\t\t\tString newPassword1 = JOptionPane.showInputDialog(\"Enter your password:\");\n\t\t\t\tString newPassword2 = JOptionPane.showInputDialog(\"Enter your password again\");\n\t\t\t\t\n\t\t\t\tif (newPassword1.contentEquals(newPassword2)) {\n\t\t\t\t\tcreateAccount(newUser, newPassword1);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(menuFrame, \"Your passwords do not match\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcreateAccountButton.setBounds(406, 587, 186, 25);\n\t\tmenuFrame.getContentPane().add(createAccountButton);\n\t\t\n\t\t// Seperator\n\t\tseparator_1 = new JSeparator();\n\t\tseparator_1.setBounds(12, 518, 965, 11);\n\t\tmenuFrame.getContentPane().add(separator_1);\n\t\t\n\t\t// Label create account\n\t\tcreateAccountLabel = new JLabel(\"if you dont have an account yet, feel free to create one, to save your current Game\");\n\t\tcreateAccountLabel.setFont(new Font(\"Dialog\", Font.BOLD, 13));\n\t\tcreateAccountLabel.setBounds(203, 549, 685, 15);\n\t\tmenuFrame.getContentPane().add(createAccountLabel);\n\t\t\n\t\t// Label for all games\n\t\tselectGameLabel = new JLabel(\"You can play one of the following games\");\n\t\tselectGameLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\tselectGameLabel.setBounds(12, 242, 348, 15);\n\t\tmenuFrame.getContentPane().add(selectGameLabel);\n\t\t\n\t\t// Button play chess\n\t\tplayChessButton = new JButton(\"Play Chess\");\n\t\tplayChessButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tdos.writeUTF(\"<Gamemode=Chess>\");\n\t\t\t\t} catch (IOException 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\t}\n\t\t});\n\t\tplayChessButton.setBounds(413, 232, 117, 41);\n\t\tmenuFrame.getContentPane().add(playChessButton);\n\t\t\n\t\t// Button play mill\n\t\tplayMillButton = new JButton(\"Play Mill\");\n\t\tplayMillButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tdos.writeUTF(\"<Gamemode=Mill>\");\n\t\t\t\t} catch (IOException 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\t}\n\t\t});\n\t\tplayMillButton.setBounds(646, 229, 117, 44);\n\t\tmenuFrame.getContentPane().add(playMillButton);\n\t\t\n\t\t// Label restore Game\n\t\trestoreGameLabel = new JLabel(\"Or you can restore your latest game\");\n\t\trestoreGameLabel.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\trestoreGameLabel.setBounds(12, 350, 316, 15);\n\t\tmenuFrame.getContentPane().add(restoreGameLabel);\n\t\t\n\t\t// Button restore Game\n\t\trestoreGameButton = new JButton(\"Restore Game\");\n\t\trestoreGameButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//TODO restore latest game from database\n\t\t\t}\n\t\t});\n\t\trestoreGameButton.setBounds(413, 337, 155, 41);\n\t\tmenuFrame.getContentPane().add(restoreGameButton);\n\t\t\n\t\t// Window Listener for Closing\n\t\tmenuFrame.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdos.writeUTF(\"<Connectionstatus=Exit>\");\n\t\t\t\t} catch (IOException 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\te.getWindow().dispose();\n\t\t\t}\n\t\t});\n\t\n\t\tupdateSetupGUI();\n\t\tmenuFrame.setVisible(true);\n\t}", "public JMenuBar createMenuBar ()\n {\n MenuListener menuListener = new MenuListener ();\n\t //-----------------------------Menu options.--------------------------------------------------------------\n JMenu fileMenu = new JMenu (\"File\");\n JMenu editMenu = new JMenu (\"Edit\");\n JMenu viewMenu = new JMenu (\"View\");\n JMenu colorMenu = new JMenu (\"Colors\");\n JMenu filterMenu = new JMenu (\"Filter\");\n JMenu helpMenu = new JMenu (\"Help\");\n\n //----------------------------Submenu options.-------------------------------------------------------------\n JMenuItem newMenuItem = new JMenuItem (\"New\",new ImageIcon(\"../img/new.gif\"));\n newMenuItem.addActionListener (menuListener);\n newMenuItem.setEnabled (true);\n\n JMenuItem openMenuItem = new JMenuItem (\"Open\",new ImageIcon(\"../img/open.gif\"));\n openMenuItem.addActionListener (menuListener);\n openMenuItem.setEnabled (true);\n\n JMenuItem saveMenuItem = new JMenuItem (\"Save\",new ImageIcon(\"../img/save.gif\"));\n saveMenuItem.addActionListener (menuListener);\n saveMenuItem.setEnabled (true);\n \n JMenuItem exitMenuItem = new JMenuItem (\"Exit\",new ImageIcon(\"../img/close.gif\"));\n exitMenuItem.addActionListener (menuListener);\n exitMenuItem.setEnabled (true);\n \n fileMenu.add (newMenuItem);\n fileMenu.add (openMenuItem);\n fileMenu.add (saveMenuItem);\n fileMenu.add (exitMenuItem);\n\n //---------------------------------------------End of File Menu--------------------------------------------\n JMenuItem undoMenuItem = new JMenuItem (\"Undo\",new ImageIcon(\"../img/undo.gif\"));\n undoMenuItem.addActionListener (menuListener);\n undoMenuItem.setEnabled (true);\n\n JMenuItem redoMenuItem = new JMenuItem (\"Redo\",new ImageIcon(\"../img/redo.gif\"));\n redoMenuItem.addActionListener (menuListener);\n redoMenuItem.setEnabled (true);\n\n JMenuItem clearMenuItem = new JMenuItem (\"Clear All\",new ImageIcon(\"../img/clear.gif\"));\n clearMenuItem.addActionListener (menuListener);\n clearMenuItem.setEnabled (true);\n\n editMenu.add (undoMenuItem);\n editMenu.add (redoMenuItem);\n editMenu.add (clearMenuItem);\n\n //----------------------------------------End of Edit Menu-------------------------------------------------\n JMenuItem toolboxMenuItem = new JMenuItem (\"Tool Box\",new ImageIcon(\"../img/tool.gif\"));\n toolboxMenuItem.addActionListener(menuListener);\n toolboxMenuItem.setEnabled (true);\n\n JMenuItem colorboxMenuItem = new JMenuItem (\"Color Box\",new ImageIcon(\"../img/cbox.gif\"));\n colorboxMenuItem.addActionListener(menuListener);\n colorboxMenuItem.setEnabled (true);\n\n JMenuItem cursorMenuItem = new JMenuItem (\"Cursor Position\",new ImageIcon(\"../img/pos.gif\"));\n cursorMenuItem.addActionListener(menuListener);\n cursorMenuItem.setEnabled (true);\n \n viewMenu.add (toolboxMenuItem);\n viewMenu.add (colorboxMenuItem);\n viewMenu.add (cursorMenuItem);\n\n //--------------------------------------End of View Menu-------------------------------------------------- \n JMenuItem editcolorMenuItem = new JMenuItem (\"Edit Colors\",new ImageIcon(\"../img/color.gif\"));\n editcolorMenuItem.addActionListener(menuListener);\n editcolorMenuItem.setEnabled (true);\n \n colorMenu.add (editcolorMenuItem);\n\n //------------------------------------End of Color Menu--------------------------------------------------- \n JMenuItem brightnessMenuItem = new JMenuItem (\"Brightness\",new ImageIcon(\"../img/bright.gif\"));\n brightnessMenuItem.addActionListener(menuListener);\n brightnessMenuItem.setEnabled (true);\n \n JMenuItem blurMenuItem = new JMenuItem (\"Blur\",new ImageIcon(\"../img/blur.gif\"));\n blurMenuItem.addActionListener(menuListener);\n blurMenuItem.setEnabled (true);\n \n filterMenu.add (brightnessMenuItem);\n filterMenu.add (blurMenuItem);\n\n //--------------------------------------End of Filter Menu------------------------------------------------ \n JMenuItem helpMenuItem = new JMenuItem (\"Help Topics\",new ImageIcon(\"../img/help.gif\"));\n helpMenuItem.addActionListener(menuListener);\n helpMenuItem.setEnabled (true); \n JMenuItem aboutMenuItem = new JMenuItem (\"About Multi Brush\",new ImageIcon(\"../img/license.gif\"));\n aboutMenuItem.addActionListener(menuListener);\n aboutMenuItem.setEnabled (true);\n \n helpMenu.add (helpMenuItem);\n helpMenu.add (aboutMenuItem);\n\n //-----------------------------------------End of Help Menu----------------------------------------------- \t \n JMenuBar menubar = new JMenuBar ();\n menubar.add (fileMenu);\n menubar.add (editMenu);\n menubar.add (viewMenu);\n menubar.add (colorMenu);\n //menubar.add (filterMenu);\n menubar.add (helpMenu);\n\n return menubar;\n }", "public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}", "public void createAndShowGUI() {\n\n setTitle(title);\n // Sets what to do when frame closes\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setIconImage(new ImageIcon(ClassLoader.getSystemResource(ICON_PATH)).getImage());\n\n //shows the frame\n pack();\n setLocationRelativeTo(null); //centers frame\n setVisible(true);\n }", "private void setAttributes() {\n this.setVisible(true);\n this.setSize(500, 500);\n this.setTitle(\"cuttco.com\");\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\n }", "private void initUI()\r\n {\r\n var webIcon = new ImageIcon(\"src/resources/web.png\");\r\n \r\n // The setIconImage() sets the image to be displayed as the icon for this window. the getImage() returns the\r\n // icon's Image.\r\n setIconImage(webIcon.getImage());\r\n \r\n setTitle(\"Icon\");\r\n setSize(300, 200);\r\n setLocationRelativeTo(null);\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n }", "public Menu() {\n \n \n initComponents();\n this.setLocationRelativeTo(null);\n this.repaint();\n this.setResizable(false);\n }", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private void initControlsPage()\r\n {\n \tString keyTitleString = \"KEYBOARD\";\r\n \tkeyTitleText = new OText(25, 200, 300, keyTitleString);\r\n \tkeyTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the keyboard movement text\r\n \tString keyMoveString = \"Move Optimus with the WASD keys \"\r\n \t\t\t + \" <br> \"\r\n \t\t\t + \"as if they were the arrow keys.\";\r\n \tkeyMoveText = new OText(25, 225, 300, keyMoveString);\r\n \tkeyMoveText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t\r\n \t//Initialize the mouse title text\r\n \tString mouseTitleString = \"MOUSE\";\r\n \tmouseTitleText = new OText(375, 200, 300, mouseTitleString);\r\n \tmouseTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the mouse text\r\n \tString mouseMoveString = \"Aim by moving the mouse and shoot bullets from Optimus in the direction of the cursor using both clicks. \";\r\n \tmouseText = new OText(375, 225, 300, mouseMoveString);\r\n \tmouseText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n }", "private void initComponents() {//GEN-BEGIN:initComponents\n\n\n setClosable(true);\n\n setIconifiable(true);\n\n setPreferredSize(new java.awt.Dimension(730, 520));\n\n pack();\n\n }", "private void createGUI() {\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"My first player\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.getContentPane().setBackground(Color.PINK);\n\t\tbtnPlay.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnPlay.setBounds(27, 80, 107, 22);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnStop.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnStop.setBounds(321, 79, 117, 25);\n\t\tbtnStop.setEnabled(false);\n\t\tbtnPause.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnPause.setBounds(170, 79, 117, 25);\n\t\tbtnPause.setEnabled(false);\n\t\tbtnOpen.setFont(new Font(\"FreeSerif\", Font.BOLD, 16));\n\t\tbtnOpen.setBounds(113, 43, 249, 25);\n\t\tlblMyMusic.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblMyMusic.setForeground(new Color(51, 51, 51));\n\t\tlblMyMusic.setFont(new Font(\"FreeSerif\", Font.BOLD, 20));\n\t\tlblMyMusic.setBounds(101, 174, 261, 57);\n\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 290, 217);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t frame.setLocationRelativeTo(null);\n\t frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);\n\t frame.setVisible(true);\n\t\t\n\t\tJLabel lblAfter = new JLabel(\"Afternoon\");\n\t\tlblAfter.setFont(new Font(\"Segoe Script\", Font.BOLD, 25));\n\t\tlblAfter.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblAfter.setBounds(0, 11, 264, 40);\n\t\tframe.getContentPane().add(lblAfter);\n\t\t\n\t\tJButton btnAdministracin = new JButton(\"Administraci\\u00F3n\");\n\t\tbtnAdministracin.setFont(new Font(\"Segoe Script\", Font.PLAIN, 15));\n\t\tbtnAdministracin.setBounds(45, 133, 185, 26);\n\t\tframe.getContentPane().add(btnAdministracin);\n\t\t\n\t\tbtnAdministracin.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tPantalla1_1 pantallaAdministracion = new Pantalla1_1();\n\t\t\t\tpantallaAdministracion.frame.setVisible(true);\n\t\t\t\tPantalla1.frame.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnBar = new JButton(\"BAR\");\n\t\tbtnBar.setFont(new Font(\"Segoe Script\", Font.PLAIN, 15));\n\t\tbtnBar.setBounds(45, 62, 185, 60);\n\t\tframe.getContentPane().add(btnBar);\n\t\t\n\t\tJLabel lblA = new JLabel(\"a\");\n\t\tlblA.setIcon(new ImageIcon(Pantalla1.class.getResource(\"/img/fondo-de-malla-degradado-abstracto-borrosa_1159-3174.jpg\")));\n\t\tlblA.setBounds(0, 0, 274, 178);\n\t\tframe.getContentPane().add(lblA);\n\t\t\n\t\tbtnBar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tPantalla2_1 pantallaBar = new Pantalla2_1();\n\t\t\t\tpantallaBar.frame.setVisible(true);\n\t\t\t\tPantalla1.frame.setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "private void initMainComponents() {\n\t\tsetBackground(Color.RED);\n\t\tsetTitle(\"TABL\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 974, 842);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(100, 149, 237));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\tlayeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(10, 40, 941, 757);\n\t\tcontentPane.add(layeredPane);\n\t\t\n\t\tsetForeground(Color.BLACK);\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(AdminManageUsers.class.getResource(\"/resources/Logo.PNG\")));\n\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 600, 600);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblStaffModify = new JLabel(\"Staff Modify\");\n\t\tlblStaffModify.setFont(new Font(\"Times New Roman\", Font.BOLD | Font.ITALIC, 22));\n\t\tlblStaffModify.setBounds(243, 20, 118, 23);\n\t\tframe.getContentPane().add(lblStaffModify);\n\t\t\n\t\tJLabel lblAdd = new JLabel(\"Add\");\n\t\tlblAdd.setForeground(Color.RED);\n\t\tlblAdd.setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\n\t\tlblAdd.setBounds(10, 76, 76, 38);\n\t\tframe.getContentPane().add(lblAdd);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Delete\");\n\t\tlblNewLabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\n\t\tlblNewLabel.setForeground(Color.RED);\n\t\tlblNewLabel.setBounds(10, 164, 62, 23);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Modify\");\n\t\tlblNewLabel_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 20));\n\t\tlblNewLabel_1.setForeground(Color.RED);\n\t\tlblNewLabel_1.setBounds(10, 218, 62, 24);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Movie\");\n\t\tbtnNewButton.setBounds(110, 68, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSixth_AddMovie addmovie=new Sixth_AddMovie();\n\t\t\t\t\taddmovie.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Person\");\n\t\tbtnNewButton_1.setBounds(233, 68, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_1);\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t\tSixth_AddPerson addperson=new Sixth_AddPerson();\n\t\t\t\t\taddperson.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_2 = new JButton(\"Delete\");\n\t\tbtnNewButton_2.setBounds(110, 166, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_2);\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t\tFifth_Delete delete=new Fifth_Delete();\n\t\t\t\t\tdelete.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_3 = new JButton(\"Modify\");\n\t\tbtnNewButton_3.setBounds(110, 221, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_3);\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t\tFifth_Modify modify=new Fifth_Modify();\n\t\t\t\t\tmodify.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnBack = new JButton(\"Back\");\n\t\tbtnBack.setBounds(0, 0, 93, 23);\n\t\tframe.getContentPane().add(btnBack);\n\t\t\n\t\tbtnBack.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(First.v==1){\n\t\t\t\t\tThird_Member member=new Third_Member();\n\t\t\t\t\tmember.main(null);\n\t\t\t\t\tframe.dispose();\n\t\t\t\t}\n\t\t\t\tif(First.v==2){\n\t\t\t\t\tThird_Staff staff=new Third_Staff();\n\t\t\t\t staff.main(null);\n\t\t\t\t frame.dispose();}\n\t\t\t\n\t\t}\n\t\t});\n\t\t\n\t\tJButton btnNewButton_5 = new JButton(\"Room\");\n\t\tbtnNewButton_5.setBounds(362, 68, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_5);\n\t\t\n\t\tbtnNewButton_5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSixth_AddRoom addRoom=new Sixth_AddRoom();\n\t\t\t\taddRoom.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnShowing = new JButton(\"Showing\");\n\t\tbtnShowing.setBounds(481, 68, 93, 23);\n\t\tframe.getContentPane().add(btnShowing);\n\t\tbtnShowing.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSixth_AddShowing addShowing=new Sixth_AddShowing();\n\t\t\t\taddShowing.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_4 = new JButton(\"Direct\");\n\t\tbtnNewButton_4.setBounds(110, 111, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_4);\n\t\tbtnNewButton_4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddDirect addDirect=new AddDirect();\n\t\t\t\taddDirect.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_6 = new JButton(\"Write\");\n\t\tbtnNewButton_6.setBounds(233, 111, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_6);\n\t\tbtnNewButton_6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddWrite addWrite=new AddWrite();\n\t\t\t\taddWrite.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\tJButton btnNewButton_7 = new JButton(\"Act\");\n\t\tbtnNewButton_7.setBounds(362, 111, 93, 23);\n\t\tframe.getContentPane().add(btnNewButton_7);\n\t\tbtnNewButton_7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddAct addAct=new AddAct();\n\t\t\t\taddAct.main(null);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t}});\n\t\t\n\t\t\n\t}" ]
[ "0.74497586", "0.73811656", "0.7270953", "0.72615874", "0.7204111", "0.7158064", "0.7130989", "0.7102753", "0.7101332", "0.7081586", "0.7077135", "0.7063115", "0.7036585", "0.7027168", "0.7026152", "0.70031756", "0.6996287", "0.6992255", "0.6978245", "0.6974488", "0.6959697", "0.69526136", "0.6948546", "0.6943173", "0.69257486", "0.69241154", "0.69012034", "0.69000053", "0.6898634", "0.6895025", "0.6893324", "0.68886185", "0.6884681", "0.6882718", "0.68817997", "0.68725455", "0.68669444", "0.6866879", "0.68619806", "0.6843742", "0.6838139", "0.6823178", "0.68228084", "0.6808762", "0.68031317", "0.6801719", "0.6791957", "0.67835563", "0.6778641", "0.6770511", "0.6770506", "0.67681575", "0.6768089", "0.6767512", "0.67638516", "0.67397964", "0.6738116", "0.6737906", "0.67256665", "0.67243314", "0.6716409", "0.6714035", "0.67124087", "0.6710982", "0.6710309", "0.6708519", "0.67056245", "0.67046815", "0.67024994", "0.6702371", "0.6693332", "0.66855013", "0.66738313", "0.6672918", "0.6671588", "0.66688967", "0.66677207", "0.6666726", "0.6657467", "0.6647135", "0.66367084", "0.663045", "0.66287684", "0.6602687", "0.66023123", "0.6597637", "0.6597307", "0.6597182", "0.6578201", "0.65779257", "0.65775925", "0.6564195", "0.6562878", "0.6558556", "0.6552359", "0.6551995", "0.6549554", "0.6545179", "0.65450066", "0.6537018", "0.65368205" ]
0.0
-1
leads to the statistics window
public void actionPerformed(ActionEvent e) { PersonalBests s=new PersonalBests(); dispose(); s.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void statsAction() {\n StatsWin newWindow = getSelectedCell().mkStatsWin();\n WindowUtils.avoidParent(newWindow, parentFrame);\n watchers.add(newWindow);\n }", "private void reCalcularWindows(){\n }", "public void updateStatisticsData() {\r\n\t\tif (this.statisticsTabItem != null && !this.statisticsTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.statisticsTabItem.updateStatisticsData(true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.statisticsTabItem.updateStatisticsData(true);\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}", "public static void showStatistics(){\n\n }", "void statistics();", "@FXML public void showStatistics() {\n\t\tPopupMessage.getInstance().showAlert(AlertType.INFORMATION,\n\t\t\t\t\t\t\t\t\t\t\tgsTitle, \n\t\t\t\t\t\t\t\t\t\t\tgsHeader,\n\t\t\t\t\t\t\t\t\t\t\tgsDetailsFiles + Connect.getNumberofFilesFromStatistics()\n\t\t\t\t\t\t\t\t\t\t\t+ System.lineSeparator()\n\t\t\t\t\t\t\t\t\t\t\t+ gsDetailsCases + Connect.getCases());\n\t}", "private void visualize(guiStatistics statistics) {\r\n\t\tstatistics.pack();\r\n RefineryUtilities.centerFrameOnScreen(statistics);\r\n statistics.setVisible(true);\r\n\r\n\t}", "private void actionStatisticalData() {\n String message = getStatisticalMsg(true);\n\n JOptionPane.showMessageDialog(null, message, \"Statistical data\",\n JOptionPane.PLAIN_MESSAGE);\n }", "void startStatisticsMonitor();", "@Override public void handle(ActionEvent e) {\n\t\t m_StatisticsWindow.refresh(); \r\n\t\t\t stage.show();\r\n\t\t }", "public void resetStatistics()\n {\n }", "private void thisWindowOpened(WindowEvent e) {\n List<ResultAnswer> resultAnswers = new ArrayList<ResultAnswer>();\n\n Long yesCounter = 0L;\n Long noCounter = 0L;\n Long naCounter = 0L;\n\n List typeList = new ArrayList<String>();\n for (Object answer : answerList) {\n String type = ((Answer) answer).getType();\n if (!typeList.contains(type)) {\n typeList.add(type);\n }\n }\n\n for (Object text : typeList) {\n ResultAnswer resultAnswer = new ResultAnswer();\n resultAnswer.setType((String) text);\n resultAnswers.add(resultAnswer);\n }\n\n for (ResultAnswer resultAnswer : resultAnswers) {\n for (Object answer : answerList) {\n String type = ((Answer) answer).getType();\n String myAnswer = ((Answer) answer).getAnswer();\n if (resultAnswer.getType().equalsIgnoreCase(type)) {\n if (myAnswer.equalsIgnoreCase(\"Tak\")) {\n resultAnswer.yesAnswers++;\n yesCounter++;\n } else if (myAnswer.equalsIgnoreCase(\"Nie\")) {\n resultAnswer.noAnswers++;\n noCounter++;\n } else {\n resultAnswer.naAnswers++;\n naCounter++;\n }\n }\n }\n }\n\n /////////////////////// utworzenie wykresu kolowego /////////////////////////////////////////\n\n PieChartSample pieChartSample = new PieChartSample(\"Odpowiedzi\",\n new PieChartSample().createDataset(yesCounter, noCounter, naCounter));\n panel1.setLayout(new java.awt.BorderLayout());\n panel1.add(pieChartSample.getChartPanel(), BorderLayout.CENTER);\n panel1.validate();\n\n ////////////////////// utworzenie wykresu slupkowego ////////////////////////////////////////\n\n StackedBarChart stackedBarChart = new StackedBarChart(\"Wyniki\", resultAnswers);\n panel2.setLayout(new java.awt.BorderLayout());\n panel2.add(stackedBarChart.getChartPanel(), BorderLayout.CENTER);\n panel2.validate();\n }", "private void calcFinanceTotals() {\n System.out.println(\"calcFinanceTotals\");\n financeWindow.clear();\n for (int i = 0; i < clubEventList.totalSize(); i++) {\n financeWindow.calcPlus(clubEventList.getUnfiltered(i));\n }\n financeWindow.display();\n }", "public StatisticsWindow() {\n initComponents();\n }", "void displayReport ()\n {\n\tStatFrame statTable;\n String winTitle = new String (\"Statistical Results Window\");\n\n\tif (use_xml) {\n\t try {\n\t\tVector data = new Vector (); data.add (modelReport);\n\t\tString xmlStr = XMLSerializer.serialize (data);\n\t\tstatTable = new StatFrame (winTitle, xmlStr);\n\t } catch (Exception e) {\n\t\ttrc.tell (\"displayReport\", e.getMessage ());\n\t\te.printStackTrace ();\n\t\treturn;\n\t }\n\t} else {\n statTable = new StatFrame (winTitle, modelReport);\n\t}; // if\n\n statTable.showWin ();\n\n }", "private void resetStats() {\n }", "void clearStatistics();", "public void updateWindow() {\n MatchDAO ma = new MatchDAO();\n ArrayList<User> u = ma.getTopFiveMostMatchedUsers();\n view.updateWindow(ma.getLastMonthMatches(), ma.getLastWeekMatches(), ma.getLastDayMatches(), u);\n }", "public void printStatistics() {\n\t// Skriv statistiken samlad så här långt\n stats.print();\n }", "public JInternalFrame_Statistics() {\n initComponents();\n }", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "void statsReset();", "public void transitionToStatsPage() throws RemoteException{\n removeAll();\n statsPanel = new StatsPanel(contr);\n add(statsPanel, \"span 1\");\n }", "@Override\n public void refreshGui() {\n int count = call(\"getCountAndReset\", int.class);\n long nextTime = System.currentTimeMillis();\n long elapsed = nextTime - lastTime; // ms\n double frequency = 1000 * count / elapsed;\n lastTime = nextTime;\n stats.addValue(frequency);\n\n outputLbl.setText(String.format(\"%3.1f Hz\", stats.getGeometricMean()));\n }", "void this_windowActivated() {\n if (m_oOutputBehaviors.savingShortOutputData() == false) {\n m_jShortOutputLabel.setText(\"Not saving summary output\");\n }\n else {\n m_jShortOutputLabel.setText(\"Saving summary output\");\n }\n\n DetailedOutput oOutput = m_oOutputBehaviors.getDetailedOutput();\n if (oOutput.getNumberOfDetailedLiveTreeSettings() == 0 &&\n oOutput.getNumberOfDetailedDeadTreeSettings() == 0 &&\n oOutput.getNumberOfDetailedGridSettings() == 0) {\n m_jDetailedOutputLabel.setText(\"Not saving detailed output\");\n }\n else {\n m_jDetailedOutputLabel.setText(\"Saving detailed output\");\n }\n }", "@Override\n boolean resetStatistics();", "public void update() {\n super.update();\n window win = null;\n for(int i = windows.length-1 ; i >= 0 ; i -= 1 ) {\n win = (window) windows.getSorted(i);\n win.update();\n }\n }", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "private String updateWindow()\n\t{\n \t return String.format(\"Batt: %d Alt: %d Hdg: %d Rdy: %b Track: %b Id: %d\", drone.getBattery(), drone.getHeight(), \n \t\t\tdrone.getHeading(), drone.isFlying(), trackMarker, markerId);\n\t}", "private final void updateStatistics(){\r\n\t\tstatisticsText_.setLength(0); \t//reset\r\n\t\t\r\n\t\tRegion[][] regions = Map.getInstance().getRegions();\r\n\t\tVehicle[] vehicles;\r\n\t\tVehicle vehicle;\r\n\t\tint i, j, k;\r\n\t\tint activeVehicles = 0;\r\n\t\tint travelledVehicles = 0;\r\n\t\tint wifiVehicles = 0;\r\n\t\tlong messagesCreated = 0;\r\n\t\tlong IDsChanged = 0;\r\n\t\tdouble messageForwardFailed = 0;\r\n\t\tdouble travelDistance = 0;\r\n\t\tdouble travelTime = 0;\r\n\t\tdouble speed = 0;\r\n\t\tdouble knownVehicles = 0;\r\n\t\tfor(i = 0; i < regions.length; ++i){\r\n\t\t\tfor(j = 0; j < regions[i].length; ++j){\r\n\t\t\t\tvehicles = regions[i][j].getVehicleArray();\r\n\t\t\t\tfor(k = 0; k < vehicles.length; ++k){\r\n\t\t\t\t\tvehicle = vehicles[k];\r\n\t\t\t\t\tif(vehicle.getTotalTravelTime() > 0){\r\n\t\t\t\t\t\t++travelledVehicles;\r\n\t\t\t\t\t\ttravelDistance += vehicle.getTotalTravelDistance();\r\n\t\t\t\t\t\ttravelTime += vehicle.getTotalTravelTime();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(vehicle.isActive()){\r\n\t\t\t\t\t\t++activeVehicles;\r\n\t\t\t\t\t\tspeed += vehicle.getCurSpeed();\r\n\t\t\t\t\t\tif(vehicle.isWiFiEnabled()){\r\n\t\t\t\t\t\t\t++wifiVehicles;\r\n\t\t\t\t\t\t\tmessageForwardFailed += vehicle.getKnownMessages().getFailedForwardCount();\r\n\t\t\t\t\t\t\tknownVehicles += vehicle.getKnownVehiclesList().getSize();\r\n\t\t\t\t\t\t\tIDsChanged += vehicle.getIDsChanged();\r\n\t\t\t\t\t\t\tmessagesCreated += vehicle.getMessagesCreated();\r\n\t\t\t\t\t\t}\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\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.currentTime\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(Renderer.getInstance().getTimePassed()));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.activeVehicles\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(activeVehicles));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageSpeed\")); //$NON-NLS-1$\r\n\t\tif(activeVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(speed/activeVehicles/100000*3600));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" km/h\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageTravelDistance\")); //$NON-NLS-1$\r\n\t\tif(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelDistance/travelledVehicles/100));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" m\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageTravelTime\")); //$NON-NLS-1$\r\n\t\tif(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelTime/travelledVehicles/1000));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\" s\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.wifiVehicles\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(wifiVehicles));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.averageKnownVehicles\")); //$NON-NLS-1$\r\n\t\tif(wifiVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(knownVehicles/wifiVehicles));\r\n\t\telse statisticsText_.append(\"0\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.uniqueMessages\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(messagesCreated));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.failedMessages\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(messageForwardFailed));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(Messages.getString(\"ReportingControlPanel.totalIDchanges\")); //$NON-NLS-1$\r\n\t\tstatisticsText_.append(INTEGER_FORMAT.format(IDsChanged));\r\n\t\tstatisticsText_.append(\"\\n\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tstatisticsTextArea_.setText(statisticsText_.toString());\r\n\t}", "@Then(\"^display result window$\")\n public void display_result_window() throws Throwable {\n \tSystem.out.println(\"display_result_window\");\n \n }", "public void printStats() {\n\t\tSystem.out.println(\"QuickSort terminates!\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Duration: \" + getDuration() + \" seconds\");\n\t\tSystem.out.println(\"Comparisons: \" + this.comparisonCounter);\n\t\tSystem.out.println(\"Boundary: \" + this.b);\n\t}", "public void showMetrics() {\n }", "@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "public static void updateSummaryTable() {\n tableModel.fireTableDataChanged();\n tableModel.fireTableStructureChanged();\n window.resetSize();\n\n window.setComboBox();\n showWindow();\n }", "@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void windowClosed(WindowEvent we) {\n }", "public FrequencyMonitor(ADEGuiCallHelper helper, int smoothingWindow) {\n super(helper, 500);\n initComponents();\n outputLbl.setText(\"0 Hz\");\n lastTime = System.currentTimeMillis();\n stats = new DescriptiveStatistics(smoothingWindow);\n\n this.setTitle(call(\"getDataName\", String.class));\n}", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "public StatisticsJFrame() {\n initComponents();\n initData();\n }", "@Override\n public void startIteration() {\n mWindowId = getCurrentWindow();\n\n // Clear out any previous data\n mUiAutomation.clearWindowContentFrameStats(mWindowId);\n }", "private static void reportStatistics() {\n SmartDashboard.putNumber(\"Speed value\", speed);\n SmartDashboard.putNumber(\"Desired RPM\", kVelocitySetpoint);\n SmartDashboard.putNumber(\"Error\", error);\n SmartDashboard.putNumber(\"ErrorSum\", errorSum);\n SmartDashboard.putNumber(\"Flywheel Velocity (Master)\", -flywheelMaster.getSelectedSensorVelocity());\n\n if(d >= kMinThreePoint && d <= kMaxThreePoint) { //If we are in the range for a 3-point shot\n threePointDistanceEntry.setBoolean(true); //Alert operator\n } else { //If we are not in the range for a 3-point shot\n threePointDistanceEntry.setBoolean(false); //Alert operator\n }\n\n if(d >= kMinViableRange && d <= kMaxViableRange) { //If we are in the viable range for any power port shot\n viableDistanceEntry.setBoolean(true); //Alert operator\n } else { //If we cannot make a shot into the power port\n viableDistanceEntry.setBoolean(false); //Alert operator\n }\n }", "public void updateStatistics(List<Creature> mobs) {\n time++;\n statisticsPane.printStatistics(mobs, time);\n }", "public synchronized void setupHistoWindows() {\r\n\t\tif (log.isLoggable(Level.INFO)) log.log(Level.INFO, String.format(\"started\")); //$NON-NLS-1$\r\n\t\tthis.histoSet = HistoSet.getInstance();\r\n\t\tthis.histoSet.initialize();\r\n\r\n\t\tif (this.histoGraphicsTabItem != null) this.resetGraphicsWindowHeaderAndMeasurement();\r\n\r\n\t\tthis.setHistoGraphicsTabItemVisible(this.settings.isHistoActive());\r\n\t\tthis.setHistoTableTabItemVisible(this.settings.isHistoActive());\r\n\t\tif (this.settings.isHistoActive()) {\r\n\t\t\tthis.updateHistoTabs(RebuildStep.A_HISTOSET, true);\r\n\t\t}\r\n\t}", "public void computeStats() {\n\t\tstats = new Stats();\t\t\n\t}", "@Override\r\n\tpublic void control() {\r\n // data is aggregated this time step\r\n q.put(qCur);\r\n v.put(vCur);\r\n if (lane.model.settings.getBoolean(\"storeDetectorData\")) {\r\n qHist.add(qCur);\r\n vHist.add(vCur);\r\n tHist.add(lane.model.t);\r\n }\r\n // reset count\r\n qCur = 0;\r\n vCur = 0;\r\n }", "@Override\r\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public void resetGraphicsWindowHeaderAndMeasurement() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.histoGraphicsTabItem.clearHeaderAndComment();\r\n\t\t\tthis.histoGraphicsTabItem.getGraphicsComposite().setModeState(HistoGraphicsMode.RESET);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.histoGraphicsTabItem.clearHeaderAndComment();\r\n\t\t\t\t\tDataExplorer.this.histoGraphicsTabItem.getGraphicsComposite().setModeState(HistoGraphicsMode.RESET);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}", "private void updateStats()\n\t{\n\n\t\tint[] temp = simulation.getStatValue();\n\t\tfor(int i = 0; i < temp.length; i++)\n\t\t{\n\t\t\tthis.statsValues[i].setText(Integer.toString(temp[i]));\n\t\t}\n\t\t\n\t\tint[] temp2 = simulation.getNumberInEachLine();\n\t\tfor(int i = 0; i < temp2.length; i++)\n\t\t{\n\t\t\tthis.eatValues[i].setText(Integer.toString(temp2[i]));\n\t\t}\n\t}", "public void printStats() {\n\t\tSystem.out.println(\"============= RULEGROWTH - STATS ========\");\n\t\tSystem.out.println(\"Sequential rules count: \" + ruleCount);\n\t\tSystem.out.println(\"Total time: \" + (timeEnd - timeStart) + \" ms\");\n\t\tSystem.out.println(\"Max memory: \" + MemoryLogger.getInstance().getMaxMemory());\n\t\tSystem.out.println(\"==========================================\");\n\t}", "private void statsActionPerformed(ActionEvent evt) {\n\t\t//if the reels are nor spinning perform the the action\n\t\tif (!isSpining)\n\t\t\tnew StatsGUIInterface().setVisible(true);\n\t}", "public void resetStats() {\n recentStats = new Stats();\n }", "private void displayStatistics(ArrayList<Double> stats) {\n chart.getData().clear();\n XYChart.Series series = new XYChart.Series();\n series.setName(\"CMC\");\n\n double offset = stats.get(0);\n\n for (int index = 1; index < stats.size(); index++) {\n series.getData().add(new XYChart.Data(index + offset, stats.get(index)));\n }\n\n chart.getData().add(series);\n }", "public void windowCreated()\n {\n return;\n }", "void printStats();", "public void stats() {\n\t\tSystem.out.println(\"Hash Table Stats\");\n\t\tSystem.out.println(\"=================\");\n\t\tSystem.out.println(\"Number of Entries: \" + numEntries);\n\t\tSystem.out.println(\"Number of Buckets: \" + myBuckets.size());\n\t\tSystem.out.println(\"Histogram of Bucket Sizes: \" + histogram());\n\t\tSystem.out.printf(\"Fill Percentage: %.5f%%\\n\", fillPercent());\n\t\tSystem.out.printf(\"Average Non-Empty Bucket: %.7f\\n\\n\", avgNonEmpty());\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint N = getN();\n\t\t\t\tint T = getT();\n\t\t\t\t\n\t\t\t\tStopwatch stopwatch = new Stopwatch();\n\t\t\t\tPercolationStats ps = new PercolationStats(N, T);\n\t\t\t\t\n\t\t\t\t// results of running PercolationStats object after passing N and T \n\t\t\t\t// N - size of the Table (N * N)\n\t\t\t\t// T - times object runs the simulation\n\t\t\t\tString runTime= \"\" + stopwatch.elapsedTime(); // gets run Time\n\t\t\t\tString mean = \t\"\" + ps.mean(); // gets Mean - look at Statistics\n\t\t\t\tString stddev = \"\" + ps.stddev(); // gets Standard Deviation\n\t\t\t\tString HiLo = \t\"\" + ps.confidenceLo() + \", \" + ps.confidenceHi(); // gets 95% confidence interval:\n\t\t\t\tResultScreenGUI result = new ResultScreenGUI(mean, stddev, HiLo, runTime);\n\t\t\t\tresult.pack();\n\t\t\t\tresult.setVisible(true);\n\t\t\t}", "@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\t\t\trefresh(jt);\n\t\t\t\t\t\t}", "@Override\n public void windowOpened(WindowEvent we) {\n }", "@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}", "public void summarize() {\n if (!waitlist.isEmpty()) {\n waitlist.clear();\n }\n workingReached.clear();\n }", "public void updateStatsPanel() {\n\t\t//update versus table\n\t\tuser1 = Login.getInstance().getUserOne();\n\t\tuser2 = Login.getInstance().getUserTwo();\n\t\t\n\t\tif(isVersusTableInitialized==true) {\n\t\t\tmainPanel.remove(versusTable);\n\t\t}\n\t\t\n\t\tversusTable = generateVersusTable();\n\t\tmainPanel.add(versusTable);\n\t\tisVersusTableInitialized=true;\n\t\tversusTable.setBounds(600, 160, 150, 45);\n\t\tversusTable.setBackground(Color.LIGHT_GRAY);\n\t\tversusTable.setEnabled(false);\n\t\ttitle.setForeground(Color.WHITE);\n\t\t\n\t\t//update top ten table\n\t\tif(isTopTenTableInitialized==true) {\n\t\t\tmainPanel.remove(topTenTable);\n\t\t}\n\t\t\n\t\ttopTenTable=generateTopTenTable();\n\t\tmainPanel.add(topTenTable);\n\t\tisTopTenTableInitialized=true;\n\t\ttopTenTable.setBounds(150, 160, 150, 175);\n\t\ttopTenTable.setBackground(Color.LIGHT_GRAY);\n\t\ttopTenTable.setEnabled(false);\n\t\ttitle.setForeground(Color.WHITE);\n\t}", "@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t}", "private static void moveWindow() {\n // sort the window array\n int[] windowInstance = window.clone();\n Arrays.sort(windowInstance);\n // use median to update distance readings\n prevDist = dist;\n dist = windowInstance[windowInstance.length / 2];\n // shift window by 1 sample, newest sample at the end \n for (int i = 0; i < window.length - 1; i++) {\n window[i] = window[i + 1];\n }\n window[window.length - 1] = readUsDistance();\n // for testing purpose:\n //System.out.println(Arrays.toString(windowInstance) + \" median: \" + dist);\n }", "public abstract void showStat();", "@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void windowOpened(WindowEvent e) {\n \n }", "@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\n\t\t\t}", "public void windowsUp() {\n\n windowStatus = true;\n System.out.println(\"Windows stay closed\");\n\n }", "void stopStatisticsMonitor();", "private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }", "@Override\r\n\tpublic void windowstartUpData() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "public void displayStats()\n {\n if(graph == null)\n {\n clearStats();\n }\n else\n { \n pathJTextArea.setText(graph.getPathString(pathList));\n costJTextField.setText(decimal.format(graph.getPathCost(pathList)));\n timeJTextField.setText(String.valueOf(timePassed));\n }\n }", "@Override\n public void windowOpened(WindowEvent e)\n {\n\n }", "public void printStats() {\n\t\tSystem.out.println(\"========== LCMFreq v0.96r18 - STATS ============\");\n\t\tSystem.out.println(\" Freq. itemsets count: \" + frequentCount);\n\t\tSystem.out.println(\" Total time ~: \" + (endTimestamp - startTimestamp)\n\t\t\t\t+ \" ms\");\n\t\tSystem.out.println(\" Max memory:\" + MemoryLogger.getInstance().getMaxMemory());\n\t\tSystem.out.println(\"=====================================\");\n\t}", "public abstract void statsReset();", "private static void displayStats() {\n\t\tint numPlay = 0;\n\t\tint numWon = 0;\n\t\tint sumGuess = 0;\n\t\tint minGuess = Integer.MAX_VALUE;\n\t\tint maxGuess = Integer.MIN_VALUE;\n\t\tdouble average = 0;\n\t\tint lastNumGuess = 0;\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tnumPlay++;\n\t\t\t\tlastNumGuess = Integer.parseInt(line);\n\t\t\t\tif (lastNumGuess > 0) { // a positive number of guesses indicates the user won the game\n\t\t\t\t\tnumWon++;\n\t\t\t\t\tminGuess = Math.min(minGuess, lastNumGuess);\n\t\t\t\t\tmaxGuess = Math.max(maxGuess, lastNumGuess);\n\t\t\t\t\tsumGuess += lastNumGuess;\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (FileNotFoundException exception) {\n\t\t\tSystem.out.println(\"It seems that you haven't played this game before. Keep playing to gather statistics!\");\n\t\t\treturn;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sorry the software encountered an IO Error. Please try again later.\");\n\t\t}\n\t\tSystem.out.println(\"Below are the summary statistics: \");\n\t\tSystem.out.println(\"Number of games played: \" + numPlay);\n\t\tSystem.out.println(\"Number of games won: \" + numWon);\n\t\tSystem.out.println(String.format(\"Total number of guesses: %d\", sumGuess + 12 * (numPlay - numWon)));\n\t\tif (lastNumGuess < 1) {\n\t\t\tSystem.out.println(\"Last time you lost\");\n\t\t} else {\n\t\t\tSystem.out.println(String.format(\"Last time you won and made %d guess%s\", lastNumGuess,\n\t\t\t\t\t(lastNumGuess > 1 ? \"es\" : \"\")));\n\t\t}\n\t\tif (numWon > 0) {\n\t\t\tSystem.out.println(\"Minimum number of guesses to win: \" + minGuess);\n\t\t\tSystem.out.println(\"Maximum number of guesses to win: \" + maxGuess);\n\t\t\taverage = (double) sumGuess / numWon;\n\t\t\tSystem.out.println(String.format(\"Average number of guesses to win: %.2f\", average));\n\t\t}\n\t}", "private void statisticButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_statisticButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getStatisticController();\n }", "private void displayStats(CheckListView<String> checkview, TextArea stats) {\n\t\tStringBuilder start = new StringBuilder();\n\t\tfor(String critter_name:checkview.getCheckModel().getCheckedItems()){\n\t\t\ttry {\n\t\t\t\tClass classTemp = Class.forName(this.getClass().getPackage().getName() + \".\" + critter_name);\n\t\t\t\tMethod m = classTemp.getMethod(\"runStats\", List.class); //Get method\n\t\t\t\tList<Critter> instances = Critter.getInstances(critter_name);\n\t\t\t\tString output = (String)m.invoke(null, instances); //Invoke with instances\n\t\t\t\tstart.append(output).append(\"\\n\");\n\t\t\t} catch (Exception e) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tstats.clear();\n\t\tstats.appendText(start.toString());\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}", "@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\r\n\t}" ]
[ "0.73564404", "0.66273165", "0.6468676", "0.64274657", "0.6426693", "0.6387972", "0.635583", "0.62724733", "0.6256255", "0.61405015", "0.612743", "0.6099315", "0.6091212", "0.6082602", "0.6060837", "0.60173124", "0.6016345", "0.59865195", "0.59529406", "0.58970845", "0.587687", "0.5871804", "0.5863465", "0.58563125", "0.5829561", "0.5825548", "0.5804657", "0.58041775", "0.57731193", "0.5770753", "0.5759079", "0.5751447", "0.5732256", "0.57287204", "0.57287204", "0.57287204", "0.57287204", "0.57019424", "0.56961954", "0.56961954", "0.5695411", "0.5694166", "0.5677132", "0.5650394", "0.56435126", "0.5640888", "0.5637788", "0.56314766", "0.5626984", "0.5623514", "0.5616543", "0.56089437", "0.5601715", "0.5601447", "0.55948085", "0.5584158", "0.5574045", "0.55736786", "0.557163", "0.5565429", "0.5565403", "0.55642545", "0.5563621", "0.555554", "0.5554907", "0.55464953", "0.55464953", "0.55325246", "0.5528669", "0.5527005", "0.55255663", "0.5525517", "0.5519606", "0.55126065", "0.55126065", "0.55126065", "0.55126065", "0.55073273", "0.5503146", "0.5503146", "0.5503146", "0.55013776", "0.54990315", "0.54984146", "0.5491924", "0.5481896", "0.54768014", "0.54735947", "0.54623085", "0.5461096", "0.54582494", "0.54579175", "0.54557985", "0.54486454", "0.54486454", "0.54486454", "0.54486454", "0.54486454", "0.54486454", "0.54486454", "0.5447632" ]
0.0
-1
running the main menu GUI on initial start up.
public void windowClosing(java.awt.event.WindowEvent windowEvent) { if (JOptionPane.showConfirmDialog(panel, "Are you sure to close this window?", "Attention!", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION){ System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public startingMenu() {\r\n initComponents();\r\n }", "public void initMenu(){\n\t}", "public static void launch() {\r\n\t\tint choice = EXIT;\r\n\t\tdo {\r\n\t\t\tchoice = displayMenu();\r\n\t\t\texecuteMenuItem(choice);\r\n\t\t} while (choice != EXIT);\r\n\t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "public static void main(String[] args) {\n InitStart.Init();\r\n new MainMenuView().displayMenu();\r\n\r\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\n\t\thome = new MenuItem(\"Home Page\");\n\t\thome.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.CREDENTIALS);\n\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tnewuser = new MenuItem(\"New User\");\n\t\tnewuser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Calling New User window\");\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.NEWUSER);\n\t\t\t}\n\t\t}); \n\t\t\n\t\t\n\t\texit = new MenuItem(\"Exit Application\");\n\t\texit.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"quitting\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}); \n\n\t\t\n\t\tMain.getItems().add(home);\n\t\n\t\tMain.getItems().add(newuser);\n\n\t\tMain.getItems().add(exit);\n\t\t\n\n\t\t//---------------------------- Actions Menu Drop down --------------------------------\n\n\t\thistory = new MenuItem(\"View History\");\n\t\thistory.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) { \t\n\t\t\t\t// open the default web browser for the HTML page\n\t\t\t\ttry {\n\t\t\t\t\tURL webURL = new URL(\"http://webdevelopmentdev.azurewebsites.net/\");\n\t\t\t\t\tDesktop.getDesktop().browse(webURL.toURI());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (URISyntaxException 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\t}\n\t\t}); \n\n\t\tActions.getItems().add(history);\n\n\t\tbrowser = new MenuItem(\"View Browser\");\n\t\tbrowser.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.out.println(\"Inside the browser\");\n\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.BROWSER);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(browser);\n\t\tbrowser.setDisable(true);\n\t\t\n\t\tissue = new MenuItem(\"Report Issue\");\n\t\tissue.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tApplication_Navigator.loadVista(Application_Navigator.ISSUE);\n\t\t\t}\n\t\t}); \n\n\t\tActions.getItems().add(issue);\n\n\t\tStartConnection();\n\t}", "public static void main(String[] args) {\n\t\tnew menu().InitUI();\r\n\t}", "public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}", "public void init() {\n\t\tMenu menu = new Menu();\n\t\tmenu.register();\n\n\t\t// Application.getInstance().getGUILog().showMessage(\"Show a popup the proper\n\t\t// way !\");\n\n\t\t// final ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\n\t\t// final MDAction action = new ExampleAction();\n\t\t// Adding action to main menu\n\t\t// manager.addMainMenuConfigurator(new MainMenuConfigurator(action));\n\t\t// Adding action to main toolbar\n\t\t// manager.addMainToolbarConfigurator(new MainToolbarConfigurator(action));\n\n\t\t// pluginDir = getDescriptor().getPluginDirectory().getPath();\n\n\t\t// Creating submenu in the MagicDraw main menu\n\t\t// ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\t\t// manager.addMainMenuConfigurator(new\n\t\t// MainMenuConfigurator(getSubmenuActions()));\n\n\t\t/**\n\t\t * @Todo: load project options (@see myplugin.generator.options.ProjectOptions)\n\t\t * from ProjectOptions.xml and take ejb generator options\n\t\t */\n\n\t\t// for test purpose only:\n\t\t// GeneratorOptions ejbOptions = new GeneratorOptions(\"c:/temp\", \"ejbclass\",\n\t\t// \"templates\", \"{0}.java\", true, \"ejb\");\n\t\t// ProjectOptions.getProjectOptions().getGeneratorOptions().put(\"EJBGenerator\",\n\t\t// ejbOptions);\n\n\t\t// ejbOptions.setTemplateDir(pluginDir + File.separator +\n\t\t// ejbOptions.getTemplateDir()); //apsolutna putanja\n\t}", "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "private void initialize() {\r\n this.setJMenuBar(getMainMenuBar());\r\n this.setContentPane(getPaneContent());\r\n\r\n this.setSize(800, 600);\r\n this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\r\n this.addWindowListener(new java.awt.event.WindowAdapter() { \r\n\r\n \tpublic void windowClosing(java.awt.event.WindowEvent e) { \r\n\r\n \t\tgetMainMenuBar().getMenuFileControl().exit();\r\n \t}\r\n });\r\n\r\n this.setVisible(false);\r\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}", "@Override\n public void onStart() {\n GuiMain gui = new GuiMain(this);\n gui.setVisible(true);\n log(\"Script is starting!\");\n\n }", "private void init() {\n StateManager.setState(new MenuState());\n }", "public static void openMainMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new MainMenu(), true);\r\n\t}", "public void mainMenu() {\n Game.stage.setScene(mainMenuScene);\n Game.stage.show();\n }", "private static void initAndShowGUI() {\n }", "private void initUI() {\n }", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "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 void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }", "@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }", "public static void main(String[] args) {\n\n UIController.getInstance().setMain(new SelectionMenuUI());\n UIController.getInstance().startUI();\n\n }", "public mainUI() {\n initComponents();\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}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "void initUI();", "public void showMainMenu() {\r\n\t\tmenu.setThreadSuspended(false);\r\n\t\tmenu.setVisible(true);\r\n\t\tsetVisible(false);\r\n\t\tsetVisible(true);\r\n\t}", "public static void main(String[] args){\n\n main_menu();\n\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 MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "protected void initializeGUI() {\n\n\t}", "public void start(Stage primaryStage, MainMenuController mainMenuData)\n {\n\n mainMenuController = mainMenuData;\n\n donutTypeComboBox.getItems().addAll(\"Yeast Donut\", \"Cake Donut\", \"Donut Hole\");\n flavorComboBox.getItems().addAll(\"Glazed\", \"Chocolate\", \"Vanilla\");\n\n this.primaryStage = primaryStage;\n }", "public MainMenuPanel() {\n\t\tinitComponents();\n\t}", "public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 678, 450);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\t\t\n\t\tmnuAcciones = new JMenu(\"Acciones\");\n\t\tmenuBar.add(mnuAcciones);\n\t\t\n\t\tmnuABMCPersona = new JMenuItem(\"ABMC de Personas\");\n\t\tmnuABMCPersona.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(mnuABMCPersona);\n\t\t\n\t\tnuABMCTipoElemento = new JMenuItem(\"ABMC de Tipos de Elemento\");\n\t\tnuABMCTipoElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCTipoElementoClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCTipoElemento);\n\t\t\n\t\tnuABMCElemento = new JMenuItem(\"ABMC de Elementos\");\n\t\tnuABMCElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuABMCElementoClick();\n\t\t\t\t} catch (Exception 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\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCElemento);\n\t\t\n\t\tnuAReserva = new JMenuItem(\"Hacer una Reserva\");\n\t\tnuAReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuAReservaClick();\n\t\t\t\t} catch (Exception 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\t}\n\t\t});\n\t\tmnuAcciones.add(nuAReserva);\n\t\t\n\t\tnuCBReserva = new JMenuItem(\"Listado de Reservas\");\n\t\tnuCBReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuListadoPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuCBReserva);\n\t\t\n\t\tnuSalir = new JMenuItem(\"Salir\");\n\t\tnuSalir.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsalir();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuSalir);\n\t\tframe.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tdesktopPane = new JDesktopPane();\n\t\tframe.getContentPane().add(desktopPane, BorderLayout.CENTER);\n\t}", "public void startProgram() {\n this.displayBanner();\n// prompt the player to enter their name Retrieve the name of the player\n String playersName = this.getPlayersName();\n// create and save the player object\n User user = ProgramControl.createPlayer(playersName);\n// Display a personalized welcome message\n this.displayWelcomeMessage(user);\n// Display the Main menu.\n MainMenuView mainMenu = new MainMenuView();\n mainMenu.display();\n }", "public static void main(String[] args) {\n\t\tnew MainMenuGUI();\n\t}", "public MainGui() {\n initComponents();\n this.setVisible(true);\n configuracoesSalvas();\n }", "public static void updateMainMenu() {\n instance.updateMenu();\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "protected void initialize() {\n\t\tthis.initializeFileMenu();\n\t\tthis.initializeEditMenu();\n\t\tthis.initializeNavigationMenu();\n\t\tthis.initializeHelpMenu();\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "public void startApp() {\n\n\t\tboolean isContinue = true;\n\t\tint i = 0;\n\t\twhile (isContinue) {\n\t\t\ti = displayAppMenu();\n\t\t\texecuteMenuItem(i);\n\n\t\t\tif (i == APP_EXIT) {\n\t\t\t\tisContinue = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void initGUI(User user) {\n\t\ttry {\n\t\t\tthis.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\t\tthis.setTitle(\"Warehouse Application\");\n\t\t\tthis.setIconImage(new ImageIcon(getClass().getClassLoader().getResource(ApplicationConstants.WAREHOUSE_LOGO)).getImage());\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setFocusTraversalKeysEnabled(false);\n\t\t\tthis.setLocation(new java.awt.Point(100, 100));\n\t\t\t{\n\t\t\t\tChangeScreen.setBlankScreen(user);\n\t\t\t}\n\t\t\t{\n\t\t\t\tmnuMain = new WarehouseMenuBar(user, this);\n\t\t\t\tsetJMenuBar(mnuMain);\n\t\t\t}\n\t\t\tpack();\n\t\t\tthis.setSize(809, 577);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void start() {\n SetupGUI setup = new SetupGUI();\n }", "private void setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}", "public Main() {\n\t\tsuper();\n\t\tInitScreen screen = new InitScreen();\n\t\tpushScreen(screen);\n\t\tUiApplication.getUiApplication().repaint();\n\t}", "private void initMenubar() {\r\n\t\tsetJMenuBar(new MenuBar(controller));\r\n\t}", "public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}", "public SysRunGUI() {\n initComponents();\n this.run();\n }", "@FXML\n private void initialize() {\n \tassert getMainMenu() != null : \"fx:id=\\\"mainMenu\\\" was not injected: check your FXML file 'RootLayout.fxml'.\";\n \tmessages = Messages.getMessages();\n \tMenu settingsMenu = new Menu(messages.getString(\"menu_settings\"));\n \tMenu menuLanguage = new Menu(messages.getString(\"menu_language\"));\n \t\n \tfinal ToggleGroup groupLanguage = new ToggleGroup();\n \tfinal Entry<String, Locale>[] languages = new Entry [] {\n \t\t\tnew SimpleEntry<String, Locale>(\"English\", Messages.enLocale),\n \t\t\tnew SimpleEntry<String, Locale>(\"Slovak\", Messages.skLocale)\n \t};\n \tfor (Entry<String, Locale> language : languages) {\n \t RadioMenuItem itemEffect = new RadioMenuItem(language.getKey());\n \t itemEffect.setSelected((language.getValue()).equals(messages.getLocale()));\n \t itemEffect.setOnAction(handleLanguage(language.getValue()));\n \t itemEffect.setToggleGroup(groupLanguage);\n \t menuLanguage.getItems().add(itemEffect);\n \t}\n \t\n \tsettingsMenu.getItems().add(menuLanguage);\n \tsettingsMenu.getItems().add(new SeparatorMenuItem());\n \t\n \tMenuItem aboutItem = new MenuItem(messages.getString(\"menu_about\"));\n \taboutItem.setOnAction(handleAbout());\n\n \tsettingsMenu.getItems().add(aboutItem);\n \tgetMainMenu().getMenus().add(settingsMenu);\n \n }", "public void start () {\n int choice = NO_CHOICE;\n while (choice != EXIT) {\n displayMainMenu();\n choice = readIntWithPrompt(\"Enter choice: \");\n executeChoice(choice);\n }\n }", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}", "public MainFrame() {\n initComponents();\n\n mAlmondUI.addWindowWatcher(this);\n mAlmondUI.initoptions();\n\n initActions();\n init();\n\n if (IS_MAC) {\n initMac();\n }\n\n initMenus();\n mActionManager.setEnabledDocumentActions(false);\n }", "public static void main(String[] args) {\n mainMenu();\n }", "@Override\n public void initGui()\n {\n super.initGui();\n }", "private void setup() {\n this.primaryStage.setTitle(Constants.APP_NAME);\n\n this.root = new VBox();\n root.setAlignment(Pos.TOP_CENTER);\n root.getChildren().addAll(getMenuBar());\n\n Scene scene = new Scene(root);\n this.primaryStage.setScene(scene);\n\n // set the default game level.\n setGameLevel(GameLevel.BEGINNER);\n\n // fix the size of the game window.\n this.primaryStage.setResizable(false);\n this.primaryStage.show();\n }", "private void init()\n {\n btnUser.setOnAction(buttonHandler);\n btnHome.setOnAction(event -> changeScene(\"store/fxml/home/home.fxml\"));\n btnCategories.setOnAction(event -> changeScene(\"store/fxml/category/categories.fxml\"));\n btnTopApps.setOnAction(buttonHandler);\n btnPurchased.setOnAction(buttonHandler);\n btnMenu.setOnAction(buttonHandler);\n btnSearch.setOnAction(buttonHandler);\n btnFeatured.setOnAction(buttonHandler);\n\n itmLogout = new MenuItem(\"Logout\");\n itmAddApp = new MenuItem(\"Add app\");\n itmUsers = new MenuItem(\"Manage users\");\n itmCategories = new MenuItem(\"Manage categories\");\n\n itmAddApp.setOnAction(itemHandler);\n itmLogout.setOnAction(itemHandler);\n itmUsers.setOnAction(itemHandler);\n itmCategories.setOnAction(itemHandler);\n\n if (user.getId() != null)\n {\n btnMenu.setVisible(true);\n if (user.getAdmin())\n btnMenu.getItems().addAll(itmAddApp, itmCategories, itmUsers, itmLogout);\n else\n btnMenu.getItems().add(itmLogout);\n\n ImageView imageView = new ImageView(user.getPicture());\n imageView.setFitHeight(25);\n imageView.setFitWidth(25);\n\n btnUser.setText(user.getUsername());\n }\n else\n btnMenu.setVisible(false);\n }", "public abstract void initUiAndListener();", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // Repartos\n// initializeMainMenu();\n connectMainMenuClickActions();\n \n initFirstMenu();\n }", "public static void main(String[] args) {\n Graphics.graphicsMainMenu();\r\n //Print main menu\r\n Menu.mainMenu();\r\n }", "private void initialize() {\n\t\tthis.setResizable(true);\n\t\tthis.setJMenuBar(getMbMain());\n\t\tthis.setSize(547, 453);\n\t\tthis.setContentPane(getCpMainFrame());\n\t\tthis.getGlassPane().setVisible(true);\n\t\tthis.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\tthis.setTitle(\"Mernis KPS �rnek Uygulamasi\");\n\t\tthis.addWindowListener(new java.awt.event.WindowAdapter() { \n\t\t\tpublic void windowClosing(java.awt.event.WindowEvent e) { \n\t\t\t\tclose(true);\n\t\t\t}\n\t\t});\n\t}", "public DropMainMenu() {\n initComponents();\n }", "public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "public MenuAdminGUI() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setVisible(true);\n }", "public MainUI() {\r\n initComponents();\r\n this.setLocationRelativeTo(null);\r\n /**/\r\n }", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "private void initGUI() {\n\t\tContainer cp = getContentPane();\n\t\tcp.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel top = new JPanel(new GridLayout(0, 1));\n\t\tcp.add(top, BorderLayout.PAGE_START);\n\t\t\n\t\ttop.add(createMenuBar());\n\n\t\tJTabbedPane tabs = new JTabbedPane();\n\t\ttabs.add(\"Encryptor\", encryptorPanel);\n\t\ttabs.add(\"Decryptor\", decryptorPanel);\n\t\ttabs.setSelectedComponent(encryptorPanel);\n\t\t\n\t\tcp.add(tabs);\n\t}", "public void start(){\n JmeFormatter formatter = new JmeFormatter();\n\n Handler consoleHandler = new ConsoleHandler();\n consoleHandler.setFormatter(formatter);\n\n Logger.getLogger(\"\").removeHandler(Logger.getLogger(\"\").getHandlers()[0]);\n Logger.getLogger(\"\").addHandler(consoleHandler);\n \n createCanvas(appClass);\n \n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n \n SwingUtilities.invokeLater(new Runnable(){\n public void run(){\n JPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\n createFrame();\n \n //currentPanel.add(canvas, BorderLayout.CENTER);\n mMainFrame.pack();\n startApp();\n mMainFrame.setLocationRelativeTo(null);\n mMainFrame.setVisible(true);\n }\n });\n \n \n }", "private void initializeMenuBar() {\n\t\tthis.hydraMenu = new HydraMenu(this.commands);\n\t\tthis.setJMenuBar(this.hydraMenu);\n\t}", "private void startMenuBar() no topo\n {\n //Inicializa a barra de menus\n JMenuBar menuBar = new JMenuBar();\n JMenu menuFile = new JMenu(\"File\");\n JMenu menuProgram = new JMenu(\"Program\");\n JMenuItem fileOpen = new JMenuItem(\"Open\");\n fileOpen.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n setFileName();\n }\n });\n menuFile.add(fileOpen);\n \n JMenuItem programClose = new JMenuItem(\"Close\");\n programClose.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n System.exit(0);\n }\n });\n menuProgram.add(programClose);\n \n menuBar.add(menuFile);\n menuBar.add(menuProgram);\n mainFrame.add(menuBar, BorderLayout.PAGE_START);\n }", "public void start() {\n\n\t\t// There will be no established screen at startup.\n\t\tif (screen != null)\n\t\t\tthrow new RuntimeException(\"Multiple instances of the game cannot be run.\");\n\n\t\t// Fire up the main menu screen.\n\t\tsetCurrentScreen(new MainMenuScreen());\n\t}", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }", "protected void initContextMenusOnce() {\n\t\tsynchronized(this) {\n \t\tif(runOnce != null) {\n \t\t\tSwingUtilities.invokeLater(runOnce);\n \t\t\trunOnce = null;\n \t\t}\n\t\t}\n\t\t\n\t}", "public static void activateMenu() {\n instance.getMenu().show();\n }", "public FrmMain()\n {\n //Displays the menu bar on the top of the screen (mac style)\n System.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n // Build the GUI\n initComponents();\n // Load the texts\n initTextsI18n();\n }", "private MenuManager() {\r\n\r\n\t\t\tmenubar = new Menu(shell, SWT.BAR);\r\n\t\t\tshell.setMenuBar(menubar);\r\n\t\t}", "public void init()\n\t{\n\t\ttry\n\t\t{\n\t\t\tjavax.swing.SwingUtilities.invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tcreateGUI();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"createGUI didn't successfully complete: \"\n\t\t\t\t\t+ e.toString());\n\t\t}\n\t}", "public static void main(String[] args)\r\n {\n\t\t System.out.println(\"************* Welocome To My Application ************* \");\r\n\t\t MainMenu();\r\n }", "public void start() {\r\n\t\tif (FormsContext.isFormsServicesApp()) {\r\n\t\t\tinitialOpenLWWindows = new LWWindowOperator().getWindowTitles();\r\n\t\t} else {\r\n\r\n\t\t}\r\n\t}", "public BBDJPAAdminGUI() {\n initComponents();\n\n myInit();\n }", "public void init(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tbuildWindow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"createGUI didn't complete successfully\");\r\n\t\t}\r\n\t}", "private void registerMainMenu() {\n\t\ttry {\n//\t\t\tif (FMLCommonHandler.instance().getSide().isClient())\n//\t\t\t\tnet.aetherteam.mainmenu_api.MainMenuAPI.registerMenu(\"TurretMod3Menu\", sanandreasp.mods.TurretMod3.client.gui.mainMenu.MainMenuTM3.class);\n\t\t} catch (Exception e) {\n\t\t\tFMLLog.log(TM3ModRegistry.modID, Level.INFO, \"kingbdogz' Main Menu API not found. Skipping Main Menu registration!\");\n\t\t} catch (NoClassDefFoundError error) {\n\t\t\tFMLLog.log(TM3ModRegistry.modID, Level.INFO, \"kingbdogz' Main Menu API not found. Skipping Main Menu registration!\");\n\t\t}\n\t}", "public ScreenMainMenu() {\n\t\tsuper(AdapterInputMainMenu.class);\n\t\tobj.add(new MainMenuInteractObjTest<>(gRef,200,200,new Rectangle(0,0,32,32)));\n\t\tChartset.detect(\"resources\\\\Charts\");\n\t}", "public static void main( String args[] ) {\n java.awt.EventQueue.invokeLater( new Runnable() {\n\n public void run() {\n new Menus().setVisible( true );\n }\n } );\n }", "@FXML\n private void switchToMainMenu() throws IOException {\n // TODO = possibly set other menu switchers\n pause();\n mainMenuSwitcher.switchMenu();\n }", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "public void startup() {\n neutral();\n }", "private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}", "public void run() {\n ui.showWelcomeMessage();\n runUntilExit();\n }", "public MainGUI() {\n\t\tString xmlpath = \"classpath:applicationContext.xml\";\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlpath);\n\t\t\n\t\tcenter = (CenterController)applicationContext.getBean(\"CenterController\");\n\t\t\n\t\tinitialize();\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}", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "private void initializateGUI() {\n\t\t\n\t\t\n\t\tthis.menuBar = buildMenuBar();\n\t\t\n\t\tthis.toolBar = buildToolBar();\n\t\t\n\t\tthis.container = (JComponent) ContainerViewFactory.getInstance().getContainerView(null);\n\t\t\n\t\tthis.status = buildStatusBar();\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.getViewport().add(this.container);\n\t\t\n\t\ttextResources.getString(\"application.title\").ifPresent(super::setTitle);\n\n\t\tif (this.menuBar != null) {\n\t\t\tsuper.setJMenuBar(this.menuBar);\n\t\t}\n\t\tsuper.setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.setMinimumSize(MINIMUM_SIZE);\n\t\tsuper.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\n\t\tsuper.getRootPane().setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.getRootPane().setMinimumSize(MINIMUM_SIZE);\t\t\n\t\tsuper.getRootPane().setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\t\t\n\t\tsuper.setLayout(new BorderLayout());\n\t\t\n\t\tsuper.add(toolBar, BorderLayout.NORTH);\n\t\tsuper.add(scrollPane, BorderLayout.CENTER);\n\t\tsuper.add(status, BorderLayout.SOUTH);\n\t\t\n\t\tsuper.addWindowListener(new WindowAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializationDialog = buildInitializationAction();\n\t\t\t\tinitializationDialog.setVisible(true);\n\t\t\t\tinitializationDialog.toFront();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tconfirmExitAction();\n\t\t\t}\n\t\t});\n\t\tthis.handlerInitializateGUI();\n\t}", "private void initializeMenuBar()\r\n\t{\r\n\t\tJMenuBar menuBar = new SmsMenuBar(this);\r\n\t\tsetJMenuBar(menuBar);\r\n\t}" ]
[ "0.75782454", "0.7210457", "0.7189909", "0.7174388", "0.7133439", "0.708789", "0.70800024", "0.70742977", "0.7071622", "0.70691985", "0.70634896", "0.7058481", "0.7058307", "0.7043568", "0.70315456", "0.6973392", "0.6924273", "0.69179034", "0.69100636", "0.688635", "0.68708926", "0.6866969", "0.6865167", "0.6841913", "0.6840744", "0.6837868", "0.67901564", "0.6778507", "0.67778134", "0.67627007", "0.6761625", "0.6761625", "0.6761625", "0.67572767", "0.6757214", "0.67539793", "0.6750955", "0.6742944", "0.6726181", "0.6722876", "0.6716626", "0.67112976", "0.66962105", "0.6695556", "0.6693657", "0.6691233", "0.6691232", "0.66895145", "0.668637", "0.6677184", "0.66661483", "0.6641049", "0.6621673", "0.6619027", "0.6612069", "0.6608557", "0.66078484", "0.66076624", "0.6598436", "0.6593804", "0.6588556", "0.65882283", "0.6581403", "0.6577151", "0.657687", "0.6549385", "0.65479034", "0.6547874", "0.6544711", "0.6536207", "0.653172", "0.65300936", "0.6525462", "0.65190154", "0.6518498", "0.65088344", "0.6505242", "0.65051806", "0.65039706", "0.64973944", "0.6495738", "0.6494403", "0.64903426", "0.6481774", "0.6479", "0.6476666", "0.64761865", "0.6474682", "0.6474666", "0.646724", "0.6466276", "0.64645743", "0.64635617", "0.6456751", "0.64554703", "0.64547646", "0.64529586", "0.6452523", "0.6450929", "0.6450348", "0.64496213" ]
0.0
-1
Inserts a new row in the sgfens_pedido_producto table.
public SgfensPedidoProductoPk insert(SgfensPedidoProducto dto) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(ProdutoPedido produtoPedido) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(produtoPedido);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t\temf.close();\n\t}", "public void insertNewProduto(ProdutoTO produto){\n\t\ttry {\n\t\t\tmodelProduto.insertNewProduto(produto);\n\t\t\tsuper.updateViewPrincipal(viewPrincipal);\n\t\t} catch (ProdutoException e) {\n\t\t\te.printStackTrace();\n\t\t\tgetControllerError().initialize(e);\n\t\t}\n\t}", "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void insert() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n if (check == -1){\n stmtIn.executeUpdate(\"INSERT INTO ngaccount.goods (goods_id , product_type_id, post_id) \" +\n \"VALUES ('\" + this.goodID + \"', '\" + this.productRelation.getID() +\n \"', '\" + this.post.getID() + \"');\");\n }\n }", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void crearProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"INSERT \\n\");\r\n\t\tsql.append(\"INTO fidelizacion.producto_sucursal \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" sucursal_id , \\n\");\r\n\t\tsql.append(\" producto_id , \\n\");\r\n\t\tsql.append(\" stock , \\n\");\r\n\t\tsql.append(\" usuario_modificacion, \\n\");\r\n\t\tsql.append(\" fecha_creacion , \\n\");\r\n\t\tsql.append(\" fecha_modificacion , \\n\");\r\n\t\tsql.append(\" estado , \\n\");\r\n\t\tsql.append(\" usuario_creacion \\n\");\r\n\t\tsql.append(\" ) \\n\");\r\n\t\tsql.append(\" VALUES \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" 0 , \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" SYSDATE, \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" 1 , \\n\");\r\n\t\tsql.append(\" ? \\n\");\r\n\t\tsql.append(\" )\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,bSucursal.getCodigo());\r\n\t\tpstm.setInt(2,bProducto.getCodigo());\r\n\t\tpstm.setInt(3,usuario.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}", "@Transactional\r\n\r\n\t@Override\r\n\tpublic void insertar(Distrito distrito) {\n\t\tem.persist(distrito);\t\r\n\t}", "public void agregar(Producto producto) throws BusinessErrorHelper;", "public static void insert(int codigo, String descripcion, double precioCompra, double precioVenta, int stock) {\n String sql = \"INSERT INTO articulo(Codigo, Nombre, PrecioC, PrecioV, Stock) \"\n + \"VALUES(\"\n +codigo\n +\",'\"+descripcion+\n \"',\"+precioCompra+\n \",\"+precioVenta+\n \",\"+stock+\")\";\n try(Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.executeUpdate();\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se ha podido insertar el articulo \"+codigo + \" en la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n }", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "public static Producto insertProducto(int codProd,String nomb_modelo,Cliente cliente){\n Producto prod = new Producto(codProd,nomb_modelo,cliente);\n try {\n prod.registrarProducto();\n } catch (SQLException ex) {\n // En caso de haber una excepcion se imprime el mensaje\n System.err.println(ex.getMessage());\n }\n return prod;\n }", "public void salvaProduto(Produto produto){\n conecta = new Conecta();\n conecta.iniciaConexao();\n\n String sql = \"INSERT INTO `JoalheriaJoia`.`Produto` (`codigo`, `nome`, `valorCusto`, `valorVenda`, `idTipoJoia` , `quantidadeEstoque`) VALUES (?, ?, ?, ?, ?, ?);\";\n\n try {\n PreparedStatement pstm;\n pstm = conecta.getConexao().prepareStatement(sql); \n \n pstm.setString(1, produto.getCodigo());\n pstm.setString(2, produto.getNome());\n pstm.setFloat(3, produto.getValorCusto());\n pstm.setFloat(4, produto.getValorVenda());\n pstm.setInt(5, produto.getTipoJoia().getIdTipoJoia());\n pstm.setInt(6, produto.getQuantidadeEstoque());\n pstm.execute();\n } catch (SQLException ex) {\n Logger.getLogger(ProdutoDao.class.getName()).log(Level.SEVERE, null, ex);\n }\n conecta.fechaConexao(); \n \n }", "@Override\n\tpublic void inserir(CLIENTE cliente) {\n\t\t\n\t\tString sql = \"INSERT INTO CLIENTE (NOME_CLIENTE) VALUES (?)\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, cliente.getNomeCliente());\n\t\t\t\n\t\t\tps.execute();\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void doSave(VideogameBean prod) throws SQLException {\n\n\t\tDatabaseConnector connector = new DatabaseConnector();\n\t\tconnector.startConnection();\n\t\tPreparedStatement state = null;\n\t\tstate = connector.getJdbcConnection()\n\t\t\t\t.prepareStatement(\"insert into Videogioco values (?, ?, ?, ?, ?, ?, ?, ?)\");\n\n\t\tstate.setInt(1, prod.getVideogameCode());\n\t\tstate.setString(2, prod.getTitle());\n\t\tstate.setString(3, prod.getDescription());\n\t\tstate.setString(4, prod.getConsole());\n\t\tstate.setDouble(5, prod.getPrice());\n\t\tstate.setInt(6, prod.getAvailability());\n\t\tstate.setInt(7, prod.getShipment());\n\t\tstate.setString(8, prod.getImgPath());\n\t\tstate.executeUpdate();\n\t\tconnector.closeConnection();\n\n\t}", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "public boolean añadirproducto(ProductoDTO c) {/* */\r\n try {\r\n\r\n try {\r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_INSERT);\r\n ps.setInt(1, c.getId());\r\n ps.setString(2, c.getDescripcion());\r\n ps.setString(3, c.getFechaproducto());\r\n ps.setInt(4, c.getStock());\r\n ps.setInt(5, c.getPrecio());\r\n ps.setString(6, c.getNombre());\r\n ps.setString(7, c.getFechacaducidad());\r\n ps.setString(8, c.getFechaelaboracion());\r\n ps.setString(9, c.getNombrecategoria());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Producto registrado correctamente\");\r\n return true;\r\n }\r\n } catch (MysqlDataTruncation ef) {\r\n JOptionPane.showMessageDialog(null, \"Formato de fecha debe ser MM/DD/AAAA\");\r\n }\r\n\r\n } catch (MySQLIntegrityConstraintViolationException e) {\r\n JOptionPane.showMessageDialog(null, \"codigo ya existe\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"no se ha podido registrar\");\r\n return false;\r\n\r\n }", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "@Override\r\n public ProductosPuntoVentaPk insert(ProductosPuntoVenta dto)\r\n throws ProductosPuntoVentaDaoException {\r\n long t1 = System.currentTimeMillis();\r\n PreparedStatement stmt = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n stmt = userConn.prepareStatement(SQL_INSERT);\r\n int index = 1;\r\n stmt.setInt(index++, dto.getIdPuntoVenta());\r\n stmt.setInt(index++, dto.getIdProducto());\r\n stmt.setInt(index++, dto.getCantidad());\r\n System.out.println(\"Executing \" + SQL_INSERT + \" with DTO: \" + dto);\r\n int rows = stmt.executeUpdate();\r\n long t2 = System.currentTimeMillis();\r\n System.out.println(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\r\n reset(dto);\r\n return dto.createPk();\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(stmt);\r\n }\r\n }", "void insert(Disproduct record);", "public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "@Override\r\n\tpublic void inserir(Evento evento) {\n\t\trepository.save(evento);\r\n\t}", "public void insereCliente(Cliente cliente){\n cliente.setClieCadDt(new Date());\r\n \r\n //nova conexão\r\n Connection connection = new ConnectionFactory().getConnection();\r\n \r\n //consulta\r\n String query = \"INSERT INTO cliente\"\r\n + \"(clie_debito,\"\r\n + \"clie_debito_ant,\"\r\n + \"clie_cpf,\"\r\n + \"clie_rg,\"\r\n + \"clie_cnh,\"\r\n + \"clie_nasc_dt,\"\r\n + \"clie_cad_dt,\"\r\n + \"clie_nm,\"\r\n + \"clie_end_ds,\"\r\n + \"clie_cid_ds,\"\r\n + \"clie_uf,\"\r\n + \"clie_telefone_ds,\"\r\n + \"clie_telefone_ddd,\"\r\n + \"clie_telefone_ddi)\"\r\n \r\n + \"VALUES(\"\r\n + \"?,\" //clie_debito\r\n + \"?,\" //clie_debito_ant\r\n + \"?,\" //clie_cpf\r\n + \"?,\" //clie_rg\r\n + \"?,\" //clie_cnh\r\n + \"?,\" //clie_nasc_dt\r\n + \"?,\" //clie_cad_dt\r\n + \"?,\" //clie_nm\r\n + \"?,\" //clie_end_ds\r\n + \"?,\" //clie_cid_ds\r\n + \"?,\" //clie_uf\r\n + \"?,\" //clie_telefone_ds\r\n + \"?,\" //clie_telefone_ddd\r\n + \"?)\";//clie_telefone_ddi\r\n \r\n try{\r\n PreparedStatement stmt = connection.prepareStatement(query);\r\n //débito atual do cliente\r\n stmt.setFloat(1, cliente.getClieDebito());\r\n //débito anterior do cliente\r\n stmt.setFloat(2, cliente.getClieDebitoAnt());\r\n //CPF\r\n stmt.setString(3, cliente.getClieCPF());\r\n //RG\r\n stmt.setString(4, cliente.getClieRG());\r\n //CNH\r\n stmt.setString(5, cliente.getClieCNH());\r\n \r\n //Data de nascimento\r\n stmt.setString(6, this.converteDataSimples(cliente.getClieNascDt()));\r\n //Data de cadastro no sistema\r\n stmt.setString(7, this.converteDataSimples(cliente.getClieCadDt()));\r\n \r\n //Nome do cliente\r\n stmt.setString(8, cliente.getClieNm());\r\n \r\n //Endereço do cliente(logradouro e número)\r\n stmt.setString(9, cliente.getClieEndDs());\r\n //Cidade do cliente\r\n stmt.setString(10, cliente.getClieCidDs());\r\n //UF do cliente\r\n stmt.setString(11, cliente.getClieUf());\r\n //Telefone do cliente\r\n stmt.setString(12, cliente.getClieTelefoneDs());\r\n //DDD do telefone\r\n stmt.setString(13, cliente.getClieTelefoneDDD());\r\n //DDI\r\n stmt.setString(14, cliente.getClieTelefoneDDI());\r\n \r\n stmt.execute(); //executa transação\r\n stmt.close(); //fecha conexção com o banco de dados\r\n \r\n }catch(SQLException u){\r\n throw new RuntimeException(u);\r\n }\r\n }", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "@Override //inserisce un viaggio nel db // \r\n\tpublic boolean create(Viaggio viaggio) {\r\n\t\tboolean esito=false;\r\n\t\tif(viaggio==null) {\r\n\t\t\tSystem.out.println( \"insert(): failed to insert a null entry\");\r\n\t\t\t}\r\n\t\ttry {\r\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(MssqlViaggioDAO.insert);\r\n\t\t\tprep_stmt.clearParameters();\r\n\t\t\t//prep_stmt.setInt(1,viaggio.getIdViaggio());\r\n\t\t\tint i=1;\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getCreatore().getId());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getTitolo());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getDestinazione());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getDescrizione());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getLingua());\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getBudget());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getLuogopartenza());\r\n\t\t\tprep_stmt.setInt(i++,viaggio.getStato().ordinal());\r\n\t\t\tprep_stmt.setDate(i++,viaggio.getDatainizio());\r\n\t\t\tprep_stmt.setDate(i++,viaggio.getDatafine());\r\n\t\t\tprep_stmt.setString(i++,viaggio.getImmaginiProfilo());\t\t\r\n\t\t\tif(prep_stmt.executeUpdate()>0) esito= true;\r\n\t\t\telse esito= false;\r\n\t\t\tprep_stmt.close();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"create(): failed to insert entry: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t\treturn esito;\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\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void inserir(Venda venda)\r\n throws Exception {\r\n venda.setId(totalVenda++);\r\n listaVenda.add(venda);\r\n }", "@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void insertarRubro2(RubrosObject rubro) throws SQLException \r\n { \r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"INSERT INTO RUBROS (IDRUBRO, NOMBRE, MONTO, IDPRESUPUESTO,SALDO,TIPO_PAGO) VALUES (?,?,?,?,?,?)\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setInt(1, Integer.parseInt(rubro.getIdentificador()));\r\n prepStmt.setString(2, rubro.getNombre());\r\n prepStmt.setDouble(3, Double.parseDouble(rubro.getMonto()));\r\n prepStmt.setInt(4, Integer.parseInt(rubro.getIdpresupuesto()));\r\n prepStmt.setDouble(5, Double.parseDouble(rubro.getMonto()));//EL SALDO SE INICIA IGUAL AL MONTO\r\n prepStmt.setString(6, rubro.getTipo_pago().trim());\r\n \r\n prepStmt.executeUpdate();\r\n \r\n \r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n\r\n }", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "@Override\n\tpublic void salvar(ProdutoPedido produtoPedido) {\n\t\tdao.save(produtoPedido);\n\t}", "@Override\n\tpublic void entradaestoque(EntidadeDominio entidade) throws SQLException {\n\t\topenConnection();\n\t\tPreparedStatement pst=null;\n\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\n\t\ttry {\n\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\n\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\tsql.append(\"INSERT INTO estoque (id_livro, quantidade,id_precificacao, custo) VALUES (?,?,?,?)\");\n\t\t\t\t\t\n\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\tpst.setInt(1, livro.getId());\n\t\t\tpst.setInt(2, livro.getEstoque().getQuantidade());\n\t\t\tpst.setInt(3, livro.getPrecificacao().getTipo());\n\t\t\tpst.setDouble(4, livro.getEstoque().getCusto());\n\t\t\tpst.executeUpdate();\t\t\t\n\t\t\tconnection.commit();\t\t\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpst.close();\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public static Posee insertPosee(Date fecha_inicio,ServicioAdicional serv_adicional,\n Producto producto){\n Posee miPosee = new Posee(fecha_inicio,serv_adicional,producto);\n miPosee.registrarPosee();\n \n return miPosee;\n }", "public void guardarProveedor(Proveedor v){\n pr.save(v);\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public void insertar(int rafaga, int tiempo) {\n\t\tif (rafaga <= 0 || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.id = String.valueOf((char) this.caracter);\n\t\tthis.caracter++;\n\t\tnuevo.rafaga = rafaga;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.ColaProviene = this.NombreCola;\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public static int insert(OrderItems o) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orderItem (orderNumber, productCode, quantity) \"\n + \"VALUES (?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, o.getOrderNumber());\n ps.setString(2, o.getProduct().getProductCode());\n ps.setInt(3, o.getQuantity());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public boolean inserirProposta(Proposta novaProposta) {\n\n conectarnoBanco();\n\n String sql = \"INSERT INTO proposta (propostaRealizada,valorProposta,id_usuario,id_projeto,id_client) values (?,?,?,?,?)\";\n\n try {\n pst = con.prepareStatement(sql);\n \n pst.setString(1, novaProposta.getPropostaRealizada());\n String prop = Float.toString(novaProposta.getValorProposta());\n pst.setString(2, prop);\n String usuario = Integer.toString(novaProposta.getIdUsuario());\n pst.setString(3, usuario);\n String proj = Integer.toString(novaProposta.getIdProjeto());\n pst.setString(4, proj);\n String cliente = Integer.toString(novaProposta.getIdCliente());\n pst.setString(5, cliente);\n pst.execute();\n\n sucesso = true;\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao inserir proposta = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return sucesso;\n }", "@Override\n\tpublic void insert(Seller obj) {\n\t\tPreparedStatement st = null;\n\t\ttry {\n\t\t\tst = conn.prepareStatement(\n\t\t\t\t\t\"INSERT INTO seller\\r\\n\" +\n\t\t\t\t\t\"(Name, Email, BirthDate,BaseSalary,DepartmentId)\\r\\n\" +\n\t\t\t\t\t\"VALUES\\r\\n\"+ \n\t\t\t\t\t\"(?,?,?,?,?);\", Statement.RETURN_GENERATED_KEYS);\n\t\t\tst.setString(1, obj.getName());\n\t\t\tst.setString(2, obj.getEmail());\n\t\t\tst.setDate(3, new java.sql.Date(obj.getBirthDate().getTime()));\n\t\t\tst.setDouble(4, obj.getBaseSalary());\n\t\t\tst.setInt(5, obj.getDepartment().getId());\n\t\t\tint rowsAffected = st.executeUpdate();\n\t\t\tif(rowsAffected > 0) {\n\t\t\t\tResultSet rst = st.getGeneratedKeys();\n\t\t\t\tif(rst.next()) obj.setId(rst.getInt(1));\n\t\t\t\trst.close();\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tthrow new DbException(e.getMessage());\n\t\t}finally {\n\t\t\tDb.closeStatement(st);\n\t\t}\n\t}", "public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "public void insert(Curso curso) throws SQLException {\n String query = \"\";\n Conexion db = new Conexion();\n\n query = \"INSERT INTO curso VALUES (NULL,?,?,?);\";\n \n PreparedStatement ps = db.conectar().prepareStatement(query);\n //Aquí se asignaran a los interrogantes(?) anteriores el valor oportuno en el orden adecuado\n ps.setString(1, curso.getNombre()); \n ps.setInt(2, curso.getFamilia());\n ps.setString(3, curso.getProfesor());\n \n\n if (ps.executeUpdate() > 0) {\n System.out.println(\"El registro se insertó exitosamente.\");\n } else {\n System.out.println(\"No se pudo insertar el registro.\");\n }\n\n ps.close();\n db.conexion.close();\n }", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "int insert(ItoProduct record);", "void insert(CTipoComprobante record) throws SQLException;", "public void guardarDietaComida(DietaComida dietaComida){\r\n try {\r\n \r\n String sql = \"INSERT INTO dietacomida (idDieta,idComida) VALUES ( ? , ? );\";\r\n \r\n PreparedStatement ps = con.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\r\n ps.setInt(1, dietaComida.getIdDieta());\r\n ps.setInt(2, dietaComida.getIdComida());\r\n \r\n ps.executeQuery();\r\n \r\n ResultSet rs = ps.getGeneratedKeys();\r\n\r\n /* if (rs.next()) {\r\n dietaComida.setId(rs.getInt(1));\r\n } else {\r\n System.out.println(\"No se pudo obtener el id luego de insertar una DietaComida\");\r\n }*/\r\n ps.close();\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"Error al insertar una DietaComida \" + ex.getMessage());\r\n }\r\n }", "public void insert(Groupe g) throws SQLException {\n\t\t\t//chercher combien y'a de lignes dans la table Groupe pour construire l'id \n\t\t\tString req =\"Select count(*) from Groupe\";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\t// incrementer l'id du groupe \n\t\t\tint id =rs.getInt(1) + 1;\t\n\t\t\t\n\t\t\t\n\t\t\tString req1 = \"INSERT INTO Groupe VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps1 = DBConfig.getInstance().getConn().prepareStatement(req1);\n\t\t\tps1.setInt(1,id);\n\t\t\tps1.setString(2,g.getNomGroupe());\n\t\t\tps1.setString(3,g.getModerateurGroupe().getNomComptePers());\n\t\t\tps1.executeUpdate();\n\t\t}", "public void insertIntoDado(String query, Double porcentagem, Integer fkHardware, Integer fkComputador) throws IOException {\n erro = false;\n try {\n con.update(query, porcentagem, fkHardware, fkComputador);\n } catch (CannotGetJdbcConnectionException ex) {\n logger.gravarDadosLog(\"ERRO\",\"INSERT\" , \"Não foi possivel inserir dados no banco de dados na Azure\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n \n String hardware = \"\";\n switch (fkHardware) {\n case 1:\n hardware = \"CPU\";\n break;\n case 2:\n hardware = \"RAM\";\n break;\n case 3:\n hardware = \"GPU\";\n break;\n case 4:\n hardware = \"Disco 1\";\n break;\n case 5:\n hardware = \"Disco 2\";\n break;\n case 6:\n hardware = \"Disco 3\";\n break;\n }\n \n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"INSERT\" , \"O dado coletado de \" + hardware + \"(\" + porcentagem + \"%) foi registrado com sucesso.\");\n } \n erro = false;\n }", "public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "@Override\n\tpublic void insertProduct(ProductVO dto) {\n\n\t}", "public Producto guardar(Producto producto) throws IWDaoException;", "@Override\n public int insertar(ClienteBean cliente) {\n clienteDAO = new ClienteDAOImpl();\n return clienteDAO.insertar (cliente);\n }", "@Override\n\tpublic void insert(Product product) {\n\t\tTransaction txTransaction = session.beginTransaction();\n\t\tsession.save(product);\n\t\ttxTransaction.commit();\n\t\tSystem.out.println(\"Product Inserted\");\n\t\t\n\t\t\n\t}", "public OrdemDeServico inserir (OrdemDeServico servico) {\n\t\tservico.setId((Long) null);\n\t\treturn repoOrdem.save(servico);\n\t}", "@Override\n\tpublic int insert(ProductDTO dto) {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "public void addRow(Spedizione spedizione){\n spedizioni.add(spedizione);\n fireTableChanged(new TableModelEvent(this));\n }", "@FXML\n\t private void insertProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.insertProd(denumireText.getText(),producatorText.getText(),pretText.getText(),marimeText.getText(),culoareText.getText());\n\t resultArea.setText(\"Product inserted! \\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while inserting product \" + e);\n\t throw e;\n\t }\n\t }", "public void insert(Product product) {\n this.products.add(product);\n }", "public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "@Override\r\n public void inserirQuestaoDiscursiva(QuestaoDiscursiva questaoDiscursiva)\r\n throws Exception {\n rnQuestaoDiscursiva.inserir(questaoDiscursiva);\r\n\r\n }", "public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }", "public boolean insertarOrdenador(Ordenador o) {\n\t\tboolean resultado = false;\n\t\ttry {\n\t\t\tSimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\n\t\t\tXPathQueryService consulta = (XPathQueryService) col.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tconsulta.query(\"update insert \"\n\t\t\t\t\t+ \"<ordenador codigo='\"+o.getCodigo()+\"' fecha='\"+\n\t\t\t\t\t formato.format(o.getFecha())+\"'>\"\n\t\t\t\t\t + \"<piezas/>\" +\n\t\t\t\t\t \"<precio>0</precio>\" \n\t\t\t\t\t+\"</ordenador>\"\n\t\t\t\t\t+ \"into /ordenadores\");\n\t\t\tresultado=true;\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public String addProduct(Context pActividad,int pId, String pDescripcion,float pPrecio)\n {\n AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(pActividad, \"administracion\", null, 1);\n\n // con el objeto de la clase creado habrimos la conexion\n SQLiteDatabase db = admin.getWritableDatabase();\n try\n {\n // Comprobamos si el id ya existe\n Cursor filas = db.rawQuery(\"Select codigo from Articulos where codigo = \" + pId, null);\n if(filas.getCount()<=0)\n {\n //ingresamos los valores mediante, key-value asocioados a nuestra base de datos (tecnica muñeca rusa admin <- db <- registro)\n ContentValues registro = new ContentValues();\n registro.put(\"codigo\",pId);\n registro.put(\"descripcion\",pDescripcion);\n registro.put(\"precio\", pPrecio);\n\n //ahora insertamos este registro en la base de datos\n db.insert(\"Articulos\", null, registro);\n }\n else\n return \"El ID insertado ya existe\";\n }\n catch (Exception e)\n {\n return \"Error Añadiendo producto\";\n }\n finally\n {\n db.close();\n }\n return \"Producto Añadido Correctamente\";\n }", "@Override\n\tpublic void add(Entity entity) throws Exception {\n\t\tsuper.add(entity);\n\t\tProduct prod = (Product) entity;\n\n\t\tSQLiteStatement st = db\n\t\t\t\t.prepare(\"INSERT INTO products(sessionID, name, priceMin, priceMax, quantity, category)\"\n\t\t\t\t\t\t+\"VALUES (?, ?, ?, ?, ?, ?)\");\n\t\tst.bind(1, sessionId).bind(2, prod.getName()).bind(3, prod.getPriceMin())\n\t\t\t\t.bind(4, prod.getPriceMin()).bind(5, prod.getQuantity())\n\t\t\t\t.bind(6, prod.getCategory());\n\t\tst.step();\n\t\ttotalQuantity += prod.quantity;\n\t\tif (!categoryList.containsKey(prod.getCategory())) {\n\t\t\tcategoryList.put(prod.getCategory(), new ArrayList<Product>());\n\t\t}\n\t\tcategoryList.get(prod.getCategory()).add(prod);\n\t\tif (availableProducts.get(entity.getName())==null) {\n\t\t\tavailableProducts.put(entity.getName(), \" \");\n\t\t}\n\t}", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "public void insert(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n //Abrindo o mapeamento dos dados para o insert\n ContentValues dados = new ContentValues();\n\n dados.put(\"id_participa_campanha\",doacao.getId_participa_campanha());\n dados.put(\"id_recurso\",doacao.getId_recurso());\n dados.put(\"data\",doacao.getData());\n dados.put(\"quantidade\",doacao.getQuantidade());\n\n\n sqLiteDatabase.insert(\"doacao\",null, dados);\n\n }", "public int inserir(Ingrediente ingrediente) {\n\n\t\tConnection conn = null;\n\t\tconn = getConnection();\n\t\tint sucesso = 0;\n\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(\"INSERT INTO \"\n\t\t\t\t\t+ \"INGREDIENTE (NOME) VALUES(?)\");\n\n\t\t\tstmt.setString(1, ingrediente.getNome());\n\t\t\tsucesso = stmt.executeUpdate();\n\n\t\t\tif (sucesso > 0) {\n\t\t\t\tSystem.out.println(\"INGREDIENTE INSERIDO!\");\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"ERRO AO INSERIR INGREDIENTE!\");\n\t\t} finally {\n\t\t\tcloseConnection(conn, stmt);\n\t\t}\n\t\treturn sucesso;\n\t}", "public void insertarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdSeccion(38);\n \tgrado.setNumGrado(2);\n \tgrado.setUltimoGrado(0);\n \tString respuesta = negocio.insertarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public void insertDBorder(String prodID, String quantity) {\r\n try {\r\n String sql = \"INSERT INTO EmpOrders (ProductID, QuantityNeeded) VALUES ('\" + prodID + \"', '\" + quantity + \"')\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }", "public static void insertNabranoRecord(String girlName, Vegetable vegetable, int quantity){\n try{\n dbDAO.getInstance().createNabranoRecord(girlName, vegetable, quantity);\n System.out.println(\"Nabrano record was added to db\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void AgregarUsuario(Usuario usuario)\n {\n //encerramos todo en un try para manejar los errores\n try{\n //si no hay ninguna conexion entonces generamos una\n if(con == null)\n con = Conexion_Sql.getConexion();\n \n String sql = \"INSERT INTO puntajes(nombre,puntaje) values(?,?)\";\n \n PreparedStatement statement = con.prepareStatement(sql);\n statement.setString(1, usuario.RetornarNombre());\n statement.setInt(2, usuario.RetornarPremio());\n int RowsInserted = statement.executeUpdate();\n \n if(RowsInserted > 0)\n {\n System.out.println(\"La insercion fue exitosa\");\n System.out.println(\"--------------------------------------\");\n }\n else\n {\n System.out.println(\"Hubo un error con la insercion\");\n System.out.println(\"--------------------------------------\");\n }\n }\n catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n }", "boolean agregarProducto(Producto p) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(p);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }", "@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}", "public void AgregarVenta() {\r\n if (vista.jTcodigodebarras.equals(\"\")) {//C.P.M si el componete esta vacio es que no a insertado algun codigo a buscar\r\n JOptionPane.showMessageDialog(null, \"No has ingresado un codigo de barras\");//C.P.M se lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario es que inserto algo y ay que buscarlo\r\n try {\r\n modelo.setCodigobarras(vista.jTcodigodebarras.getText());//C.P.M le mandamos el codigo a buscar a el modelo\r\n rs = modelo.Buscarcodigobarras();//C.P.M cachamos el resultado de la consulta\r\n if (rs.next() == true) {//C.P.M preguntamos si trai datos si es asi \r\n String nombre = rs.getString(\"nombre_producto\");//C.P.M obtenemos el nombre de el resultado\r\n float precio = Float.parseFloat(rs.getString(\"precio\"));//C.P.M obtenemos el precio\r\n String precioformato = format.format(precio);//C.P.M le damos el formato adecuado esta variable la utilizamos para enviarla a la vista\r\n float totalPro = Float.parseFloat(precioformato);//C.P.M cambiamos a flotante ya el precio con el formato adecuado\r\n String cant = JOptionPane.showInputDialog(null, \"Cantidad: \");//C.P.M preguntamos la cantidad del prducto\r\n float cantidad = Float.parseFloat(cant);//C.P.M convertimos a flotante la cantidad\r\n totalPro = totalPro * cantidad;//C.P.M obtenemos el total de ese producto multiplicando al cantidad por el precio\r\n total = Float.parseFloat(vista.jTtotal.getText());//C.P.M obtenemos el total de la venta \r\n total = totalPro + total;//C.P.M le sumamos el total del producto ingresado al total ya de la venta\r\n String totalaenviar = format.format(total);//C.P.M le damos el formato adecuado para enviar el nuevo total\r\n vista.jTtotal.setText(totalaenviar);//C.P.M le enviamos el nuevo total a la vista\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo de la tabla\r\n Object[] fila = new Object[3];//C.P.M creamos un areglo con el tamano de la nota\r\n fila[0] = cant;//C.P.M le agregamos la cantidad \r\n fila[1] = nombre;//C.P.M le agregamos el nombre\r\n fila[2] = precioformato;//C.P.M y el precio con el formato\r\n temp.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"No existe un artículo con dicho código\");\r\n }\r\n vista.jTcodigodebarras.setText(\"\");//C.P.M limpiamos el codigo de barras y le colocamos el foco\r\n vista.jTcodigodebarras.requestFocus();//C.P.M le colocamos el foco\r\n } catch (SQLException ex) {//C.P.M si ocurre un error le notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar el codigo de barras\");\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void k_insert(ManufacturersVO MANUFACTURERSVO) {\n\t\t\r\n\t}", "public static Efectivo insertEfectivo(int id_efectivo, int numero_pago){\n \n Efectivo miEfectivo = new Efectivo(id_efectivo,numero_pago);\n miEfectivo.registrarEfectivo();\n return miEfectivo;\n }", "private void agregarProducto(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\tString codArticulo = request.getParameter(\"CArt\");\n\t\tString seccion = request.getParameter(\"seccion\");\n\t\tString nombreArticulo = request.getParameter(\"NArt\");\n\t\tSimpleDateFormat formatoFecha = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = formatoFecha.parse(request.getParameter(\"fecha\"));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdouble precio = Double.parseDouble(request.getParameter(\"precio\"));\n\t\tString importado = request.getParameter(\"importado\");\n\t\tString paisOrigen = request.getParameter(\"POrig\");\n\t\t// Crear un objeto del tipo producto\n\t\tProducto producto = new Producto(codArticulo, seccion, nombreArticulo, precio, fecha, importado, paisOrigen);\n\t\t// Enviar el objeto al modelo e insertar el objeto producto en la BBDD\n\t\tmodeloProductos.agregarProducto(producto);\n\t\t// Volver al listado de productos\n\t\tobtenerProductos(request, response);\n\n\t}", "public void add(Product product) {\r\n sessionFactory.getCurrentSession()\r\n .save(product);\r\n }", "public boolean addProductToTable(Product product) {\r\n\t\tString sqlCommand = \"Insert Into ProductTable \\n\"\r\n\t\t\t\t+ \"(Barcode, Product_Name, Delivery_Time, Quantity_In_Store, Quantity_In_storeroom, Supplier_Name, Average_Sales_Per_Day, \"\r\n\t\t\t\t+ \"Location_In_Store, Location_In_Storeroom, Faulty_Product_In_Store,Faulty_Product_In_Storeroom, Category)\\n\" + \"values(\" \r\n\t\t\t\t+ \"?\"+ \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\"\r\n\t\t\t\t+ \"?\" + \",\" + \"?\" + \",\" + \"?\" + \")\";\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase);\r\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(sqlCommand)) {\r\n\t\t\tpstmt.setInt(1, product.getBarcodeProduct());\r\n\t\t\tpstmt.setString(2, product.getProductName());\r\n\t\t\tpstmt.setInt(3, product.getDeliveryTime());\r\n\t\t\tpstmt.setInt(4, product.getStoreQuantity());\r\n\t\t\tpstmt.setInt(5, product.getStoreroomQuantity());\r\n\t\t\tpstmt.setString(6, product.getSupplier());\r\n\t\t\tpstmt.setDouble(7, product.getAverageSalesPerDay());\r\n\t\t\tpstmt.setString(8, product.getStoreLocation());\r\n\t\t\tpstmt.setString(9, product.getStoreroomLocation());\r\n\t\t\tpstmt.setInt(10, product.getFaultyProductInStore());\r\n\t\t\tpstmt.setInt(11, product.getFaultyProductInStoreroom());\r\n\t\t\tpstmt.setInt(12, product.getCategoryID());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"addProductToTable: \"+e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "int insert(Product record);", "@Override\r\n public void agregarVehiculo(VehiculoModel vehiculo) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Insert into vehiculo(veh_placa, veh_marca, veh_modelo, veh_anio, veh_capacidad, veh_color, veh_kilometros) values (?, ?, ?, ?, ?, ?, ?)\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, vehiculo.getVehPlaca());\r\n statement.setString(2, vehiculo.getVehMarca());\r\n statement.setString(3, vehiculo.getVehModelo());\r\n statement.setInt(4, vehiculo.getVehAnio());\r\n statement.setInt(5, vehiculo.getVehCapacidad());\r\n statement.setString(6, vehiculo.getVehColor());\r\n statement.setInt(7, vehiculo.getVehKilometros());\r\n //para insert into se usa executeUpdate();\r\n int rowUpdated = statement.executeUpdate();\r\n if(rowUpdated > 0){\r\n JOptionPane.showMessageDialog(null, \"El registro fue \" \r\n + \" creado exitosamente.\");\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError : \" + ex.getMessage());\r\n }\r\n }", "@Override\r\n\tpublic int insertProduct(Product product) {\n\t\treturn dao.insertProduct(product);\r\n\t}", "public void addOrder(Order o) throws SQLException\r\n {\r\n String sqlQuery = \r\n \"INSERT INTO orders (custname, tablenumber, foodname, beveragename, served, billed) VALUES (\" +\r\n \"'\" + o.getCustomerName() + \"', \" + \r\n o.getTable() + \", \" + \r\n \"'\" + o.getFood() + \"', \" +\r\n \"'\" + o.getBeverage() + \"', \" + \r\n o.isServed() + \", \" +\r\n o.isBilled() + \")\";\r\n myStmt.executeUpdate(sqlQuery);\r\n }", "@Override\n\tpublic Integer insert(MyFoodVO myFoodVO) {\n\t\t\n\t\tString sql = \" INSERT INTO tbl_myfoods( \";\n\t\tsql += \" mf_seq,\";\n\t\tsql += \" mf_fcode,\";\n\t\tsql += \" mf_date,\";\n\t\tsql += \" mf_amt)\";\n\t\tsql += \" VALUES( \";\n\t\tsql += \" seq_myfoods.NEXTVAL,\";\n\t\tsql += \"?, ?, ? )\";\n\n\t\tPreparedStatement pStr = null;\n\t\ttry {\n\t\t\tpStr = dbConn.prepareStatement(sql);\n\t\t\tpStr.setString(0, myFoodVO.getMf_fcode());\n\t\t\tpStr.setString(0, myFoodVO.getMf_date());\n\t\t\tpStr.setFloat(0, myFoodVO.getMf_amt());\n\t\t\tInteger result = pStr.executeUpdate();\n\t\t\tpStr.close();\n\t\t\t\n\t\t\treturn result;\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\treturn null;\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "public static boolean insert_prod(String ProdName, String catg,int cost,String owner,String Description) {\n\n String sql = \"INSERT INTO Product(ProdName,Category,Cost,Owner,Description,PackageID,Status) VALUES(?,?,?,?,?,?,?)\";\n try (\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.setString(1, ProdName);\n pstmt.setString(2, catg);\n pstmt.setInt(3, cost);\n pstmt.setString(4, owner);\n pstmt.setString(5, Description);\n pstmt.setString(6,\"\");\n pstmt.setString(7,\"0\");\n pstmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return false;\n }", "@Override\r\n\tpublic void guardarCambiosProducto(Producto producto) {\r\nconectar();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = miConexion.prepareStatement(ConstantesSql.GUARDAR_CAMBIOS_PRODUCTO);\r\n\t\t\tps.setString(1, producto.getNombre());\r\n\t\t\tps.setString(2, producto.getCantidad());;\r\n\t\t\tps.setString(3, producto.getPrecio());\r\n\t\t\tps.setString(6, producto.getOferta());\r\n\t\t\tps.setString(4, producto.getFechaCad());\r\n\t\t\tps.setString(5, producto.getProveedor());\r\n\t\t\tps.setString(7, producto.getComentario());\r\n\t\t\tps.setInt(8, producto.getId());\r\n\t\t\tps.execute();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql guardar producto\");\r\n\t\t}\r\n\t\t\r\n\t\tdesconectar();\r\n\t}", "public void insertOption(Opcion o){\n\t\topciones.persist(o);\n\t}", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }", "public void insertIntoDadoAws(String query, Double porcentagem, Integer fkHardware, Integer fkComputador) throws IOException {\n erro = false;\n try{\n conAws.update(query, porcentagem, fkHardware, fkComputador);\n } catch (CannotGetJdbcConnectionException ex) {\n //Logger.getLogger(ControllerDashboard.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Nao foi encontrado um banco de dados local.\");\n logger.gravarDadosLog(\"ERRO\",\"INSERT\" , \"Não foi possivel inserir dados no banco de dados local.\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n String hardware = \"\";\n switch (fkHardware) {\n case 1:\n hardware = \"CPU\";\n break;\n case 2:\n hardware = \"RAM\";\n break;\n case 3:\n hardware = \"GPU\";\n break;\n case 4:\n hardware = \"Disco 1\";\n break;\n case 5:\n hardware = \"Disco 2\";\n break;\n case 6:\n hardware = \"Disco 3\";\n break;\n }\n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"INSERT\" , \"O dado coletado de \" + hardware + \"(\" + porcentagem + \"%) foi registrado com sucesso no banco de dados local.\");\n }\n erro = false;\n }", "@Override\n\tpublic void insert(ExportProduct exportProduct) {\n\t\t\n\t}", "private void addBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMouseClicked\n\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"INSERT INTO `stock` (`Product_ID`, `Product_Name`,`Quantity`, `Entry_Date`,`Price`) VALUES (?, ?, ?, ?, ?)\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setInt(1, Integer.parseInt(id));\n pstm.setString(2, name);\n pstm.setInt(3, Integer.parseInt(quantity));\n pstm.setString(4, date);\n pstm.setInt(5, Integer.parseInt(price));\n pstm.executeUpdate();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Data Insertion Failed \");\n }\n refTable();\n\n\n }" ]
[ "0.6855455", "0.6703213", "0.64595085", "0.6358947", "0.6358723", "0.6289244", "0.62717736", "0.62698275", "0.62612015", "0.62447923", "0.62424374", "0.6241238", "0.62337625", "0.62199897", "0.61781126", "0.6177487", "0.61604065", "0.61309695", "0.6106681", "0.6099358", "0.6087396", "0.6070786", "0.60457665", "0.6044493", "0.60403", "0.60394025", "0.6036678", "0.6031991", "0.603002", "0.602088", "0.59755796", "0.5958483", "0.5955325", "0.5954359", "0.5945994", "0.5929283", "0.59236693", "0.5918562", "0.5915536", "0.5904719", "0.5899896", "0.58965904", "0.5884457", "0.5877484", "0.58743024", "0.58688486", "0.58624744", "0.58614284", "0.5838447", "0.5836498", "0.582631", "0.58245975", "0.5812314", "0.5811161", "0.5807311", "0.58017987", "0.5798534", "0.5774484", "0.5771839", "0.5762949", "0.5760388", "0.5751135", "0.5747842", "0.57335293", "0.5732605", "0.5726476", "0.5726171", "0.5724507", "0.5721904", "0.5720948", "0.5715544", "0.57141787", "0.57126856", "0.57103205", "0.5708447", "0.5699494", "0.56993306", "0.5697867", "0.5697675", "0.56917036", "0.5690125", "0.5684924", "0.56837255", "0.5677239", "0.56765145", "0.5675438", "0.56748444", "0.56715363", "0.56706864", "0.56680876", "0.5667318", "0.5667235", "0.56655806", "0.5664988", "0.5663348", "0.5663342", "0.56627315", "0.56595516", "0.56539536", "0.5652491" ]
0.68057287
1
Updates a single row in the sgfens_pedido_producto table.
public void update(SgfensPedidoProductoPk pk, SgfensPedidoProducto dto) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProveedorEntity updateProveedor(Long id_pago, ProveedorEntity proveedor){\n ProveedorEntity proveedorEntity = proveedorPersistence.update(proveedor);\n return proveedorEntity;\n }", "@Override\n\tpublic void editar(ProdutoPedido produtoPedido) {\n\t\tdao.update(produtoPedido);\n\t}", "@Override\n\tpublic int update(Proveedor r) {\n\t\treturn 0;\n\t}", "void updateOfProductById(long id);", "public boolean ModificarProducto(int id,String nom,String fab,int cant,int precio,String desc,int sucursal) {\n boolean status=false;\n int res =0;\n try {\n conectar(); \n res=state.executeUpdate(\"update producto set nombreproducto='\"+nom+\"', fabricante='\"+fab+\"',cantidad=\"+cant+\",precio=\"+precio+\",descripcion='\"+desc+\"',idsucursal=\"+sucursal+\" where idproducto=\"+id+\";\");\n if(res>=1)\n {\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }", "public void updateProveedor(Proveedor proveedor) {\n\t\tupdate(proveedor);\n\t}", "@Override\r\n public void update(ProductosPuntoVentaPk pk, ProductosPuntoVenta dto)\r\n throws ProductosPuntoVentaDaoException {\r\n long t1 = System.currentTimeMillis();\r\n PreparedStatement stmt = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + SQL_UPDATE + \" with DTO: \" + dto);\r\n stmt = userConn.prepareStatement(SQL_UPDATE);\r\n int index = 1;\r\n stmt.setInt(index++, dto.getCantidad());\r\n stmt.setInt(index++, dto.getIdPuntoVenta());\r\n stmt.setInt(index, dto.getIdProducto());\r\n int rows = stmt.executeUpdate();\r\n reset(dto);\r\n long t2 = System.currentTimeMillis();\r\n System.out.println(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(stmt);\r\n }\r\n }", "int updateByPrimaryKey(Disproduct record);", "Product updateProductById(Long id);", "Product update(Product product, long id);", "public void updateProducto(Producto producto) {\n\t\tupdate(producto);\n\t}", "@Override\r\n\tpublic Long update(Producto entity) throws Exception {\n\t\treturn productRepository.update(entity);\r\n\t}", "public boolean modificarproducto(ProductoDTO c) {\r\n\r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_UPDATE);\r\n ps.setString(1, c.getDescripcion());\r\n ps.setString(2, c.getFechaproducto());\r\n ps.setInt(3, c.getStock());\r\n ps.setInt(4, c.getPrecio());\r\n ps.setString(5, c.getNombre());\r\n ps.setString(6, c.getFechacaducidad());\r\n ps.setString(7, c.getFechaelaboracion());\r\n ps.setString(8, c.getNombrecategoria());\r\n ps.setInt(9, c.getId());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n JOptionPane.showMessageDialog(null, \"Modificado correctamente\");\r\n return true;\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"no se ha podido modificar\");\r\n return false;\r\n }", "int updateByPrimaryKey(ItoProduct record);", "public ResultMessage update(SaleDocumentPO po) throws RemoteException {\n\t\tString id = po.getDocumentID();\r\n\t\tint index = containsSameID(id);\r\n\t\tsaleDocumentPOs.set(index, po);\r\n\t\toutput();\r\n\t\t//show();\r\n\t\treturn ResultMessage.SUCCESS;\r\n\t}", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public void setIdproducto(int idproducto) {\r\n\t\tthis.idproducto = idproducto;\r\n\t}", "public void mudaQuantidadeAprovada(PedidoProduto pedidoProduto) {\n String sql = \"UPDATE pedidosprodutos SET QuantidadeAprovada=? WHERE Id=?\";\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, pedidoProduto.getQuantidadeAprovada());\n stmt.setInt(2, pedidoProduto.getId());\n stmt.execute();\n connFac.closeAll(rs, stmt, st, conn);\n } catch(SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n throw new RuntimeException(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n }\n }", "ProductView updateProduct(int productId, EditProductBinding productToEdit) throws ProductException;", "@Override\n\tpublic void update(Iscrizioni o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tem.merge(o);\n//\t\tObject[] campi = { o.getIdDipendente(), o.getIdDocente(), o.getIdCorso(), o.getIdIscrizione() };\n//\t\tString sql = \"UPDATE `iscrizioni` SET `idDipendente`=?,`idDocente`=?,`idCorso`=? WHERE `idIscrizione`=?\";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n\t}", "public int modificarPresidente(int idpresi,int idcam,int idequipo, String nombre, String paterno,String materno,String dni,String fecNac,String fechaDirect,String telefono){\n sql=\"UPDATE presidente set idCampeonato='\"+idcam+\"', idEquipo='\"+idequipo+\"',Nombre_pres='\"+nombre+\"',Ap_presidente='\"+paterno+\"',Am_presidente='\"+materno+\"',Dni='\"+dni+\"',Fec_Nac='\"+fecNac+\"',Fecha_presidente='\"+fechaDirect+\"',Telefono='\"+telefono+\"' WHERE idPresidente='\"+idpresi+\"'\";\r\n \r\n try {\r\n cx = Conexion.coneccion();\r\n st = cx.createStatement();\r\n res = st.executeUpdate(sql);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Error: \"+e);\r\n }\r\n return res;\r\n }", "int updateByPrimaryKey(Product record);", "@Override\n public void update(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"UPDATE curso SET idprofesor = ?, nombrecurso = ?, claveprofesor = ?, clavealumno = ? WHERE idcurso = ?\");\n\n pstmt.setInt(1, entity.getIdProfesor());\n pstmt.setString(2, entity.getNombre());\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n pstmt.setInt(5, entity.getIdCurso());\n \n pstmt.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public int updateProduct(Product product){\n int rowsAffected = 0;\n connect();\n String sql = \"UPDATE productos SET descripcion = ?, presentacion = ?, cantidad = ?, \"\n + \"precio = ?, subtotal = ? WHERE id_producto = ?\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, product.getProductDescription());\n ps.setString(2, product.getProductPresentation());\n ps.setInt(3, product.getProductCuantity());\n ps.setFloat(4, product.getProductPrice());\n ps.setFloat(5, (product.getProductCuantity() * product.getProductPrice())); \n ps.setInt(6, Integer.parseInt(product.getProductId()));\n \n rowsAffected = ps.executeUpdate();\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return rowsAffected;\n }", "@Override\r\n\tpublic boolean update(Viaggio viaggio) {\r\n\t\tboolean result = false;\r\n\t\tif ( viaggio == null ) {\r\n\t\t\tSystem.out.println( \"update(): failed to update a null entry\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(update);\r\n\t\t\tprep_stmt.clearParameters();\r\n\t\t\tprep_stmt.setInt(1, viaggio.getCreatore().getId());\r\n\t\t\tprep_stmt.setString(2, viaggio.getTitolo());\r\n\t\t\tprep_stmt.setString(3, viaggio.getDestinazione());\r\n\t\t\tprep_stmt.setString(4, viaggio.getDescrizione());\r\n\t\t\tprep_stmt.setString(5, viaggio.getLingua());\r\n\t\t\tprep_stmt.setInt(6, viaggio.getBudget());\r\n\t\t\tprep_stmt.setString(7, viaggio.getLuogopartenza());\r\n\t\t\tprep_stmt.setInt(8, viaggio.getStato().ordinal());\r\n\t\t\tprep_stmt.setDate(9, viaggio.getDatainizio());\r\n\t\t\tprep_stmt.setDate(10, viaggio.getDatafine());\r\n\t\t\tprep_stmt.setString(11, viaggio.getImmaginiProfilo());\t\t\t\r\n\t\t\tprep_stmt.setInt(12, viaggio.getIdViaggio());\r\n\t\t\tint esito;\r\n\t\t\tesito=prep_stmt.executeUpdate();\r\n\t\t\tprep_stmt.close();\r\n\t\t\tif(esito>=0) {\r\n\t\t\t\tSystem.out.println(\"Ho aggiornato il viaggio con id \"+ viaggio.getIdViaggio());\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"ERRORE: non ho potuto aggiornare il viaggio con id \"+ viaggio.getIdViaggio());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"insert(): failed to update entry: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\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\t}\r\n\t\treturn result;\r\n\t}", "public void updateDetail(String proid) {\n\t\tsqlSession.update(\"product.updateDetail\", proid);\n\t}", "@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}", "public void update(SgfensBancoPk pk, SgfensBanco dto) throws SgfensBancoDaoException;", "public void updateProduto(int cd_Produto, Produto produto) {\n pdao.updateProduto(cd_Produto, produto);\n }", "int updateByPrimaryKey(Shipping record);", "int updateByPrimaryKey(GoodsPo record);", "int updateByPrimaryKey(ProductPricelistEntity record);", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "public void update() throws SQLException {\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n int safeCheck = BusinessFacade.getInstance().checkChildsIDinDB(this.goodID,\n this.order.getID(), \"orders\", \"goods_id\", \"orders_id\");\n\n if (check != -1 && safeCheck == -1) {\n if (check != this.goodID) {\n int oldGoodID = this.goodID;\n this.goodID = check;\n this.order.update();\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n oldGoodID + \" LIMIT 1;\");\n }\n } else if (check != -1 && safeCheck != -1) {\n this.goodID = check;\n } else if (check == -1 && safeCheck == -1) {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n stmtIn.executeUpdate(\"UPDATE ngaccount.goods SET product_type_id = \" +\n this.productRelation.getID() + \", post_id = \" + this.post.getID() +\n \" WHERE goods.goods_id = \" + this.goodID);\n } else {\n this.goodID = BusinessFacade.getInstance().lastIDInDB(\"product_type\") + 1;\n this.insert();\n }\n }", "@Override\n public void update(FecetProrrogaOrdenPk pk, FecetProrrogaOrden dto) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_UPDATE).append(getTableName()).append(SQL_UPDATE_PRORROGA);\n\n getJdbcTemplateBase().update(query.toString(), dto.getIdOrden(), dto.getFechaCarga(), dto.getRutaAcuse(),\n dto.getCadenaContribuyente(), dto.getFirmaContribuyente(), dto.getAprobada(), dto.getIdAsociadoCarga(),\n dto.getIdAuditor(), dto.getIdFirmante(), dto.getRutaResolucion(), dto.getCadenaFirmante(),\n dto.getFirmaFirmante(), dto.getFechaFirma(), dto.getIdEstatus(), dto.getFolioNyV(),\n dto.getFechaNotifNyV(), dto.getFechaNotifCont(), dto.getFechaSuerteEfectos(), pk.getIdProrrogaOrden());\n\n }", "@Transactional\n public void update(Cliente cliente, long id) {\n\t\t\t\n \t getCurrentSession().saveOrUpdate(cliente);\n\t\t\n }", "int updateByPrimaryKey(Movimiento record);", "@Override\n\tpublic ResultMessage update(PaymentOrderPO po) {\n\t\tString sql=\"update paymentlist set date=?,amount=?,payer=?,bankaccount=?,entry=?,note=? where ID=?\";\n\t\ttry {\n\t\t\tstmt=con.prepareStatement(sql);\n\t\t\tstmt.setString(1, po.getDate());\n\t\t\tstmt.setDouble(2, po.getAmount());\n\t\t\tstmt.setString(3, po.getPayer());\n\t\t\tstmt.setString(4, po.getBankAccount());\n\t\t\tstmt.setString(5, po.getEntry());\n\t\t\tstmt.setString(6, po.getNote());\n\t\t\tstmt.setString(7, po.getID());\n\t\t\tstmt.executeUpdate();\n\t\t\treturn ResultMessage.Success;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn ResultMessage.NotExist;\n\t\t}\n\t}", "int updateEstancia(final Long srvcId);", "public void update(NominaPuestoPk pk, NominaPuesto dto) throws NominaPuestoDaoException;", "public void ModificarPrestamo(PrestamoFila pf) {\n this.conexion.ConectarBD();\n String consulta = \"update prestamos set IdSocio = ?, IdLibro = ?, FechaInicio = ?, FechaFin = ? where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del update\n this.pstm.setInt(1, pf.getIdSocio());\n this.pstm.setInt(2, pf.getIdLibro());\n this.pstm.setDate(3, new java.sql.Date(pf.getFechaInicio().getTime()));\n this.pstm.setDate(4, new java.sql.Date(pf.getFechaFin().getTime()));\n this.pstm.setInt(5, pf.getIdPrestamo());\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al modificar un Prestamo.\\n\"+e.toString());\n \n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n \n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD(); \n }", "int updateByPrimaryKey(CartDO record);", "public boolean update(Object objekt) throws SQLException {\r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Update \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\r\n\t\t\r\n\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(updateUpit);\r\n\r\n\t\t\tps.setString(1, ul.getNaziv());\r\n\t\t\tps.setInt(2, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\t// 20.03.06. -asabo- dodano\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(3, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(3, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(4, op);\r\n\r\n\t\t\tps.setTimestamp(5, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(6, 1);\r\n\t\t\t\r\n\t\t\tps.setString(7, ul.getSifraArtikla());\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tboolean updated = kom == 1;\r\n\t\t\tif (!updated)\r\n\t\t\t\t{}\r\n\t\t\telse\r\n\t\t\t\tclearFromCache(ul.getSifraArtikla());\r\n\r\n\t\t\treturn updated;\r\n\t\t}\r\n\t\t// -asabo- NEMA CATCH-anja! - sve ide pozivatelju...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\t}", "int updateByPrimaryKey(Prueba record);", "@Override\n\tpublic int update(Prod_Unidadmed P) {\n\t\treturn jdbcTemplate.update(\"call PKG_ALM_CRUD_PRODUNIDADMED.pa_mat_produnidadmed_upd(?,?,?,?)\",P.getIdprodunidadmed(),P.getNombrelargo(),P.getNombrecorto(),P.getEstado());\n\t}", "@Override\r\n\tpublic void updateFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().update(fournisseur);\r\n\t}", "public void updateReserva(Reserva reserva) throws Exception \n\t\t{\n\t\t\tDAOReserva daoReserva = new DAOReserva( );\n\t\t\ttry\n\t\t\t{\n\t\t\t\tthis.conn = darConexion();\n\t\t\t\tdaoReserva.setConn( conn );\n\t\t\t\tif(daoReserva.findReservaById(reserva.getIdReserva()) == null)\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception(\"El reserva al que esta intentando modificar no existe\");\n\t\t\t\t}\n\t\t\t\tdaoReserva.updateReservas(reserva);\t\t\n\n\t\t\t}\n\t\t\tcatch (SQLException sqlException) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\t\tsqlException.printStackTrace();\n\t\t\t\tthrow sqlException;\n\t\t\t} \n\t\t\tcatch (Exception exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t} \n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tdaoReserva.cerrarRecursos();\n\t\t\t\t\tif(this.conn!=null){\n\t\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (SQLException exception) {\n\t\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public static void atualizarProduto(long id_produto, String codigo, String descricao,String preco,long idgrupo){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"Update produto set codigo = ?, descricao =? , preco =?,idgrupo =? where id_produto = ?\");\r\n stmn.setString(1,codigo);\r\n stmn.setString(2,descricao);\r\n stmn.setString(3,preco);\r\n stmn.setLong(4,idgrupo);\r\n stmn.setLong(5,id_produto);\r\n\r\n int row = stmn.executeUpdate();\r\n if(row == 0){\r\n System.out.println(\"Informação não alterada\");\r\n }else{\r\n System.out.println(\"Dados atualizados\");\r\n }\r\n } catch (SQLException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n }", "public void update(Pessoa p) {\n\t\tdb.save(p);\t\t\n\t}", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\r\n\tpublic Product updateProduct(Product s) {\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(Promo record);", "@Override\r\n\tpublic void update(TrDetailPenjualan trDetailPenjualan) {\n\t\tString query = \"update TR_DETAIL_PENJUALAN set QTY=?, SUBTOTAL=?, DISKON=?, HARGA_SATUAN=?, KODE_BARANG=?, NO_NOTA=? where kode_detail=?\";\r\n\t\tConnection con = null;\r\n\t\tPreparedStatement ps = null;\r\n\t\ttry {\r\n\t\t\tcon = dataSource.getConnection();\r\n\t\t\tps = con.prepareStatement(query);\r\n\t\t\tps.setString(1, trDetailPenjualan.getKodeDetail());\r\n\t\t\tps.setInt(2, trDetailPenjualan.getQty());\r\n\t\t\tps.setInt(3, trDetailPenjualan.getSubtotal());\r\n\t\t\tps.setInt(4, trDetailPenjualan.getDiskon());\r\n\t\t\tps.setInt(5, trDetailPenjualan.getHargaSatuan());\r\n\t\t\tps.setString(6, trDetailPenjualan.getKodeBarang().getKodeBarang());\r\n\t\t\tps.setString(7, trDetailPenjualan.getNoNota().getNoNota());\r\n\r\n\t\t\tint out = ps.executeUpdate();\r\n\t\t\tif (out != 0) {\r\n\t\t\t\tSystem.out.println(\"update sukses\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"update gagal\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tps.close();\r\n\t\t\t\tcon.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic Producto buscarIdProducto(Integer codigo) {\n\t\treturn productoDao.editarProducto(codigo);\n\t}", "int updateNavegacionSalida(final Long srvcId);", "public int update(FurniturePiece piece) throws Exception {\n try ( Connection conn = ConnectionDB.getConnection(); PreparedStatement ps = conn.prepareStatement(SQL_UPDATE_PIECE)) {\n ps.setString(1, piece.getName());\n ps.setDouble(2, piece.getCost());\n ps.setInt(3, piece.getId());\n return ps.executeUpdate();\n } catch (Exception e) {\n new InsertUtilities().throwCustomError(\"Error al actualizar pieza, verifica los datos ingresados, \" + e.getMessage());\n return 0;\n }\n }", "public ProveedorPromocionHotelEntity updatePromocion(Long id_p_Promocion_hotel, ProveedorPromocionHotelEntity promocion){\n ProveedorPromocionHotelEntity proveedorPromocionHotelEntity = proveedorPromocionHotelPersistence.update(promocion);\n return proveedorPromocionHotelEntity;\n }", "@Override\n\tpublic void updateProduct(Product p) {\n\t\tProduct product = productRepository.getOne(p.getId());\n\t\tproduct.setName(p.getName());\n\t\tproduct.setPrice(150000);\n\t\tproductRepository.save(product);\n\t}", "int updateByPrimaryKey(Goods record);", "int updateByPrimaryKey(Goods record);", "public void updateSocio(String usu,String nom,String pa,String dni, int id) throws SQLException {\n\t\t\n\t\tpstmt = conn.prepareStatement(\"update socio set usuario = ?, nombre = ?,pass = ?, dni = ? where id_socio = ?\");\n\t\t\n\t\tpstmt.setString(1, usu);\n\t\tpstmt.setString(2, nom);\n\t\tpstmt.setString(3, pa);\n\t\tpstmt.setString(4, dni);\n\t\tpstmt.setInt(5, id);\n\t\t\n\t\tif (pstmt.executeUpdate() > 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Se ha modificado correctamente\",\n\t\t\t\t\t\"Modicacion de campos\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void update(Product product) throws SQLException {\n\t\tproductDao.update(product);\n\t}", "public void update(TipologiaStrutturaPk pk, TipologiaStruttura dto) throws TipologiaStrutturaDaoException;", "@Override\r\n\tpublic int update(Estado_Civil estado) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_UPD_ESTADO_CIVIL(?,?)\", estado.getIdestado_civil(), estado.getNombre());\r\n\t}", "public void guardarCambiosProducto(BProducto producto, BUsuario usuario, Connection conn)throws SQLException {\n\t\tPreparedStatement pstm;\r\n\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE producto \\n\");\r\n\t\tsql.append(\"SET tipo_producto_id = ? , \\n\");\r\n\t\tsql.append(\" descripcion = ? , \\n\");\r\n\t\tsql.append(\" usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" fecha_modificacion = SYSDATE, \\n\");\r\n\t\tsql.append(\" nombre = ?, \\n\");\r\n\t\tsql.append(\" codigo_imagen = ? \\n\");\r\n\t\tsql.append(\"WHERE producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\t\r\n\t\tpstm.setInt(1,producto.getTipo().getCodigo());\r\n\t\tpstm.setString(2,producto.getDescripcion());\r\n\t\tpstm.setString(3,usuario.getLogin());\r\n\t\tpstm.setString(4,producto.getNombre());\r\n\t\tpstm.setInt(5,producto.getImagen().getCodigo());\r\n\t\tpstm.setInt(6,producto.getCodigo());\r\n\t\tpstm.executeUpdate();\r\n\t\t\r\n\t\tpstm.close();\r\n\t}", "public static void updateVendedor(Vendedor vendedor) {\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession sesion = sf.openSession();\n\t\tsesion.beginTransaction();\n\n\t\ttry {\n\t\t\tsesion.update(vendedor);\n\t\t\tsesion.getTransaction().commit();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tsesion.getTransaction().rollback();\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tsesion.close();\n\t\t}\n\t}", "public void setIdProveedor(Integer idProveedor) {\n this.idProveedor = idProveedor;\n }", "int updateByPrimaryKey(CTipoComprobante record) throws SQLException;", "@Override\r\n\tpublic void prodUpdate(ProductVO vo) {\n\t\tadminDAO.prodUpdate(vo);\r\n\t}", "@Override\n\tpublic void update(Connection c, Genre v, Integer id) throws SQLException {\n\n\t}", "public void setIdProducto(int value) {\n this.idProducto = value;\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 static void editarEstudiante(Estudiante estudiante) {\r\n //metimos este método a la base de datos\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"update docente set \"\r\n + \"Nro_de_ID='\" + estudiante.getNro_de_ID()\r\n + \"',Nombres='\" + estudiante.getNombres()\r\n + \"',Apellidos='\" + estudiante.getApellidos()\r\n + \"',Laboratorio='\" + estudiante.getLaboratorio()\r\n + \"',Carrera='\" + estudiante.getCarrera()\r\n + \"',Modulo='\" + estudiante.getModulo()\r\n + \"',Materia='\" + estudiante.getMateria()\r\n + \"',Fecha='\" + estudiante.getFecha()\r\n + \"',Hora_Ingreso='\" + estudiante.getHora_Ingreso()\r\n + \"',Hora_salida='\" + estudiante.getHora_Salida()\r\n + \"'where Nro_de_ID='\" + estudiante.getNro_de_ID() + \"';\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "int updateByPrimaryKey(Sequipment record);", "@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 Editproduct(Product objproduct) {\n\t\t\n\t}", "int updateByPrimaryKey(Dish record);", "public int actualizar(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"UPDATE conftbc_producto SET nombre_producto=?, imagen=?, idcategoria=?, idmarca=?, idmodelo=? WHERE idmodelo = ?\";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tps.setString(1,producto.getNombre());\n\t\t\tps.setString(2,producto.getImagen());\n\t\t\tps.setInt(3,producto.getCategoria().getIdcategoria());\n\t\t\tps.setInt(4, producto.getMarca().getIdmarca());\n\t\t\tps.setInt(5, producto.getModelo().getIdmodelo());\n\t\t\tps.setInt(6, producto.getModelo().getIdmodelo());// como el producto se originacuando se crea el modelo lo actualizamos por el modelo\n\t\t\tint rpta = ps.executeUpdate();\t\t\n\t\t\tthis.objCnx.confirmarDB();\n\t\t\treturn rpta;\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally {\t\t\t\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "private void updateBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseClicked\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"UPDATE `stock` SET `Product_Name`=?,`Quantity`=?,`Entry_Date`=?,`Price`=? Where `Product_ID`=?\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setString(1, name);\n\n pstm.setInt(2, Integer.parseInt(quantity));\n pstm.setString(3, date);\n pstm.setInt(4, Integer.parseInt(price));\n pstm.setInt(5, Integer.parseInt(id));\n pstm.executeUpdate();\n } catch (Exception ex) {\n\n JOptionPane.showMessageDialog(null, \"Data Not Found To be Updated\");\n }\n\n //Refersh Table\n refTable();\n\n }", "int updateByPrimaryKey(Tipologia record);", "public boolean update(Product product);", "Product editProduct(Product product);", "public boolean updatePricingForId(int productId, Pricing pricing);", "@Override\r\n\tpublic int update(Product product) throws Exception {\n\t\treturn this.dao.update(product);\r\n\t}", "public void updateProduct() throws ApplicationException {\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n try {\n session.beginTransaction();\n Menu updateProduct = (Menu) session.get(Menu.class, menuFxObjectPropertyEdit.getValue().getIdProduct());\n\n updateProduct.setName(menuFxObjectPropertyEdit.getValue().getName());\n updateProduct.setPrice(menuFxObjectPropertyEdit.getValue().getPrice());\n\n session.update(updateProduct);\n session.getTransaction().commit();\n } catch (RuntimeException e) {\n session.getTransaction().rollback();\n SQLException sqlException = getCauseOfClass(e, SQLException.class);\n throw new ApplicationException(sqlException.getMessage());\n }\n\n initMenuList();\n }", "public void salida(String k_idparqueadero) throws CaException {\n try {\n String strSQL = \"UPDATE servicio SET f_fycsalida=?, q_valorapagar=? WHERE k_idservicio =?\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n prepStmt.setDate(1, Date.valueOf(servicio.getF_fycsalida()));\n prepStmt.setInt(2, servicio.getQ_valorapagar());\n prepStmt.setInt(3, servicio.getK_idservicio());\n prepStmt.executeUpdate();\n prepStmt.close();\n ServiceLocator.getInstance().commit();\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo actualizar el servicio\" + e.getMessage());\n } finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n this.actualizarDatosSalida(String.valueOf(servicio.getK_idservicio()), k_idparqueadero);\n }", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "int updateByPrimaryKey(Cargo record);", "public void alterar(int id) {\r\n\t\ttry {\r\n\t\t\tbd.getConnection();\r\n\t\t\tString nome, apelido, mascote;\r\n\t\t\tsmt = bd.conn.createStatement();\r\n\t\t\t\r\n\t\t\tutil.p2(\"Nome da Equipe: \"); \r\n\t\t\tnome = dados.nextLine();\r\n\t\t\t\t\t\r\n\t\t\tutil.p2(\"Apelido: \"); \r\n\t\t\tapelido = dados.nextLine();\r\n\t\t\t\r\n\t\t\tutil.p2(\"Mascote: \");\r\n\t\t\tmascote = dados.nextLine();\t\r\n\t\t\t\r\n\t\t\tsql = \"UPDATE equipes set \" \r\n\t\t\t\t+ \"nome= '\" + nome + \"' , \" \r\n\t\t\t\t+ \"apelido= '\" + apelido + \"' , \" \r\n\t\t\t\t+ \"mascote= '\" + mascote + \"' \"\r\n\t\t\t\t+ \"where id=\" + id;\r\n\t\t\t\r\n\t\t\tsmt.execute(sql);\r\n\t\t\t\r\n\t\t\tutil.l();\r\n\t\t\tutil.p(\"Equipe alterada com sucesso!\");\r\n\t\t\t\r\n\t\t\tbd.conn.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tutil.p(\"Erro: \" + e.getMessage());\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void updateProduct(SiteProduct product) {\n dataProvider.save(product);\n }", "Product updateProductInStore(Product product);", "@Override\n public int updateProduct(Product product) throws Exception\n {\n if(product == null)\n return 0;\n\n if(getProductById(product.getId(), true) == null)\n return 0;\n\n PreparedStatement query = _da.getCon().prepareStatement(\"UPDATE Products SET contactsKey = ?, categoryKey = ?, name = ?, purchasePrice = ?, salesPrice = ?, rentPrice = ?, countryOfOrigin = ?, minimumStock = ? \" +\n \"WHERE productId = ?\");\n\n query.setLong(1, product.getSupplier().getPhoneNo());\n query.setLong(2, product.getCategory().getCategoryId());\n query.setString(3, product.getName());\n query.setDouble(4, product.getPurchasePrice().doubleValue());\n query.setDouble(5, product.getSalesPrice().doubleValue());\n query.setDouble(6, product.getRentPrice().doubleValue());\n query.setString(7, product.getCountryOfOrigin());\n query.setLong(8, product.getMinimumStock());\n query.setLong(9, product.getId());\n _da.setSqlCommandText(query);\n int rowsAffected = _da.callCommand();\n\n DBProductData dbProductData = new DBProductData();\n dbProductData.deleteProductData(product.getId());\n for(ProductData data : product.getProductData())\n rowsAffected += dbProductData.insertProductData(product.getId(), data);\n\n return rowsAffected;\n }", "int updateByPrimaryKey(Depart record);", "@Override\r\n\tpublic void actualizarStockProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, int cantidad,Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE fidelizacion.producto_sucursal ps \\n\");\r\n\t\tsql.append(\"SET ps.stock = (nvl(ps.stock,0) - ?), \\n\");\r\n\t\tsql.append(\" ps.usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" ps.fecha_modificacion = SYSDATE \\n\");\r\n\t\tsql.append(\"WHERE ps.sucursal_id = ? \\n\");\r\n\t\tsql.append(\"AND ps.producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,cantidad);\r\n\t\tpstm.setString(2,usuario.getLogin());\r\n\t\tpstm.setInt(3,bSucursal.getCodigo());\r\n\t\tpstm.setInt(4,bProducto.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}", "public void update(Sale sale) {\n sale_dao.update(sale);\n }", "@Override\n\tpublic boolean update(Produto t) {\n\t\treturn true;\n\t}", "int updateByPrimaryKey(OrderPO record);", "int updateByPrimaryKey(cskaoyan_mall_order_goods record);", "public Boolean updateData(String codProduc, String nombreProduc, String precioProduc){\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"codProduc\", codProduc);\n contentValues.put(\"nombreProduc\", nombreProduc);\n contentValues.put(\"precioProduc\", precioProduc);\n\n //Verificamos el registro usando el codigo de actualizar\n Cursor cursor = db.rawQuery(\"SELECT * FROM tienda WHERE codProduc=?\", new String[]{codProduc});\n\n //Evaluamos el registro para verificar si existe\n if(cursor.getCount()>0){\n long result = db.update(\"tienda\", contentValues, \"codProduc=?\", new String[]{codProduc});\n if(result==-1){\n return false;\n }else{\n return true;\n }\n }else{\n return false;\n }\n\n }", "@Override\n\tpublic void salvar(ProdutoPedido produtoPedido) {\n\t\tdao.save(produtoPedido);\n\t}" ]
[ "0.68581396", "0.6801628", "0.64553654", "0.63447857", "0.62956303", "0.6291415", "0.627736", "0.62762845", "0.6275297", "0.62506604", "0.6244455", "0.61805826", "0.61564296", "0.6136486", "0.60419005", "0.60351586", "0.6032025", "0.60244244", "0.601896", "0.6016863", "0.60154235", "0.60043126", "0.59974813", "0.5986765", "0.598211", "0.59805685", "0.59322673", "0.5930195", "0.5920187", "0.5908321", "0.59011984", "0.5889893", "0.58789927", "0.58655655", "0.5863468", "0.5847065", "0.5846426", "0.58454186", "0.58237946", "0.5818152", "0.58056355", "0.5800733", "0.57922006", "0.57870793", "0.5764941", "0.5754672", "0.5738648", "0.57334685", "0.57287514", "0.57217777", "0.5720446", "0.5717159", "0.57111555", "0.5708887", "0.5707863", "0.5702243", "0.5701048", "0.56962806", "0.5695024", "0.5695024", "0.56908697", "0.5690261", "0.56891704", "0.56868124", "0.56862754", "0.5683419", "0.5680108", "0.567321", "0.565824", "0.5657344", "0.5655376", "0.5649765", "0.56482476", "0.56430244", "0.5638042", "0.5630533", "0.56277704", "0.5625019", "0.5622429", "0.5621751", "0.5620174", "0.5618976", "0.5611475", "0.5610395", "0.5604353", "0.5601122", "0.5600457", "0.55970865", "0.5595012", "0.5594389", "0.55942625", "0.5579171", "0.5564287", "0.55620885", "0.5561054", "0.55574256", "0.5551221", "0.5549986", "0.55494905", "0.55428195" ]
0.70521706
0
Deletes a single row in the sgfens_pedido_producto table.
public void delete(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteProveedor (Long id_proveedor){\n proveedorPersistence.delete(id_proveedor);\n }", "@Delete({\n \"delete from soggetto_personale_scolastico\",\n \"where id_soggetto = #{idSoggetto,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long idSoggetto);", "public void eliminar(Producto producto) throws IWDaoException;", "public void delete(SgfensBancoPk pk) throws SgfensBancoDaoException;", "public void eliminar(Producto producto) throws BusinessErrorHelper;", "@Override\r\n public void delete(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n long t1 = System.currentTimeMillis();\r\n PreparedStatement stmt = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + SQL_DELETE + \" with PK: \" + pk);\r\n stmt = userConn.prepareStatement(SQL_DELETE);\r\n if (pk.getIdPuntoVenta() != null && pk.getIdProducto() != null) {\r\n stmt.setInt(IDaoConstants.INT_ONE, pk.getIdPuntoVenta());\r\n stmt.setInt(IDaoConstants.INT_TWO,\r\n pk.getIdProducto().intValue());\r\n }\r\n else {\r\n stmt.setNull(IDaoConstants.INT_ONE, java.sql.Types.INTEGER);\r\n stmt.setNull(IDaoConstants.INT_TWO, java.sql.Types.INTEGER);\r\n }\r\n int rows = stmt.executeUpdate();\r\n long t2 = System.currentTimeMillis();\r\n System.out.println(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(stmt);\r\n }\r\n }", "public void delete(NominaPuestoPk pk) throws NominaPuestoDaoException;", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "public void deleteIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENTDEL);\r\n\t\t\t\r\n\t\t\tpstmt.setString(1, i.getGiocatore());\r\n\t\t\tpstmt.setInt(2, 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 boolean EliminarProducto(int id) {\n boolean status=false;\n int res =0;\n try {\n conectar();\n res=state.executeUpdate(\"delete from producto where idproducto=\"+id+\";\");\n \n if(res>=1){\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }", "public void delete(TipologiaStrutturaPk pk) throws TipologiaStrutturaDaoException;", "@Override\r\n\tpublic boolean delete(Pilote obj) {\r\n\t\tboolean succes=true;\r\n\t\tString req = \"delete from \" + TABLE + \" where numPil= ?\" + \";\";\r\n\t\tPreparedStatement pst;\r\n\t\ttry {\r\n\t\t\tpst = Connexion.getInstance().prepareStatement(req);\r\n\t\t\tpst.setInt(1, obj.getNumPil());\r\n\t\t\tpst.executeUpdate();\r\n\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tsucces=false;\r\n\t\t\tSystem.out.println(\"Echec de la tentative delete pilote : \" + e.getMessage()) ;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn succes;\r\n\t}", "@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public int eliminar(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"DELETE FROM conftbc_producto WHERE idmodelo = ?\";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tps.setInt(1,producto.getModelo().getIdmodelo());\n\t\t\tint rpta = ps.executeUpdate();\t\t\n\t\t\tthis.objCnx.confirmarDB();\n\t\t\treturn rpta;\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally {\t\t\t\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public void deleteProveedor(Proveedor proveedor) {\n\t\tdelete(proveedor);\n\t}", "@Override\n\t@Transactional // de escritura\n\tpublic void deleteById(Long id) {\n\t\tproductoDao.deleteById(id);\n\t}", "public void deleteProduto(int cd_Produto) {\n pdao.deleteProduto(cd_Produto);\n }", "@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}", "private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }", "@Override\n public void delete(FecetProrrogaOrdenPk pk) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_DELETE).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n getJdbcTemplateBase().update(query.toString(), pk.getIdProrrogaOrden());\n\n }", "int deleteByPrimaryKey(String idTipoComprobante) throws SQLException;", "@Override\n\tpublic void delete(Iscrizioni o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tIscrizioni i = em.find(Iscrizioni.class, o.getIdIscrizione());\n\t\tem.remove(i);\n//\t\tObject[] campi = { o.getIdIscrizione() };\n//\t\tString sql = \"DELETE FROM `iscrizioni` WHERE `idIscrizione` = ? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n\t}", "public void delete(ClientePk pk) throws ClienteDaoException;", "void deleteProduct(Long id);", "public void delete(SmsAgendaGrupoPk pk) throws SmsAgendaGrupoDaoException;", "public boolean eliminarproducto(ProductoDTO c) {\r\n \r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_DELETE);\r\n ps.setInt(1, c.getId());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Prudcto eliminado exitosamente\");\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"No se ha podido registrar\");\r\n return false;\r\n\r\n }", "@Override\r\npublic int delete(int id) {\n\treturn detalle_pedidoDao.delete(id);\r\n}", "@Override\r\n\tpublic void delete(int idStrumento) {\n\t\tstrumentoRepository.delete(idStrumento);\r\n\t}", "@DeleteMapping(\"/productos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProducto(@PathVariable Long id) {\n log.debug(\"REST request to delete Producto : {}\", id);\n productoRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public int productDelete(Product product){\n int rowsAffected = 0;\n connect();\n String sql = \"DELETE FROM productos WHERE id_producto = ?\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, Integer.parseInt(product.getProductId()));\n rowsAffected = ps.executeUpdate();\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return rowsAffected;\n }", "public void deleteProducto(Producto producto) {\n\t\tdelete(producto);\n\t}", "public int deleteByPrimaryKey(Integer id) {\n Profesor key = new Profesor();\n key.setId(id);\n int rows = getSqlMapClientTemplate().delete(\"tbl_profesor.ibatorgenerated_deleteByPrimaryKey\", key);\n return rows;\n }", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "@DELETE\r\n @Path(\"{proveedorId: \\\\d+}\")\r\n public void eliminarProveedorID(@PathParam(\"proveedorId\") Long proveedorId) {\r\n ProveedorEntity entity = proveedorLogic.getProveedor(proveedorId);\r\n if (entity == null) {\r\n throw new WebApplicationException(\"El recurso /proveedores/\" + proveedorId + \" no existe.\", 404);\r\n }\r\n proveedorLogic.deleteProveedor(proveedorId);\r\n }", "int deleteByPrimaryKey(String shoppingCartId);", "public void delete(TipoPk pk) throws TipoDaoException;", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "@Override\n\tpublic void delete(SeguUsuario cliente) {\n\t\tusuarioDao.delete(cliente);\n\t\t\n\t}", "int deleteByPrimaryKey(String idTipoPersona) throws SQLException;", "@DeleteMapping(\"/selo-cartaos/{id}\")\n public ResponseEntity<Void> deleteSeloCartao(@PathVariable Long id) {\n log.debug(\"REST request to delete SeloCartao : {}\", id);\n seloCartaoService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "void deleteProduct(Integer productId);", "public static void deletarProduto(long id_produto) {\r\n PreparedStatement stmn = null;\r\n try {\r\n stmn = connection.prepareStatement(\"Delete from produto where id_produto = ?\");\r\n stmn.setLong(1, id_produto);\r\n\r\n int row = stmn.executeUpdate();\r\n if (row == 0) {\r\n System.out.println(\"Não foi possível excluir o registro do id \" + id_produto);\r\n } else {\r\n System.out.println(\"Produto exluído com sucesso\");\r\n }\r\n } catch (SQLException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n }", "public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }", "public void delete(DatiBancariPk pk) throws DatiBancariDaoException;", "@Override\r\n\tpublic int deleteOne(int id) {\n\t\treturn productRawDao.deleteByPrimaryKey(id);\r\n\t}", "public static int delete(Product p) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"DELETE FROM product \"\n + \"WHERE productCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, p.getProductCode());\n\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "@Override\r\n public void elminarVehiculo(String placa) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"delete from vehiculo where veh_placa=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, placa);\r\n int rowsDelete = statement.executeUpdate();\r\n if(rowsDelete > 0){\r\n JOptionPane.showMessageDialog(null, \"Registro eliminado de manera correcta\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(VehiculoDAOJDBCImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void delete(RutaPk pk) throws RutaDaoException;", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "@Delete({\n \"delete from SALEORDERDETAIL\",\n \"where SOID = #{soid,jdbcType=VARCHAR}\",\n \"and LINENO = #{lineno,jdbcType=DECIMAL}\"\n })\n int deleteByPrimaryKey(@Param(\"soid\") String soid, @Param(\"lineno\") Long lineno);", "public int delete(FurniturePiece piece) throws Exception {\n try ( Connection conn = ConnectionDB.getConnection(); PreparedStatement ps = conn.prepareStatement(SQL_DELETE_PIECE)) {\n ps.setInt(1, piece.getId());\n int reg = ps.executeUpdate();\n return reg;\n } catch (Exception e) {\n new InsertUtilities().throwCustomError(\"Error al borrar pieza, verifica los datos ingresados, \" + e.getMessage());\n return 0;\n }\n }", "@Transactional\n\tpublic void delete(Long id_interesado) {\n\t\tinteresadoDao.deleteById(id_interesado);\n\t\t\n\t}", "@Override\n\tpublic void deleteOne(String id) {\n\t\tsqlSession.delete(\"product.deleteOne\", id);//상품 삭제\n\t\tsqlSession.delete(\"product.deleteAll\", id);//상품 시작일 모두 삭제\n\t}", "@DeleteMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProcesador(@PathVariable Long id) {\n log.debug(\"REST request to delete Procesador : {}\", id);\n procesadorRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }", "@Override\n public boolean eliminar(ModelCliente cliente) {\n strSql = \"DELETE CLIENTE WHERE ID_CLIENTE = \" + cliente.getIdCliente();\n \n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }", "public void borrar(Especialiadad espe,JTextField txtcodigo ){\r\n\t\tConnection con = null;\r\n\t\tStatement stmt = null;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tSystem.out.println(txtcodigo.getText());\r\n\t\tString sql = \"DELETE FROM Especialiadad \"\r\n\t\t\t\t+ \"WHERE codigo = \"+ txtcodigo.getText();\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\tcon = ConexionBD.getConnection();\r\n\t\t stmt = con.createStatement();\r\n\t\t result = stmt.executeUpdate(sql);\r\n\t\t//\tPreparedStatement ps= con.prepareStatement(sql);\r\n\t\t // ps.setInt(1, espe.getCodigo());\r\n\t\t // ps.setString(2, espe.getNombre());\r\n\t\t \t\t \r\n\t\t \r\n\t\t// ps.executeUpdate();\r\n\t\t \r\n\t\t} catch (Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tConexionBD.close(con);\r\n\t\t}\r\n\t\t}", "@ResponseStatus(HttpStatus.OK)\n\t@ResponseBody\n\t@DeleteMapping(value = \"/{id}\", produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic void deleteProductoById(@PathVariable(\"id\") Long id) {\n\t\t// Verifica si el producto existe\n\t\tProducto producto = productoService.findById(id);\n\n\t\tInventario invantario = inventarioService.findByCodProducto(producto.getCodProducto());\n\t\tinventarioService.delete(invantario);\n\t}", "@Delete({ \"delete from public.tb_sistema\", \"where id_sistema = #{idSistema,jdbcType=INTEGER}\" })\n\tint deleteByPrimaryKey(Integer idSistema);", "public void eliminar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //eliminamos el Dia\n session.delete(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n }", "public void deleteCliente(Cliente cliente) throws SQLException, Exception {\n\n\t\tString sql = String.format(\"DELETE FROM %1$s.CLIENTE WHERE CEDULA = %2$d\", USUARIO, cliente.getCedula());\n\n\t\tSystem.out.println(sql);\n\n\t\tPreparedStatement prepStmt = conn.prepareStatement(sql);\n\t\trecursos.add(prepStmt);\n\t\tprepStmt.executeQuery();\n\t}", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public void delete(Sale sale) {\n sale_dao.delete(sale);\n }", "@Delete({\n \"delete from PURCHASE\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n int deleteByPrimaryKey(BigDecimal id);", "@Override\n\tpublic void delete(int id) {\n\t\tdispositivoDao.deleteById(id);\n\t}", "@Override\n @Transactional\n public void delete(long id) {\n productoDao.deleteById(id);\n }", "public boolean eliminar(){\n\t\tString query = \"DELETE FROM Almacen WHERE Id_Producto = \"+this.getId();\n\t\tif(updateQuery(query)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic int delete(Integer pk) throws SQLExceptionIFOpenDoors {\n\t\treturn 0;\r\n\t}", "public void delete(CrGrupoFormularioPk pk) throws CrGrupoFormularioDaoException;", "@Override\n\tpublic void delete(MedioPago entidad) {\n\t\t\n\t}", "public RespuestaBD eliminarRegistro(int codigoFlujo, int secuencia) {\n/* 296 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 299 */ String s = \"delete from wkf_detalle where codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* 304 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 306 */ catch (Exception e) {\n/* 307 */ e.printStackTrace();\n/* 308 */ Utilidades.writeError(\"FlujoDetalleDAO:eliminarRegistro \", e);\n/* 309 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 311 */ return rta;\n/* */ }", "public static int delete(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from periode where id=?\"); \n ps.setInt(1,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "public void deleteByVaiTroID(long vaiTroId);", "@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}", "void eliminarPedido(UUID idPedido);", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "public void delete(Premie premie){\n premieRepository.delete(premie);\n }", "@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}", "int deleteByPrimaryKey(String goodsId);", "public static void eliminarEstudiante(String Nro_de_ID) {\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion Establecida\");\r\n Statement sentencia = conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"delete from estudiante where Nro_de_ID = '\" + Nro_de_ID + \"'\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "public void eliminar(Procedimiento procedimiento) {\n IProcedimientoDao dao = new ProcedimientoDaoImpl();\n dao.eliminarProcedimiento(procedimiento);\n }", "int deleteByPrimaryKey(Byte shippingId);", "@Override\r\n\tpublic void prodDelete(ProductVO vo) {\n\t\tadminDAO.prodDelete(vo);\r\n\t}", "@Override\n\tpublic void deleteProduct(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Products where id=:productId\");\n\t\t\n\t\ttheQuery.setParameter(\"productId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t\t\n\t}", "@Override\n\tpublic void delete(int codigo) {\n\t\tSystem.out.println(\"Borra el empleado con \" + codigo + \" en la BBDD.\");\n\t}", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "void eliminar(PK id);", "public void delete(Cliente cliente) {\n\t\tdao.delete(cliente);\n\t}", "@Delete({\n \"delete from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);", "public boolean eliminarCliente(int codigo){\n\t\ttry{\n\t\t\tString insert = \"DELETE FROM clientes WHERE codigo = ? ;\";\n\t\t\tPreparedStatement ps = con.prepareStatement(insert);\n\t\t\tps.setInt(1, codigo);\n\t\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\t\t\t\n\t\t\tps.executeUpdate();\t\n\t\t\tcon.commit();\n\t\t\treturn true;\n\t\t}catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n\tpublic int delById(int id) {\n\t\tint flag=0;\r\n\t\ttry {\r\n\t\t\tString sql=\"DELETE FROM payedproduct WHERE PayedProduct_id=?\";\r\n\t\t\tflag= qr.update(sql, id);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\n\tpublic void eliminar(int id) {\n\t\tdao.deleteById(id);;\n\t}", "public void delete(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n String[] params = {doacao.getId_doacao().toString()};\n sqLiteDatabase.delete(\"doacao\",\"id_doacao = ?\",params);\n\n }", "@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}", "public void delete(RelacionConceptoEmbalajePk pk) throws RelacionConceptoEmbalajeDaoException;", "@Override\n public void excluir(Pessoa pessoa) {\n String sql = \"DELETE FROM pessoa WHERE uuid=?\";\n try {\n this.conexao = Conexao.abrirConexao();\n PreparedStatement statement = conexao.prepareStatement(sql);\n statement.setLong(1, pessoa.getId());\n statement.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n\n }", "@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }", "@Override\n\tpublic void deleteOeuvre(Long id) {\n\t\toeuvreDao.deleteAvis(id);\n\t\toeuvreDao.deleteById(id);\n\t}", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }" ]
[ "0.7337183", "0.6982083", "0.6950407", "0.69399464", "0.6808016", "0.6806723", "0.6711378", "0.6704109", "0.6699876", "0.6694093", "0.66789204", "0.66522163", "0.66285974", "0.6582788", "0.6570374", "0.6548588", "0.6544602", "0.6519436", "0.65097445", "0.6479255", "0.647613", "0.6458168", "0.64522", "0.64362186", "0.64338785", "0.64278173", "0.6409335", "0.63801855", "0.6370082", "0.6351011", "0.63458455", "0.6330416", "0.63281745", "0.63278425", "0.6327813", "0.631824", "0.6312929", "0.6306544", "0.62983936", "0.62947273", "0.6288236", "0.6274506", "0.6252115", "0.6243774", "0.62366503", "0.6224534", "0.6218434", "0.62072676", "0.6206999", "0.6200837", "0.6187437", "0.61832637", "0.6183078", "0.6174247", "0.6171964", "0.6161543", "0.61574817", "0.6155507", "0.61548895", "0.6154443", "0.61538935", "0.6151158", "0.6141456", "0.61336786", "0.6133194", "0.61325264", "0.61256176", "0.61201555", "0.6119803", "0.6119622", "0.61179864", "0.6115616", "0.6105709", "0.61022633", "0.60958356", "0.609261", "0.609242", "0.60911787", "0.6088161", "0.6086883", "0.60857326", "0.60842365", "0.60809666", "0.60770714", "0.60700864", "0.60680217", "0.6060652", "0.60558194", "0.6054439", "0.60376656", "0.6030928", "0.6029243", "0.6023005", "0.60218894", "0.60158175", "0.601346", "0.6013055", "0.60121423", "0.60117984", "0.600661" ]
0.7638367
0
Returns the rows from the sgfens_pedido_producto table that matches the specified primarykey value.
public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\r\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "public SgfensBanco findByPrimaryKey(SgfensBancoPk pk) throws SgfensBancoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public Cliente findByPrimaryKey(ClientePk pk) throws ClienteDaoException;", "public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "ItoProduct selectByPrimaryKey(Integer id);", "public NominaPuesto findByPrimaryKey(NominaPuestoPk pk) throws NominaPuestoDaoException;", "Product selectByPrimaryKey(Long id);", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public FecetProrrogaOrden findByPrimaryKey(FecetProrrogaOrdenPk pk) {\n return findByPrimaryKey(pk.getIdProrrogaOrden());\n }", "ProductSellerGoods selectByPrimaryKey(Integer productId);", "Product selectByPrimaryKey(Integer id);", "public DatiBancari findByPrimaryKey(DatiBancariPk pk) throws DatiBancariDaoException;", "Prueba selectByPrimaryKey(Integer id);", "PrhFree selectByPrimaryKey(Integer id);", "public TipologiaStruttura findByPrimaryKey(TipologiaStrutturaPk pk) throws TipologiaStrutturaDaoException;", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "Procdef selectByPrimaryKey(String id);", "public Cliente findByPrimaryKey(int idCliente) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "GoodsPo selectByPrimaryKey(Long id);", "public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public static ru.terralink.mvideo.sap.Orders findByPrimaryKey(java.lang.String IV_FO_TOR_ID\n ,java.lang.String IV_FU_TOR_ID)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByPrimaryKey\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \"SELECT x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x\"\n + \".\\\"_rf\\\",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ? AND x.\\\"bm\\\" = ?)\";\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n IV_FU_TOR_ID,\n };\n Object res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, ru.terralink.mvideo.sap.Orders.class);\n return (ru.terralink.mvideo.sap.Orders)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "public Tblproductos findById(Integer idSucursal){\n em = getEntityManager();\n return em.find(Tblproductos.class, idSucursal);\n }", "public Pedido select(Integer codigo) {\r\n\t\ttry (Connection con = db.getConnection()) {\r\n\r\n\t\t\tString sql = \"SELECT * FROM pedidos WHERE codigo = ?\";\r\n\r\n\t\t\tPreparedStatement cmd = con.prepareStatement(sql);\r\n\r\n\t\t\tcmd.setInt(1, codigo);\r\n\t\t\tResultSet rs = cmd.executeQuery();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tPedido pedido = new Pedido();\r\n\t\t\t\tpedido.setCodigo(codigo);\r\n\t\t\t\tpedido.setCod_vend(rs.getInt(\"cod_vend\"));\r\n\t\t\t\tpedido.setCod_cli(rs.getInt(\"cod_cli\"));\r\n\t\t\t\tpedido.setData_pedido(rs.getDate(\"data_pedido\"));\r\n\t\t\t\tpedido.setData_entrega(rs.getDate(\"data_entrega\"));\r\n\t\t\t\tpedido.setFrete(rs.getDouble(\"frete\"));\r\n\t\t\t\tpedido.setStatus(Status_ped.valueOf(rs.getString(\"status\")));\r\n\t\t\t\t\r\n\t\t\t\tList<Item> itens = new ArrayList();\r\n\t\t\t\tsql = \"SELECT * FROM detalhes_pedidos WHERE cod_ped = ?\";\r\n\t\t\t\tcmd = con.prepareStatement(sql);\r\n\t\t\t\tcmd.setInt(1, codigo);\r\n\t\t\t\trs = cmd.executeQuery();\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\tItem item = new Item();\r\n\t\t\t\t\titem.setCod_ped(rs.getInt(\"cod_ped\"));\r\n\t\t\t\t\titem.setProduto(ProdutoDAO.select(rs.getInt(\"cod_prod\")));\r\n\t\t\t\t\titem.setQuantidade(rs.getInt(\"quantidade\"));\r\n\t\t\t\t\titens.add(item);\r\n\t\t\t\t}\r\n\t\t\t\tpedido.setItens(itens);\r\n\t\t\t\t\r\n\t\t\t\treturn pedido;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "Disproduct selectByPrimaryKey(String samId);", "NjProductTaticsRelation selectByPrimaryKey(String id);", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "UserPonumberGoods selectByPrimaryKey(String ponumberGoodsId);", "CartDO selectByPrimaryKey(Integer id);", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "Goods selectByPrimaryKey(String goodsId);", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "Tipologia selectByPrimaryKey(BigDecimal id);", "public Ruta findByPrimaryKey(RutaPk pk) throws RutaDaoException;", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "TRepairs selectByPrimaryKey(Integer id);", "Device selectByPrimaryKey(String deviceNo);", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "ProductPricelistEntityWithBLOBs selectByPrimaryKey(Integer id);", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "ApplicationDO selectByPrimaryKey(ApplicationDOKey key);", "@Override\n\tpublic CLIENTE pesquisar(int id_cliente) {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE WHERE ID_CLIENTE = ?\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setInt(1, id_cliente);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente.setId_cliente(res.getInt(\"ID_CLIENTE\"));\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cliente;\n\t}", "@Override\n public long getPrimaryKey() {\n return _partido.getPrimaryKey();\n }", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public Proveedor buscarProveedor(long id) {\n EntityManager em = getEntityManager();\n try {\n return em.find(Proveedor.class, id);\n } finally {\n em.close();\n }\n }", "public Product searchId(int idProduc) {\n\t\tSession session = getSessionFactory().openSession();\n\t\treturn null;\n\t}", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "SwipersDO selectByPrimaryKey(Integer id);", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "DepAcctDO selectByPrimaryKey(String depCode);", "@Query(value = \"SELECT * FROM proveedor WHERE id=:id\", nativeQuery = true)\n public Proveedor obtenerPorId(@Param(\"id\") int id);", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "TCar selectByPrimaryKey(Integer fitemid);", "@Override\n\tpublic Producto buscarIdProducto(Integer codigo) {\n\t\treturn productoDao.editarProducto(codigo);\n\t}", "Shipping selectByPrimaryKey(Byte shippingId);", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public NominaPuesto findByPrimaryKey(int idPuesto) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "Cargo selectByPrimaryKey(Integer idCargo);", "Ltsprojectpo selectByPrimaryKey(Long id);", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "OrderPO selectByPrimaryKey(Integer id);", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "TCpySpouse selectByPrimaryKey(Integer id);", "private int getProductIdFromDatabase() throws ClassNotFoundException, SQLException\r\n {\n String randomKey = Helper.getRandomString();\r\n \r\n //Importiamo il driver di mysql\r\n \r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n //Tramite l'oggetto conn, stiamo creando la connessione al database \r\n Connection con = Helper.getDatabaseConnection();\r\n \r\n //L'oggetto stmt esegue fisicamente la query sul db\r\n Statement stmt=con.createStatement();\r\n //Genero la query da eseguire\r\n String query = \"INSERT INTO products (price,name,randomkey) VALUES ('\" + this.price + \"','\" + this.name + \"','\" + randomKey + \"')\";\r\n //Eseguo la query di inserimento sul DB\r\n stmt.executeUpdate(query);\r\n \r\n //Genero la query che estrae l'id della macchinetta appena inserita\r\n query = \"SELECT products_id FROM products WHERE randomkey='\" + randomKey + \"'\";\r\n //Estraggo i dati della query, associati ad un oggetto di tipo ResultSet\r\n ResultSet rs=stmt.executeQuery(query);\r\n \r\n //Leggo la prima riga dei risultati dello statement\r\n rs.next();\r\n \r\n //Converto in intero il primo campo del resultset relativo alla query precedente\r\n int retvalue =rs.getInt(1);\r\n \r\n //Cancello dal database la randomkey che non mi serve più\r\n query = \"UPDATE products SET randomkey = NULL WHERE products_id = \" + retvalue;\r\n stmt.executeUpdate(query);\r\n \r\n return retvalue;\r\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "EcsSupplierRebate selectByPrimaryKey(Integer rebateId);", "public Faq findByPrimaryKey(FaqPk pk) throws FaqDaoException;", "Promo selectByPrimaryKey(Integer id);", "List<Purchase> retrieveForProductID(Long productID) throws SQLException, DAOException;", "Disease selectByPrimaryKey(Integer id);", "@Override\n\tpublic ImageEntity find(Object primarykey) {\n\t\treturn (ImageEntity) DatabaseContext.find(ImageEntity.class, primarykey);\n\t}", "public Cliente[] findWhereIdClienteEquals(int idCliente) throws ClienteDaoException;", "public Product getProductByPrimaryKey(Integer tid)\r\n\t\t\tthrows DataAccessException {\n\t\treturn productDAO.getProductByPrimaryKey(tid);\r\n\t}", "DashboardGoods selectByPrimaryKey(Integer id);", "public Resourcesvalue selectByPK(Long pk){\n \tif(pk==null)\n \t\treturn null;\n\t\tResourcesvalue record = (Resourcesvalue) this.queryForObject(\"Resourcesvalue.selectByPK\", pk);\n\t\treturn record;\n }", "public Profesor selectByPrimaryKey(Integer id) {\n Profesor key = new Profesor();\n key.setId(id);\n Profesor record = (Profesor) getSqlMapClientTemplate().queryForObject(\"tbl_profesor.ibatorgenerated_selectByPrimaryKey\", key);\n return record;\n }", "Dress selectByPrimaryKey(Integer did);", "public void ProductsProvider(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE proveedor = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "Kaiwa selectByPrimaryKey(String maht);", "Dormitory selectByPrimaryKey(Integer id);", "SupplierInfo selectByPrimaryKey(Long id);", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "TDwBzzxBzflb selectByPrimaryKey(String objId);", "ProEmployee selectByPrimaryKey(String id);", "ItemStockDO selectByPrimaryKey(Integer id);", "ItemStockDO selectByPrimaryKey(Integer id);", "public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}", "public static Produto pesqProdutoCodigo(int codigo) throws SQLException, ProdutoException{\n\t\tPreparedStatement objSQL = \n\t\t\tobjcon.prepareStatement(\"SELECT * FROM TABPRODUTOS WHERE CODIGO = ?\");\n\t\tobjSQL.setInt(1, codigo);\n\t\t// executeQuery, executa o comando de SQL colocado no prepareStatemente\n\t\tResultSet objResp = objSQL.executeQuery();\n\t\tif (objResp.next()) {\n\t\t\treturn new Produto(\n\t\t\t\t\tobjResp.getInt(\"CODIGO\"), \n\t\t\t\t\tobjResp.getString(\"PRODUTO\"), \n\t\t\t\t\tobjResp.getDouble(\"PRECO\"), \n\t\t\t\t\tobjResp.getDate(\"DATAPRECO\"));\n\t\t} else {\n\t\t\tthrow new ProdutoException(\"Não existe produto para o código.\");\n\t\t}\t\n\t}" ]
[ "0.66776377", "0.66238904", "0.6415193", "0.63918227", "0.6241976", "0.62138844", "0.6151456", "0.6112614", "0.6024908", "0.60154015", "0.59575593", "0.59225297", "0.5880238", "0.58697486", "0.58691853", "0.5820611", "0.5819825", "0.57919484", "0.5790774", "0.57903445", "0.5754722", "0.5739493", "0.5738913", "0.5731241", "0.56678176", "0.56624717", "0.56581974", "0.5624484", "0.56009823", "0.5591048", "0.5577764", "0.55596536", "0.5556424", "0.55528384", "0.5550151", "0.55492467", "0.5532479", "0.5523574", "0.5520941", "0.55176324", "0.5516184", "0.54909295", "0.54654557", "0.54644823", "0.54620427", "0.54500586", "0.5439571", "0.54340184", "0.54334724", "0.5416125", "0.54154456", "0.54147464", "0.5407657", "0.54055554", "0.54040843", "0.5401857", "0.5394858", "0.53922826", "0.53768253", "0.536566", "0.53635323", "0.53611624", "0.5356992", "0.53518593", "0.5351606", "0.535117", "0.5348143", "0.53441477", "0.53418404", "0.53367555", "0.53356075", "0.5328607", "0.5327094", "0.5313386", "0.5311568", "0.5308584", "0.5305004", "0.53020823", "0.5295295", "0.5291709", "0.5288482", "0.52870816", "0.52684313", "0.5263232", "0.526119", "0.5247897", "0.52388597", "0.52303874", "0.522355", "0.5216102", "0.52081454", "0.5204031", "0.5202264", "0.5201004", "0.5200619", "0.5192534", "0.5187532", "0.5187532", "0.5186963", "0.5186004" ]
0.711805
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'ID_PEDIDO = :idPedido AND ID_CONCEPTO = :idConcepto'.
public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public RelacionConceptoEmbalaje[] findWhereIdConceptoEquals(int idConcepto) throws RelacionConceptoEmbalajeDaoException;", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "public List<PersonEntity> obtenerDatosPersonasPorId(int idCliente) {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes filtrando por ID\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONA_ID(), PersonEntity.class)\n\n\t\t\t\t\t// Entradas\n\t\t\t\t\t.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN)\n\n\t\t\t\t\t// Parametros\n\t\t\t\t\t.setParameter(1, idCliente);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONA_ID() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "@Override\n\tpublic CLIENTE pesquisar(int id_cliente) {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE WHERE ID_CLIENTE = ?\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setInt(1, id_cliente);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente.setId_cliente(res.getInt(\"ID_CLIENTE\"));\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cliente;\n\t}", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public List<Emprestimos> buscarPorPropriedade(String whereClause, Object parametro) {\n\t\treturn manager.createQuery(\"select e from Emprestimos e \" + whereClause + parametro, Emprestimos.class)\n\t\t .getResultList();\n\t}", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public List<PedidoIndividual> obtenerNuevosPedidosPorPedidoMesa(Long idPedido) throws QRocksException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic Servicos pesquisar(int idServicos) throws SQLException {\n\t\treturn null;\n\t}", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "public Cliente[] findWhereIdClienteEquals(int idCliente) throws ClienteDaoException;", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "@GetMapping(\"buscarProductos\")\n\tpublic List<Producto> getProductos(){\n\t\treturn this.productoServicios.findAll();\n\t}", "public Cliente[] findWhereGenericoEquals(int generico) throws ClienteDaoException;", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public List<Perguntas> getPerguntas(String servico) {\r\n String idSolicitacao = \"\";\r\n List<Perguntas> perguntas = new ArrayList<>();\r\n\r\n String sql = \"Select\\n\"\r\n + \" perguntas.Id_Perguntas,\\n\"\r\n + \" perguntas.pergunta,\\n\"\r\n + \" perguntas.Servico_id_servico,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \"\\n\"\r\n + \"INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" INNER JOIN perguntas on \t(servico.id_servico=perguntas.Servico_id_servico)\\n\"\r\n + \" WHERE solicitacoes.em_chamado = 3 and servico.id_servico = \" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n\r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n Perguntas p = new Perguntas();\r\n\r\n p.setIdPerguntas(rs.getInt(1));\r\n p.setIdServico(rs.getInt(3));\r\n p.setPergunta(rs.getString(2));\r\n idSolicitacao = rs.getString(4);\r\n perguntas.add(p);\r\n }\r\n mudaStatus(idSolicitacao);\r\n\r\n return perguntas;\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return perguntas;\r\n }", "public List getPorReferenteAProduto(long id) throws DaoException {\n\t\t// Existe no DAO\n\t\tCompartilhamentoProdutoDao dao = getDao();\n\t\tDaoConexao conn = dao.criaConexao();\n\t\tdao.setConexao(conn);\n\t\treturn dao.ListaPorProdutoReferenteA(id);\n\t}", "public List<ReciboPension> buscarRecibosDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "List<BeanPedido> getPedidos(String idUsuario);", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public DatiBancari[] findByStruttura(long fkStruttura) throws DatiBancariDaoException;", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public List<Payment> retrievePaymentsByPedido(Order order) throws DatabaseException {\n\t\ttry {\n\t\t\tthis.startConnection();\n\t\t\tString sql = \"SELECT id_payment FROM purchase WHERE id_order = \"\n\t\t\t\t\t+ returnValueStringBD(String.valueOf(order.getId()));\n\t\t\tResultSet rs = command.executeQuery(sql);\n\t\t\tList<String> id_payments = new ArrayList<String>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString pu = rs.getString(\"id_payment\");\n\t\t\t\tid_payments.add(pu);\n\t\t\t}\n\t\t\tList<Payment> payments = new ArrayList<Payment>();\n\t\t\tfor (String id : id_payments) {\n\t\t\t\tPayment pa = this.select(Integer.parseInt(id));\n\t\t\t\tpayments.add(pa);\n\t\t\t}\n\t\t\treturn payments;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.closeConnection();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "public NominaPuesto[] findWhereIdEmpresaEquals(int idEmpresa) throws NominaPuestoDaoException;", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }" ]
[ "0.6980257", "0.6917965", "0.6559193", "0.62814003", "0.6273163", "0.6245627", "0.6243226", "0.62420905", "0.61966926", "0.6169178", "0.6162142", "0.6148656", "0.60809207", "0.60716075", "0.6030132", "0.60161227", "0.600593", "0.59866565", "0.59404254", "0.59279346", "0.59226483", "0.5922628", "0.5916215", "0.5906615", "0.5898024", "0.58834136", "0.5879831", "0.5864196", "0.58425665", "0.5837705", "0.5837501", "0.58229625", "0.58212966", "0.5810122", "0.58036184", "0.5790442", "0.57804763", "0.57736754", "0.57697195", "0.5766292", "0.5758763", "0.57186496", "0.57169104", "0.5712775", "0.57090604", "0.5704292", "0.57013535", "0.57002723", "0.56944466", "0.5693933", "0.56925464", "0.5691161", "0.56737643", "0.5667528", "0.56623906", "0.565829", "0.5657704", "0.5640442", "0.5633744", "0.5630415", "0.5623622", "0.5622576", "0.5619267", "0.560278", "0.5594736", "0.55877095", "0.5586006", "0.55847645", "0.5544004", "0.55187833", "0.55174816", "0.5515273", "0.55092275", "0.55088824", "0.5505575", "0.55031705", "0.54947835", "0.5493769", "0.5493674", "0.54906905", "0.5490098", "0.5489601", "0.54843056", "0.54784214", "0.5474793", "0.5474299", "0.54723114", "0.5468981", "0.5464602", "0.5456529", "0.5454933", "0.5454433", "0.54542696", "0.5453936", "0.5451885", "0.5446552", "0.5436392", "0.54303104", "0.5427661", "0.54167694" ]
0.68810725
2
Returns all rows from the sgfens_pedido_producto table that match the criteria ''.
public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public List<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public void ProductsSearch(DefaultTableModel tableModel, String parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE descripcion LIKE ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, \"%\" + parameter + \"%\");\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM produtos WHERE prd_nome LIKE %?%\", nativeQuery = true)\r\n public List<ProdutosModel> findAllLike (String pesquisa);", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public static void searchAll(){\r\n try {\r\n singleton.dtm = new DefaultTableModel(); \r\n singleton.dtm.setColumnIdentifiers(general);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM articulos\");\r\n //SELECT a.*,c.nombre FROM articulos a,categorias c,prodcategoria p WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria\r\n \r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public Cliente[] findWhereNombreComercialEquals(String nombreComercial) throws ClienteDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public Cliente[] findWhereNombreClienteEquals(String nombreCliente) throws ClienteDaoException;", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public List<Produto> findByNomeLike(String nome);", "public Cliente[] findWhereNumeroEquals(String numero) throws ClienteDaoException;", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "public List<ProdutoModel> search(Integer page, Integer linesPerPage) {\n \t\treturn repository.findAll();\n \t}", "public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "public List<Proveedor> findByAliasContaining(String alias);", "public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public List<Product> search(String word, String codigo) {\n\t\tSession session = getSessionFactory().openSession();\n\t\treturn null;\n\t}", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "static Producto busqueda(int codigo, Vector productos){ \r\n \tboolean band = false;\r\n \t//si return no es igual a null nos regresara el codigo\r\n Producto p,retornP = null; \r\n //For para comparar todos los codigos del vector que digitamos\r\n for(int x = 0; x < productos.size(); x++){ \r\n \tp = (Producto) productos.elementAt(x);\r\n \t//si el codigo es el mismo regresamos el producto que encontramos\r\n if(p.getCodigo() == codigo) \r\n \tretornP = p;\r\n }\r\n return retornP;\r\n }", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public Cliente[] findWhereApellidoPaternoClienteEquals(String apellidoPaternoCliente) throws ClienteDaoException;", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui obtenemos la estructura de la tabla(\"Los encabezados\")\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M Obtenemos los metadatos para obtener la cantidad del columnas que llegan\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M la cantidad la alojamos dentro de un entero\r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "@Query(\"SELECT entity.tiposBancos FROM VwBancos entity WHERE entity.clientes.id = :id AND (:cdTipoBanco is null OR entity.tiposBancos.cdTipoBanco = :cdTipoBanco) AND (:dsTipoBanco is null OR entity.tiposBancos.dsTipoBanco like concat('%',:dsTipoBanco,'%')) AND (:dsIconeBanco is null OR entity.tiposBancos.dsIconeBanco like concat('%',:dsIconeBanco,'%'))\")\n public Page<TiposBancos> listTiposBancosSpecificSearch(@Param(value=\"id\") java.lang.Double id, @Param(value=\"dsTipoBanco\") java.lang.String dsTipoBanco, @Param(value=\"dsIconeBanco\") java.lang.String dsIconeBanco, Pageable pageable);", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "public Cliente[] findWherePaisEquals(String pais) throws ClienteDaoException;", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;" ]
[ "0.6749203", "0.6703222", "0.6585278", "0.63600445", "0.626345", "0.62392926", "0.62093776", "0.61952287", "0.6176639", "0.61331826", "0.6021486", "0.60194224", "0.60149854", "0.6012858", "0.600921", "0.600234", "0.60004836", "0.59795344", "0.59717876", "0.5970845", "0.5965563", "0.5954951", "0.59533495", "0.59378666", "0.59284216", "0.5913346", "0.5909869", "0.5885488", "0.5857385", "0.5850506", "0.58060956", "0.58024186", "0.5796711", "0.57839876", "0.57756275", "0.5757381", "0.57570356", "0.57206", "0.5713845", "0.5710207", "0.5695626", "0.56853414", "0.56852466", "0.567293", "0.566378", "0.56521666", "0.5648968", "0.56415737", "0.5636977", "0.562818", "0.56135136", "0.5597551", "0.5595493", "0.55916816", "0.5590879", "0.55871964", "0.5574981", "0.5550918", "0.55443835", "0.5540575", "0.55387866", "0.55379057", "0.5534103", "0.5514501", "0.5513353", "0.55103683", "0.55028737", "0.5502761", "0.5502101", "0.5501644", "0.5501483", "0.5501417", "0.549663", "0.5492971", "0.5492164", "0.5486703", "0.5486539", "0.5481563", "0.5477182", "0.5470181", "0.5464139", "0.54606795", "0.54546255", "0.544884", "0.5448223", "0.5446567", "0.5446295", "0.5444143", "0.5434445", "0.5426496", "0.54197973", "0.5419524", "0.53983134", "0.5396964", "0.5394822", "0.53920346", "0.53902024", "0.5379365", "0.537822", "0.53768593" ]
0.62181604
6
Returns all rows from the sgfens_pedido_producto table that match the criteria 'ID_PEDIDO = :idPedido'.
public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "List<BeanPedido> getPedidos(String idUsuario);", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public List<PedidoIndividual> obtenerNuevosPedidosPorPedidoMesa(Long idPedido) throws QRocksException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic CLIENTE pesquisar(int id_cliente) {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE WHERE ID_CLIENTE = ?\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setInt(1, id_cliente);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente.setId_cliente(res.getInt(\"ID_CLIENTE\"));\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cliente;\n\t}", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<PersonEntity> obtenerDatosPersonasPorId(int idCliente) {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes filtrando por ID\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONA_ID(), PersonEntity.class)\n\n\t\t\t\t\t// Entradas\n\t\t\t\t\t.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN)\n\n\t\t\t\t\t// Parametros\n\t\t\t\t\t.setParameter(1, idCliente);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONA_ID() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public Pedido buscarPedidos(Long id) {\n\t\treturn em.find(Pedido.class, id);\n\t}", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public List<PedidoProveedorEntity> getPedidos() {\r\n return pedidos;\r\n }", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public List getPorReferenteAProduto(long id) throws DaoException {\n\t\t// Existe no DAO\n\t\tCompartilhamentoProdutoDao dao = getDao();\n\t\tDaoConexao conn = dao.criaConexao();\n\t\tdao.setConexao(conn);\n\t\treturn dao.ListaPorProdutoReferenteA(id);\n\t}", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<Payment> retrievePaymentsByPedido(Order order) throws DatabaseException {\n\t\ttry {\n\t\t\tthis.startConnection();\n\t\t\tString sql = \"SELECT id_payment FROM purchase WHERE id_order = \"\n\t\t\t\t\t+ returnValueStringBD(String.valueOf(order.getId()));\n\t\t\tResultSet rs = command.executeQuery(sql);\n\t\t\tList<String> id_payments = new ArrayList<String>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString pu = rs.getString(\"id_payment\");\n\t\t\t\tid_payments.add(pu);\n\t\t\t}\n\t\t\tList<Payment> payments = new ArrayList<Payment>();\n\t\t\tfor (String id : id_payments) {\n\t\t\t\tPayment pa = this.select(Integer.parseInt(id));\n\t\t\t\tpayments.add(pa);\n\t\t\t}\n\t\t\treturn payments;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.closeConnection();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "List<BeanPedido> getPedidos();", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\r\n }", "public List<Pedido> findAll() {\n\t\treturn em.createQuery(\"select from Pedidos\").getResultList();\n\t}", "public Ruta[] findWhereIdUsuarioEquals(int idUsuario) throws RutaDaoException;", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public Cliente[] findWhereIdClienteEquals(int idCliente) throws ClienteDaoException;", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "@Override\n\tpublic Servicos pesquisar(int idServicos) throws SQLException {\n\t\treturn null;\n\t}", "public Pedido select(Integer codigo) {\r\n\t\ttry (Connection con = db.getConnection()) {\r\n\r\n\t\t\tString sql = \"SELECT * FROM pedidos WHERE codigo = ?\";\r\n\r\n\t\t\tPreparedStatement cmd = con.prepareStatement(sql);\r\n\r\n\t\t\tcmd.setInt(1, codigo);\r\n\t\t\tResultSet rs = cmd.executeQuery();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tPedido pedido = new Pedido();\r\n\t\t\t\tpedido.setCodigo(codigo);\r\n\t\t\t\tpedido.setCod_vend(rs.getInt(\"cod_vend\"));\r\n\t\t\t\tpedido.setCod_cli(rs.getInt(\"cod_cli\"));\r\n\t\t\t\tpedido.setData_pedido(rs.getDate(\"data_pedido\"));\r\n\t\t\t\tpedido.setData_entrega(rs.getDate(\"data_entrega\"));\r\n\t\t\t\tpedido.setFrete(rs.getDouble(\"frete\"));\r\n\t\t\t\tpedido.setStatus(Status_ped.valueOf(rs.getString(\"status\")));\r\n\t\t\t\t\r\n\t\t\t\tList<Item> itens = new ArrayList();\r\n\t\t\t\tsql = \"SELECT * FROM detalhes_pedidos WHERE cod_ped = ?\";\r\n\t\t\t\tcmd = con.prepareStatement(sql);\r\n\t\t\t\tcmd.setInt(1, codigo);\r\n\t\t\t\trs = cmd.executeQuery();\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\tItem item = new Item();\r\n\t\t\t\t\titem.setCod_ped(rs.getInt(\"cod_ped\"));\r\n\t\t\t\t\titem.setProduto(ProdutoDAO.select(rs.getInt(\"cod_prod\")));\r\n\t\t\t\t\titem.setQuantidade(rs.getInt(\"quantidade\"));\r\n\t\t\t\t\titens.add(item);\r\n\t\t\t\t}\r\n\t\t\t\tpedido.setItens(itens);\r\n\t\t\t\t\r\n\t\t\t\treturn pedido;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public NominaPuesto[] findWhereIdEmpresaEquals(int idEmpresa) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "@Override\n @SuppressWarnings(\"unchecked\")\n public List<PontoTuristico> searchByID(Integer pIdPonto)\n {\n List<PontoTuristico> tLista = new ArrayList<>();\n\n try\n {\n // Obtendo a sessão hibernate\n SessionFactory tFactory = HibernateUtil.getSessionFactory();\n Session tSessao = tFactory.getCurrentSession();\n\n // Criando o critério para pesquisa\n Criteria tCriterio = tSessao.createCriteria(PontoTuristico.class)\n .add(Restrictions.idEq(pIdPonto));\n\n // Recuperando a lista via hibernate\n tLista = tCriterio.list();\n }\n catch (HibernateException tExcept)\n {\n ExceptionUtil.mostrarErro(tExcept, \"Erro no método de recuperação da lista de PontoTuristicos\");\n }\n\n // Retornando a lista de PontoTuristicos\n return tLista;\n }", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<ProdutoPedido> buscarTodos() {\n\t\treturn dao.findAll();\n\t}", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public List<ItemProducto> obtenerTodosLosProductosDeUnCliente(ClienteEmpresa clienteIDSeleccionado) {\n return clienteIDSeleccionado != null ? this.itemProductoFacade.obtenerTodosLosProductosDeCliente(clienteIDSeleccionado.getContratoList()) : null;\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "public java.util.Collection findByPetiOrden(java.lang.Long idPeticion) throws javax.ejb.FinderException;", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@Override\n\tpublic List<Produto> listPorId(int id) throws Exception {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "@GetMapping(\"buscarProductos\")\n\tpublic List<Producto> getProductos(){\n\t\treturn this.productoServicios.findAll();\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public Ruta[] findWhereIdTipoRutaEquals(int idTipoRuta) throws RutaDaoException;", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public Proveedor buscarProveedor(long id) {\n EntityManager em = getEntityManager();\n try {\n return em.find(Proveedor.class, id);\n } finally {\n em.close();\n }\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@Generated\n public List<Proveedor> getProveedores() {\n if (proveedores == null) {\n __throwIfDetached();\n ProveedorDao targetDao = daoSession.getProveedorDao();\n List<Proveedor> proveedoresNew = targetDao._queryUsuarios_Proveedores(id);\n synchronized (this) {\n if(proveedores == null) {\n proveedores = proveedoresNew;\n }\n }\n }\n return proveedores;\n }", "public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}", "List<ItemPedido> findAll();", "@RequestMapping(method = RequestMethod.GET)\n\t\tpublic ResponseEntity<List<Pedido>> getPedidos() {\n\t\t\tList<Pedido> lista = service.findAll();\n\t\t\treturn ResponseEntity.ok(lista);\n\n\t\t}", "public Collection pesquisarRoteiroEmpresaPorGrupoFaturamento(Integer idGrupoFaturamento) throws ErroRepositorioException;", "public ArrayList<Ingrediente> buscarTodos() {\n\n\t\tConnection conn = null;\n\t\tResultSet resultSet = null;\n\t\tPreparedStatement stmt = null;\n\t\tconn = getConnection();\n\t\tArrayList<Ingrediente> listaIngredientes = null;\n\n\t\ttry {\n\n\t\t\tstmt = conn\n\t\t\t\t\t.prepareStatement(\"SELECT * FROM IDINGREDIENTE ORDER BY ID\");\n\t\t\tresultSet = stmt.executeQuery();\n\t\t\tlistaIngredientes = new ArrayList<Ingrediente>();\n\t\t\tIngrediente ingrediente = null;\n\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tingrediente = new Ingrediente();\n\t\t\t\tingrediente.setNome(resultSet.getString(\"nome\"));\n\t\t\t\tlistaIngredientes.add(ingrediente);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlistaIngredientes = null;\n\t\t} finally {\n\t\t\tcloseConnection(conn, stmt, resultSet);\n\t\t}\n\t\treturn listaIngredientes;\n\t}" ]
[ "0.71979207", "0.6673304", "0.6613298", "0.6589095", "0.65712607", "0.6548903", "0.6535551", "0.650105", "0.6456175", "0.64307517", "0.6367619", "0.6328566", "0.632656", "0.6312738", "0.62640697", "0.6254935", "0.6247173", "0.62196654", "0.61913687", "0.61455804", "0.6141169", "0.613713", "0.61282384", "0.6119749", "0.6102456", "0.6077643", "0.60586196", "0.603218", "0.6019807", "0.6017498", "0.60057336", "0.6002985", "0.59917146", "0.5988584", "0.59687865", "0.59686047", "0.59665734", "0.5952082", "0.5941907", "0.5903891", "0.5900998", "0.58994865", "0.5895933", "0.5848118", "0.58467686", "0.5842064", "0.5829202", "0.58206356", "0.58188325", "0.58150995", "0.5814266", "0.58042747", "0.580281", "0.58020926", "0.57958305", "0.5793899", "0.578429", "0.5772119", "0.577075", "0.57694316", "0.5766335", "0.57644445", "0.5761822", "0.576146", "0.57453686", "0.5740169", "0.5735709", "0.57252824", "0.5722348", "0.5721246", "0.5719214", "0.5718815", "0.57055813", "0.5703645", "0.5702595", "0.57019204", "0.56994504", "0.5663999", "0.5656321", "0.56493104", "0.56425995", "0.5638972", "0.5634421", "0.56195676", "0.56155616", "0.56151974", "0.5614476", "0.5611794", "0.55996984", "0.55986047", "0.55918217", "0.55906034", "0.5590119", "0.5587338", "0.55760986", "0.5547114", "0.55449855", "0.55448186", "0.55444777", "0.5530824" ]
0.76253974
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'ID_CONCEPTO = :idConcepto'.
public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public RelacionConceptoEmbalaje[] findWhereIdConceptoEquals(int idConcepto) throws RelacionConceptoEmbalajeDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "@Override\r\n\tpublic List<Requisito> getRequisitos(int cursoId, int centroId) {\r\n\t\tList<Requisito> requisitos = new ArrayList<Requisito>();\r\n\t\ttry\r\n\t\t{\r\n\t\t\trequisitos = jdbcTemplate.query(\r\n\t\t\t\t\t\t\tSQL_SELECT_REQUISITOS_CERTIFICACION + \" where ac.centroid='\" + centroId + \"' and c.id= \" + cursoId + \" order by cr.descripcion\",\r\n\t\t\t\t\t\t\tnew RowMapper<Requisito>() {\r\n\t\t\t\t\t\t\t\tpublic Requisito mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\tRequisito requisito = new Requisito();\r\n\t\t\t\t\t\t\t\t\trequisito.setCodigo(rs.getString(\"codigo_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setDescripcion(rs.getString(\"descripcion_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setAcreditacion(rs.getString(\"codigo_acreditacion\"));\r\n\t\t\t\t\t\t\t\t\treturn requisito;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}); \r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn requisitos;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public List<ReciboPension> buscarRecibosDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public DatiBancari[] findByStruttura(long fkStruttura) throws DatiBancariDaoException;", "@SuppressWarnings(\"unchecked\")\n\tpublic List<CartaVO> cartasToProducto(int id) {\n String queryString = \"SELECT DISTINCT c FROM CartaVO c\"\n + \" INNER JOIN c.ProdCarta t WHERE t.producto.id=:x\";\n\n Query query = this.entityManager.createQuery(queryString);\n\n query.setParameter(\"x\", id);\n\n List<CartaVO> resultList = (List<CartaVO>) query.getResultList();\n return resultList;\n\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public List<ReciboPension> buscarRecibosAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public List<Emprestimos> buscarPorPropriedade(String whereClause, Object parametro) {\n\t\treturn manager.createQuery(\"select e from Emprestimos e \" + whereClause + parametro, Emprestimos.class)\n\t\t .getResultList();\n\t}", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public Ruta[] findWhereIdTipoRutaEquals(int idTipoRuta) throws RutaDaoException;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Curso> listarCursosPorDocente(int docente) {\r\n\t\tSession session = sf.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tQuery query = session.createQuery(\"select c from DocenteBean d join d.cursos c \"\r\n\t\t\t\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\t//Query query = session.createQuery(\"select c from CursoBean c join d.cursos c \"\r\n\t\t\t//\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\tquery.setInteger(0, docente);\r\n\t\tList<Curso> cursos = new ArrayList<Curso>();\r\n\t\ttry {\r\n\t\t\tList<CursoBean> cursosBean = new ArrayList<CursoBean>();\r\n\t\t\tcursosBean = query.list();\r\n\t\t\tfor(CursoBean cursoBean : cursosBean){\r\n\t\t\t\tCurso curso = cursoBean.pasarNegocio();\r\n\t\t\t\tcursos.add(curso);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tsession.flush();\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\treturn cursos;\r\n\t}", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public Cliente[] findWhereGenericoEquals(int generico) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public DatiBancari[] findByComuni(long fkComune) throws DatiBancariDaoException;", "public List<Catalogo> buscarPorTipoCatalogoId(final Long codigo) throws DaoException {\n try {\n return buscarPorConsultaNombrada(Catalogo.BUSCAR_POR_TIPO_CATALOGO_ID, codigo);\n } catch (DaoException ex) {\n Logger.getLogger(DatoAdicionalDao.class.getName()).log(Level.SEVERE, null, ex);\n throw new DaoException(ex);\n }\n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public List<TurmaDocente> docentesPorTurma(Long idTurma){\n Session session = getSessionFactory().openSession();\n Criteria criteria = session.createCriteria(TurmaDocente.class);\n criteria.add(Restrictions.eq(\"idTurma\", idTurma));\n //criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n List results = criteria.list();\n session.close();\n\n return results; \n }", "public Cliente[] findWhereIdClienteCategoriaEquals(int idClienteCategoria) throws ClienteDaoException;", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<ReciboPension> buscarRecibosPendientesDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public List<ReciboPension> buscarRecibosPendientesAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "public TipologiaStruttura[] findWhereIdEquals(long id) throws TipologiaStrutturaDaoException;", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public List<Curso> recuperaTodosCursos(){\r\n Connection conexao = ConexaoComBD.conexao();\r\n //instrução sql\r\n String sql = \"SELECT * FROM curso;\";\r\n try {\r\n //statement de conexão\r\n PreparedStatement ps = conexao.prepareStatement(sql);\r\n //recebe a tabela de retorno do banco de dados em um formato java\r\n ResultSet rs = ps.executeQuery();\r\n //criar lista de retorno\r\n List<Curso> lista = new ArrayList<>();\r\n \r\n //tratar o retorno do banco\r\n \r\n while(rs.next()){\r\n //criar um objeto modelo do tipo do retorno \r\n Curso c = new Curso();\r\n c.setIdCurso(rs.getInt(1));\r\n c.setNome(rs.getString(2));\r\n c.setArea(rs.getString(3));\r\n c.setCargaHoraria(rs.getInt(5));\r\n c.setValorCurso(rs.getDouble(6));\r\n c.setValorMensal(rs.getDouble(7));\r\n c.setCod(rs.getString(8));\r\n lista.add(c);\r\n }\r\n //retornar lista preenchida \r\n return lista;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CursoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //retorna null em caso de excessao\r\n return null;\r\n }", "@Override\n public Collection<Curso> findByCriteria(String Criteria) throws Exception {\n // throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select c.idcurso, c.idprofesor, p.nombre as nombreprofesor, c.nombrecurso, c.claveprofesor,\"\n + \" c.clavealumno from curso c, persona p\\n\" +\n \"where c.idprofesor = p.id and UPPER(p.nombre) like UPPER(?) and p.rol = 2\");\n pstmt.setString(1, Criteria);\n \n rs = pstmt.executeQuery();\n\n while (rs.next()) { \n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"),rs.getInt(\"idprofesor\"), rs.getString(\"nombreprofesor\"),rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n \n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public List getPorReferenteAProduto(long id) throws DaoException {\n\t\t// Existe no DAO\n\t\tCompartilhamentoProdutoDao dao = getDao();\n\t\tDaoConexao conn = dao.criaConexao();\n\t\tdao.setConexao(conn);\n\t\treturn dao.ListaPorProdutoReferenteA(id);\n\t}", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa, Integer idCategoria, Date dataFaturamento)\n\t\t\tthrows ErroRepositorioException;", "public static ArrayList<Actividad> selectActividadesProyecto(int idProyecto) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = \"SELECT * FROM Actividades a, Fases f, Proyectos p WHERE a.idFase=f.id AND f.idProyecto=p.id AND f.id=? ORDER BY a.anoInicio, a.mesInicio, a.diaInicio ASC\";\n ArrayList<Actividad> actividades = new ArrayList<Actividad>();\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, idProyecto);\n rs = ps.executeQuery();\n while (rs.next()) {\n String fechaInicio = String.format(\"%02d/%02d/%04d\", rs.getInt(6), rs.getInt(7), rs.getInt(8));\n String fechaFin = String.format(\"%02d/%02d/%04d\", rs.getInt(9), rs.getInt(10), rs.getInt(11));\n Actividad a = new Actividad(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5), fechaInicio, fechaFin, rs.getInt(12), rs.getString(13).charAt(0), rs.getInt(14));\n actividades.add(a);\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return actividades;\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public ProductoDTO buscarproducto(ProductoDTO c) {\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ProductoDTO arrpdto = null;\r\n\r\n try {\r\n ps = conn.getConn().prepareStatement(SQL_READ);\r\n ps.setInt(1, c.getId());\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arrpdto = new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9));\r\n\r\n }\r\n return arrpdto;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n\r\n return null;\r\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public List<String> guiaContableByTipoNominaTerceros(String idTipoNomina) {\n String guiaContableByTipoNominaTerceros = super.getQueryDefinition(\"guiaContableByTipoNominaTerceros\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"idTipoNomina\", idTipoNomina);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n \n return namedTemplate.query(guiaContableByTipoNominaTerceros, namedParameters, new GuiaContableAux());\n }" ]
[ "0.6722596", "0.64354694", "0.6232141", "0.614438", "0.6092926", "0.6011397", "0.5996409", "0.5894058", "0.58789164", "0.5806944", "0.58013743", "0.57871264", "0.57691425", "0.57286423", "0.57142234", "0.57019323", "0.5684599", "0.56778926", "0.5649661", "0.5586892", "0.5581571", "0.5573296", "0.5551999", "0.55286175", "0.55175424", "0.5502565", "0.55021095", "0.5497128", "0.5487409", "0.54798704", "0.5479622", "0.5461783", "0.5450126", "0.5444645", "0.542919", "0.54192233", "0.5416161", "0.541424", "0.5414113", "0.541328", "0.5410952", "0.5402703", "0.5389214", "0.53848", "0.538347", "0.5376636", "0.5376048", "0.5373191", "0.5352723", "0.53516257", "0.5346753", "0.53454924", "0.533975", "0.53391683", "0.533522", "0.5331422", "0.53171164", "0.53127015", "0.531134", "0.53103596", "0.53052187", "0.52981377", "0.5295154", "0.52920556", "0.52875406", "0.528723", "0.5283455", "0.52820015", "0.5280738", "0.5279772", "0.52764547", "0.52720857", "0.525992", "0.5258942", "0.5257361", "0.52514863", "0.5248998", "0.5245741", "0.52394617", "0.5237359", "0.5230753", "0.5210968", "0.52064496", "0.52034056", "0.5202663", "0.51951194", "0.518653", "0.5180728", "0.51779664", "0.51748097", "0.51745313", "0.5169165", "0.51595485", "0.5158275", "0.51581824", "0.51573765", "0.515448", "0.51540697", "0.5148079", "0.51430374" ]
0.7421242
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'DESCRIPCION = :descripcion'.
public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NominaPuesto[] findWhereDescripcionEquals(String descripcion) throws NominaPuestoDaoException;", "@Override\n\tpublic Pais findByNombre(String descripcion) {\n\t\treturn (Pais) getSession().createQuery(\"from Pais where descripcion = :descripcion\").setParameter(\"descripcion\", descripcion).uniqueResult();\n\t}", "public CrGrupoFormulario[] findWhereDescripcionEquals(String descripcion) throws CrGrupoFormularioDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public TipologiaStruttura[] findWhereDescrizioneEquals(String descrizione) throws TipologiaStrutturaDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public SmsAgendaGrupo[] findWhereDescripcionGrupoEquals(String descripcionGrupo) throws SmsAgendaGrupoDaoException;", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public void ProductsSearch(DefaultTableModel tableModel, String parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE descripcion LIKE ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, \"%\" + parameter + \"%\");\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public List<Product> findByDescription(String description);", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "@Query(\"SELECT f FROM Funcionario f JOIN f.cargo c WHERE c.descricao = :descricao\")\n List<Funcionario> findByCargoPelaDescricao(String descricao);", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public boolean existeProducto(String p) throws DBException {\r\n\t\tboolean existe = false;\r\n\t\tString sentSQL = \"SELECT * FROM producto WHERE nombre ='\"+ p +\"'\";\r\n\t\ttry {\r\n\t\t\tStatement st = conexion.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\r\n\t\t\tif(rs.next()) \r\n\t\t\t\texiste = true;\r\n\t\t\trs.close();\r\n\t\t\tst.close();\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\tthrow new DBException(\"No se ha podido buscar el produtco en la tabla Productos\");\r\n\t\t}\r\n\t\treturn existe;\r\n\t}", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a la cantidad de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) { //C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1); //C.P.M vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public List<TgTabla> getAllTgTabla(String descripcion)throws Exception{\n\t\tList<TgTabla> lista=new LinkedList<TgTabla>();\n\t\ttry{\n\t\t\t//validacion a la bd relacionada 31/07/2012\n\t\t\tStringBuffer SQL=new StringBuffer(\"select campo1,campo2 from \").append(Constante.schemadb).append(\".tg_tabla where nombre_corto='\"+descripcion+\"' AND estado='1'\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tTgTabla obj=new TgTabla(); \n\t\t\t\tobj.setCampo1(rs.getString(\"campo1\"));\n\t\t\t\tobj.setCampo2(rs.getString(\"campo2\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "@Query(\"select p from Pedido p where p.desc =?1\")\n public Pedido buscarPedidoPorDescricao(String desc);", "public void ProductsContent(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql =\"SELECT productos.descripcion, productos.presentacion, productos.precio, contenido.cantidad, \"\n + \"contenido.importe FROM productos JOIN contenido JOIN requisiciones ON productos.id_producto = \"\n + \"contenido.producto AND contenido.requisicion = requisiciones.id_requisicion \"\n + \"WHERE requisiciones.id_requisicion = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i <= columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i <= columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Query(value = INGREDIENT_SELECT + DESCRIPTION_SEARCH + EXT_DESCRIPTION + NOT_DELETES)\n List<Ingredient> findByIngredientDescriptionContaining(@Param(\"description\")String description, Pageable request);", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public CrGrupoFormulario[] findWhereNombreEquals(String nombre) throws CrGrupoFormularioDaoException;", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui obtenemos la estructura de la tabla(\"Los encabezados\")\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M Obtenemos los metadatos para obtener la cantidad del columnas que llegan\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M la cantidad la alojamos dentro de un entero\r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "public List<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "@Query(value = \"SELECT * FROM produtos WHERE prd_nome LIKE %?%\", nativeQuery = true)\r\n public List<ProdutosModel> findAllLike (String pesquisa);", "public CompraResponse descricaoProduto(String descricaoProduto) {\n this.descricaoProduto = descricaoProduto;\n return this;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public List<Proveedor> findByAliasContaining(String alias);", "public ResultSet select(String pCampos, String pTabla, String pCondicion) {\n ResultSet rs = null; //obtener los datos del select\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n sentencia = \" SELECT \" + pCampos + \" FROM \" + pTabla; // se crea el select\n if (!pCondicion.isEmpty()) {\n sentencia += \" WHERE \" + pCondicion;\n }\n rs = s.executeQuery(sentencia); // \n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n }\n return rs;\n }", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "@Query(\"SELECT f FROM Funcionario f JOIN f.unidadeTrabalhos u WHERE u.descricao = :descricao\")\n List<Funcionario> findByUnidadeTrabalhos_Descricao_jpql(String descricao);", "public String[][] obtenerConsultasBusqueda(String nombre){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n String[][] datos = new String[obtenerRegistrosBusqueda(nombre)][5];\n int i = 0;\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n \n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id WHERE nombre = ?\");\n ps.setString(1, nombre);\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\");\n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "public List<Escritor> getEscritores (String idArtigo) {\n List<Escritor> esc = new ArrayList<>();\n Escritor e = null;\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Escritor.* FROM Escritor \" +\n \"INNER JOIN EscritorArtigo \" +\n \"ON Escritor.ID = EscritorArtigo.Escritor_ID \" +\n \"WHERE EscritorArtigo.Artigo_ID = \" + idArtigo);\n ResultSet rs = stm.executeQuery();\n while(rs.next()){\n e = new Escritor(rs.getString(\"ID\"), rs.getString(\"Nome\"));\n esc.add(e);\n }\n\n }\n catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return esc;\n }", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public List<TipoRetencion> findByNombreContaining(String nombre);", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<Product> search(String word, String codigo) {\n\t\tSession session = getSessionFactory().openSession();\n\t\treturn null;\n\t}", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public String estadisticasProveedoresMasSolicitados() {\n String html = \"\";\n DefaultTableModel dtm = proveedor.estadisticaProveedoresMasSolicitados();\n html = Utils.dibujarGraficasHTMLBarras(dtm, \"TOP PROVEEDORES MAS SOLICITADOS\", \"Proveedor\");\n return html;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }", "public void ProductsProvider(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE proveedor = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "public void ProductsAcquisition(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT productos.descripcion, productos.presentacion, productos.precio, adquisicion.cantidad,\"\n + \" adquisicion.importe FROM productos JOIN adquisicion JOIN facturas ON productos.id_producto =\"\n + \" adquisicion.producto AND adquisicion.factura = facturas.folio WHERE facturas.folio = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i <= columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i <= columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public Cliente[] findWhereNombreComercialEquals(String nombreComercial) throws ClienteDaoException;", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "@Override\n public List<ModeloCuestionario> findAll() {\n List<ModeloCuestionario> listadoModelos = (List<ModeloCuestionario>) modeloCuestionarioRepository.findAll();\n Collections.sort(listadoModelos, (o1, o2) -> o1.getDescripcion().compareTo(o2.getDescripcion()));\n \n return listadoModelos;\n \n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }" ]
[ "0.66025525", "0.6531464", "0.62618345", "0.6245837", "0.6206268", "0.61777174", "0.61602336", "0.595655", "0.5890779", "0.5869599", "0.575078", "0.57432544", "0.57338464", "0.57211345", "0.56816655", "0.56453675", "0.5627931", "0.562717", "0.5618233", "0.5613434", "0.56093913", "0.56034946", "0.56008565", "0.55826795", "0.55738294", "0.555239", "0.55456895", "0.55376965", "0.55158114", "0.5514147", "0.5509981", "0.5507396", "0.55072176", "0.5506214", "0.55046093", "0.5491491", "0.54906803", "0.54696643", "0.5466047", "0.5455384", "0.5452563", "0.54266983", "0.5417605", "0.54130936", "0.5412899", "0.54099125", "0.54029596", "0.539978", "0.5380999", "0.53781676", "0.53746104", "0.53732747", "0.53658885", "0.53543586", "0.53408873", "0.5335094", "0.53254014", "0.53221595", "0.53122187", "0.5310787", "0.53059393", "0.530441", "0.53006345", "0.5283603", "0.5279425", "0.527707", "0.5275775", "0.5272076", "0.5265485", "0.52433205", "0.52366453", "0.5227424", "0.5225797", "0.52228075", "0.5221279", "0.5217965", "0.5214762", "0.5206131", "0.51942265", "0.518669", "0.51819056", "0.5179668", "0.5170428", "0.5167169", "0.5165239", "0.5160582", "0.51575184", "0.5153178", "0.5146414", "0.5145759", "0.514428", "0.513502", "0.51313394", "0.5131073", "0.5123422", "0.5123312", "0.5123052", "0.5120048", "0.51188105", "0.51167077" ]
0.72900754
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'UNIDAD = :unidad'.
public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "public static ArrayList<Persona> obtenerUsuariosCiudad(DatosDTO datos) throws SQLException {\n\n\t\tConnection conexion = Conexion.getConexion();\n ArrayList<Persona> listaPersonas = new ArrayList<>();\n st = conexion.createStatement();\n String query = \"SELECT * FROM personas Where id_ciudad=\" + datos.getNombreCiudad();\n ResultSet rs = st.executeQuery(query);\n\n\n while (rs.next()) {\n int id = rs.getInt(1); \n int id_ciudad = rs.getInt(2); \n String nombre = rs.getString(3); \n String tipo = rs.getString(4); \n boolean infectado = rs.getBoolean(5); \n\n Persona persona = new Persona(id, id_ciudad, nombre, tipo, infectado);\n listaPersonas.add(persona);\n\n }\n rs.close();\n return listaPersonas;\n \n }", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public Utente[] findByComuni(long fkComune) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune = ?\", new Object[] { new Long(fkComune) } );\n\t}", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public ArrayList findPersonalAsistencia(String dbpool, String criterio,\n\t\t\tString valor, String periodo, HashMap seguridad)\n\t\t\tthrows SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select t02cod_pers, substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) cod_uorga \"\n\t\t\t\t\t).append( \" from t02perdp \" ).append( \" where t02cod_stat = ? \");\n\n\t\t\tif (criterio.equals(\"0\")) {\n\t\t\t\tstrSQL.append(\" and t02cod_pers = '\" ).append( valor.trim().toUpperCase()\n\t\t\t\t\t\t).append( \"'\");\n\t\t\t}\n\n\t\t\tif (criterio.equals(\"1\")) {\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) = '\"\n\t\t\t\t\t\t).append( valor.trim().toUpperCase() ).append( \"'\");\n\t\t\t}\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\" ).append( Constantes.PROCESO_ASISTENCIA\n\t\t\t\t\t\t).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by t02cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, Constantes.ACTIVO);\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tHashMap det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"t02cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"cod_uorga\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "public DatiBancari[] findByComuni(long fkComune) throws DatiBancariDaoException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "@Override\r\n\tpublic ArrayList<CiudadVO> consultaListaCiudades(CiudadVO ciudad) {\n\t\ttry {\r\n\t\t\tArrayList<CiudadVO> listaCiudades = new ArrayList<CiudadVO>();\r\n\t\t\t\r\n\t\t\tConnection connection = null;\r\n\t\t\tconnection = crearConexion(connection);\r\n\t\t\t\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\r\n\t\t\tString query = \"SELECT c.id, c.nombre, c.pais_id, p.id, p.nombre as nombrepais FROM ciudades c, paises p where c.ESTADO = 1 AND p.estado = 1 AND c.pais_id = p.id\"; \r\n\t\t\t\r\n\t\t\tSystem.out.println(this.getClass() + \" -> MiSQL-> \" + query);\r\n\t\t\t\r\n\t\t\tstatement.execute(query);\r\n\t\t\t\r\n\t\t\tResultSet resultSet = statement.getResultSet();\r\n\t\t\t\r\n\t\t\twhile(resultSet.next()) {\r\n\t\t\t\tCiudadVO ciudadVO = new CiudadVO();\r\n\t\t\t\t\r\n\t\t\t\tciudadVO.setId(resultSet.getInt(\"ID\"));\r\n\t\t\t\tciudadVO.setNombre(resultSet.getString(\"Nombre\"));\r\n\t\t\t\tciudadVO.setPais_id(resultSet.getInt(\"Pais_Id\"));\r\n\t\t\t\tciudadVO.setPais_nombre(resultSet.getString(\"nombrepais\"));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlistaCiudades.add(ciudadVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcerrarConexion(resultSet, statement, connection);\r\n\t\t\t\r\n\t\t\treturn listaCiudades;\r\n\t\t\t\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Error en DAO\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario listarPorId(Usuario entidad) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tQuery query = entityManager.createQuery(\"from Usuario c where c.id = ?1\");\n\t\tquery.setParameter(1, entidad.getId());\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario Usuario = new Usuario();\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tUsuario = lista.get(0);\n\t\t}\n\n\t\treturn Usuario;\n\t}", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "List<BeanPedido> getPedidos(String idUsuario);", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereDiasVisitaEquals(String diasVisita) throws ClienteDaoException;", "public Ruta[] findWhereIdUsuarioEquals(int idUsuario) throws RutaDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public List<EntregaUtiles> findByGrado(GradoPK gPK);", "@Query(\"select pu from ProcesoUsuario pu join pu.proceso p where p.estado = true and p.juzgado=?1\")\r\n\tPage<ProcesoUsuario> findAllByJuzgado(Juzgado juzgado, Pageable pageable);", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "public ArrayList findPersonalByFecha(String dbpool, String fecha,\n\t\t\tHashMap seguridad) throws SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select distinct cod_pers, u_organ \"\n\t\t\t\t\t).append( \"from t1271asistencia \" ).append( \"where fing = ? \");\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\n\t\t\t\tstrSQL.append(\" and u_organ in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\"\n\t\t\t\t\t\t).append( Constantes.PROCESO_CALIFICACION ).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tcon.prepareCall(\"SET LOCK MODE TO WAIT 10\").execute();\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setDate(1, new BeanFechaHora(fecha).getSQLDate());\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\n\t\t\tHashMap det = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"u_organ\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario iniciarSesion(String identificacion, String clave) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tString sql = \"select u.* from usuario as u inner join empleado as e \"\n\t\t\t\t+ \"on u.id = e.id where e.identificacion = :identificacion and u.clave = :clave ;\";\n\n\t\tQuery query = entityManager.createNativeQuery(sql, Usuario.class);\n\n\t\tquery.setParameter(\"identificacion\", identificacion);\n\t\tquery.setParameter(\"clave\", clave);\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario usuario = null;\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tusuario = lista.get(0);\n\t\t}\n\n\t\treturn usuario;\n\t}", "public void buscarProductosXSucursal(){\n\t\tif(getEmpresaId()==null){\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Seleccione una sucursal\"));\n\t\t\treturn;\t\t\n\t\t}\n\t\tsetProductoEmpresaList(productoEmpresaService.getByEmpresa(getEmpresaId()));\n\t\tif(getProductoEmpresaList()==null||getProductoEmpresaList().isEmpty()){\n\t\t\tRequestContext.getCurrentInstance().execute(\"PF('confirmarBusqueda').show();\");\n\t\t}\n\t}", "public NominaPuesto[] findWhereSueldoDiarioIntegradoEquals(double sueldoDiarioIntegrado) throws NominaPuestoDaoException;", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "private boolean buscarUnidadMedida(String valor) {\n\t\ttry {\n\t\t\tlistUnidadMedida = unidadMedidaI.getAll(Unidadmedida.class);\n\t\t} catch (Exception e) {\n\t\n\t\t}\n\n\t\tboolean resultado = false;\n\t\tfor (Unidadmedida tipo : listUnidadMedida) {\n\t\t\tif (tipo.getMedidaUm().equals(valor)) {\n\t\t\t\tresultado = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tresultado = false;\n\t\t\t}\n\t\t}\n\n\t\treturn resultado;\n\t}", "public DTOUnidadAdministrativa obtenerUAActiva(Long oidCliente, Long oidPeriodo) throws MareException {\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Entrada\"); \n BelcorpService bs;\n RecordSet resultado = new RecordSet();\n bs = UtilidadesEJB.getBelcorpService();\n\n DTOUnidadAdministrativa dtoS = new DTOUnidadAdministrativa();\n\n StringBuffer query = new StringBuffer();\n\n try {\n query.append(\" SELECT distinct sub.PAIS_OID_PAIS, sub.MARC_OID_MARC, sub.CANA_OID_CANA, OID_SUBG_VENT, \");\n query.append(\" OID_REGI, OID_ZONA, OID_SECC, TERR_OID_TERR, t.COD_NSE1, t.COD_NSE2, t.COD_NSE3, \");\n query.append(\" OID_TERR_ADMI, pi.FEC_INIC, unid.PERD_OID_PERI_INI, unid.PERD_OID_PERI_FIN \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN unid, \");\n query.append(\" ZON_TERRI_ADMIN tadm, \");\n query.append(\" \t ZON_TERRI t, \");\n query.append(\" \t ZON_SECCI, \");\n query.append(\" \t ZON_ZONA, \");\n query.append(\" \t ZON_REGIO, \");\n query.append(\" \t ZON_SUB_GEREN_VENTA sub, \");\n query.append(\" CRA_PERIO pi, \");\n query.append(\" \t CRA_PERIO pi2 \");\n query.append(\" WHERE unid.CLIE_OID_CLIE = \" + oidCliente);\n query.append(\" AND unid.IND_ACTI = 1 \"); // Unidad Administrativa \"Activa\" \n query.append(\" AND unid.PERD_OID_PERI_INI = pi.OID_PERI \");\n query.append(\" AND pi.FEC_INIC <= (SELECT FEC_INIC FROM CRA_PERIO WHERE OID_PERI = \" + oidPeriodo + \")\");\n query.append(\" AND ((unid.PERD_OID_PERI_FIN = pi2.OID_PERI \");\n query.append(\" AND pi2.FEC_FINA >= (SELECT FEC_FINA FROM CRA_PERIO WHERE OID_PERI = \" + oidPeriodo + \") )\");\n query.append(\" OR unid.PERD_OID_PERI_FIN is NULL) \");\n query.append(\" AND ZTAD_OID_TERR_ADMI = OID_TERR_ADMI \");\n query.append(\" AND TERR_OID_TERR = OID_TERR \");\n query.append(\" AND ZSCC_OID_SECC = OID_SECC \");\n query.append(\" AND ZZON_OID_ZONA = OID_ZONA \");\n query.append(\" AND ZORG_OID_REGI = OID_REGI \");\n query.append(\" AND ZSGV_OID_SUBG_VENT = OID_SUBG_VENT \"); \n query.append(\" order by pi.FEC_INIC desc \");\n\n bs = BelcorpService.getInstance();\n resultado = bs.dbService.executeStaticQuery(query.toString());\n } catch (Exception e) {\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n if (resultado.esVacio()) {\n UtilidadesLog.debug(\"...no hay registros de obtenerUAActiva\");\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Salida\"); \n return null;\n } else {\n UtilidadesLog.debug(\"...resultado de obtenerUAActiva es: \" + resultado);\n dtoS.setNSE1(objToString(resultado.getValueAt(0, \"COD_NSE1\")));\n dtoS.setNSE2(objToString(resultado.getValueAt(0, \"COD_NSE2\")));\n dtoS.setNSE3(objToString(resultado.getValueAt(0, \"COD_NSE3\")));\n dtoS.setOidCanal(objToLong(resultado.getValueAt(0, \"CANA_OID_CANA\")));\n dtoS.setOidMarca(objToLong(resultado.getValueAt(0, \"MARC_OID_MARC\")));\n dtoS.setOidPais(objToLong(resultado.getValueAt(0, \"PAIS_OID_PAIS\")));\n dtoS.setOidRegion(objToLong(resultado.getValueAt(0, \"OID_REGI\")));\n dtoS.setOidSeccion(objToLong(resultado.getValueAt(0, \"OID_SECC\")));\n dtoS.setOidSGV(objToLong(resultado.getValueAt(0, \"OID_SUBG_VENT\")));\n dtoS.setOidTerritorio(objToLong(resultado.getValueAt(0, \"TERR_OID_TERR\")));\n dtoS.setOidTerritorioAdministrativo(objToLong(resultado.getValueAt(0, \"OID_TERR_ADMI\")));\n dtoS.setOidZona(objToLong(resultado.getValueAt(0, \"OID_ZONA\")));\n \n dtoS.setOidCliente(oidCliente);\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Salida\"); \n return dtoS;\n }\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public Vector listaGrupos(String asignatura)\n {\n try\n {\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM grupos \";\n query += \"WHERE asignasoc='\"+asignatura+\"' AND activa='s'\";\n\n //Se crea un vector de grupos\n Vector vectorGrupos = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n grupo grupo = new grupo();\n\n grupo.setCodigoLab(resultado.getInt(\"codigolab\"));\n grupo.setAsigAsoc(resultado.getString(\"asignasoc\"));\n grupo.setDia(resultado.getString(\"dia\"));\n grupo.setHora(resultado.getString(\"hora\"));\n grupo.setPlazas(resultado.getInt(\"plazas\"));\n grupo.setPlazasOcupadas(resultado.getInt(\"plazasocupadas\"));\n grupo.setObservaciones(resultado.getString(\"observaciones\"));\n\n //Se añade el grupo al vector de grupos\n vectorGrupos.add(grupo);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorGrupos;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a los grupos de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public Cliente[] findWhereNombreClienteEquals(String nombreCliente) throws ClienteDaoException;", "public Cliente[] findWhereMunicipioEquals(String municipio) throws ClienteDaoException;", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public List<ItemProducto> obtenerTodosLosProductosDeUnCliente(ClienteEmpresa clienteIDSeleccionado) {\n return clienteIDSeleccionado != null ? this.itemProductoFacade.obtenerTodosLosProductosDeCliente(clienteIDSeleccionado.getContratoList()) : null;\n }", "public List<mTipoAdicionais> selectAdicTipoProd(int codAdicional) throws SQLException {\n\t\tString sql = \"select adictipoprod.codTipoProduto,tDescTipo, adictipoprod.adicPreco,adictipoprod.adicAtivo\\r\\n\" + \r\n\t\t\t\t\"from adicionais, adictipoprod,tipoproduto\\r\\n\" + \r\n\t\t\t\t\"where adictipoprod.codTipoProduto = tipoproduto.codTipoProduto \\r\\n\" + \r\n\t\t\t\t\"and adictipoprod.codAdicionais = adicionais.codAdicionais\\r\\n\" + \r\n\t\t\t\t\"and adicionais.codAdicionais = ?;\";\r\n\t\t\r\n\t\tPreparedStatement stm = this.createPreparedStatement(sql);\r\n\t\tstm.setInt(1,codAdicional);\r\n\t\t\r\n\t\tResultSet rs = stm.executeQuery();\r\n\t\tList<mTipoAdicionais> retorno = new ArrayList();\r\n\t\t\r\n\t\twhile(rs.next()) {\r\n\t\t\tmTipoAdicionais temp = new mTipoAdicionais();\r\n\t\t\ttemp.setCodTipoProduto(rs.getInt(1));\r\n\t\t\ttemp.setTipoProduto(rs.getString(2));\r\n\t\t\ttemp.setPreco(rs.getFloat(3));\r\n\t\t\ttemp.setAtivo(rs.getBoolean(4));\r\n\t\t\t\r\n\t\t\tretorno.add(temp);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tclose(rs,stm);\r\n\t\tfecha();\r\n\t\treturn retorno;\r\n\r\n\t}", "@WebMethod\n @WebResult(name = \"ResultadoObtenerProductos\")\n public List<Producto> consultaObtenerProductos(\n @WebParam(name = \"idIntermediario\") Long idIntermediario) {\n logger.debug(\"consultaObtenerProductos-Inicia idIntermediario:\" + idIntermediario);\n\n List<Producto> productos = new ArrayList<Producto>();\n try {\n productos = administracionParametrosService\n .obtenerProductos(idIntermediario);\n } catch (Exception e1) {\n logger.error(\"consultaObtenerProductos-Fin Error Exception:\" + e1.getMessage(), e1);\n \n }\n return productos;\n }", "public String[] busquedaUsuarioXusuario(String usu){\n\t\tconectar();\n\t\t\n\t\tString[] salida=new String[]{usu};\n\t\ttry {\n\n\t\t\tStatement consulta;\n\t\t\tconsulta = con.createStatement();\n\n\t\t\tResultSet tabla = consulta.executeQuery(\"select usuario from \"+dtbs+\".usuarios where Usuario like '%\"+usu+\"%' and usuarios.admin=0\");\n\t\t\t\n\t\t\tint size=0;\n\t\t\twhile (tabla.next()) {\n\t\t\t\t\n\t\t\t\tsize++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttabla.beforeFirst();\n\t\t\tsalida=new String[size];\n\t\t\tint index=1;\n\t\t\twhile (tabla.next()) {\n\t\t\t\tString usuario= tabla.getString(1);\n\n\t\t\t\tsalida[index-1]=usuario;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\treturn salida;\n\t\t} catch (SQLException e) {\n\t\t\tPrincipal.getInstancePrincipal().registrarErrorDB(\"< ERROR CONBUS 53> En la conexion con la base de datos\"+e);\n\t\t\tcloseConnection();\n\t\t\treturn salida;\n\t\t}\n\t\t\n\t\t\n\t}", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public Utente[] findByComuni2(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ?\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@Override\r\n\tpublic ArrayList<CiudadVO> obtenerDatosCiudad(CiudadVO ciudad) {\n\t\ttry {\r\n\t\t\tArrayList<CiudadVO> listaDatosCiudad = new ArrayList<CiudadVO>();\r\n\t\t\tConnection connection = null;\r\n\t\t\tconnection = crearConexion(connection);\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString query = \"SELECT * FROM CIUDADES WHERE ID = \" +ciudad.getId();\r\n\t\t\tSystem.out.println(this.getClass() + \" -> MiSQL-> \" + query);\r\n\t\t\tstatement.execute(query);\r\n\t\t\tResultSet resultSet = statement.getResultSet();\r\n\t\t\twhile(resultSet.next()) {\r\n\t\t\t\tCiudadVO ciudadVO = new CiudadVO();\r\n\t\t\t\tciudadVO.setId(resultSet.getInt(\"ID\"));\r\n\t\t\t\tciudadVO.setPais_id(resultSet.getInt(\"Pais_Id\"));\r\n\t\t\t\tciudadVO.setNombre(resultSet.getString(\"Nombre\"));\r\n\t\t\t\t\r\n\t\t\t\tlistaDatosCiudad.add(ciudadVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcerrarConexion(resultSet, statement, connection);\r\n\t\t\treturn listaDatosCiudad;\r\n\t\t\t\r\n\t\t\t}catch(Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tSystem.out.println(\"Error en DAO\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t}", "public Utente[] findWhereUteDepositoBagagliEquals(String uteDepositoBagagli) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_deposito_bagagli = ? ORDER BY ute_deposito_bagagli\", new Object[] { uteDepositoBagagli } );\n\t}", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "@RequestMapping(value = \"/consultarusuariossistema\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public CommonsResponse findallusers(@RequestParam String llave_seguridad, HttpServletRequest request)\n {\n CommonsResponse response = new CommonsResponse();\n Map<String, String> mapConfiguration = null;\n try\n {\n logger.debug(\"Se valida la licencia si puede consumir los procesos.\");\n GatewayBaseBean.validateLicenceToWS(llave_seguridad, webUtils.getClientIp(request));\n\n List<UsersAllOutDTO> usuarios = userServices.findAllUsers();\n if (usuarios != null && !usuarios.isEmpty())\n response.setResponse(usuarios);\n else\n return response.toEmpty();\n }\n catch (LicenseException ex)\n {\n response.toLicenceWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode(), llave_seguridad);\n logger.error(\"Parametros de Licencia Errados WS [consultarusuariossistema], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (ServiceException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.warn(\"Error de Servicio WS [consultarusuariossistema].\", ex);\n return response;\n }\n catch (Exception ex)\n {\n logger.error(\"Error Generico en WS [consultarusuariossistema].\", ex);\n GatewayBaseBean.matchToResponses(response);\n return response;\n }\n logger.info(\"Se retorna respuesta efectiva del WS [consultarusuariossistema].\");\n return response.toOk();\n }", "@Query(value = \"SELECT * FROM aluno a WHERE a.situacao = true ORDER BY ID\", nativeQuery = true)\n List<Aluno> findAlunosAprovados();", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public ArrayList findByCodPersFecha(String dbpool, String codPers,\n\t\t\tString fecha, HashMap seguridad) throws SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select a.cod_pers, a.periodo, a.u_organ, a.mov, a.fing, a.hing, \"\n\t\t\t\t\t).append( \" a.fsal, a.hsal, a.autor_id, a.jefe_autor, a.fecha_autor, a.estado_id, m.descrip, a.obs_papeleta \"\n\t\t\t\t\t).append( \" from t1271asistencia a, t1279tipo_mov m \"\n\t\t\t\t\t).append( \" where a.cod_pers = ? and a.fing = ? and a.mov = m.mov \");\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tHashMap roles = (HashMap) seguridad.get(\"roles\");\n\t\t\t\tString uoSeg = (String) seguridad.get(\"uoSeg\");\n\t\t\t\tString uoAO = (String) seguridad.get(\"uoAO\");//DEC 28/12/2012 NUEVAS UUOOS ANALISTA OPERATIVO\n\n\t\t\t\tif (roles.get(Constantes.ROL_ANALISTA_CENTRAL) != null) {\n\t\t\t\t\tstrSQL.append(\" and 1=1 \");\n\t\t\t\t} else if (roles.get(Constantes.ROL_ANALISTA_OPERATIVO) != null) {\n\t\t\t\t\tstrSQL.append(\" and ((a.u_organ like '\" ).append( uoSeg ).append( \"') \");\n\t\t\t\t\t\n\t\t\t\t\tstrSQL.append(\" or (a.u_organ in (select t99siglas from t99codigos where t99cod_tab='471' and t99tip_desc='D' and t99descrip= '\" ).append( uoAO ).append( \"'))) \");\n\t\t\t\t} else if (//roles.get(Constantes.ROL_ANALISTA_OPERATIVO) != null ||\n\t\t\t\t\t\troles.get(Constantes.ROL_JEFE) != null) {\n\t\t\t\t\tstrSQL.append(\" and a.u_organ like '\" ).append( uoSeg ).append( \"' \");\n\t\t\t\t} else {\n\t\t\t\t\tstrSQL.append(\" and 1=2 \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//else{\n\t\t\t//\tstrSQL.append(\" and a.mov in (?,?,?,?,?,?) \");\t\t\t\t\n\t\t\t//}\n\n\t\t\tstrSQL.append(\" order by a.hing\");\n\n\t\t\tlog.debug(strSQL.toString());\n\t\t\t\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, codPers);\n\t\t\tpre.setDate(2, new BeanFechaHora(fecha).getSQLDate());\n\t\t\t\n\t\t\t//if (seguridad == null) {\n\t\t\t\t//se agrego esta linea para la validacion del registro de papeletas 04/01/2006\n\t\t\t//pre.setString(3,Constantes.MOV_TARDANZA_DESCUENTO);\n\t\t\t//\tpre.setString(4,Constantes.MOV_TARDANZA_SIN_DESCUENTO);\n\t\t\t//\tpre.setString(5,Constantes.MOV_SALIDA_NO_AUTORIZADA);\n\t\t\t//\tpre.setString(6,Constantes.MOV_OMISION_MARCA);\n\t\t\t// pre.setString(7,Constantes.MOV_INASISTENCIA);\n\t\t\t//\tpre.setString(8,Constantes.MOV_PAPELETA_NO_AUTORIZADA);\n\t\t\t//}\n\t\t\t\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tBeanAsistencia asis = null;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tasis = new BeanAsistencia();\n\t\t\t\tasis.setCodPers(rs.getString(\"cod_pers\"));\n\t\t\t\tasis.setPeriodo(rs.getString(\"periodo\"));\n\t\t\t\tasis.setUOrgan(rs.getString(\"u_organ\"));\n\t\t\t\tasis.setMov(rs.getString(\"mov\"));\n\t\t\t\tasis.setFIng(new BeanFechaHora(rs.getDate(\"fing\")).getFormatDate(\"dd/MM/yyyy\"));\n\t\t\t\tif (rs.getDate(\"fsal\")==null) {\n\t\t\t\t\tasis.setFSal(\"\");\n\t\t\t\t}else{\n\t\t\t\t\tasis.setFSal(new BeanFechaHora(rs.getDate(\"fsal\")).getFormatDate(\"dd/MM/yyyy\"));\n\t\t\t\t}\n\t\t\t\tasis.setHIng(rs.getString(\"hing\"));\n\t\t\t\tasis.setHSal(rs.getString(\"hsal\"));\n\t\t\t\tasis.setAutorId(rs.getString(\"autor_id\"));\n\t\t\t\tasis.setJefeAutor(rs.getString(\"jefe_autor\"));\n\t\t\t\tasis.setFechaAutor(rs.getTimestamp(\"fecha_autor\"));\n\t\t\t\tasis.setEstadoId(rs.getString(\"estado_id\"));\n\t\t\t\tasis.setDescMov(rs.getString(\"descrip\"));\n\t\t\t\tasis.setDescObserv(rs.getString(\"obs_papeleta\"));\n\t\t\t\tdetalle.add(asis);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "public List<Usuario> buscarPorNombre(String nombre) throws SQLException {\n PreparedStatement preSt = connection.prepareStatement(USUARIOS_POR_NOMBRE);\n preSt.setString(1, \"%\" + nombre + \"%\");\n ResultSet result = preSt.executeQuery();\n\n List<Usuario> usuario = new LinkedList<>();\n\n while (result.next()) {\n usuario.add(new Usuario(\n result.getInt(Usuario.USUARIO_ID_DB_NAME),\n result.getString(Usuario.NOMBRE_DB_NAME),\n result.getString(Usuario.PROFESION_DB_NAME),\n result.getString(Usuario.PASSWORD_DB_NAME)\n ));\n }\n System.out.println(\"Usuarios: \" + usuario.size());\n return usuario;\n }", "public DatiBancari[] findWhereUtenteUteIdEquals(long utenteUteId) throws DatiBancariDaoException;", "public List<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "private boolean existeCondicionTrabajoEspecifico(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\" SELECT * FROM planificacion.det_condicion_trabajo_especif \"\r\n\t\t\t\t+ \" where id_concurso_puesto_agr = \" + concursoPuestoAgr.getIdConcursoPuestoAgr()\r\n\t\t\t\t+ \" and tipo = 'GRUPO' \";\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;" ]
[ "0.5940178", "0.5924437", "0.56028044", "0.55107164", "0.54891646", "0.54702747", "0.5466403", "0.54243684", "0.54222023", "0.5401255", "0.5384518", "0.5366353", "0.53651965", "0.5337648", "0.5313982", "0.5312617", "0.53100467", "0.52935094", "0.5288993", "0.5274834", "0.5273168", "0.5263234", "0.5249303", "0.5242914", "0.5234667", "0.5224553", "0.5208927", "0.52025336", "0.51991236", "0.519725", "0.5192634", "0.5189527", "0.5187406", "0.5167042", "0.5166685", "0.515361", "0.5151915", "0.5151296", "0.51383567", "0.5138106", "0.51338685", "0.512868", "0.5127394", "0.51254654", "0.5123946", "0.51210225", "0.51207703", "0.51094407", "0.5104129", "0.50955683", "0.50949645", "0.5088831", "0.5080452", "0.50788504", "0.5057177", "0.5056218", "0.5053181", "0.5051567", "0.5050675", "0.50469923", "0.50456357", "0.5045392", "0.50408167", "0.50387686", "0.50273156", "0.5018518", "0.50170773", "0.5010082", "0.50072396", "0.5007066", "0.5006352", "0.50034666", "0.49952447", "0.4993319", "0.49918413", "0.49864584", "0.4980662", "0.49787897", "0.49781978", "0.49761316", "0.49697012", "0.49670443", "0.49658212", "0.49634528", "0.49601054", "0.49583802", "0.4949739", "0.49477234", "0.49474183", "0.49473906", "0.49434683", "0.49419242", "0.4939817", "0.49392703", "0.49286205", "0.49284285", "0.49278462", "0.4927104", "0.49241793", "0.4916654" ]
0.76751995
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'IDENTIFICACION = :identificacion'.
public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public Empleado buscarEmpleadoPorId(String identificacion){\n Empleado empleadoEncontrado = null ;\n for (int i = 0; i < listaEmpleados.size(); i++) {\n if(listaEmpleados.get(i).getIdentificacion().equalsIgnoreCase(identificacion)){\n empleadoEncontrado = listaEmpleados.get(i);\n }\n }\n return empleadoEncontrado;\n }", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario iniciarSesion(String identificacion, String clave) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tString sql = \"select u.* from usuario as u inner join empleado as e \"\n\t\t\t\t+ \"on u.id = e.id where e.identificacion = :identificacion and u.clave = :clave ;\";\n\n\t\tQuery query = entityManager.createNativeQuery(sql, Usuario.class);\n\n\t\tquery.setParameter(\"identificacion\", identificacion);\n\t\tquery.setParameter(\"clave\", clave);\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario usuario = null;\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tusuario = lista.get(0);\n\t\t}\n\n\t\treturn usuario;\n\t}", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public void setIdentificacionEntrega(java.lang.String identificacionEntrega) {\r\n this.identificacionEntrega = identificacionEntrega;\r\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereGenericoEquals(int generico) throws ClienteDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "public boolean buscarPorIdentificador(String identificador){\n Nodo_Bodega Temporal = Nodo_bodega_inicial;\n if(Size==0){\n return false;\n }else{\n if(Temporal.obtenerIdentificador().equals(identificador)){\n return true;\n }\n }\n \n while(Temporal.obtenerSiguiente()!= null){\n Temporal = Temporal.obtenerSiguiente();\n if(Temporal.obtenerIdentificador().equals(identificador)){\n return true;\n }\n }\n return false;\n }", "public ArrayList<Auxiliar> obtenerObsInvestigacion(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerObsInvestigacion(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public ArrayList<Auxiliar> obtenerObsAsesoria(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerObsAsesoria(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public ArrayList findPersonalAsistencia(String dbpool, String criterio,\n\t\t\tString valor, String periodo, HashMap seguridad)\n\t\t\tthrows SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select t02cod_pers, substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) cod_uorga \"\n\t\t\t\t\t).append( \" from t02perdp \" ).append( \" where t02cod_stat = ? \");\n\n\t\t\tif (criterio.equals(\"0\")) {\n\t\t\t\tstrSQL.append(\" and t02cod_pers = '\" ).append( valor.trim().toUpperCase()\n\t\t\t\t\t\t).append( \"'\");\n\t\t\t}\n\n\t\t\tif (criterio.equals(\"1\")) {\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) = '\"\n\t\t\t\t\t\t).append( valor.trim().toUpperCase() ).append( \"'\");\n\t\t\t}\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\" ).append( Constantes.PROCESO_ASISTENCIA\n\t\t\t\t\t\t).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by t02cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, Constantes.ACTIVO);\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tHashMap det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"t02cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"cod_uorga\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "public ArrayList<Auxiliar> obtenerObsDocencia(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerObsDocencia(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public ArrayList<Auxiliar> obtenerAutoevaluacionDocencia(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerAutoevaluacionDocencia(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public ArrayList<Auxiliar> obtenerObsAdmin(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerObsAdmin(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public ArrayList<Auxiliar> obtenerObsTrbInvestigacion(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerObsTrbInvestigacion(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}", "public ArrayList<Auxiliar> obtenerAutoevaluacionInvestigacion(\tString periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerAutoevaluacionInvestigacion(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public List<InfoDocumento> buscarImagenDocumentos (int idInfoDocumento, int idDocumento, int idCategoria, int idSubCategoria, \n int version, int numeroDocumento, java.lang.String idExpediente) throws SOAPException, SOAPFaultException {\n traza.trace(\"buscar los tipos de documento\", Level.INFO);\n traza.trace(\"idInfoDocumento \"+idInfoDocumento, Level.INFO);\n traza.trace(\"idDocumento \"+idDocumento, Level.INFO);\n traza.trace(\"idCategoria \"+idCategoria, Level.INFO);\n traza.trace(\"idSubCategoria \"+idSubCategoria, Level.INFO);\n traza.trace(\"version \"+version, Level.INFO);\n traza.trace(\"numero del documeto \"+numeroDocumento, Level.INFO);\n traza.trace(\"idExpediente \"+idExpediente, Level.INFO);\n return buscarFisicoDocumento(idInfoDocumento, idDocumento, idCategoria, idSubCategoria, version, numeroDocumento, idExpediente);\n }", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public ArrayList<Auxiliar> obtenerAutoevaluacionAdministracion(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerAutoevaluacionAdministracion(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public Cliente[] findWhereNumeroEquals(String numero) throws ClienteDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "public NominaPuesto[] findWhereSueldoDiarioIntegradoEquals(double sueldoDiarioIntegrado) throws NominaPuestoDaoException;", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "public ArrayList<Auxiliar> obtenerAutoevaluacionAsesoria(String periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerAutoevaluacionAsesoria(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public Ruta[] findWhereIdUsuarioEquals(int idUsuario) throws RutaDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByDynamicWhere(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n // construct the SQL statement\r\n final String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n System.out.println(\"Executing \" + SQL);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(SQL);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public ArrayList<Auxiliar> obtenerAutoevaluacionTrabajosInvestigacion(\tString periodo, String identificacion) {\n\t\tArrayList<Bean> result = new ArrayList<Bean>();\n\t\tint cont = 0;\n\t\ttry {\n\t\t\tresult = this.objADAO.obtenerAutoevaluacionTrabajosInvestigacion(periodo, identificacion);\n\t\t\tfor(Bean iteratorBean : result) {\n\t\t\t\tthis.auxiliar.add((Auxiliar) iteratorBean);\n\t\t\t}\n\t\t\t//this.docenteAsesoriaData.add((Asesoria) iteratorBean);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getAuxiliar();\n\t}", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public ResultSet MostrarCitaCliente(String nif) throws SQLException {\n\t\t\n\t\tString sql = \"SELECT cita.idCita, cita.fechaCita, cita.estadoCita,horas.Hora,sala.idSala, sala.tamanoSala,medico.nombreMedico FROM(cita INNER JOIN cliente on cita.idClienteAux = cliente.idCliente INNER JOIN medico ON cita.idMedicoAux = medico.idMedico INNER JOIN sala ON cita.idSalaAux = sala.idSala INNER JOIN horas ON cita.idHoraAux = horas.idHora) WHERE cliente.nifCliente like'\"+nif+\"' ORDER BY fechaCita ASC , Hora ASC\";\n\t\ttry {\n\t\t\tconn = conexion.getConexion(); // nueva conexion a la bbdd CREARLO EN TODOS LOS METODOS\n\t\t\tst=(Statement) conn.createStatement();\n\t\t\tresultado = st.executeQuery(sql);\n\t\t\t\t//st.close();\n\t\t\t\t//con.close();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "@Override\r\n\tpublic List<Ifp> getIfpInatec(Integer entidadId) {\r\n\t\tList<Ifp> ifpList = null;\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tentidadId = (entidadId == null) ? 1000 : entidadId;\r\n\t\t\tObject [] params = new Object [] {String.valueOf(entidadId), String.valueOf(entidadId)};\r\n\t\t\tint [] paramsType = {java.sql.Types.VARCHAR, java.sql.Types.VARCHAR};\r\n\t\t\t \r\n\t\t\tifpList = jdbcTemplate.query(SQL_SELECT_IFP_INATEC, \r\n\t\t\t\t\t\t\t\t\t\tparams, paramsType, \r\n\t\t\t\t\t\t\t\t\t\tnew RowMapper<Ifp>() {\r\n\t\t\t\t\t\t\t\t\t\t\tpublic Ifp mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\t\t\t\tIfp ifp = new Ifp();\r\n\t\t\t\t\t\t\t\t\t\t\t\tifp.setIfpId(rs.getInt(\"id_centro\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\tifp.setIfpNombre(rs.getString(\"nombre\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn ifp;\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\r\n\t\t} catch(EmptyResultDataAccessException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tifpList = null;\r\n\t\t}\r\n\t\treturn ifpList;\t\t\r\n\t}", "public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}", "public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@WebMethod\n @WebResult(name = \"ResultadoObtenerProductos\")\n public List<Producto> consultaObtenerProductos(\n @WebParam(name = \"idIntermediario\") Long idIntermediario) {\n logger.debug(\"consultaObtenerProductos-Inicia idIntermediario:\" + idIntermediario);\n\n List<Producto> productos = new ArrayList<Producto>();\n try {\n productos = administracionParametrosService\n .obtenerProductos(idIntermediario);\n } catch (Exception e1) {\n logger.error(\"consultaObtenerProductos-Fin Error Exception:\" + e1.getMessage(), e1);\n \n }\n return productos;\n }", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public Collection pesquisarRoteiroEmpresaPorGrupoFaturamento(Integer idGrupoFaturamento) throws ErroRepositorioException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public List<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "Especialidad getEspecialidadPorId(Integer especialidadId);", "public boolean esIdentificador() {\n\t\tif (Entidad.class.isInstance(this.getPadre())) {\n\t\t\tSet<Identificador> identificadores = ((Entidad) this.getPadre()).identificadores;\n\n\t\t\tfor (Identificador identificador : identificadores) {\n\t\t\t\tif (identificador.contiene(this) && identificador.getEntidades().isEmpty()\n\t\t\t\t\t\t&& identificador.getAtributos().size() == 1)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "@Query(\"select pu from ProcesoUsuario pu join pu.proceso p where p.estado = true and p.juzgado=?1\")\r\n\tPage<ProcesoUsuario> findAllByJuzgado(Juzgado juzgado, Pageable pageable);", "public String[] listarArticulos() throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\t\n System.out.println(\"Listando articulos...\");\n\t\t\n\t\tint cantArticulos = 0;\n String sql = \"SELECT COUNT(NombreArticulo) FROM Articulos\";\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantArticulos = rs.getInt(1);\n }\n\t\t\t\n\t\t\tString[] articulos = new String[cantArticulos];\n\t\t\tString sql2 = \"SELECT NombreArticulo FROM Articulos\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tarticulos[k] = rs2.getString(1);\n\t\t\t\tk++;\n\t\t\t}\n\t\t\t\n\t\t\treturn articulos;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar los articulos.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n \n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic Collection<String> consultarLineaComercialClasificacionAsignacionMasivaIngresar(String codigoClasificacion,String nivelClasificacion,String valorTipoLineaComercial,Long codigoLinPad,Long codigoLinCom)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Entr� a consultar Linea Comercial Clasificacion Asignacion Masiva Ingresar : {}\",codigoClasificacion);\n\t\tStringBuilder query = null;\n\t\tSQLQuery sqlQuery = null;\n\t\tSession session=null;\n\t\tString divDep=\" ) \";\n\t\ttry {\n\t\t\tsession = hibernateH.getHibernateSession();\n\t\t\tsession.clear();\n\t\t\tquery = new StringBuilder(\" SELECT t1.CODIGOCLASIFICACION \");\n\t\t\t\n\t\t\tquery.append(\" FROM ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\tdivDep+=\" ) ) \";\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tquery.append(\" where t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\tquery.append(\" select distinct lineacomer0_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCADMTLINCOMCLA lineacomer0_, SCADMTLINCOM lineacomer1_ \");\n\t\t\tquery.append(\" where lineacomer1_.CODIGOLINEACOMERCIAL=lineacomer0_.CODIGOLINEACOMERCIAL \");\n\t\t\tquery.append(\" and lineacomer1_.NIVEL=0 and lineacomer1_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and lineacomer1_.CODIGOLINEACOMERCIAL NOT IN( \"+codigoLinPad+\" ) \");\n\t\t\t}\n\t\t\tquery.append(\" and lineacomer0_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' and lineacomer1_.VALORTIPOLINEACOMERCIAL='\"+valorTipoLineaComercial+\"' \");\n\t\t\tquery.append(\" and ( lineacomer0_.CODIGOCLASIFICACION in ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" ) )\");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" ) ) \");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t///CODIGO EXTRA\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\t\tquery.append(\" SELECT CODIGOCLASIFICACION FROM SCADMTLINCOMCLA LCC, SCADMTLINCOM LC\t \");\n\t\t\t\tquery.append(\" where LCC.CODIGOCLASIFICACION IN(\t \");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\t}\n\t\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\"\"+divDep+\" \");\n\t\t\t\t}else{\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" \");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tquery.append(\" AND LCC.ESTADO='1' \");\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL=LC.CODIGOLINEACOMERCIAL \");\n\t\t\t\tquery.append(\" AND LC.CODIGOLINEACOMERCIALPADRE = \"+codigoLinPad);\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL NOT IN (\"+codigoLinCom+\") )\");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" ) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\n//\t\t\tsqlQuery.setParameter(\"estadoClasificacion\", SICConstantes.ESTADO_ACTIVO_NUMERICO);\n//\t\t\tsqlQuery.setParameter(\"codigoClasificacion\", codigoClasificacion);\n//\t\t\tsqlQuery.setParameter(\"valorTipoLineaComercial\", valorTipoLineaComercial);\n\t\t\t\n\t\t\tsqlQuery = hibernateH.getHibernateSession().createSQLQuery(query.toString());\n//\t\t\tsqlQuery.addEntity(\"vista\", ClasificacionDTO.class);\n\t\t\t\n//\t\t\tclasificacionDTOs =sqlQuery.list();\n\t\t\treturn sqlQuery.list();\n\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t}\n//\t\treturn clasificacionDTOs;\n\t\t\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public void verSeleccionarDatosporID(String entidad, String accion)\r\n\t{\r\n\t\tseleccionardatos = new SeleccionarDatosporID(this,entidad,accion);\r\n\t\tseleccionardatos.setVisible(true);\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }" ]
[ "0.6508119", "0.6449964", "0.60779506", "0.5968479", "0.5860674", "0.5823285", "0.5819078", "0.5719971", "0.5712051", "0.563524", "0.56020665", "0.5598821", "0.5562039", "0.55609906", "0.5520591", "0.5485444", "0.5484055", "0.5476474", "0.54633486", "0.54607344", "0.5441925", "0.5439864", "0.5425276", "0.5411056", "0.5403061", "0.53969026", "0.53943175", "0.538858", "0.5377778", "0.53705907", "0.5365289", "0.5357764", "0.53498375", "0.5345854", "0.53349245", "0.5305145", "0.5291872", "0.52887565", "0.52878994", "0.52606887", "0.5257346", "0.5256157", "0.52537537", "0.5249514", "0.52372235", "0.5234327", "0.5228175", "0.5218585", "0.5210764", "0.52027583", "0.519838", "0.5194273", "0.5188333", "0.51823705", "0.5158122", "0.5144799", "0.5140722", "0.51361483", "0.5132392", "0.5129734", "0.51260406", "0.51227665", "0.51216394", "0.51076657", "0.5107474", "0.5105553", "0.50970036", "0.50969243", "0.50942075", "0.50935394", "0.50929755", "0.50927573", "0.5091293", "0.5089332", "0.50833946", "0.5078816", "0.5077879", "0.50625974", "0.50610524", "0.50569093", "0.505548", "0.5052197", "0.50477487", "0.50433415", "0.5042609", "0.50412923", "0.5040566", "0.50403625", "0.5039445", "0.5035095", "0.5032997", "0.50252795", "0.5023469", "0.50227934", "0.5022212", "0.5019152", "0.5018505", "0.5018378", "0.501703", "0.5015302" ]
0.7600449
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'CANTIDAD = :cantidad'.
public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public RelacionConceptoEmbalaje[] findWhereCantidadEquals(double cantidad) throws RelacionConceptoEmbalajeDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "@RequestMapping(method=RequestMethod.GET,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Producto> consultaPorTipoDeProductoYCantidad(\n\t\t\t@RequestParam String tipo, @RequestParam int cantidad\n\t\t\t){\n\t\treturn null;\n\t}", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public List<mTipoAdicionais> selectAdicTipoProd(int codAdicional) throws SQLException {\n\t\tString sql = \"select adictipoprod.codTipoProduto,tDescTipo, adictipoprod.adicPreco,adictipoprod.adicAtivo\\r\\n\" + \r\n\t\t\t\t\"from adicionais, adictipoprod,tipoproduto\\r\\n\" + \r\n\t\t\t\t\"where adictipoprod.codTipoProduto = tipoproduto.codTipoProduto \\r\\n\" + \r\n\t\t\t\t\"and adictipoprod.codAdicionais = adicionais.codAdicionais\\r\\n\" + \r\n\t\t\t\t\"and adicionais.codAdicionais = ?;\";\r\n\t\t\r\n\t\tPreparedStatement stm = this.createPreparedStatement(sql);\r\n\t\tstm.setInt(1,codAdicional);\r\n\t\t\r\n\t\tResultSet rs = stm.executeQuery();\r\n\t\tList<mTipoAdicionais> retorno = new ArrayList();\r\n\t\t\r\n\t\twhile(rs.next()) {\r\n\t\t\tmTipoAdicionais temp = new mTipoAdicionais();\r\n\t\t\ttemp.setCodTipoProduto(rs.getInt(1));\r\n\t\t\ttemp.setTipoProduto(rs.getString(2));\r\n\t\t\ttemp.setPreco(rs.getFloat(3));\r\n\t\t\ttemp.setAtivo(rs.getBoolean(4));\r\n\t\t\t\r\n\t\t\tretorno.add(temp);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tclose(rs,stm);\r\n\t\tfecha();\r\n\t\treturn retorno;\r\n\r\n\t}", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }", "public Ruta[] findWhereIdTipoRutaEquals(int idTipoRuta) throws RutaDaoException;", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public GrafoNPonderados(int pCantNodos, double densidad) {\n\t\tcantNodos = pCantNodos;\n\t\tpesoNodos = new int[cantNodos+1];\n\t\t\n\t\tadyacencias = new LinkedList[cantNodos+1];\n\t\tfor (int i = 1; i <= cantNodos; i++) { \n\t\t\tadyacencias[i] = new LinkedList();\n\t\t\tpesoNodos[i] = (int)(Math.random()*(cantNodos)+1)*10;\n\t\t}\n\n\t\tfor (int i = 1; i <= cantNodos; i++) {\n\t\t\tfor(int j = 0; j < (int)(Math.random()*((cantNodos-1)+1)*densidad); j++) {\n\t\t\t\tint nodo = (int)(Math.random()*(cantNodos));\n\t\t\t\tif(!adyacencias[i].contains(Integer.valueOf(nodo)) && nodo != i && nodo != 0) {\n\t\t\t\t\tadyacencias[i].add(Integer.valueOf(nodo));\n\t\t\t\t\tif(!adyacencias[nodo].contains(Integer.valueOf(i))) {\n\t\t\t\t\t\tadyacencias[nodo].add(Integer.valueOf(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tarmarMatrizAdyacencias();\n\t}", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public void obtenerCantidadProducto() {\n \n if (codigoBarra.equals(\"\")) {\n return; //para que nos mantenga siempre en el imput\n }\n\n ProductoDao productoDao = new ProductoDaoImp();\n try {\n //obtenemos la instancia de Producto en Base a su codigo de Barra\n producto = productoDao.obtenerProductoPorCodigoBarra(codigoBarra);\n\n if (producto != null) {\n //Levantamos dialog\n RequestContext.getCurrentInstance().execute(\"PF('dialogCantidadProducto2').show();\");\n } else {\n codigoBarra = \"\";\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Error\", \n \"Producto No encontrado con ese Codigo de Barra\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public Integer consultaCantidadesXId(Integer idProducto){\n\t\tInteger rta = 0;\n\t\ttry {\n\t\t\tList<ExistenciaXSedeEntity> lista = new ArrayList<>();\n\t\t\tlista = conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t\tif(lista==null || lista.isEmpty()){\n\t\t\t\trta =0;\n\t\t\t}else{\n\t\t\t\trta = lista.get(0).getExistencias();\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rta;\n\t}", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa, Integer idCategoria, Date dataFaturamento)\n\t\t\tthrows ErroRepositorioException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public Object[][] getNumeros(int cantidad) {\r\n Object[][] numeros = new Object[2][cantidad];\r\n\r\n double xi = this.seed;\r\n\r\n for (int i = 0; i < cantidad; i++) {\r\n xi = (a * xi + c) % m;\r\n numeros[0][i] = (long) xi;\r\n numeros[1][i] = xi / (m - 1);\r\n }\r\n return numeros;\r\n }", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "public CrGrupoFormulario[] findWhereNombreEquals(String nombre) throws CrGrupoFormularioDaoException;", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public Integer consultaExistenciasTotales(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t Integer respuesta = 0;\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t\tif(lista!=null && !lista.isEmpty()){\n\t\t\t\tfor(ExistenciaXSedeEntity item:lista){\n\t\t\t\t\trespuesta += item.getExistencias();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return respuesta;\n\t}", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "private void cargardatos() {\n String sql = \"SELECT * FROM nomPercepciones\";\n\n Object datos[] = new Object[13];\n try {\n conn = (this.userConn != null) ? this.userConn : Conexion.getConnection();\n stmt = conn.prepareStatement(sql);\n rs = stmt.executeQuery();\n while (rs.next()) {\n datos[0] = rs.getString(\"idNomPer\");\n datos[1] = rs.getString(\"nombre\");\n datos[2] = rs.getString(\"dias\");\n if (rs.getString(\"estatus\").equalsIgnoreCase(\"1\")) {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/actulizadoj.png\")));\n } else {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/noactualizadoj.png\")));\n }\n\n tabla1.addRow(datos);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Error al cargar los datos\\n\" + e, \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } finally {\n Conexion.close(rs);\n Conexion.close(stmt);\n if (this.userConn == null) {\n Conexion.close(conn);\n }\n }\n }", "@Override\r\n public Resultado consultar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n // instanciando DAO de acordo com a classe\r\n IDAO dao = daos.get(nmClass);\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"PESQUISAR\");\r\n if (msg.isEmpty()) {\r\n if (dao.consultar(entidade).isEmpty()) {\r\n //caso dados não foram encontrados\r\n resultado.setMsg(\"dados nao encontrados\");\r\n } else {\r\n //caso dados foram encontrados \r\n resultado.setMsg(\"pesquisa feita com sucesso\");\r\n }\r\n resultado.setEntidades(dao.consultar(entidade));\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public List<Perguntas> getPerguntas(String servico) {\r\n String idSolicitacao = \"\";\r\n List<Perguntas> perguntas = new ArrayList<>();\r\n\r\n String sql = \"Select\\n\"\r\n + \" perguntas.Id_Perguntas,\\n\"\r\n + \" perguntas.pergunta,\\n\"\r\n + \" perguntas.Servico_id_servico,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \"\\n\"\r\n + \"INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" INNER JOIN perguntas on \t(servico.id_servico=perguntas.Servico_id_servico)\\n\"\r\n + \" WHERE solicitacoes.em_chamado = 3 and servico.id_servico = \" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n\r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n Perguntas p = new Perguntas();\r\n\r\n p.setIdPerguntas(rs.getInt(1));\r\n p.setIdServico(rs.getInt(3));\r\n p.setPergunta(rs.getString(2));\r\n idSolicitacao = rs.getString(4);\r\n perguntas.add(p);\r\n }\r\n mudaStatus(idSolicitacao);\r\n\r\n return perguntas;\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return perguntas;\r\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "@RequestMapping (\"/vehiculos\")\n\tpublic ModelAndView verVehiculos (@RequestParam (\"cantidad\") Integer cant){\n\n\t\tModelMap modelo = new ModelMap();\n\t\t\n\t\tmodelo.put(\"vehiculos\", servicioVehiculo.listarVehiculos(cant));\n\t\treturn new ModelAndView (\"vehiculos\", modelo);\n\t}", "public ResultSet select(String pCampos, String pTabla, String pCondicion) {\n ResultSet rs = null; //obtener los datos del select\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n sentencia = \" SELECT \" + pCampos + \" FROM \" + pTabla; // se crea el select\n if (!pCondicion.isEmpty()) {\n sentencia += \" WHERE \" + pCondicion;\n }\n rs = s.executeQuery(sentencia); // \n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n }\n return rs;\n }", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public ProductoDTO buscarproducto(ProductoDTO c) {\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ProductoDTO arrpdto = null;\r\n\r\n try {\r\n ps = conn.getConn().prepareStatement(SQL_READ);\r\n ps.setInt(1, c.getId());\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arrpdto = new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9));\r\n\r\n }\r\n return arrpdto;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n\r\n return null;\r\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public ArrayList<Posicion> getCamino(int dia){\n Query q = bd.query();\n q.constrain(Posicion.class);\n q.descend(\"fecha\").constrain(dia).like();\n ObjectSet<Posicion> p= q.execute();\n ArrayList<Posicion> ruta = new ArrayList<Posicion>();\n for(Posicion a: p){\n ruta.add(a);\n }\n return ruta;\n }", "public Cliente[] findWhereDiasVisitaEquals(String diasVisita) throws ClienteDaoException;", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public Utente[] findByValute(long fkPreferenzaValuta) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_preferenza_valuta = ?\", new Object[] { new Long(fkPreferenzaValuta) } );\n\t}", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "public Cliente[] findWhereGenericoEquals(int generico) throws ClienteDaoException;", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "@Query(\"SELECT entity.tiposBancos FROM VwBancos entity WHERE entity.clientes.id = :id AND (:cdTipoBanco is null OR entity.tiposBancos.cdTipoBanco = :cdTipoBanco) AND (:dsTipoBanco is null OR entity.tiposBancos.dsTipoBanco like concat('%',:dsTipoBanco,'%')) AND (:dsIconeBanco is null OR entity.tiposBancos.dsIconeBanco like concat('%',:dsIconeBanco,'%'))\")\n public Page<TiposBancos> listTiposBancosSpecificSearch(@Param(value=\"id\") java.lang.Double id, @Param(value=\"dsTipoBanco\") java.lang.String dsTipoBanco, @Param(value=\"dsIconeBanco\") java.lang.String dsIconeBanco, Pageable pageable);", "public SgfensBanco[] findWhereIdBancoEquals(int idBanco) throws SgfensBancoDaoException;", "public java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;", "public List<String> guiaContableByTipoNominaTerceros(String idTipoNomina) {\n String guiaContableByTipoNominaTerceros = super.getQueryDefinition(\"guiaContableByTipoNominaTerceros\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"idTipoNomina\", idTipoNomina);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n \n return namedTemplate.query(guiaContableByTipoNominaTerceros, namedParameters, new GuiaContableAux());\n }" ]
[ "0.66426826", "0.61883444", "0.6141649", "0.6022464", "0.6021047", "0.5953118", "0.59529865", "0.5943347", "0.59427863", "0.5784089", "0.5723118", "0.5701311", "0.5629614", "0.5611586", "0.5602968", "0.55977917", "0.5594353", "0.55898935", "0.55840075", "0.55665004", "0.5562354", "0.5534064", "0.5519191", "0.549899", "0.5482899", "0.54750717", "0.54739964", "0.54711604", "0.5461086", "0.5453729", "0.5451992", "0.54410493", "0.54331994", "0.5433009", "0.5412013", "0.54091847", "0.5399895", "0.5399584", "0.5397378", "0.53938943", "0.5367305", "0.53482294", "0.53335726", "0.5333441", "0.53312314", "0.5331203", "0.53163815", "0.5315924", "0.531506", "0.52908057", "0.52858466", "0.52763045", "0.5275293", "0.52674764", "0.52668667", "0.5265219", "0.5262827", "0.52461123", "0.5242517", "0.5242286", "0.5240007", "0.52390426", "0.5197068", "0.5193721", "0.5190096", "0.517209", "0.51521677", "0.5151678", "0.5136666", "0.5134502", "0.51320606", "0.51255244", "0.5117637", "0.5116983", "0.5113374", "0.5112278", "0.5106419", "0.509378", "0.50931394", "0.50762594", "0.5066175", "0.5065413", "0.50636196", "0.5061998", "0.50606906", "0.50584847", "0.5054604", "0.5054232", "0.5052026", "0.50509715", "0.5045784", "0.50456935", "0.5041158", "0.5038658", "0.5035243", "0.5033515", "0.50305104", "0.5028359", "0.5026676", "0.50201166" ]
0.7131359
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'PRECIO_UNITARIO = :precioUnitario'.
public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public List<Perguntas> getPerguntas(String servico) {\r\n String idSolicitacao = \"\";\r\n List<Perguntas> perguntas = new ArrayList<>();\r\n\r\n String sql = \"Select\\n\"\r\n + \" perguntas.Id_Perguntas,\\n\"\r\n + \" perguntas.pergunta,\\n\"\r\n + \" perguntas.Servico_id_servico,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \"\\n\"\r\n + \"INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" INNER JOIN perguntas on \t(servico.id_servico=perguntas.Servico_id_servico)\\n\"\r\n + \" WHERE solicitacoes.em_chamado = 3 and servico.id_servico = \" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n\r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n Perguntas p = new Perguntas();\r\n\r\n p.setIdPerguntas(rs.getInt(1));\r\n p.setIdServico(rs.getInt(3));\r\n p.setPergunta(rs.getString(2));\r\n idSolicitacao = rs.getString(4);\r\n perguntas.add(p);\r\n }\r\n mudaStatus(idSolicitacao);\r\n\r\n return perguntas;\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return perguntas;\r\n }", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public Utente[] findWhereUteCartaUsaPerPremioEquals(String uteCartaUsaPerPremio) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_carta_usa_per_premio = ? ORDER BY ute_carta_usa_per_premio\", new Object[] { uteCartaUsaPerPremio } );\n\t}", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelTabelas(Integer terminal, String painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel in(\" + painel + \") order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal); \r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>(); \r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public ArrayList findPersonalAsistencia(String dbpool, String criterio,\n\t\t\tString valor, String periodo, HashMap seguridad)\n\t\t\tthrows SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select t02cod_pers, substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) cod_uorga \"\n\t\t\t\t\t).append( \" from t02perdp \" ).append( \" where t02cod_stat = ? \");\n\n\t\t\tif (criterio.equals(\"0\")) {\n\t\t\t\tstrSQL.append(\" and t02cod_pers = '\" ).append( valor.trim().toUpperCase()\n\t\t\t\t\t\t).append( \"'\");\n\t\t\t}\n\n\t\t\tif (criterio.equals(\"1\")) {\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) = '\"\n\t\t\t\t\t\t).append( valor.trim().toUpperCase() ).append( \"'\");\n\t\t\t}\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\" ).append( Constantes.PROCESO_ASISTENCIA\n\t\t\t\t\t\t).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by t02cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, Constantes.ACTIVO);\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tHashMap det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"t02cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"cod_uorga\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorTarifa(java.math.BigDecimal valorTarifa) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorTarifa = :valorTarifa \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorTarifa\", valorTarifa);\r\n return query.getResultList();\r\n }", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public Collection pesquisarParcelamentoContaUsuario(Integer idUsuario, Date dataInicial, Date dataFinal)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection retorno = null;\n\t\tSession session = HibernateUtil.getSession();\n\t\tStringBuffer consulta = new StringBuffer();\n\n\t\ttry{\n\t\t\tconsulta.append(\"SELECT MPCCDFUN AS mpccdfun, \");\n\t\t\tconsulta.append(\" MPCDTMPC AS mpcdtmpc, \");\n\t\t\tconsulta.append(\" MPCHRMPC AS mpchrmpc, \");\n\t\t\tconsulta.append(\" MPCAMINI AS mpcamini, \");\n\t\t\tconsulta.append(\" MPCAMFIN AS mpcamfin, \");\n\t\t\tconsulta.append(\" MPCNNMATUSU AS mpcnnatusu, \");\n\t\t\tconsulta.append(\" MPCNNMATUSUD AS mpcnnmatusud, \");\n\t\t\tconsulta.append(\" MPCNNPREST AS mpcnnprest, \");\n\t\t\tconsulta.append(\" MPCVLENTR AS mpcvlentr, \");\n\t\t\tconsulta.append(\" MPCVLPREST AS mpcvlprest, \");\n\t\t\tconsulta.append(\" MPCVLDEBHIST AS mpcvldebhist, \");\n\t\t\tconsulta.append(\" MPCVLDEBCORR AS mpcvldebcorr, \");\n\t\t\tconsulta.append(\" MPCVLTOTSACINCL AS mpcvltotsacincl, \");\n\t\t\tconsulta.append(\" MPCVLPARCEL AS mpcvlparcel, \");\n\t\t\tconsulta.append(\" MPCNNMATGER AS mpcnnmatger \");\n\t\t\tconsulta.append(\"FROM SCITMPC \");\n\t\t\tconsulta.append(\"WHERE MPCNNMATUSU = :idUsuario \");\n\t\t\tconsulta.append(\"AND MPCDTMPC BETWEEN :dataInicial AND :dataFinal \");\n\t\t\tconsulta.append(\"ORDER BY MPCDTMPC, MPCHRMPC, MPCNNMATUSU \");\n\n\t\t\tSQLQuery query = session.createSQLQuery(consulta.toString());\n\n\t\t\t// RETORNO\n\t\t\tquery.addScalar(\"mpccdfun\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcdtmpc\", Hibernate.DATE);\n\t\t\tquery.addScalar(\"mpchrmpc\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamini\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamfin\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnatusu\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnmatusud\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnprest\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcvlentr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlprest\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebhist\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebcorr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvltotsacincl\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlparcel\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcnnmatger\", Hibernate.INTEGER);\n\n\t\t\t// PARAMETROS\n\t\t\tquery.setInteger(\"idUsuario\", idUsuario);\n\t\t\tquery.setDate(\"dataInicial\", dataInicial);\n\t\t\tquery.setDate(\"dataFinal\", dataFinal);\n\n\t\t\tretorno = query.list();\n\n\t\t}catch(HibernateException e){\n\t\t\t// levanta a exceção para a próxima camada\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\t// fecha a sessão\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "private TableModel getTableModelProduto() {\n\t\tString[] columnNames = { \"cod_p\", \"cod_barra\", \"categoria\", \"descricao\", \"unidade\", \"custo\", \"marge_lucro\" };\n\n\t\tObject[][] data = new Object[listaP.size()][7];\n\t\tfor (int i = 0; i < listaP.size(); i++) {\n\t\t\tint j = 0;\n\t\t\tdata[i][j++] = Long.valueOf(listaP.get(i).getCod());\n\t\t\tdata[i][j++] = listaP.get(i).getCodBarra();\n\t\t\tdata[i][j++] = listaP.get(i).getCategoria();\n\t\t\tdata[i][j++] = listaP.get(i).getDescricao();\n\t\t\tdata[i][j++] = listaP.get(i).getUnidade();\n\t\t\tdata[i][j++] = listaP.get(i).getCusto();\n\t\t\tdata[i][j++] = listaP.get(i).getMargenLucro();\n\t\t}\n\t\treturn new DefaultTableModel(data, columnNames);\n\t}", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public List<TriplaModeloLocal> obtenerMapeoIn(String pIdNodo, int pIdFuente)\n\n\t{\n\t\tList<TriplaModeloLocal> triplas = new ArrayList<TriplaModeloLocal>();\n\t\tString valorTripla = \"\";\n\t\ttry {\n\n\t\t\trs = stmt\n\t\t\t\t\t.executeQuery(\"SELECT TRIPLAINTEGRADORA FROM INTEGRACION WHERE IDNODO='\"\n\t\t\t\t\t\t\t+ pIdNodo\n\t\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t\t+ \"AND IDFUENTE='\"\n\t\t\t\t\t\t\t+ pIdFuente\n\t\t\t\t\t\t\t+ \"'\");\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tvalorTripla = rs.getString(\"TRIPLAINTEGRADORA\");\n\t\t\t\tTriplaModeloLocal t = new TriplaModeloLocal(valorTripla,\n\t\t\t\t\t\tpIdFuente);\n\t\t\t\ttriplas.add(t);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"No es posible recuperar las triplas de integracion de :\"\n\t\t\t\t\t\t\t+ pIdNodo);\n\t\t\tSystem.err.println(\"error: \" + e.getMessage());\n\n\t\t}\n\n\t\treturn triplas;\n\t}", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public boolean existeProducto(String p) throws DBException {\r\n\t\tboolean existe = false;\r\n\t\tString sentSQL = \"SELECT * FROM producto WHERE nombre ='\"+ p +\"'\";\r\n\t\ttry {\r\n\t\t\tStatement st = conexion.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\r\n\t\t\tif(rs.next()) \r\n\t\t\t\texiste = true;\r\n\t\t\trs.close();\r\n\t\t\tst.close();\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\tthrow new DBException(\"No se ha podido buscar el produtco en la tabla Productos\");\r\n\t\t}\r\n\t\treturn existe;\r\n\t}", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public NominaPuesto[] findWhereSueldoDiarioIntegradoEquals(double sueldoDiarioIntegrado) throws NominaPuestoDaoException;", "@Override\n\tpublic Servicos pesquisar(int idServicos) throws SQLException {\n\t\treturn null;\n\t}", "public int consultarPrecioVenta(String fruta, String proteina, String grano, String almidon) {\n Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon);\n return almuerzo.getPrecioVenta();\n }", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\r\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "public ArrayList<Reserva> getReservaByUsuarioOperador(Long codigo, Long opID) throws Exception {\n\t\t\tArrayList<Reserva> respu = new ArrayList<>();\n\t\t\tDAOReserva daoReserva = new DAOReserva();\n\t\t\ttry \n\t\t\t{\n\t\t\t\tthis.conn = darConexion();\n\t\t\t\tdaoReserva.setConn(conn);\n\t\t\t\trespu = daoReserva.findReservaByUsuarioOperador(codigo, opID);\n\n\t\t\t} \n\t\t\tcatch (SQLException sqlException) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\t\tsqlException.printStackTrace();\n\t\t\t\tthrow sqlException;\n\t\t\t} \n\t\t\tcatch (Exception exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t} \n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tdaoReserva.cerrarRecursos();\n\t\t\t\t\tif(this.conn!=null){\n\t\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (SQLException exception) {\n\t\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn respu;\n\t\t}", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public Utente[] findWhereUtePerChiPrenotiEquals(String utePerChiPrenoti) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_per_chi_prenoti = ? ORDER BY ute_per_chi_prenoti\", new Object[] { utePerChiPrenoti } );\n\t}", "private boolean existeCondicionTrabajoEspecifico(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\" SELECT * FROM planificacion.det_condicion_trabajo_especif \"\r\n\t\t\t\t+ \" where id_concurso_puesto_agr = \" + concursoPuestoAgr.getIdConcursoPuestoAgr()\r\n\t\t\t\t+ \" and tipo = 'GRUPO' \";\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "@Override\r\n public ProductosPuntoVenta[] findByDynamicWhere(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n // construct the SQL statement\r\n final String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n System.out.println(\"Executing \" + SQL);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(SQL);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "@Query(value = \"SELECT * FROM produtos WHERE prd_nome LIKE %?%\", nativeQuery = true)\r\n public List<ProdutosModel> findAllLike (String pesquisa);", "public List<TipoRetencion> findByNombreContaining(String nombre);", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "@Override\n\tpublic Produto pesquisar(Produto entidade) {\n\t\treturn null;\n\t}", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public boolean actualizarPrecioOrd(Ordenador o, Pieza p, int cantidad) {\n\t\tboolean resultado = false;\n\t\tfloat precio = obtenerPrecioPieza(p.getCodigo());\n\t\tfloat precioOrdenador = obtenerPrecioOrdenador(o.getCodigo());\n\t\t\n\t\ttry {\n\t\t\tXPathQueryService consulta = (XPathQueryService)\n\t\t\t\t\tcol.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tconsulta.query(\"update replace //ordenador[@codigo='\"+ o.getCodigo()+\n\t\t\t\t\t\"']/precio with <precio>\" + \n\t\t\t\t\t(precioOrdenador + precio * cantidad) +\"</precio>\");\n\t\t\tresultado = true;\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn resultado;\n\t}", "public List<Payment> retrievePaymentsByPedido(Order order) throws DatabaseException {\n\t\ttry {\n\t\t\tthis.startConnection();\n\t\t\tString sql = \"SELECT id_payment FROM purchase WHERE id_order = \"\n\t\t\t\t\t+ returnValueStringBD(String.valueOf(order.getId()));\n\t\t\tResultSet rs = command.executeQuery(sql);\n\t\t\tList<String> id_payments = new ArrayList<String>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString pu = rs.getString(\"id_payment\");\n\t\t\t\tid_payments.add(pu);\n\t\t\t}\n\t\t\tList<Payment> payments = new ArrayList<Payment>();\n\t\t\tfor (String id : id_payments) {\n\t\t\t\tPayment pa = this.select(Integer.parseInt(id));\n\t\t\t\tpayments.add(pa);\n\t\t\t}\n\t\t\treturn payments;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.closeConnection();\n\t\t}\n\t\treturn null;\n\t}", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "public Collection pesquisarParcelamentoContaFuncionario(Integer idFuncionario, Date dataInicial, Date dataFinal)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection retorno = null;\n\t\tSession session = HibernateUtil.getSession();\n\t\tStringBuffer consulta = new StringBuffer();\n\n\t\ttry{\n\t\t\tconsulta.append(\"SELECT MPCCDFUN AS mpccdfun, \");\n\t\t\tconsulta.append(\" MPCDTMPC AS mpcdtmpc, \");\n\t\t\tconsulta.append(\" MPCHRMPC AS mpchrmpc, \");\n\t\t\tconsulta.append(\" MPCAMINI AS mpcamini, \");\n\t\t\tconsulta.append(\" MPCAMFIN AS mpcamfin, \");\n\t\t\tconsulta.append(\" MPCNNMATUSU AS mpcnnatusu, \");\n\t\t\tconsulta.append(\" MPCNNMATUSUD AS mpcnnmatusud, \");\n\t\t\tconsulta.append(\" MPCNNPREST AS mpcnnprest, \");\n\t\t\tconsulta.append(\" MPCVLENTR AS mpcvlentr, \");\n\t\t\tconsulta.append(\" MPCVLPREST AS mpcvlprest, \");\n\t\t\tconsulta.append(\" MPCVLDEBHIST AS mpcvldebhist, \");\n\t\t\tconsulta.append(\" MPCVLDEBCORR AS mpcvldebcorr, \");\n\t\t\tconsulta.append(\" MPCVLTOTSACINCL AS mpcvltotsacincl, \");\n\t\t\tconsulta.append(\" MPCVLPARCEL AS mpcvlparcel, \");\n\t\t\tconsulta.append(\" MPCNNMATGER AS mpcnnmatger \");\n\t\t\tconsulta.append(\"FROM SCITMPC \");\n\t\t\tconsulta.append(\"WHERE MPCCDFUN = :idFuncionario \");\n\t\t\tconsulta.append(\"AND MPCDTMPC BETWEEN :dataInicial AND :dataFinal \");\n\t\t\tconsulta.append(\"ORDER BY MPCDTMPC, MPCHRMPC, MPCCDFUN \");\n\n\t\t\tSQLQuery query = session.createSQLQuery(consulta.toString());\n\n\t\t\t// RETORNO\n\t\t\tquery.addScalar(\"mpccdfun\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcdtmpc\", Hibernate.DATE);\n\t\t\tquery.addScalar(\"mpchrmpc\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamini\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamfin\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnatusu\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnmatusud\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnprest\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcvlentr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlprest\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebhist\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebcorr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvltotsacincl\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlparcel\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcnnmatger\", Hibernate.INTEGER);\n\n\t\t\t// PARAMETROS\n\t\t\tquery.setInteger(\"idFuncionario\", idFuncionario);\n\t\t\tquery.setDate(\"dataInicial\", dataInicial);\n\t\t\tquery.setDate(\"dataFinal\", dataFinal);\n\n\t\t\tretorno = query.list();\n\n\t\t}catch(HibernateException e){\n\t\t\t// levanta a exceção para a próxima camada\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\t// fecha a sessão\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public Ruta[] findWhereParadasRutaEquals(int paradasRuta) throws RutaDaoException;" ]
[ "0.66818905", "0.6359892", "0.617695", "0.60173017", "0.6009308", "0.59235555", "0.58995664", "0.5890193", "0.58808416", "0.5870757", "0.584854", "0.584439", "0.5836461", "0.583404", "0.5753771", "0.5727222", "0.57088375", "0.5636742", "0.5626879", "0.56220746", "0.5607343", "0.5565083", "0.55561537", "0.5554738", "0.55344915", "0.55213946", "0.5520334", "0.55018514", "0.5494182", "0.5486256", "0.54819775", "0.54668945", "0.5463807", "0.54553", "0.5449597", "0.5444323", "0.5409658", "0.540879", "0.54080015", "0.5397438", "0.53948414", "0.5392587", "0.5387588", "0.5370896", "0.5367219", "0.53535974", "0.53522605", "0.53520864", "0.53518736", "0.53466225", "0.53289205", "0.53162086", "0.5301687", "0.5298428", "0.52908355", "0.5288216", "0.5281698", "0.5280072", "0.527224", "0.52667326", "0.5264567", "0.5253844", "0.52534395", "0.52484703", "0.5245817", "0.52442867", "0.5243259", "0.5236633", "0.5234191", "0.52260846", "0.5223805", "0.5220396", "0.5201054", "0.52008015", "0.51956", "0.51930046", "0.51922345", "0.51873636", "0.51816374", "0.51770043", "0.5173257", "0.51709336", "0.5166623", "0.51626813", "0.51535875", "0.5147091", "0.51373845", "0.5135892", "0.5135637", "0.5134555", "0.5134511", "0.5122216", "0.5119553", "0.5111791", "0.5092577", "0.5092194", "0.5086929", "0.5085972", "0.5084784", "0.50832886" ]
0.7762966
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'DESCUENTO_PORCENTAJE = :descuentoPorcentaje'.
public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public DefaultTableModel pedidosCocinero(){\r\n List<Pedido> lista =pedidos.listadosPedidosCocinero(GestionUsuarios.getInstance().getPersona());\r\n return Convertidor.pedidoToTableModel(lista); \r\n }", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public void mostrarPorcentajeRangos(int porcentaje) {\n \t//Las parejas a colorear seran todas las cartas\n \tint numParejas = ((NUMCARTAS*NUMCARTAS) * porcentaje)/100;\n \tArrayList <String> parejasOrdenadas = new ArrayList<String>();\n \tfor (int i = 0; i < numParejas; i++)\n \t\tparejasOrdenadas.add(slanskyTable.devuelveCarta(i));\n \n \tfor (int i = 0; i < NUMCARTAS; i++) \n \t\tfor (int j = 0; j < NUMCARTAS; j++) {\n \t\t\tif(tablero[i][j].isSelected()) toggle(i,j);\n \t\t\tif (parejasOrdenadas.contains(tablero[i][j].getText())) {\n \t\t\t\ttoggle(i,j);\n \t\t\t\ttablero[i][j].setBackground(colorPorcentajes);\n \t\t\t}\n \t\t}\t\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public String estadisticasProveedoresMasSolicitados() {\n String html = \"\";\n DefaultTableModel dtm = proveedor.estadisticaProveedoresMasSolicitados();\n html = Utils.dibujarGraficasHTMLBarras(dtm, \"TOP PROVEEDORES MAS SOLICITADOS\", \"Proveedor\");\n return html;\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public List<MaloteView> buscaMalotesFecharSepex(Localidade oDestino) {\n\t\tlogger.info(\"buscaMaloteFecharSepex: conferencia pelo destinatario.\");\r\n\t\tQuery q;\r\n\t\tif (null != oDestino) {\r\n\t\t\t// malotes conferidos pelo proprio setor-destinatario.\r\n\t\t\tq = em.createQuery(\"from \"\r\n\t\t\t\t\t+MaloteView.class.getName()+\" as m \"\r\n\t\t\t\t\t+\" join fetch m.destino r \" +\r\n\t\t\t\t\t\" where m.dtRecepcao is null \" +\r\n\t\t\t\t\t\" and m.tipoMalote > 0 \" +\r\n\t\t\t\t\t\" and m.fechado = false \" +\r\n\t\t\t\t\t\" and m.destino = :pDestino\" +\r\n\t\t\t\t\t\" order by m.dtEnvio, m.destino.descricao\");\r\n\t\t\t\t\tq.setParameter(\"pDestino\", oDestino);\r\n\t\t} else {\r\n\t\t\t// malotes conferidos pela sepex\r\n\t\t\tq = em.createQuery(\"from \" +\r\n\t\t\t MaloteView.class.getName()+\" as m \" + \r\n\t\t\t\t\" join fetch m.destino r \" + \r\n\t\t\t\t\" where m.dtRecepcao is null \" +\r\n\t\t\t\t\" and m.tipoMalote > 0 \" +\r\n\t\t\t\t\" and m.fechado = false \" +\r\n\t\t\t\t\" order by m.dtEnvio, m.destino.descricao\");\t\t\t\r\n\t\t}\r\n\t\treturn (List<MaloteView>) q.getResultList();\r\n\t}", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public void ProductsSearch(DefaultTableModel tableModel, String parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE descripcion LIKE ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, \"%\" + parameter + \"%\");\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public static List<Tablakardex> obtenerTablaKardexPorProcesoProducto(Long codigoProceso, Long codigoProducto, Integer anno,\r\n\t\t\tShort mes, boolean esMateriaPrima) throws EntornoEjecucionException, SesionVencidaException {\r\n\r\n\t\tStringBuilder queryStr = new StringBuilder(\"FROM Tablakardex AS tk WHERE \");\r\n\r\n\t\tif (esMateriaPrima) {\r\n\t\t\tif (codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.producto.pkCodigoProducto = :producto AND \");\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.producto.estadoproducto.pkCodigoEstadoproducto = :estadoProducto AND \");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (codigoProceso != null && codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.ordenproduccion.produccion.proceso.pkCodigoProceso = :proceso AND \");\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.ordenproduccion.produccion.producto.pkCodigoProducto = :producto AND \");\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.ordenproduccion.produccion.producto.estadoproducto.pkCodigoEstadoproducto = :estadoProducto AND \");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tqueryStr.append(\"tk.producciondiaria.partediario.periodocontable.anoPeriodocontable = :anio AND \");\r\n\t\tqueryStr.append(\"tk.producciondiaria.partediario.periodocontable.mesPeriodocontable = :mes \");\r\n\r\n\t\tqueryStr.append(\" ORDER BY fechaTablakardex ASC \");\r\n\r\n\t\tif (esMateriaPrima) {\r\n\t\t\tif (codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\",tk.producciondiaria.producto.nombreProducto ASC\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (codigoProceso != null && codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\",tk.producciondiaria.ordenproduccion.produccion.proceso.ordenEjecucionProceso ASC,tk.producciondiaria.ordenproduccion.produccion.proceso.lineanegocio.pkCodigoLineanegocio ASC \");\r\n\t\t\t\tqueryStr.append(\",tk.producciondiaria.ordenproduccion.produccion.producto.nombreProducto ASC \");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tQuery query = Querier.query(queryStr.toString());\r\n\r\n\t\tif (esMateriaPrima) {\r\n\t\t\tif (codigoProducto != null) {\r\n\t\t\t\tquery.setLong(\"producto\", codigoProducto);\r\n\t\t\t\tquery.setLong(\"estadoProducto\", Long.valueOf(1));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (codigoProceso != null && codigoProducto != null) {\r\n\t\t\t\tquery.setLong(\"proceso\", codigoProceso);\r\n\t\t\t\tquery.setLong(\"producto\", codigoProducto);\r\n\t\t\t\tquery.setLong(\"estadoProducto\", Long.valueOf(1));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tquery.setInteger(\"anio\", anno);\r\n\t\tquery.setShort(\"mes\", mes);\r\n\r\n\t\treturn query.list();\r\n\r\n\t}", "public NominaPuesto[] findWhereDescripcionEquals(String descripcion) throws NominaPuestoDaoException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic Produto pesquisar(Produto entidade) {\n\t\treturn null;\n\t}", "public List<EntityClass> cerca(String testoRicerca, String colonnaFiltro){\n CriteriaContainer cc = new CriteriaContainer();\n // SELECT * FROM EntityClass\n cc.query.select(cc.root);\n // SELECT * FROM EntityClass WHERE colonnaFiltro LIKE :testoParam\n ParameterExpression<String> testoParam = cc.builder.parameter(String.class);\n cc.query.where(\n cc.builder.like(cc.root.get(colonnaFiltro), testoParam)\n );\n // Ottengo la lista risultante dalla query\n return getSession().createQuery(cc.query)\n .setParameter(testoParam, \"%\"+testoRicerca+\"%\") // :testoParam -> \"%testoRicerca%\"\n .getResultList();\n }", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public ResultSet mostrarPacientesBorrados() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente_borrado \"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "public List getChamado(String servico) {\r\n Solicitacoes e = chamadoHandler(servico);\r\n\r\n List<ChamadoEnderecos> consultas = new ArrayList<>();\r\n String sql = \"SELECT DISTINCT\\n\"\r\n + \"\tpid.cod_pid,\\n\"\r\n + \" pid.nome_estabelecimento,\\n\"\r\n + \" endereco.descricao,\\n\"\r\n + \" endereco.numero,\\n\"\r\n + \" endereco.bairro,\\n\"\r\n + \" endereco.complemento,\\n\"\r\n + \" municipio.nome_municipio,\\n\"\r\n + \" municipio.uf,\\n\"\r\n + \" municipio.cod_IBGE,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \" INNER JOIN contato on \t(pid.cod_pid = contato.PID_cod_pid)\\n\"\r\n + \" INNER JOIN endereco on \t(pid.cod_pid = endereco.PID_cod_pid)\\n\"\r\n + \" INNER JOIN telefone on \t(contato.id_contato = telefone.Contato_id_contato)\\n\"\r\n + \" INNER JOIN municipio on \t(endereco.Municipio_cod_IBGE = municipio.cod_IBGE)\\n\"\r\n + \" INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \" WHERE solicitacoes.em_chamado= 3 and servico.id_servico=\" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n consultas.add(new ChamadoEnderecos(rs.getString(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getString(4),\r\n rs.getString(5),\r\n rs.getString(6),\r\n rs.getString(7),\r\n rs.getString(8),\r\n rs.getString(9),\r\n rs.getString(10)\r\n ));\r\n\r\n }\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return consultas;\r\n }", "public void verProcedimientos(JTable tabla) {\n System.out.println(\"controladores.ProcedimientoController.verProcedimientos()\");\n ResultSet procedimientos = null;\n IProcedimientoDao dao = new ProcedimientoDaoImpl();\n procedimientos = dao.obtenerProcedimientos();\n vista.verProcedimientos(procedimientos, tabla);\n }", "public void ProductsProvider(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE proveedor = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "VentaJPA obtenerVenta(int comprobante);", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public java.sql.ResultSet consultaporespecialidadhorafecha(String CodigoEspecialidad,String hora,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.horas='\"+hora+\"' and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas \");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadhorafecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public List<Emprestimos> buscarPorPropriedade(String whereClause, Object parametro) {\n\t\treturn manager.createQuery(\"select e from Emprestimos e \" + whereClause + parametro, Emprestimos.class)\n\t\t .getResultList();\n\t}", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public Cliente[] findWhereApellidoPaternoClienteEquals(String apellidoPaternoCliente) throws ClienteDaoException;", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "public String estadisticasProductosMasVendidos() {\n String html = \"\";\n DefaultTableModel dtm = producto.estadisticaTopProductosMasVendidos();\n html = Utils.dibujarGraficasHTMLDonut(dtm, \"TOP PRODUCTOS MAS VENDIDOS\");\n return html;\n }", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "public List<Poteaux> recherchePoteauxBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Poteaux p WHERE p.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereFechaFirmaEquals(Date fechaFirma) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_FIRMA = ? ORDER BY FECHA_FIRMA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaFirma);\n\n }", "public void ProductsContent(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql =\"SELECT productos.descripcion, productos.presentacion, productos.precio, contenido.cantidad, \"\n + \"contenido.importe FROM productos JOIN contenido JOIN requisiciones ON productos.id_producto = \"\n + \"contenido.producto AND contenido.requisicion = requisiciones.id_requisicion \"\n + \"WHERE requisiciones.id_requisicion = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i <= columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i <= columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public List<Coupefeu> rechercheCoupefeuBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Coupefeu c WHERE c.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "public java.sql.ResultSet consultaporespecialidadfecha(String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Query(\"select pu from ProcesoUsuario pu join pu.proceso p where p.estado = true and p.juzgado=?1\")\r\n\tPage<ProcesoUsuario> findAllByJuzgado(Juzgado juzgado, Pageable pageable);", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public List<ReciboPension> buscarRecibosPendientesAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public Venta[] listarVentas(String nombreVendedor)throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\tResultSet rs3 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\tResultSet rs5 = null;\n\t\tPreparedStatement pst5 = null;\n\t\t\n System.out.println(\"Listando ventas...\");\n\t\t\n\t\tString sql = \"SELECT COUNT(IdentificadorVenta) FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\tint cantidadVentas = 0;\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, nombreVendedor);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantidadVentas = rs.getInt(1);\n }\n\t\t\t\n\t\t\tVenta[] ventas = new Venta[cantidadVentas];\n\t\t\tString sql2 = \"SELECT NombreComprador, ApellidoComprador, DocumentoComprador, AnioVenta, MesVenta, DiaVenta, IdentificadorVenta FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\tpst2.setString(1, nombreVendedor);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tString nombreComprador = rs2.getString(1);\n\t\t\t\tString apellidoComprador = rs2.getString(2);\n\t\t\t\tString numeroDocumentoComprador = rs2.getString(3);\n\t\t\t\t\n\t\t\t\tint anioVenta = rs2.getInt(4);\n\t\t\t\tint mesVenta = rs2.getInt(5);\n\t\t\t\tint diaVenta = rs2.getInt(6);\n\t\t\t\t\n\t\t\t\tint identificadorVenta = rs2.getInt(7);\n\t\t\t\t\n\t\t\t\tString sql3 = \"SELECT COUNT(A_NombreArticulo) FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs3 = pst3.executeQuery(); \n\t\t\t\t\n\t\t\t\tint cantArticulosVenta = 0;\n\t\t\t\t\n\t\t\t\tif (rs3.next()){\n\t\t\t\t\tcantArticulosVenta = rs3.getInt(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArticuloVenta[] listaArticulosVenta = new ArticuloVenta[cantArticulosVenta];\n\t\t\t\tString sql4 = \"SELECT A_NombreArticulo, Cantidad FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\n\t\t\t\tint j=0;\n\t\t\t\twhile (rs4.next()){\n\t\t\t\t\tString nombreArticulo = rs4.getString(1);\n\t\t\t\t\tint cantidadArticulo = rs4.getInt(2);\n\t\t\t\t\t\n\t\t\t\t\tArticuloVenta articulo = new ArticuloVenta(nombreArticulo, cantidadArticulo);\n\t\t\t\t\tlistaArticulosVenta[j] = articulo;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tVenta venta = new Venta(nombreComprador, apellidoComprador, numeroDocumentoComprador, anioVenta, mesVenta, diaVenta, listaArticulosVenta);\n\t\t\t\t\n\t\t\t\tventas[k] = venta;\n\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn ventas;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar las ventas.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n }" ]
[ "0.6908186", "0.6360077", "0.634778", "0.6222486", "0.60642207", "0.5922428", "0.5853945", "0.58451265", "0.5829322", "0.5805728", "0.5805362", "0.5766359", "0.57353526", "0.5732361", "0.571749", "0.57043177", "0.56883276", "0.56765026", "0.5654341", "0.5648534", "0.56123656", "0.56022054", "0.557852", "0.55727625", "0.5571114", "0.5570098", "0.5549306", "0.5548117", "0.5541057", "0.55386627", "0.5536353", "0.5529943", "0.5524668", "0.55202603", "0.55170125", "0.5510981", "0.5491707", "0.54772943", "0.54516584", "0.54492545", "0.5425649", "0.5415592", "0.54129547", "0.54095614", "0.53852165", "0.53838056", "0.53825516", "0.5375882", "0.53708476", "0.5369968", "0.5368635", "0.536396", "0.53579557", "0.53571665", "0.53496265", "0.5346512", "0.53338146", "0.533226", "0.53243434", "0.5323124", "0.53197855", "0.531855", "0.531799", "0.53000987", "0.52995294", "0.52971464", "0.5294894", "0.5290339", "0.5273569", "0.5273517", "0.5269921", "0.5259307", "0.5256227", "0.5253846", "0.5253241", "0.52499175", "0.5243259", "0.5236984", "0.52350897", "0.52307457", "0.52223766", "0.5220243", "0.5204247", "0.51955396", "0.5193621", "0.51906234", "0.5189772", "0.51863515", "0.51751935", "0.5169079", "0.51686615", "0.51677203", "0.51656103", "0.5158703", "0.51585376", "0.51544434", "0.515354", "0.51524127", "0.5152177", "0.51458335" ]
0.7274446
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'DESCUENTO_MONTO = :descuentoMonto'.
public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public List<MaloteView> buscaMalotesFecharSepex(Localidade oDestino) {\n\t\tlogger.info(\"buscaMaloteFecharSepex: conferencia pelo destinatario.\");\r\n\t\tQuery q;\r\n\t\tif (null != oDestino) {\r\n\t\t\t// malotes conferidos pelo proprio setor-destinatario.\r\n\t\t\tq = em.createQuery(\"from \"\r\n\t\t\t\t\t+MaloteView.class.getName()+\" as m \"\r\n\t\t\t\t\t+\" join fetch m.destino r \" +\r\n\t\t\t\t\t\" where m.dtRecepcao is null \" +\r\n\t\t\t\t\t\" and m.tipoMalote > 0 \" +\r\n\t\t\t\t\t\" and m.fechado = false \" +\r\n\t\t\t\t\t\" and m.destino = :pDestino\" +\r\n\t\t\t\t\t\" order by m.dtEnvio, m.destino.descricao\");\r\n\t\t\t\t\tq.setParameter(\"pDestino\", oDestino);\r\n\t\t} else {\r\n\t\t\t// malotes conferidos pela sepex\r\n\t\t\tq = em.createQuery(\"from \" +\r\n\t\t\t MaloteView.class.getName()+\" as m \" + \r\n\t\t\t\t\" join fetch m.destino r \" + \r\n\t\t\t\t\" where m.dtRecepcao is null \" +\r\n\t\t\t\t\" and m.tipoMalote > 0 \" +\r\n\t\t\t\t\" and m.fechado = false \" +\r\n\t\t\t\t\" order by m.dtEnvio, m.destino.descricao\");\t\t\t\r\n\t\t}\r\n\t\treturn (List<MaloteView>) q.getResultList();\r\n\t}", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public List getChamado(String servico) {\r\n Solicitacoes e = chamadoHandler(servico);\r\n\r\n List<ChamadoEnderecos> consultas = new ArrayList<>();\r\n String sql = \"SELECT DISTINCT\\n\"\r\n + \"\tpid.cod_pid,\\n\"\r\n + \" pid.nome_estabelecimento,\\n\"\r\n + \" endereco.descricao,\\n\"\r\n + \" endereco.numero,\\n\"\r\n + \" endereco.bairro,\\n\"\r\n + \" endereco.complemento,\\n\"\r\n + \" municipio.nome_municipio,\\n\"\r\n + \" municipio.uf,\\n\"\r\n + \" municipio.cod_IBGE,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \" INNER JOIN contato on \t(pid.cod_pid = contato.PID_cod_pid)\\n\"\r\n + \" INNER JOIN endereco on \t(pid.cod_pid = endereco.PID_cod_pid)\\n\"\r\n + \" INNER JOIN telefone on \t(contato.id_contato = telefone.Contato_id_contato)\\n\"\r\n + \" INNER JOIN municipio on \t(endereco.Municipio_cod_IBGE = municipio.cod_IBGE)\\n\"\r\n + \" INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \" WHERE solicitacoes.em_chamado= 3 and servico.id_servico=\" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n consultas.add(new ChamadoEnderecos(rs.getString(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getString(4),\r\n rs.getString(5),\r\n rs.getString(6),\r\n rs.getString(7),\r\n rs.getString(8),\r\n rs.getString(9),\r\n rs.getString(10)\r\n ));\r\n\r\n }\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return consultas;\r\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "public static List<Tablakardex> obtenerTablaKardexPorProcesoProducto(Long codigoProceso, Long codigoProducto, Integer anno,\r\n\t\t\tShort mes, boolean esMateriaPrima) throws EntornoEjecucionException, SesionVencidaException {\r\n\r\n\t\tStringBuilder queryStr = new StringBuilder(\"FROM Tablakardex AS tk WHERE \");\r\n\r\n\t\tif (esMateriaPrima) {\r\n\t\t\tif (codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.producto.pkCodigoProducto = :producto AND \");\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.producto.estadoproducto.pkCodigoEstadoproducto = :estadoProducto AND \");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (codigoProceso != null && codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.ordenproduccion.produccion.proceso.pkCodigoProceso = :proceso AND \");\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.ordenproduccion.produccion.producto.pkCodigoProducto = :producto AND \");\r\n\t\t\t\tqueryStr.append(\"tk.producciondiaria.ordenproduccion.produccion.producto.estadoproducto.pkCodigoEstadoproducto = :estadoProducto AND \");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tqueryStr.append(\"tk.producciondiaria.partediario.periodocontable.anoPeriodocontable = :anio AND \");\r\n\t\tqueryStr.append(\"tk.producciondiaria.partediario.periodocontable.mesPeriodocontable = :mes \");\r\n\r\n\t\tqueryStr.append(\" ORDER BY fechaTablakardex ASC \");\r\n\r\n\t\tif (esMateriaPrima) {\r\n\t\t\tif (codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\",tk.producciondiaria.producto.nombreProducto ASC\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (codigoProceso != null && codigoProducto != null) {\r\n\t\t\t\tqueryStr.append(\",tk.producciondiaria.ordenproduccion.produccion.proceso.ordenEjecucionProceso ASC,tk.producciondiaria.ordenproduccion.produccion.proceso.lineanegocio.pkCodigoLineanegocio ASC \");\r\n\t\t\t\tqueryStr.append(\",tk.producciondiaria.ordenproduccion.produccion.producto.nombreProducto ASC \");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tQuery query = Querier.query(queryStr.toString());\r\n\r\n\t\tif (esMateriaPrima) {\r\n\t\t\tif (codigoProducto != null) {\r\n\t\t\t\tquery.setLong(\"producto\", codigoProducto);\r\n\t\t\t\tquery.setLong(\"estadoProducto\", Long.valueOf(1));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (codigoProceso != null && codigoProducto != null) {\r\n\t\t\t\tquery.setLong(\"proceso\", codigoProceso);\r\n\t\t\t\tquery.setLong(\"producto\", codigoProducto);\r\n\t\t\t\tquery.setLong(\"estadoProducto\", Long.valueOf(1));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tquery.setInteger(\"anio\", anno);\r\n\t\tquery.setShort(\"mes\", mes);\r\n\r\n\t\treturn query.list();\r\n\r\n\t}", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public List<TonKho> findTonkhoByDmThuocMaso(Integer dmtMaso) {\n List<TonKho> result = null;\n try {\n Query q = getEm().createQuery(\"Select Distinct tk from TonKho tk Where tk.dmthuocMaso.dmthuocMaso = :dmthuocMaso \");\n q.setParameter(\"dmthuocMaso\", dmtMaso);\n result = q.getResultList();\n } catch (Exception ex) {\n System.out.println(\"Error: \" + ex.toString());\n }\n //System.out.println(\"End findTonkhoByDmThuocMaso(String dmtMa method\");\n return result;\n }", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public DefaultTableModel pedidosCocinero(){\r\n List<Pedido> lista =pedidos.listadosPedidosCocinero(GestionUsuarios.getInstance().getPersona());\r\n return Convertidor.pedidoToTableModel(lista); \r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public List<MascotaEntity> darMascotasPorEstado (String estado) throws Exception{\n if(!estado.equals(MascotaEntity.Estados_mascota.ADOPTADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EXTRAVIADO.name())\n && !estado.equals(MascotaEntity.Estados_mascota.ENCONTRADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EN_ADOPCION.name()))\n {\n throw new BusinessLogicException(\"El estado de la mascota no es correcto\");\n }\n \n List<MascotaEntity> mascotas = mascotaPersistence.findAll();\n List<MascotaEntity> mascotasFiltrados = new LinkedList<>();\n \n for(MascotaEntity m : mascotas){\n if(m.getEstado().name().equals(estado)){\n mascotasFiltrados.add(m);\n }\n }\n return mascotasFiltrados;\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorTarifa(java.math.BigDecimal valorTarifa) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorTarifa = :valorTarifa \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorTarifa\", valorTarifa);\r\n return query.getResultList();\r\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public RecordSet obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n // gPineda - V-COB006 - 30/01/2007\n //query.append(\" SELECT OID_ETAP_DEUD_TIPO_CARG AS OID, VAL_DESC descripcion \");\n query.append(\" SELECT oid_etap_deud_tipo_carg AS OID, NVL(val_desc, gen.VAL_I18N) descripcion \");\n query.append(\" FROM cob_etapa_deuda_tipo_cargo etapTipoCar, \");\n query.append(\" \t\t ccc_tipo_cargo_abono tipoCar, \");\n query.append(\" \t\t gen_i18n_sicc_pais gen \");\n query.append(\" WHERE ETDE_OID_ETAP_DEUD = \" + dtoe.getOid() );\n query.append(\" \t and etapTipoCar.TCAB_OID_TIPO_CARG_ABON = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.VAL_OID = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.ATTR_ENTI = 'CCC_TIPO_CARGO_ABONO' \");\n query.append(\" \t\t and gen.ATTR_NUM_ATRI = 1 \");\n query.append(\" ORDER BY descripcion \");\n \n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Salida\");\n \n return rs; \n }", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "@Override\r\n\tpublic ArrayList<TransferUsuario> buscarDesarroladorDescuento(int descuento) {\n Transaction transaccion= TransactionManager.getInstance().nuevaTransaccion();\r\n transaccion.start();\r\n\t\t\r\n //Obtenemos el DAO\r\n \r\n Query query = factoriaQuery.getInstance().getQuery(Eventos.QUERY_DESARROLLADOR);\t\t \r\n ArrayList<TransferUsuario> ret= (ArrayList<TransferUsuario>) query.execute(descuento);\r\n \r\n TransactionManager.getInstance().eliminarTransaccion();\r\n \r\n return ret;\r\n\t}", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public void listadoPedidos(DefaultTableModel dtm) {\n\t\tArrayList lista = pedidosDAO.listadoPedidos();\n\t\tif(lista.size() > 0) {\n\t\t\tIterator it = lista.iterator();\n\t\t\twhile(it.hasNext()) {\n\t\t\t\tPedidosAdministrativo p = (PedidosAdministrativo) it.next();\n\t\t\t\tObject[] fila = { p.getNombre(),\n\t\t\t\t\t\tp.getUnidades(),\n\t\t\t\t\t\tp.getFecha_pedido()\t\t\t\t\t\t\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tdtm.addRow(fila);\n\t\t\t}\n\t\t}\n\t}", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public Utente[] findWhereUteCamereOspitiDisabiliEquals(String uteCamereOspitiDisabili) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_camere_ospiti_disabili = ? ORDER BY ute_camere_ospiti_disabili\", new Object[] { uteCamereOspitiDisabili } );\n\t}", "public DatiBancari[] findWhereBanNominativoEquals(String banNominativo) throws DatiBancariDaoException;", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public String estadisticasProveedoresMasSolicitados() {\n String html = \"\";\n DefaultTableModel dtm = proveedor.estadisticaProveedoresMasSolicitados();\n html = Utils.dibujarGraficasHTMLBarras(dtm, \"TOP PROVEEDORES MAS SOLICITADOS\", \"Proveedor\");\n return html;\n }", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public TableModel GetPagineOpera (int cod, String Opera) throws SQLException {\n\t\t\n Connection dbConnection = model.connectionDataBase.ConnectionDB.Connect();\n\n // Execute the query and get the ResultSet\n PreparedStatement stmt = dbConnection.prepareStatement(\"SELECT * FROM pagine_opera INNER JOIN opera ON pagine_opera.cod_opera = opera.cod WHERE opera.cod = ? AND opera.nome = ?\");\n stmt.setInt(1, cod);\n stmt.setString(2, Opera);\n \n ResultSet rs = stmt.executeQuery();\n TableModel tm = DbUtils.resultSetToTableModel(rs);\n dbConnection.close();\n\n return tm;\n\t\t\n\t}", "private Map<Long, List<ObligacionCoactivoDTO>> consultaObligacionesComparendo() {\n logger.debug(\"CoactivoEJB::consultaObligacionesComparendo()\");\n Map<Long, List<ObligacionCoactivoDTO>> obligacionesDeudor = new HashMap<>();\n StringBuilder consulta = new StringBuilder();\n consulta.append(\"SELECT \");\n consulta.append(\"p.id_cartera, \");\n consulta.append(\"ca.saldo_capital, \");\n consulta.append(\"ca.saldo_interes, \");\n consulta.append(\"p.numero_obligacion, \");\n consulta.append(\"p.id_deudor, \");\n consulta.append(\"p.fecha_obligacion, \");\n consulta.append(\"p.id_funcionario, \");\n consulta.append(\"p.id_cargue_coactivo, \");\n consulta.append(\"p.id_precoactivo \");\n consulta.append(\"FROM precoactivo p \");\n consulta.append(\"JOIN cartera ca on ca.id_cartera = p.id_cartera \");\n consulta.append(\"WHERE p.id_estado_precoactivo = :estadoAprobado \");\n consulta.append(\"AND p.codigo_tipo_obligacion = :tipoComparendo \");\n\n Query query = em.createNativeQuery(consulta.toString());\n query.setParameter(\"estadoAprobado\", EnumEstadoPrecoactivo.AUTORIZADO.getValue());\n query.setParameter(\"tipoComparendo\", EnumTipoObligacion.COMPARENDO.getValue());\n @SuppressWarnings({ \"unchecked\" })\n List<Object[]> lsObligacionesComparendos = Utilidades.safeList(query.getResultList());\n\n for (Object[] obligacionComparendo : lsObligacionesComparendos) {\n int i = 0;\n BigInteger idCartera = (BigInteger) obligacionComparendo[i++];\n BigDecimal saldoCapital = (BigDecimal) obligacionComparendo[i++];\n BigDecimal saldoInteres = (BigDecimal) obligacionComparendo[i++];\n String numObligacion = (String) obligacionComparendo[i++];\n Long idDeudor = ((BigInteger) obligacionComparendo[i++]).longValue();\n Date fechaObligacion = (Date) obligacionComparendo[i++];\n Integer idFuncionario = (Integer) obligacionComparendo[i++];\n Long idCargue = ((BigInteger) obligacionComparendo[i++]).longValue();\n Long idPrecoactivo = ((BigInteger) obligacionComparendo[i++]).longValue();\n\n CoactivoDTO coactivo = new CoactivoDTO();\n coactivo.setCargueCoactivo(new CargueCoactivoDTO(idCargue));\n coactivo.setFuncionario(new FuncionarioDTO(idFuncionario));\n coactivo.setPersona(new PersonaDTO(idDeudor));\n // Arma obligacion que va a entrar a coactivo\n ObligacionCoactivoDTO obligacion = new ObligacionCoactivoDTO();\n obligacion.setCodigoTipoObligacion(EnumTipoObligacion.COMPARENDO.getValue());\n obligacion.setCartera(new CarteraDTO(idCartera.longValue()));\n obligacion.setNumeroObligacion(numObligacion);\n obligacion.setCoactivo(coactivo);\n obligacion.setFechaObligacion(fechaObligacion);\n obligacion.setValorObligacion(saldoCapital);\n obligacion.setValorInteresMoratorios(saldoInteres);\n obligacion.setIdPrecoativo(idPrecoactivo);\n if (!obligacionesDeudor.containsKey(idDeudor)) {\n obligacionesDeudor.put(idDeudor, new ArrayList<ObligacionCoactivoDTO>());\n }\n obligacionesDeudor.get(idDeudor).add(obligacion);\n }\n return obligacionesDeudor;\n }", "public Cliente[] findWhereApellidoPaternoClienteEquals(String apellidoPaternoCliente) throws ClienteDaoException;", "@Override\n public List<Endereco> obterTodos(Integer limit, Integer offset) throws SQLException {\n\n SQLProdutor sqlProd = new SQLProdutor();\n sqlProd.selectAll().from(View.VIEW_ENDERECO.name());\n sqlProd.limit(limit).offset(offset);\n\n psTodos = conexao.prepareStatement(sqlProd.toString());\n return obterVarios(psTodos);\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public ArrayList<ServicioDTO> consultarServicios(String columna, String informacion) throws Exception {\r\n ArrayList<ServicioDTO> dtos = new ArrayList<>();\r\n conn = Conexion.generarConexion();\r\n String sql = \"\";\r\n if (columna.equals(\"nom\")) \r\n sql = \" WHERE SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ?\";\r\n else if (columna.equals(\"cod\"))\r\n sql = \" WHERE SerCodigo = ? \";\r\n if (conn != null) {\r\n PreparedStatement stmt = conn.prepareStatement(\"SELECT SerCodigo, \"\r\n + \"SerNombre, SerCaracter, SerNotas, SerHabilitado \"\r\n + \"FROM tblservicio\" + sql);\r\n if (columna.equals(\"cod\")) {\r\n stmt.setString(1, informacion);\r\n } else if (columna.equals(\"nom\")) {\r\n stmt.setString(1, informacion);\r\n stmt.setString(2, \"%\" + informacion);\r\n stmt.setString(3, informacion + \"%\");\r\n stmt.setString(4, \"%\" + informacion + \"%\");\r\n }\r\n ResultSet rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n ServicioDTO dto = new ServicioDTO();\r\n dto.setCodigo(rs.getInt(1));\r\n dto.setNombre(rs.getString(2));\r\n dto.setCaracter(rs.getString(3));\r\n dto.setNotas(rs.getString(4));\r\n String habilitado = rs.getString(5);\r\n if(habilitado.equals(\"si\"))\r\n dto.setHabilitado(true);\r\n else\r\n dto.setHabilitado(false);\r\n dtos.add(dto);\r\n }\r\n stmt.close();\r\n rs.close();\r\n conn.close();\r\n }\r\n return dtos;\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public NominaPuesto[] findWhereDescripcionEquals(String descripcion) throws NominaPuestoDaoException;", "public Cliente[] findWhereCreditoMontoMaxEquals(double creditoMontoMax) throws ClienteDaoException;", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "public Cliente[] findWhereApellidoMaternoClienteEquals(String apellidoMaternoCliente) throws ClienteDaoException;", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public DefaultTableModel cargarDatos () {\r\n DefaultTableModel modelo = new DefaultTableModel(\r\n new String[]{\"ID SALIDA\", \"IDENTIFICACIÓN CAPITÁN\", \"NÚMERO MATRICULA\", \"FECHA\", \"HORA\", \"DESTINO\"}, 0); //Creo un objeto del modelo de la tabla con los titulos cargados\r\n String[] info = new String[6];\r\n String query = \"SELECT * FROM actividad WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n info[0] = rs.getString(\"id_salida\");\r\n info[1] = rs.getString(\"identificacion_navegate\");\r\n info[2] = rs.getString(\"numero_matricula\");\r\n info[3] = rs.getString(\"fecha\");\r\n info[4] = rs.getString(\"hora\");\r\n info[5] = rs.getString(\"destino\");\r\n Object[] fila = new Object[]{info[0], info[1], info[2], info[3], info[4], info[5]};\r\n modelo.addRow(fila);\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return modelo;\r\n }", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a la cantidad de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) { //C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1); //C.P.M vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public List<Poteaux> recherchePoteauxBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Poteaux p WHERE p.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "private JTable itensNaoRecebidos() {\n\t\tinitConexao();\t\t\n try {\t \n\t String select = \"SELECT cod_item_r, nome_item_r, valor_item_r FROM Item_receita WHERE recebimento_item_r = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de receita\", \"Valor total\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_r\"),rs.getString(\"valor_item_r\"),\"Receber\", rs.getString(\"cod_item_r\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 2, \"itemNaoRecebido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public TipologiaStruttura[] findWhereDescrizioneEquals(String descrizione) throws TipologiaStrutturaDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public String estadisticasProductosMasVendidos() {\n String html = \"\";\n DefaultTableModel dtm = producto.estadisticaTopProductosMasVendidos();\n html = Utils.dibujarGraficasHTMLDonut(dtm, \"TOP PRODUCTOS MAS VENDIDOS\");\n return html;\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public java.sql.ResultSet consultapormedicofecha(String CodigoMedico,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pmd.codigo=\"+CodigoMedico+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public List<Coupefeu> rechercheCoupefeuBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Coupefeu c WHERE c.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "public List<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public DTOConsultaCliente consultarCliente(DTOOID oid) throws MareException {\n UtilidadesLog.info(\" DAOMAEMaestroClientes.consultarCliente(DTOOID): Entrada\");\n\n Boolean bUsaGEOREFERENCIADOR = Boolean.FALSE;\n MONMantenimientoSEG mms;\n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n RecordSet resultado = new RecordSet();\n StringBuffer query = new StringBuffer();\n DTOConsultaCliente dtos = new DTOConsultaCliente();\n\n try {\n query.append(\" select TICL_OID_TIPO_CLIE, SBTI_OID_SUBT_CLIE, I1.VAL_I18N DESC_TIPO_CLIENTE, \");\n query.append(\" I2.VAL_I18N DESC_SUB_TIPO_CLIENTE\");\n query.append(\" from MAE_CLIEN_TIPO_SUBTI T, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICL_OID_TIPO_CLIE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_SUBTI_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = SBTI_OID_SUBT_CLIE \");\n query.append(\" and T.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" ORDER BY DESC_TIPO_CLIENTE ASC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setTiposSubtipos(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" select TDOC_OID_TIPO_DOCU, NUM_DOCU_IDEN, VAL_IDEN_DOCU_PRIN, VAL_IDEN_PERS_EMPR, \");\n query.append(\" I1.VAL_I18N DESC_TIPO_DOCUM from MAE_CLIEN_IDENT I, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_DOCUM' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TDOC_OID_TIPO_DOCU \");\n query.append(\" and I.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setIdentificaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n // Se agrega campo \"cod_clie\" a la query.\n query.append(\" SELECT val_ape1, val_ape2, val_apel_casa, val_nom1, val_nom2, val_trat, \");\n query.append(\" cod_sexo, fec_ingr, fopa_oid_form_pago, i1.val_i18n desc_forma_pago, \");\n query.append(\" cod_clie \");\n query.append(\" FROM mae_clien m, v_gen_i18n_sicc i1 \");\n query.append(\" WHERE i1.val_oid(+) = fopa_oid_form_pago \");\n query.append(\" AND i1.attr_enti(+) = 'BEL_FORMA_PAGO' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma());\n query.append(\" AND m.oid_clie = \" + oid.getOid()); \n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n dtos.setApellido1((String) resultado.getValueAt(0, 0));\n dtos.setApellido2((String) resultado.getValueAt(0, 1));\n dtos.setApellidoCasada((String) resultado.getValueAt(0, 2));\n dtos.setNombre1((String) resultado.getValueAt(0, 3));\n dtos.setNombre2((String) resultado.getValueAt(0, 4));\n\n String tratamiento = (String) resultado.getValueAt(0, 5);\n\n if ((tratamiento != null) && !(tratamiento.equals(\"\"))) {\n dtos.setTratamiento(new Byte(tratamiento));\n }\n\n String sexo = (String) resultado.getValueAt(0, 6);\n\n if ((sexo != null) && !(sexo.equals(\"\"))) {\n dtos.setSexo(new Character(sexo.toCharArray()[0]));\n }\n\n dtos.setFechaIngreso((Date) resultado.getValueAt(0, 7));\n dtos.setFormaPago((String) resultado.getValueAt(0, 9));\n \n // Agregado by ssantana, inc. BELC300021214\n // Se agrega asignacion de parametro CodigoCliente\n dtos.setCodigoCliente((String) resultado.getValueAt(0, 10) );\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT FEC_NACI, COD_EMPL, SNON_OID_NACI, VAL_EDAD, ESCV_OID_ESTA_CIVI, VAL_OCUP, \");\n query.append(\" VAL_PROF, VAL_CENT_TRAB, VAL_CARG_DESE, VAL_CENT_ESTU, NUM_HIJO, NUM_PERS_DEPE, \");\n query.append(\" NSEP_OID_NSEP, TCLV_OID_CICL_VIDA, IND_CORR, IMP_INGR_FAMI, I1.VAL_I18N DESC_NACION, \");\n query.append(\" I2.VAL_I18N DESC_EDO_CIVIL, I3.VAL_I18N DESC_NESP, I4.VAL_I18N DESC_CICLO_VIDA, \");\n query.append(\" NIED_OID_NIVE_ESTU, i5.VAL_I18N desc_nivel_estu, IND_ACTI \");\n query.append(\" FROM MAE_CLIEN_DATOS_ADICI , V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2, V_GEN_I18N_SICC I3, V_GEN_I18N_SICC I4, v_gen_i18n_sicc i5 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'SEG_NACIO' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = SNON_OID_NACI \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_ESTAD_CIVIL' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = ESCV_OID_ESTA_CIVI \");\n query.append(\" and I3.ATTR_ENTI(+) = 'MAE_TIPO_NIVEL_SOCEC_PERSO' \");\n query.append(\" and I3.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I3.VAL_OID(+) = NSEP_OID_NSEP \");\n query.append(\" and I4.ATTR_ENTI(+) = 'MAE_CICLO_VIDA' \");\n query.append(\" and I4.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I4.VAL_OID(+) = TCLV_OID_CICL_VIDA \");\n query.append(\" and i5.ATTR_ENTI(+) = 'MAE_NIVEL_ESTUD' \");\n query.append(\" AND i5.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" AND i5.VAL_OID(+) = NIED_OID_NIVE_ESTU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n UtilidadesLog.debug(\"resultado: \" + resultado);\n\n dtos.setFechaNacimiento((Date) resultado.getValueAt(0, 0));\n dtos.setCodigoEmpleado((String) resultado.getValueAt(0, 1));\n /*cleal incidencia 21311 fecha 28/10/2005*/\n // Modificado por ssantana, 8/11/2005\n // dtos.setNacionalidad((resultado.getValueAt(0, 2))!=null ? new String(((BigDecimal) resultado.getValueAt(0, 2)).toString()) : \"\");\n dtos.setNacionalidad((resultado.getValueAt(0, 16)) != null ? (String) resultado.getValueAt(0, 16) : \"\"); \n //(resultado.getValueAt(0, 10) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 10)).toString()) : null\n\n // dtos.setEdad((String)resultado.getValueAt(0, 3));\n dtos.setEdad((resultado.getValueAt(0, 3) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 3)).toString()) : \"\");\n dtos.setEstadoCivil((String) resultado.getValueAt(0, 17));\n dtos.setOcupacion((String) resultado.getValueAt(0, 5));\n dtos.setProfesion((String) resultado.getValueAt(0, 6));\n dtos.setCentroTrabajo((String) resultado.getValueAt(0, 7));\n dtos.setCargo((String) resultado.getValueAt(0, 8));\n dtos.setCentro((String) resultado.getValueAt(0, 9));\n\n //dtos.setNumeroHijos((BigDecimal)resultado.getValueAt(0, 10));\n /* dtos.setNumeroHijos((resultado.getValueAt(0, 10) != null)\n ? new String(\n ((BigDecimal) resultado.getValueAt(0, 10)).toString())\n : \"0\");*/\n dtos.setNumeroHijos((resultado.getValueAt(0, 10) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 10)).toString()) : null);\n\n //dtos.setPersonasDependientes((String)resultado.getValueAt(0, 11));\n /* dtos.setPersonasDependientes((resultado.getValueAt(0, 11) != null)\n ? new String(\n ((BigDecimal) resultado.getValueAt(0, 11)).toString())\n : \"0\");*/\n dtos.setPersonasDependientes((resultado.getValueAt(0, 11) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 11)).toString()) : null);\n\n dtos.setNSEP((String) resultado.getValueAt(0, 18));\n dtos.setCicloVidaFamiliar((String) resultado.getValueAt(0, 19));\n dtos.setNivelEstudios((String) resultado.getValueAt(0, 21));\n\n //String corres = (String)resultado.getValueAt(0, 14);\n String corres = (resultado.getValueAt(0, 14) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 14)).toString()) : null;\n\n //String corres = ((BigDecimal) resultado.getValueAt(0,14)).toString();\n Boolean correspondencia = null;\n\n if ((corres != null) && !(corres.equals(\"\"))) {\n if (corres.equals(\"1\")) {\n correspondencia = Boolean.TRUE;\n } else {\n correspondencia = Boolean.FALSE;\n }\n }\n\n dtos.setDeseaCorrespondencia(correspondencia);\n\n BigDecimal big = (BigDecimal) resultado.getValueAt(0, 15);\n\n if (big == null) {\n dtos.setImporteIngreso(\"\");\n } else {\n dtos.setImporteIngreso(big.toString());\n }\n \n //SICC-DMCO-MAE-GCC-006 - Cleal\n Boolean indActi = null;\n if(((BigDecimal) resultado.getValueAt(0, 22))!=null){\n\n if(((BigDecimal) resultado.getValueAt(0, 22)).longValue()==1){\n indActi = new Boolean(true);\n } else if(((BigDecimal) resultado.getValueAt(0, 22)).longValue()==0){\n indActi = new Boolean(false); \n }\n }\n dtos.setIndicadorActivo(indActi);\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT I2.VAL_I18N, C.COD_CLIE, FEC_DESD, FEC_HAST, TIVC_OID_TIPO_VINC, IND_VINC_PPAL, I1.VAL_I18N DESC_TIPO_VINCU \");\n query.append(\" FROM MAE_CLIEN_VINCU, V_GEN_I18N_SICC I1, mae_tipo_vincu tv, seg_pais p, v_gen_i18n_sicc i2, mae_clien c \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_VINCU' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIVC_OID_TIPO_VINC \");\n \n /* inicio deshace modif ciglesias incidencia 24377 17/11/2006\n // SPLATAS - 26/10/2006 - Error al obtener clientes vinculados \n // query.append(\" and CLIE_OID_CLIE_VNDO = \" + oid.getOid() + \" \");\n query.append(\" and CLIE_OID_CLIE_VNTE = \" + oid.getOid() + \" \");\n */\n query.append(\" and CLIE_OID_CLIE_VNDO = \" + oid.getOid() + \" \");\n /*fin deshace ciglesias 24377*/\n \n query.append(\" AND mae_clien_vincu.TIVC_OID_TIPO_VINC = tv.OID_TIPO_VINC \");\n \n // SPLATAS - 26/10/2006 - Error al obtener clientes vinculados \n query.append(\" AND mae_clien_vincu.CLIE_OID_CLIE_VNTE = c.OID_CLIE \"); //eiraola 30/11/2006 Incidencia DBLG7...165\n \n //query.append(\" AND mae_clien_vincu.CLIE_OID_CLIE_VNDO = c.OID_CLIE \");\n \n query.append(\" AND tv.PAIS_OID_PAIS = p.OID_PAIS \");\n query.append(\" AND i2.VAL_OID = p.OID_PAIS \");\n query.append(\" AND i2.ATTR_ENTI = 'SEG_PAIS' \");\n query.append(\" AND i2.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n //UtilidadesLog.info(\"resultado Vinculo: \" + resultado.toString() );\n dtos.setVinculos(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /*query.append(\" SELECT DES_CLIE_PREF, TIPF_OID_TIPO_PREF, DES_CLIE_PREF \");\n query.append(\" FROM MAE_CLIEN_PREFE \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n query.append(\" SELECT i1.VAL_I18N descripcionTipo , a.TIPF_OID_TIPO_PREF, a.DES_CLIE_PREF \");\n query.append(\" FROM MAE_CLIEN_PREFE a , v_gen_i18n_sicc i1 \");\n query.append(\" where a.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and i1.ATTR_ENTI = 'MAE_TIPO_PREFE' \");\n query.append(\" and i1.VAL_OID = a.TIPF_OID_TIPO_PREF \");\n query.append(\" and i1.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" and i1.ATTR_NUM_ATRI = 1 \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setPreferencias(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT MARC_OID_MARC, NUM_OBSE, VAL_TEXT, DES_MARC \");\n query.append(\" FROM MAE_CLIEN_OBSER M, SEG_MARCA S \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and M.MARC_OID_MARC = S.OID_MARC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setObservaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT c.PAIS_OID_PAIS , c.COD_CLIE, t. TICL_OID_TIPO_CLIE, p.COD_TIPO_CONT, \");\n query.append(\" p.FEC_CONT, p.FEC_SIGU_CONT, I1.VAL_I18N DESC_PAIS, I2.VAL_I18N DESC_TIPO_CLIENTE \");\n query.append(\" FROM MAE_CLIEN_PRIME_CONTA p, MAE_CLIEN c, MAE_CLIEN_TIPO_SUBTI t, V_GEN_I18N_SICC I1, \");\n query.append(\" V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'SEG_PAIS' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = c.PAIS_OID_PAIS \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = TICL_OID_TIPO_CLIE \");\n query.append(\" AND p.CTSU_CLIE_CONT = t.OID_CLIE_TIPO_SUBT \");\n query.append(\" AND t.CLIE_OID_CLIE = c.OID_CLIE \");\n query.append(\" and p.CLIE_OID_CLIE = \" + oid.getOid() + \" \"); */\n query.append(\" SELECT c.pais_oid_pais, c.cod_clie, t.ticl_oid_tipo_clie, p.cod_tipo_cont, \");\n query.append(\" p.fec_cont, p.fec_sigu_cont, i1.val_i18n desc_pais, \");\n query.append(\" i2.val_i18n desc_tipo_cliente, i3.val_i18n, perio.val_nomb_peri, marca.DES_MARC \");\n query.append(\" FROM mae_clien_prime_conta p, \");\n query.append(\" mae_clien c, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" seg_canal canal, \");\n query.append(\" cra_perio perio, \");\n query.append(\" seg_marca marca, \");\n query.append(\" v_gen_i18n_sicc i1, \");\n query.append(\" v_gen_i18n_sicc i2, \");\n query.append(\" v_gen_i18n_sicc i3 \");\n query.append(\" WHERE i1.attr_enti(+) = 'SEG_PAIS' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = c.pais_oid_pais \");\n query.append(\" AND i2.attr_enti(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND i2.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i2.val_oid(+) = ticl_oid_tipo_clie \");\n query.append(\" AND p.ctsu_clie_cont = t.oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = c.oid_clie \");\n query.append(\" AND p.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND p.perd_oid_peri = perio.oid_peri(+) \");\n query.append(\" AND p.cana_oid_cana = canal.oid_cana(+) \");\n query.append(\" AND canal.oid_cana = i3.val_oid(+) \");\n query.append(\" AND i3.attr_enti(+) = 'SEG_CANAL' \");\n query.append(\" AND i3.attr_num_atri(+) = 1 \");\n query.append(\" AND i3.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" and p.MARC_OID_MARC = marca.OID_MARC(+) \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n // by Ssantana, 29/7/04 - Se corren algunos indices en -1 al quitar\n // campo Primer Pedido Contacto. \n // 5/8//2004 - Se agregan descripciones de Marca, Canal y Periodo\n dtos.setPaisContactado((String) resultado.getValueAt(0, 6));\n dtos.setCodigoClienteContactado((String) resultado.getValueAt(0, 1));\n dtos.setTipoClienteContactado((String) resultado.getValueAt(0, 7));\n dtos.setTipoContacto((String) resultado.getValueAt(0, 3));\n dtos.setFechaContacto((Date) resultado.getValueAt(0, 4));\n dtos.setFechaSiguienteContacto((Date) resultado.getValueAt(0, 5));\n dtos.setMarcaContactoDesc((String) resultado.getValueAt(0, 10));\n dtos.setCanalContactoDesc((String) resultado.getValueAt(0, 8));\n dtos.setPeriodoContactoDesc((String) resultado.getValueAt(0, 9));\n\n /* dtos.setPaisContactado((String)resultado.getValueAt(0, 7));\n dtos.setCodigoClienteContactado((String)resultado.getValueAt(0, 1));\n dtos.setTipoClienteContactado((String)resultado.getValueAt(0, 8));\n dtos.setTipoContacto((String)resultado.getValueAt(0, 3));\n dtos.setFechaContacto((Date)resultado.getValueAt(0, 4));\n //dtos.setFechaPrimerPedido((Date)resultado.getValueAt(0, 5));\n dtos.setFechaSiguienteContacto((Date)resultado.getValueAt(0, 6));*/\n }\n //Cleal Mae-03\n MONMantenimientoSEGHome mmsHome = SEGEjbLocators.getMONMantenimientoSEGHome();\n mms = mmsHome.create();\n bUsaGEOREFERENCIADOR = mms.usaGeoreferenciador(oid.getOidPais());\n \n resultado = new RecordSet();\n if(Boolean.FALSE.equals(bUsaGEOREFERENCIADOR)){\n UtilidadesLog.debug(\"*** No usa GEO\");\n resultado = obtieneDireccionSinGEO(oid);\n } else{\n UtilidadesLog.debug(\"*** Usa GEO\");\n resultado = obtieneDireccionConGEO(oid);\n }//\n \n //\n /*\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT dir.TIDC_OID_TIPO_DIRE, dir.TIVI_OID_TIPO_VIA, \");\n //SICC-GCC-MAE-005 - Cleal\n query.append(\" NVL(dir.VAL_NOMB_VIA,vi.NOM_VIA) AS VIA, \");\n \n query.append(\" dir.NUM_PPAL, dir.VAL_COD_POST, \");\n query.append(\" dir.VAL_OBSE, I1.VAL_I18N DESC_TIPO_DIREC, I2.VAL_I18N DESC_TIPO_VIA, ind_dire_ppal, VAL.DES_GEOG \");\n query.append(\" FROM MAE_CLIEN_DIREC dir, ZON_VIA vi, ZON_VALOR_ESTRU_GEOPO val, \");\n //Cleal MAE-03\n if(bUsaGEOREFERENCIADOR.equals(Boolean.FALSE)){\n query.append(\" ZON_TERRI terr, \");\n }\n //\n query.append(\" V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" WHERE I1.ATTR_ENTI(+) = 'MAE_TIPO_DIREC' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIDC_OID_TIPO_DIRE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'SEG_TIPO_VIA' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n\n //query.append(\" and I2.VAL_OID(+) = vi.TIVI_OID_TIPO_VIA \");\n query.append(\" and I2.VAL_OID(+) = dir.tivi_oid_tipo_via \");\n query.append(\" and dir.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND dir.ZVIA_OID_VIA = vi.OID_VIA(+) \");\n //Cleal MAE-03\n if(bUsaGEOREFERENCIADOR.equals(Boolean.FALSE)){\n query.append(\" AND dir.TERR_OID_TERR = terr.OID_TERR \");\n query.append(\" AND terr.VEPO_OID_VALO_ESTR_GEOP = val.OID_VALO_ESTR_GEOP \");\n //SICC-GCC-MAE-005 - Cleal\n query.append(\" AND vi.PAIS_OID_PAIS = \"+oid.getOidPais());\n } else{\n \n query.append(\" \");\n \n }\n resultado = bs.dbService.executeStaticQuery(query.toString());\n */\n dtos.setDirecciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, FEC_HORA_DESD, \");\n query.append(\" FEC_HORA_HAST, VAL_INTE_COMU, IND_COMU_PPAL, I1.VAL_I18N DESC_TIPO_COMUN \");\n query.append(\" FROM MAE_CLIEN_COMUN, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICM_OID_TIPO_COMU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n query.append(\" SELECT i1.val_i18n desc_tipo_comun, val_dia_comu, val_text_comu, ind_comu_ppal, \");\n\n /* query.append(\" DECODE(to_char(FEC_HORA_DESD, 'HH24:MI'), NULL, ' ', to_char(FEC_HORA_DESD, 'HH24:MI')), \");\n query.append(\" DECODE(to_char(FEC_HORA_HAST, 'HH24:MI'), NULL, ' ', to_char(FEC_HORA_HAST, 'HH24:MI')), \");*/\n query.append(\" to_char(FEC_HORA_DESD, 'HH24:MI'), \");\n query.append(\" to_char(FEC_HORA_HAST, 'HH24:MI'), \");\n query.append(\" val_inte_comu \");\n query.append(\" FROM mae_clien_comun, v_gen_i18n_sicc i1 \");\n query.append(\" WHERE i1.attr_enti(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = ticm_oid_tipo_comu \");\n query.append(\" AND clie_oid_clie = \" + oid.getOid().toString());\n\n /* query.append(\" SELECT TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, FEC_HORA_DESD, \");\n query.append(\" FEC_HORA_HAST, VAL_INTE_COMU, IND_COMU_PPAL, I1.VAL_I18N DESC_TIPO_COMUN \");\n query.append(\" FROM MAE_CLIEN_COMUN, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICM_OID_TIPO_COMU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \"); */\n resultado = bs.dbService.executeStaticQuery(query.toString());\n UtilidadesLog.debug(\"----- resultado Comunicaciones: \" + resultado);\n dtos.setComunicaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT MARC_OID_MARC, S.DES_MARC \");\n query.append(\" FROM MAE_CLIEN_MARCA M, SEG_MARCA S \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and M.MARC_OID_MARC = S.OID_MARC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n String[] marcas = new String[resultado.getRowCount()];\n\n for (int i = 0; i < resultado.getRowCount(); i++)\n marcas[i] = (String) resultado.getValueAt(i, 1);\n\n dtos.setMarcas(marcas);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT TITR_OID_TIPO_TARJ, CLTA_OID_CLAS_TARJ, CBAN_OID_BANC, I1.VAL_I18N DESC_TIPO_TARJ, \");\n query.append(\" DES_CLAS_TARJ, DES_BANC \");\n query.append(\" FROM MAE_CLIEN_TARJE, V_GEN_I18N_SICC I1, MAE_CLASE_TARJE, CCC_BANCO \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_TARJE' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TITR_OID_TIPO_TARJ \");\n query.append(\" and CLTA_OID_CLAS_TARJ = OID_CLAS_TARJ \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and CBAN_OID_BANC = OID_BANC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setTarjetas(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT t.TICL_OID_TIPO_CLIE, t.SBTI_OID_SUBT_CLIE, c.CLAS_OID_CLAS, c.TCCL_OID_TIPO_CLASI, \");\n query.append(\n \" c.FEC_CLAS, PERD_OID_PERI, I1.VAL_I18N DESC_TIPO_CLIENTE, I2.VAL_I18N DESC_SUB_TIPO_CLIENTE, I3.VAL_I18N DESC_CLASI, I4.VAL_I18N DESC_TIPO_CLASI_CLIENTE, I5.VAL_I18N DESC_PERIODO, \");\n query.append(\" i6.VAL_I18N desc_canal, m.DES_MARC desc_marca \");\n query.append(\" FROM MAE_CLIEN_TIPO_SUBTI t, MAE_CLIEN_CLASI c, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2, \");\n query.append(\" V_GEN_I18N_SICC I3, V_GEN_I18N_SICC I4, V_GEN_I18N_SICC I5, \");\n query.append(\" cra_perio p, seg_marca m, v_gen_i18n_sicc i6 \");\n query.append(\" WHERE I1.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = t.TICL_OID_TIPO_CLIE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_SUBTI_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = t.SBTI_OID_SUBT_CLIE \");\n query.append(\" and I3.ATTR_ENTI(+) = 'MAE_CLASI' \");\n query.append(\" and I3.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I3.VAL_OID(+) = c.CLAS_OID_CLAS \");\n query.append(\" and I4.ATTR_ENTI(+) = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" and I4.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I4.VAL_OID(+) = c.TCCL_OID_TIPO_CLASI \");\n query.append(\" and I5.ATTR_ENTI(+) = 'CRA_PERIO' \");\n query.append(\" and I5.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I5.VAL_OID(+) = PERD_OID_PERI \");\n query.append(\" and t.OID_CLIE_TIPO_SUBT = c.CTSU_OID_CLIE_TIPO_SUBT \");\n query.append(\" AND t.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND perd_oid_peri = p.OID_PERI \");\n query.append(\" AND i6.VAL_OID(+) = p.CANA_OID_CANA \");\n query.append(\" AND i6.ATTR_ENTI(+) = 'SEG_CANAL' \");\n query.append(\" AND i6.IDIO_OID_IDIO = \" + oid.getOidIdioma() + \" \");\n query.append(\" AND i6.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND p.MARC_OID_MARC = m.OID_MARC \"); */\n query.append(\" SELECT m.DES_MARC, v1.VAL_I18N, v2.VAL_I18N, \");\n query.append(\" v3.VAL_I18N, v4.VAL_I18N, v5.VAL_I18N \");\n query.append(\" FROM mae_clien_tipo_subti t, mae_clien_clasi c, cra_perio p, seg_marca m, v_gen_i18n_sicc v1, \");\n query.append(\" v_gen_i18n_sicc v2, v_gen_i18n_sicc v3, v_gen_i18n_sicc v4, v_gen_i18n_sicc v5 \");\n query.append(\" WHERE t.oid_clie_tipo_subt = c.ctsu_oid_clie_tipo_subt \");\n query.append(\" AND c.perd_oid_peri = p.oid_peri \");\n query.append(\" AND t.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND p.MARC_OID_MARC = m.OID_MARC \"); // MARCA\n query.append(\" AND p.CANA_OID_CANA = v1.VAL_OID \"); // CANAL\n query.append(\" AND v1.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v1.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND v1.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND t.TICL_OID_TIPO_CLIE = v2.VAL_OID \"); // TIPO CLIENTE\n query.append(\" AND v2.ATTR_ENTI = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND v2.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v2.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND t.SBTI_OID_SUBT_CLIE = v3.VAL_OID \"); // SUBTIPO CLIENTE\n query.append(\" AND v3.ATTR_ENTI = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND v3.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v3.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND c.TCCL_OID_TIPO_CLASI = v4.VAL_OID \"); // TIPO CLASIFICACION\n query.append(\" AND v4.ATTR_ENTI = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" AND v4.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v4.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND c.CLAS_OID_CLAS = v5.VAL_OID \"); // CLASIFICACION\n query.append(\" AND v5.ATTR_ENTI = 'MAE_CLASI' \");\n query.append(\" AND v5.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v5.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n \n // BELC300023061 - 04/07/2006\n // Si no se obtuvo ninguna clasificacion para el cliente en la consulta anterior, \n // insertar una fila en el atributo clasificaciones, con el indicador principal activo, \n // sólo con la marca y el canal\n if (!resultado.esVacio()) {\n dtos.setClasificaciones(resultado);\n } else {\n query = new StringBuffer();\n resultado = new RecordSet();\n \n query.append(\" SELECT mar.DES_MARC, \");\n query.append(\" \t\t iCa.VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN uA, \");\n query.append(\" \t CRA_PERIO per, \");\n query.append(\" \t\t SEG_MARCA mar, \");\n query.append(\" \t V_GEN_I18N_SICC iCa \");\n query.append(\" WHERE uA.CLIE_OID_CLIE = \" + oid.getOid().toString());\n query.append(\" AND uA.IND_ACTI = 1 \");\n query.append(\" \t AND uA.PERD_OID_PERI_INI = per.OID_PERI \");\n query.append(\" \t AND per.MARC_OID_MARC = mar.OID_MARC \");\n query.append(\" AND per.CANA_OID_CANA = iCa.VAL_OID \");\n query.append(\" AND iCa.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND iCa.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND iCa.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" ORDER BY uA.OID_CLIE_UNID_ADMI ASC \");\n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setClasificaciones(resultado);\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n //el false se utiliza para indicar que estas filas son de problemas \n //el true indica que estas filas son de soluciones \n query.append(\" SELECT i1.VAL_I18N, DES_PROB, decode(IND_SOLU,0,'false',1,'true') IND_SOLU, I2.VAL_I18N TSOC_OID_TIPO_SOLU, DES_SOLU, VAL_NEGO_PROD \");\n query.append(\" FROM MAE_CLIEN_PROBL, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_PROBL' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIPB_OID_TIPO_PROB \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_TIPO_SOLUC' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = TSOC_OID_TIPO_SOLU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setProblemasSoluciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /*SELECT s.des_marc, i1.val_i18n desc_tipo_perfil_psico, cod_test, fec_psic\n FROM mae_psico, v_gen_i18n_sicc i1, seg_marca s\n WHERE i1.attr_enti(+) = 'MAE_TIPO_PERFI_PSICO'\n AND i1.idio_oid_idio(+) = 1\n AND i1.val_oid(+) = tpoid_tipo_perf_psic\n AND clie_oid_clie = 152\n AND marc_oid_marc = s.oid_marc */\n query.append(\" SELECT s.des_marc, i1.val_i18n desc_tipo_perfil_psico, cod_test, fec_psic \");\n query.append(\" FROM mae_psico, v_gen_i18n_sicc i1, seg_marca s \");\n query.append(\" WHERE i1.attr_enti(+) = 'MAE_TIPO_PERFI_PSICO' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = tpoid_tipo_perf_psic \");\n query.append(\" AND clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND marc_oid_marc = s.oid_marc \");\n\n /* query.append(\" SELECT MARC_OID_MARC, TPOID_TIPO_PERF_PSIC, COD_TEST, FEC_PSIC, \");\n query.append(\" I1.VAL_I18N DESC_TIPO_PERFIL_PSICO, S.DES_MARC \");\n query.append(\" FROM MAE_PSICO, V_GEN_I18N_SICC I1, SEG_MARCA S \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_PERFI_PSICO' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TPOID_TIPO_PERF_PSIC \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and MARC_OID_MARC = S.OID_MARC \");*/\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setPsicografias(resultado);\n } catch (CreateException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (RemoteException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (Exception e) {\n e.printStackTrace();\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n UtilidadesLog.debug(\"DTO a retornar: \" + dtos.toString());\n UtilidadesLog.info(\" DAOMAEMaestroClientes.consultarCliente(DTOOID): Salida\");\n\n return dtos;\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public DefaultTableModel pedidosListado(){\r\n List<Pedido> lista =pedidos.listarPedidos();\r\n return Convertidor.PedidoToTableModelMin(lista);\r\n }", "public java.sql.ResultSet consultapormedicoespecialidadfecha(String CodigoMedico,String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pmd.codigo=\"+CodigoMedico+\" and pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicoespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "public Cliente[] findWhereMunicipioEquals(String municipio) throws ClienteDaoException;", "@Override\n\tpublic Produto pesquisar(Produto entidade) {\n\t\treturn null;\n\t}", "public Venta[] listarVentas(String nombreVendedor)throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\tResultSet rs3 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\tResultSet rs5 = null;\n\t\tPreparedStatement pst5 = null;\n\t\t\n System.out.println(\"Listando ventas...\");\n\t\t\n\t\tString sql = \"SELECT COUNT(IdentificadorVenta) FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\tint cantidadVentas = 0;\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, nombreVendedor);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantidadVentas = rs.getInt(1);\n }\n\t\t\t\n\t\t\tVenta[] ventas = new Venta[cantidadVentas];\n\t\t\tString sql2 = \"SELECT NombreComprador, ApellidoComprador, DocumentoComprador, AnioVenta, MesVenta, DiaVenta, IdentificadorVenta FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\tpst2.setString(1, nombreVendedor);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tString nombreComprador = rs2.getString(1);\n\t\t\t\tString apellidoComprador = rs2.getString(2);\n\t\t\t\tString numeroDocumentoComprador = rs2.getString(3);\n\t\t\t\t\n\t\t\t\tint anioVenta = rs2.getInt(4);\n\t\t\t\tint mesVenta = rs2.getInt(5);\n\t\t\t\tint diaVenta = rs2.getInt(6);\n\t\t\t\t\n\t\t\t\tint identificadorVenta = rs2.getInt(7);\n\t\t\t\t\n\t\t\t\tString sql3 = \"SELECT COUNT(A_NombreArticulo) FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs3 = pst3.executeQuery(); \n\t\t\t\t\n\t\t\t\tint cantArticulosVenta = 0;\n\t\t\t\t\n\t\t\t\tif (rs3.next()){\n\t\t\t\t\tcantArticulosVenta = rs3.getInt(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArticuloVenta[] listaArticulosVenta = new ArticuloVenta[cantArticulosVenta];\n\t\t\t\tString sql4 = \"SELECT A_NombreArticulo, Cantidad FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\n\t\t\t\tint j=0;\n\t\t\t\twhile (rs4.next()){\n\t\t\t\t\tString nombreArticulo = rs4.getString(1);\n\t\t\t\t\tint cantidadArticulo = rs4.getInt(2);\n\t\t\t\t\t\n\t\t\t\t\tArticuloVenta articulo = new ArticuloVenta(nombreArticulo, cantidadArticulo);\n\t\t\t\t\tlistaArticulosVenta[j] = articulo;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tVenta venta = new Venta(nombreComprador, apellidoComprador, numeroDocumentoComprador, anioVenta, mesVenta, diaVenta, listaArticulosVenta);\n\t\t\t\t\n\t\t\t\tventas[k] = venta;\n\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn ventas;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar las ventas.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n }" ]
[ "0.6716816", "0.6507345", "0.59580344", "0.5877839", "0.57008827", "0.56325823", "0.56232613", "0.559207", "0.55875355", "0.55457175", "0.55099416", "0.55002844", "0.5484506", "0.5483098", "0.5481289", "0.5464146", "0.54553217", "0.5408504", "0.5398649", "0.5381963", "0.5363203", "0.53542155", "0.53271955", "0.53213006", "0.5318434", "0.53099847", "0.52993184", "0.5299032", "0.529449", "0.528795", "0.52826893", "0.5277746", "0.5256277", "0.52535886", "0.52519524", "0.5249664", "0.5248426", "0.5240451", "0.52345765", "0.52221566", "0.5216927", "0.52168864", "0.52106804", "0.5201954", "0.51969886", "0.5196086", "0.5187555", "0.5173542", "0.51732075", "0.5169737", "0.5161865", "0.5161711", "0.51514065", "0.51458025", "0.512556", "0.51254696", "0.5120747", "0.5113504", "0.511241", "0.5108325", "0.5107788", "0.510578", "0.51014376", "0.50928086", "0.50916725", "0.5087516", "0.5076516", "0.5060293", "0.5058559", "0.5056681", "0.5053729", "0.50464666", "0.5044819", "0.5039708", "0.5038375", "0.5036501", "0.50364125", "0.5035002", "0.50335854", "0.50324667", "0.50293505", "0.50285", "0.5028123", "0.5027351", "0.50195855", "0.50193703", "0.50190043", "0.5017123", "0.5007541", "0.50073767", "0.5002763", "0.49972948", "0.49948552", "0.4990489", "0.4989987", "0.49898338", "0.49880588", "0.4987196", "0.49817994", "0.49772397" ]
0.7508799
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'SUBTOTAL = :subtotal'.
public SgfensPedidoProducto[] findWhereSubtotalEquals(double subtotal) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto);", "public Collection<VistaProveedorDTO> buscarProveedorPorSubbodega(OrdenCompraContingenciaPedidoAsistidoVO parametrosBusqueda, Integer firstResult, Integer maxResult) ;", "BigDecimal getSubtotal();", "void setSubtotal(BigDecimal subtotal);", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public void setSubTotal(double subTotal) {\n\n this.subTotal = subTotal;\n }", "public double getSubtotal() {\n return subtotal_;\n }", "public double getSubtotal() {\n return subtotal_;\n }", "public void setSubTotal(Float subTotal) {\r\n this.subTotal = subTotal;\r\n }", "double getSubtotal();", "double getSubtotal();", "public double getSubTotal() {\n\n return subTotal;\n }", "public Float getSubTotal() {\r\n return subTotal;\r\n }", "public DefaultTableModel showProducts(DefaultTableModel Modelo)\n {\n Modelo.setRowCount(0);\n try {\n total = 0.0;\n subTotal = 0.0;\n IVA = 0.0;\n String sql = \"SELECT p.idProduct, s.quantity, p.name, p.price, (s.quantity * p.price) as total\\n\" +\n \"FROM Products p\\n\" +\n \"JOIN Sales s\\n\" +\n \"ON p.idProduct = s.product_id\\n\" +\n \"WHERE s.order_number = '\" + order_number + \"';\";\n Connection Conexion = MySQL_Conexion.getConnection();\n Statement Estancia = Conexion.createStatement();\n ResultSet Resultado = Estancia.executeQuery(sql); \n Object [] Renglones = new Object[Modelo.getColumnCount()];\n \n while(Resultado.next())\n {\n Renglones[0] = Resultado.getInt(\"p.idProduct\");\n Renglones[1] = Resultado.getInt(\"s.quantity\");\n Renglones[2] = Resultado.getString(\"p.name\");\n Renglones[3] = Resultado.getDouble(\"p.price\");\n Renglones[4] = Resultado.getDouble(\"total\");\n Modelo.addRow(Renglones);\n subTotal+=Resultado.getDouble(\"total\");\n }\n System.out.println(subTotal);\n IVA = (subTotal * 0.16);\n total = IVA + subTotal;\n }catch (ClassNotFoundException | SQLException ex) {\n javax.swing.JOptionPane.showMessageDialog(null, \"Error al intentar estalecer la conexion \"+ ex.getMessage());\n return Modelo;\n }\n return Modelo;\n }", "@Override\r\n\tpublic ArrayList<FacturaVentaDTO> periodoxTotal(String periodo, String total) {\n\t\treturn dao.periodoxTotal(periodo, total);\r\n\t}", "private void SubMatRemove(double valor, double sub) {\n double result = 0;\n result = sub - valor;\n if (result <= 0) {\n result = 0;\n }\n jTxtSubTotal.setText(String.valueOf(result));\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorTarifa(java.math.BigDecimal valorTarifa) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorTarifa = :valorTarifa \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorTarifa\", valorTarifa);\r\n return query.getResultList();\r\n }", "BigDecimal getGrandTotal();", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "private void SubMatAdd(double valor, double sub) {\n double result = 0;\n result = valor + sub;\n jTxtSubTotal.setText(String.valueOf(result));\n }", "public synchronized void addAll(long subtotal) {\n\t\t\tsum[0] += subtotal;\n\t\t}", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Builder setSubtotal(double value) {\n \n subtotal_ = value;\n onChanged();\n return this;\n }", "public void setSueldoTotal(int sueldoTotal) {\n this.sueldoTotal = sueldoTotal;\n }", "public abstract void eliminarSubproducto(EntityManager sesion, Subproducto subproducto);", "public BigDecimal getGrandTotal();", "public BigDecimal getGrandTotal();", "public void obtenertotales(double suma){\n double Total = suma;\n totalPagarVentaTB.setText(String.valueOf(Total));\n double iva = Total*0.19;\n ivaVentaTB.setText(String.valueOf(iva));\n double subtotal = Total-iva;\n subTotalVentaTB.setText(String.valueOf(subtotal)); \n \n }", "@Test\n public void subtotal_isCorrect() {\n\n MainActivity.items.add(new Item(\"food\", 20.99, 2, 0));\n MainActivity.items.add(new Item(\"games\", 10, 1, 10));\n\n Cart.update_total();\n assert (Cart.sub_sum == 20.99 * 2 + 10 * 0.9);\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public ArrayList<Invoice> getAllInvoices() throws SQLException {\n ArrayList<Invoice> invoices = new ArrayList<>();\n try (\n Connection conn = DriverManager.getConnection(Main.getDBPath());\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM invoice\");\n PreparedStatement productStmt = conn.prepareStatement(\"SELECT product FROM invoice_items WHERE invoice_items.invoice = ?\");\n ResultSet result = stmt.executeQuery()\n ) {\n while (result.next()) {\n Invoice invoice = new Invoice(result.getInt(\"invoice_id\"), result.getInt(\"customer\"), result.getString(\"dato\"));\n productStmt.setInt(1, invoice.getInvoiceID());\n ResultSet productResult = productStmt.executeQuery();\n while (productResult.next()) {\n invoice.addProduct(productResult.getInt(\"product\"));\n }\n invoices.add(invoice);\n }\n }\n return invoices;\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public Object pesquisarObterQuantidadeSubcategoria() throws ControladorException {\r\n\t\ttry {\r\n\t\t\treturn repositorioCategoria.pesquisarObterQuantidadeSubcategoria();\r\n\t\t} catch (ErroRepositorioException ex) {\r\n\r\n\t\t\tthrow new ControladorException(\"erro.sistema\", ex);\r\n\t\t}\r\n\t}", "public void getSubtotalAndTotal() {\n addTotal();\n System.out.println(\"Subtotal: \" + Math.round((dblTotal) * 100.0) / 100.0);\n System.out.println(\"Tax: \" + Math.round((dblTotal * 0.13) * 100.0) / 100.0);\n System.out.println(\"Total: \" + Math.round((dblTotal * 1.13) * 100.0) / 100.0);\n dblDayEarnings += Math.round((dblTotal * 1.13) * 100.0) / 100.0;\n System.out.println(\"\");\n }", "public double calculateSubTotal() {\n return candy.getPrice() * quantity;\n\n }", "public BigDecimal getOrderTotal()\r\n\t{\r\n\t\tSystem.out.println(\"Order Total is: \" + subtotal);\r\n\t\treturn subtotal;\r\n\t}", "BigDecimal getTotal();", "BigDecimal getTotal();", "private void updateSubtotal() {\n subtotal = entreePrice + drinkPrice + dessertPrice;\n subtotalEdtTxt.setText(String.format(\"$%.2f\", subtotal));\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public String getsubTotalPriceonCartPage() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(subTotal);\n\t\treturn subTotal.getText();\n\t}", "public BigDecimal getValorTotal() {\r\n \treturn valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN).subtract(valorDesconto).setScale(3, BigDecimal.ROUND_HALF_EVEN);\r\n }", "public void setTotal(BigDecimal total) {\n this.total = total;\n }", "public void setTotal(BigDecimal total) {\n this.total = total;\n }", "public BigDecimal calcolaImportoTotaleRilevanteIVASubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()) {\n\t\t\tif(Boolean.TRUE.equals(ds.getFlagRilevanteIVA())) {\n\t\t\t\tresult = result.add(ds.getImporto());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public void setValorSubsc(BigDecimal valorSubsc) {\n\t\tthis.valorSubsc = valorSubsc;\n\t}", "public float getProductTotalMoney(){\n connect();\n float total = 0;\n String sql = \"SELECT SUM(subtotal) + (SUM(subtotal) * (SELECT iva FROM configuraciones)) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n total = result.getFloat(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return total; \n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public void ProductsTotal(DefaultTableModel tableModel){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor \"\n + \"FROM productos ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n }", "public Double shoppingCart_getSubtotal() {\n Double total, subtotal;\n int int_quantity;\n subtotal = 0.0;\n List<WebElement> rows = getDriver().findElements(By.xpath(\"//*[contains(@id, '00_row')]\"));\n for (WebElement row : rows) {\n WebElement w_input = row.findElement(By.xpath(\".//input[contains(@class,'mjr-qtyInput')]\"));\n WebElement w_price = row.findElement(By.xpath(\".//*[@class='prodDtlSalePriceDollars']\"));\n String s_quantity = w_input.getAttribute(\"value\");\n\n String checkForLB = w_input.getAttribute(\"data-qtyincrement\");\n System.out.println(\"checkForLB [\" + checkForLB + \"]\");\n if (checkForLB.contains(\"0.\")) { //To validate for LB(s) items\n int_quantity = 1;\n } else {\n int_quantity = Integer.parseInt(s_quantity);\n }\n System.out.println(\"-------------------------------------------\");\n Double dbl_price = grabPriceText(w_price.getText(), \"price\");\n System.out.println(\"=== quantity: \" + s_quantity);\n System.out.println(\"=== altuom: \" + w_input.getAttribute(\"selectedbyaltuom\") + \"\\n\");\n\n if (w_input.getAttribute(\"selectedbyaltuom\").equals(\"true\")) {\n WebElement w_altPrice = row.findElement(By.xpath(\".//*[contains (@class, 'mjr-price-desc')]\"));\n Double dbl_ppLb = grabPriceText(w_altPrice.getText(), \"price per lb\");\n Double dbl_avgWeight = grabPriceText(w_input.getAttribute(\"selectedaltweighteach\"), \"avg weight\");\n total = dbl_avgWeight * dbl_ppLb * int_quantity;\n } else {\n total = int_quantity * dbl_price;\n }\n subtotal += total;\n }\n subtotal = Double.parseDouble(new DecimalFormat(\"##.##\").format(subtotal));\n System.out.println(\"=== subtotal: \" + subtotal);\n return subtotal;\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public void setSubcodigo(java.lang.String subcodigo) {\n this.subcodigo = subcodigo;\n }", "public Float getSubTotal() {\n return item.getUnitCost() * quantity;\n }", "public BigDecimal calculatePOSubTotal(MaintenanceRequest po){\n\t\tBigDecimal subTotal = new BigDecimal(0.00).setScale(2);\n\t\tString defaultMarkUpCode = willowConfigService.getConfigValue(\"MAINT_NON_NETWORK_CODE\");\n\t\tfor(MaintenanceRequestTask line : po.getMaintenanceRequestTasks()){\n\t\t\t/** Excluding non-network mark up maintenance code 999-002 **/\n\t\t\tif(MALUtilities.isEmpty(defaultMarkUpCode) || !line.getMaintenanceCode().getCode().equals(defaultMarkUpCode)){\n\t\t\t\tsubTotal = subTotal.add(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn subTotal;\n\t}", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public float getSubtotal()\n {\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n return -1f;\n } else\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n Float quantity = Float.parseFloat(quantityTextField.getText());\n\n\n return (donut.getItemPrice() * quantity);\n }\n }", "private void sumarTotalVenta(int cantidad, double precioProducto) {\r\n\t\tdouble valorProductos = cantidad * precioProducto;\r\n\t\ttotalVenta += valorProductos;\r\n\t}", "public abstract void actualizarSubproducto(EntityManager sesion, Subproducto subproducto);", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n \n \n \n insertar insert=new insertar();\n busquedas buscar=new busquedas();\n \n \n String accion = request.getParameter(\"accion\");\n String prod = request.getParameter(\"prod\");\n String cant = request.getParameter(\"cant\");\n String subtotal=request.getParameter(\"sb\");\n\n \n if (accion.equals(\"AnadirCarrito\")) {\n \n HttpSession sesion = request.getSession();\n ArrayList<DetalleVenta> carrito;\n //Si no existe la sesion creamos al carrito de cmoras\n if (sesion.getAttribute(\"carrito\") == null) {\n carrito = new ArrayList<DetalleVenta>();\n } else {\n carrito = (ArrayList<DetalleVenta>) sesion.getAttribute(\"carrito\");\n }\n\n //Obtenemos el producto que deseamos añadir al carrito\n Producto p = buscar.obtenerProducto(request.getParameter(\"txtcodigo\"));\n \n //Creamos un detalle para el carrtio\n DetalleVenta d = new DetalleVenta();\n //Obtenemos los valores de la caja de texto\n d.setCodigop(request.getParameter(\"txtcodigo\"));\n d.setProducto(p);\n d.setCantidad(request.getParameter(\"txtcantidad\"));\n //Calculamos el descuento, si es sub detalle es mayor a 50 se le hace\n //un descuento del 5% aca es donde se encuentra la logica del negocio\n \n //Sirva para saber si tenemos agregado el producto al carrito de compras\n int indice = -1;\n //recorremos todo el carrito de compras\n for (int i = 0; i < carrito.size(); i++) {\n DetalleVenta det = carrito.get(i);\n if (det.getCodigop() == p.getCodigo()) {\n //Si el producto ya esta en el carrito, obtengo el indice dentro\n //del arreglo para actualizar al carrito de compras\n indice = i;\n break;\n }\n }\n if (indice == -1) {\n //Si es -1 es porque voy a registrar\n carrito.add(d);\n } else {\n //Si es otro valor es porque el producto esta en el carrito\n //y vamos actualizar la \n carrito.set(indice, d);\n }\n //Actualizamos la sesion del carrito de compras\n sesion.setAttribute(\"carrito\", carrito);\n //Redireccionamos al formulario de culminar la venta\n response.sendRedirect(\"web/carrito.jsp\");\n \n } \n \n \n \n \n \n \n \n \n \n \n \n \n else if (accion.equals(\"RegistrarVenta\")) {\n \n \n HttpSession sesion = request.getSession();\n Venta v=new Venta();\n v.setCliente(request.getParameter(\"cliente\"));\n v.setPersonal(\"Pe001\");\n v.setTipo(\"TC001\");\n v.setSubtotal(subtotal);;\n ArrayList<DetalleVenta> detalle = (ArrayList<DetalleVenta>) sesion.getAttribute(\"carrito\");\n boolean rpta=insert.insertarVenta(v, detalle);\n if (rpta) {\n response.sendRedirect(\"web/felicidades.jsp?s=1\");\n } else {\n response.sendRedirect(\"mensaje.jsp?men=No se registro la venta\");\n } \n \n \n } \n \n \n \n \n else if (accion.equals(\"EliminarProducto\")){\n \n HttpSession sesion = request.getSession();\n ArrayList<DetalleVenta> carrito;\n //Si no existe la sesion creamos al carrito de cmoras\n carrito = (ArrayList<DetalleVenta>) sesion.getAttribute(\"carrito\");\n \n int indice = -1;\n //recorremos todo el carrito de compras\n for (int i = 0; i < carrito.size(); i++) {\n DetalleVenta det = carrito.get(i);\n if (det.getCodigop().equals(prod)) {\n //Si el producto ya esta en el carrito, obtengo el indice dentro\n //del arreglo para actualizar al carrito de compras\n indice = i;\n break;\n }\n }\n if (indice == -1) {\n } else {\n carrito.remove(indice);\n }\n //Actualizamos la sesion del carrito de compras\n sesion.setAttribute(\"carrito\", carrito);\n //Redireccionamos al formulario de culminar la venta\n response.sendRedirect(\"web/carrito.jsp\");\n \n } \n \n \n \n else if (accion.equals(\"ActualizarProducto\")){\n \n HttpSession sesion = request.getSession();\n ArrayList<DetalleVenta> carrito;\n carrito = (ArrayList<DetalleVenta>) sesion.getAttribute(\"carrito\");\n int indice = -1;\n //recorremos todo el carrito de compras\n for (int i = 0; i < carrito.size(); i++) {\n DetalleVenta det = carrito.get(i);\n if (det.getCodigop().equals(prod)) {\n //Si el producto ya esta en el carrito, obtengo el indice dentro\n //del arreglo para actualizar al carrito de compras\n indice = i;\n break;\n }\n }\n if (indice == -1) {\n } else {\n //Obtenemos el producto que deseamos añadir al carrito\n Producto p = buscar.obtenerProducto(prod);\n \n DetalleVenta d = new DetalleVenta();\n d.setCodigop(prod);\n d.setProducto(p);\n d.setCantidad(cant);\n carrito.set(indice, d);\n }\n //Actualizamos la sesion del carrito de compras\n sesion.setAttribute(\"carrito\", carrito);\n //Redireccionamos al formulario de culminar la venta\n response.sendRedirect(\"web/carrito.jsp\");\n }\n }", "private DatosFacturaVO calcularAllDatosFactura(int idFactura) {\n DatosFacturaVO datosFacturaVO = null;\n try {\n Criteria criteria = getSession().createCriteria(DetalleFactura.class);\n criteria.add(Restrictions.eq(\"factura\", new Factura(idFactura)));\n List<DetalleFactura> detalleFacturas = criteria.list();\n double subtotal = 0;\n double retenciones = 0;\n for (DetalleFactura detalleFactura : detalleFacturas) {\n subtotal = subtotal + detalleFactura.getTotal();\n criteria = getSession().createCriteria(FacturaRetencion.class);\n criteria.add(Restrictions.eq(\"detalleFactura\", detalleFactura));\n List<FacturaRetencion> facturaRetencions = criteria.list();\n for (FacturaRetencion facturaRetencion : facturaRetencions) {\n retenciones = retenciones + facturaRetencion.getRetenciones().getValor();\n }\n }\n\n criteria = getSession().createCriteria(FacturaIva.class);\n criteria.add(Restrictions.eq(\"factura\", new Factura(idFactura)));\n List<FacturaIva> facturaIvas = criteria.list();\n double valorIva = 0;\n if (facturaIvas.size() > 0) {\n short idIva = facturaIvas.get(0).getIva().getId();\n Criteria criteriaIva = getSession().createCriteria(Iva.class);\n criteriaIva.add(Restrictions.eq(\"id\", idIva));\n Iva iva = (Iva) criteriaIva.uniqueResult();\n valorIva = subtotal * (iva.getPorcentaje() / 100);\n }\n double total = subtotal + valorIva;\n double totalPagar = total - retenciones;\n\n criteria = getSession().createCriteria(Abono.class);\n criteria.add(Restrictions.eq(\"factura\", new Factura(idFactura)));\n List<Abono> abonos = criteria.list();\n double valorAbonos = 0;\n double saldo = totalPagar;\n for (Abono abono : abonos) {\n valorAbonos = valorAbonos + abono.getValor();\n }\n saldo = saldo - valorAbonos;\n datosFacturaVO = new DatosFacturaVO(subtotal, valorIva, total, retenciones, totalPagar, saldo);\n } catch (Exception e) {\n return null;\n } finally {\n return datosFacturaVO;\n }\n }", "public List<FaturamentoVO> validaSelecionaTotalFaturamento(String ano, String anoTexto) {\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.0\");\n\n\t\tList<FaturamentoVO> listaTratada = new ArrayList<FaturamentoVO>();\n\t\tList<FaturamentoVO> lista = null;\n\t\tList<FaturamentoVO> listaRvne = null;\n\n\t\tswitch (anoTexto) {\n\t\tcase \"atual\":\n\t\t\tlista = dadosFaturamentoDetalhado;\n\t\t\tlistaRvne = rvneTipo2;\n\t\t\tbreak;\n\t\tcase \"anterior\":\n\t\t\tlista = dadosFaturamentoDetalhadoAnoAnterior;\n\t\t\tlistaRvne = rvneTipo2AnoAnterior;\n\t\t\tbreak;\n\t\t}\n\n\t\tBigDecimal totalMes = new BigDecimal(0.0);\n\n\t\t// Insere BP na lista\n\t\tint i = 0;\n\t\tFaturamentoVO faturamentoVObp = new FaturamentoVO();\n\t\tfaturamentoVObp.setProduto(lista.get(i).getProduto());\n\t\tString mesesTotalBP[] = new String[12];\n\n\t\tfor (int k = 0; k < 12; k++) {\n\t\t\tmesesTotalBP[k] = roundForm.format(Double.parseDouble(lista.get(i).getMeses()[k]) / 1000000).replace(\",\",\n\t\t\t\t\t\".\");\n\t\t}\n\n\t\tfaturamentoVObp.setMeses(mesesTotalBP);\n\t\tlistaTratada.add(faturamentoVObp);\n\n\t\t// i = 1;\n\t\t// Trata apenas do Faturamento:\n\t\tFaturamentoVO faturamentoVOtratado = new FaturamentoVO();\n\t\tString mesesTotal[] = new String[12];\n\t\tfaturamentoVOtratado.setProduto(\"Faturamento \");\n\t\tfor (int j = 0; j < 12; j++) {\n\t\t\tint c = 0;\n\t\t\twhile (c < lista.size()) {\n\t\t\t\tif (lista.get(c).getProduto().equalsIgnoreCase(\"EMITIDO\")\n\t\t\t\t\t\t|| lista.get(c).getProduto().equalsIgnoreCase(\"EMITIDOS CANCELADOS\")\n\t\t\t\t\t\t|| lista.get(c).getProduto().equalsIgnoreCase(\"EMITIDOS RESTITUIDOS\")) {\n\n\t\t\t\t\ttotalMes = totalMes.add(new BigDecimal(lista.get(c).getMeses()[j]));\n\t\t\t\t}\n\t\t\t\tc++;\n\t\t\t}\n\t\t\t// RVNE trazido direto da tabela do banco\n\t\t\tif (listaRvne.get(0).getMeses()[j] != null) {\n\t\t\t\ttotalMes = totalMes.add(new BigDecimal(listaRvne.get(0).getMeses()[j]));\n\t\t\t} else {\n\t\t\t\ttotalMes = new BigDecimal(0.0);\n\t\t\t}\n\t\t\tmesesTotal[j] = roundForm.format(Double.parseDouble(totalMes.toString()) / 1000000).replace(\",\", \".\");\n\t\t\ttotalMes = new BigDecimal(0.0D);\n\t\t}\n\t\tfaturamentoVOtratado.setMeses(mesesTotal);\n\t\tlistaTratada.add(faturamentoVOtratado);\n\n\t\treturn listaTratada;\n\t}", "public BigDecimal getValorTotal(){\r\n\t\r\n\t\t// percorre a lista de ItemVenda - stream especie de interator do java 8\r\n\t\treturn itens.stream()\r\n\t .map(ItemVenda::getValorTotal) // para cada um dos itens, obtem o valor total do item\t\r\n\t .reduce(BigDecimal::add) // soma todos os valores total \r\n\t .orElse(BigDecimal.ZERO); // caso não tenha nenhum item retorna zeo\r\n\t}", "public BigDecimal calcolaImportoTotaleNonRilevanteIVASubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()) {\n\t\t\tif(!Boolean.TRUE.equals(ds.getFlagRilevanteIVA())) {\n\t\t\t\tresult = result.add(ds.getImporto());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public List<SubPrefeitura> listSelectSubPref() throws SQLException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n List<SubPrefeitura> subPref = new ArrayList<SubPrefeitura>();\r\n String sql = \"SELECT id_subprefeitura, sg_subprefeitura, nm_subprefeitura \"\r\n + \"FROM tbl_subprefeitura \"\r\n + \"ORDER BY nm_subprefeitura \";\r\n try {\r\n stmt = connection.prepareStatement(sql);\r\n rs = stmt.executeQuery(); \r\n while (rs.next()){\r\n SubPrefeitura subpref = new SubPrefeitura();\r\n subpref.setPkSubPrefeitura(rs.getInt(\"id_subprefeitura\"));\r\n subpref.setSgSbuPrefeitura(rs.getString(\"sg_subprefeitura\"));\r\n subpref.setNmSubPrefeitura(rs.getString(\"nm_subprefeitura\"));\r\n subPref.add(subpref);\r\n } \r\n stmt.execute();\r\n return subPref;\r\n } catch (SQLException e) {\r\n throw new RuntimeException(e);\r\n }finally{\r\n rs.close();\r\n stmt.close();\r\n connection.close();\r\n } \r\n }", "private BigDecimal calculateSubtotal(List<CartItem> cartItems) {\n BigDecimal total = BigDecimal.ZERO;\n for (CartItem cartItem : cartItems) {\n total = total.add(cartItem.getSalePrice().multiply(new BigDecimal(cartItem.getQuantity())));\n }\n return total;\n }", "@Test\n\tpublic void shouldReturnPagedDocumentsWithInvoiceForPronto()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getPagedDocumentsForUnit(\"Pronto\",\n\t\t\t\tcreatePageableData(0, 10, \"byDocumentNumberDesc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createTypeCriteriaObject(DOCUMENT_TYPE_INVOICE, StringUtils.EMPTY, FILTER_BY_DOCUMENT_TYPE)));\n\n\t\tTestCase.assertEquals(3, result.getResults().size());\n\n\t\tfinal B2BDocumentModel b2bDocumentModel = result.getResults().get(0);\n\t\tfinal B2BDocumentModel b2bDocumentModel1 = result.getResults().get(1);\n\t\tfinal B2BDocumentModel b2bDocumentModel2 = result.getResults().get(2);\n\t\tTestCase.assertEquals(DOCUMENT_TYPE_INVOICE, b2bDocumentModel.getDocumentType().getCode());\n\t\tTestCase.assertEquals(DOCUMENT_TYPE_INVOICE, b2bDocumentModel1.getDocumentType().getCode());\n\t\tTestCase.assertEquals(DOCUMENT_TYPE_INVOICE, b2bDocumentModel2.getDocumentType().getCode());\n\t\tTestCase.assertEquals(\"INV-004\", b2bDocumentModel.getDocumentNumber());\n\t\tTestCase.assertEquals(\"INC-004\", b2bDocumentModel1.getDocumentNumber());\n\t\tTestCase.assertEquals(\"CRN-004\", b2bDocumentModel2.getDocumentNumber());\n\t}", "public String totalMultaCliente(String id_cliente) throws SQLException {\n System.out.println(\"asdj89asduasd8asd8\");\n // Prepara conexão p/ receber o comando SQL\n String sql = \"SELECT SUM(multa.valor) AS totalMulta FROM multa \"\n + \"INNER JOIN cliente ON multa.id_cliente = cliente.id_cliente \"\n + \"WHERE cliente.id_cliente = ? \"\n + \"GROUP BY cliente.id_cliente;\";\n PreparedStatement stmt = this.conexao.prepareStatement(sql);\n stmt.setString(1, id_cliente);\n\n // Recebe o resultado da consulta SQL\n ResultSet rs = stmt.executeQuery();\n\n rs.next();\n String totalMulta = String.valueOf(rs.getFloat(\"totalMulta\"));\n\n System.out.println(totalMulta);\n\n // Fecha a conexão com o BD\n rs.close();\n stmt.close();\n\n // Retorna a lista de registros, gerados pela consulta\n System.out.println(\"asdj89asduasd8asd8\");\n return totalMulta;\n\n }", "public BigDecimal calcolaImportoTotaleSubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}", "public Vector listaAsignaturasTotal(String nombre_titulacion)\n {\n try\n { \n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n\n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n\n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public void setGrandTotal (BigDecimal GrandTotal);", "public void setGrandTotal (BigDecimal GrandTotal);", "public Builder clearSubtotal() {\n \n subtotal_ = 0D;\n onChanged();\n return this;\n }", "public List<SalesItems> toListSalesItems(int vendaId){\n \n List<SalesItems> list = new ArrayList<>();\n String sql = \"select i.id, p.descricao, i.qtd, p.preco, \"\n + \"i.subtotal from tb_itensvendas as i \"\n + \"inner join tb_produtos as p on(i.produto_id = p.id) \"\n + \"where i.venda_id = ? \";\n \n try{\n \n PreparedStatement st = conn.prepareStatement(sql);\n \n st.setInt(1, vendaId);\n \n \n ResultSet rs = st.executeQuery();\n \n while(rs.next()){\n SalesItems item = new SalesItems();\n Product product = new Product();\n \n item.setId(rs.getInt(\"i.id\"));\n product.setDescricao(rs.getString(\"p.descricao\"));\n item.setQtd(rs.getInt(\"i.qtd\"));\n product.setPreco(rs.getDouble(\"p.preco\"));\n item.setSubtotal(rs.getDouble(\"i.subtotal\"));\n \n \n \n \n \n item.setProduto(product);\n \n list.add(item);\n \n }\n \n return list;\n \n }\n catch(SQLException error){\n JOptionPane.showMessageDialog(null, \"Erro: \" + error);\n return null;\n }\n }", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jTable2.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Quantidade\", \"Descrição\", \"Preço un.\", \"Sub-Total\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane2.setViewportView(jTable2);\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel4.setText(\"Cliente\");\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel5.setText(\"0.00\");\n\n jLabel6.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel6.setText(\"TOTAL: R$\");\n\n jLabel7.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel7.setText(\"NF\");\n\n jLabel8.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel8.setText(\"Pedido\");\n\n jLabel9.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n jLabel9.setText(\"Pedido\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel5)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel8)\n .addComponent(jLabel9))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private double getShoppingCartSubTotal(List<Book> bookList, int userId) {\n DecimalFormat decFormat = new DecimalFormat(\"#.##\");\n double subTotal = 0;\n for(Book book : bookList) {\n int bookId = book.getBookId();\n DAOShoppingCart daoShoppingCart = new DAOShoppingCart();\n ShoppingCart shoppingCart = daoShoppingCart.getShoppingCartByBookIdCustomerId(userId, bookId);\n if(shoppingCart != null) {\n subTotal += shoppingCart.getQuantity() * book.getPrice();\n }\n }\n return Double.parseDouble(decFormat.format(subTotal));\n }", "void setTotal(BigDecimal total);", "public BigDecimal getValorSubsc() {\n\t\treturn valorSubsc;\n\t}", "@Override\n\tpublic List<Subscribe> getSubList(int subAccountId) {\n\t\t\n\t\t\n\t\t\n\t\tList<Subscribe> subList= null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tSession session = sessionFactory.openSession();\n\t\t\tTypedQuery<Subscribe> query = session.createQuery(\"select s from Subscribe s where s.subscriber.kullaniciid= :subId\");\n\t\t\t\n\t\t\tquery.setParameter(\"subId\", subAccountId);\n\t\t\t\n\t\t\tsubList = query.getResultList();\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tsession.close();\n\t\t\t\n\t\t\treturn subList;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t\t\n\t\t\n\t\n\t}", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "public void setSUB_LINE_NO(BigDecimal SUB_LINE_NO) {\r\n this.SUB_LINE_NO = SUB_LINE_NO;\r\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public SmsAgendaGrupo[] findWhereNombreGrupoEquals(String nombreGrupo) throws SmsAgendaGrupoDaoException;", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public Double retornaSubTotal(Double totalGeral,Double desconto){\n return totalGeral - (totalGeral*(desconto/100));\n}", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "List<Product> getProductBySubCategory(String subCategory) throws DataBaseException;" ]
[ "0.6070163", "0.6069709", "0.60200524", "0.59102726", "0.5676225", "0.56410086", "0.5531659", "0.5485606", "0.54188883", "0.5386223", "0.5369296", "0.5369296", "0.5344788", "0.5325743", "0.52487636", "0.52093655", "0.5153184", "0.51478714", "0.5124172", "0.5083112", "0.5064603", "0.5057712", "0.505554", "0.50318056", "0.50236833", "0.50173515", "0.4980039", "0.49703982", "0.4970081", "0.4970081", "0.4961169", "0.4960579", "0.4948033", "0.49356723", "0.4919237", "0.49130732", "0.48967594", "0.48926577", "0.48909688", "0.48707595", "0.48678112", "0.4864791", "0.48606747", "0.48606747", "0.48492107", "0.48462695", "0.4844898", "0.4844316", "0.48423415", "0.48423415", "0.4831923", "0.48223004", "0.48114544", "0.48109338", "0.48104477", "0.48008987", "0.4782448", "0.47816995", "0.47798413", "0.47611532", "0.47531497", "0.47341093", "0.47326237", "0.47294363", "0.47288558", "0.47202268", "0.4718014", "0.4715369", "0.4682632", "0.4677238", "0.46707907", "0.46581945", "0.46564707", "0.465631", "0.4649915", "0.4646868", "0.46431673", "0.46326005", "0.4631852", "0.46168324", "0.46164355", "0.46164355", "0.4611263", "0.4609548", "0.4608925", "0.4608504", "0.46066463", "0.46043473", "0.4602399", "0.46003845", "0.45994216", "0.45964336", "0.45899412", "0.45867318", "0.4583077", "0.45749435", "0.457046", "0.45638523", "0.45630044", "0.45605418" ]
0.8042539
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'COSTO_UNITARIO = :costoUnitario'.
public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorTarifa(java.math.BigDecimal valorTarifa) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorTarifa = :valorTarifa \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorTarifa\", valorTarifa);\r\n return query.getResultList();\r\n }", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui obtenemos la estructura de la tabla(\"Los encabezados\")\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M Obtenemos los metadatos para obtener la cantidad del columnas que llegan\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M la cantidad la alojamos dentro de un entero\r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "public void cargarTablaFiltro(JTable table, int tipo, String restriccion) {\n\t\t\n\t\tString filtro = restriccion + \"-\" + tipo; \n\t\tList<CocheTaller> coches = mecanicoController.filtrarCocheTaller(filtro);\n\t\tString[] columnNames = {\"Marticula\", \"Marca\", \"Modelo\", \"DNI Cliente\", \"Mecanico\", \"Coste\", \"Estado\"};\n\t\t\n\t\tif (!coches.isEmpty()) {\n\t\t\t DefaultTableModel model = new DefaultTableModel();\n\t\t\t table.setModel(model);\n\t\t\t model.setColumnIdentifiers(columnNames);\n\t\t\t \n\t\t\t for (CocheTaller c : coches) {\n\t\t\t\t Object[] o = new Object[7];\n\t\t\t\t o[0] = c.getMatricula();\n\t\t\t\t o[1] = c.getMarca();\n\t\t\t\t o[2] = c.getModelo();\n\t\t\t\t o[3] = c.getDniCliente();\n\t\t\t\t o[4] = c.getMecanico();\n\t\t\t\t o[5] = c.getCoste() + \"€\";\n\t\t\t\t o[6] = mecanicoController.traducirEstado(c.getEstado());\n\t\t\t\t model.addRow(o);\n\t\t\t\t }\n\t\t} else {\n\t\t\tlogger.error(\"No se dispone ningun vehiculo con ese filtrado.\");\n\t\t}\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "@Override\r\n\tpublic List<Requisito> getRequisitos(int cursoId, int centroId) {\r\n\t\tList<Requisito> requisitos = new ArrayList<Requisito>();\r\n\t\ttry\r\n\t\t{\r\n\t\t\trequisitos = jdbcTemplate.query(\r\n\t\t\t\t\t\t\tSQL_SELECT_REQUISITOS_CERTIFICACION + \" where ac.centroid='\" + centroId + \"' and c.id= \" + cursoId + \" order by cr.descripcion\",\r\n\t\t\t\t\t\t\tnew RowMapper<Requisito>() {\r\n\t\t\t\t\t\t\t\tpublic Requisito mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\tRequisito requisito = new Requisito();\r\n\t\t\t\t\t\t\t\t\trequisito.setCodigo(rs.getString(\"codigo_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setDescripcion(rs.getString(\"descripcion_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setAcreditacion(rs.getString(\"codigo_acreditacion\"));\r\n\t\t\t\t\t\t\t\t\treturn requisito;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}); \r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn requisitos;\r\n\t}", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a la cantidad de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) { //C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1); //C.P.M vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public Aluno buscaPorCPFESenha(Aluno aluno) {\n\t\tQuery query = this.entityManager.createNamedQuery(Aluno.QUERY_BUSCA_POR_CPF_E_SENHA);\n\t\tquery.setParameter(\"cpf\", aluno.getCpf());\n\t\tquery.setParameter(\"senha\", aluno.getSenha());\n\t\t\n\t\treturn (Aluno) query.getSingleResult();\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "public List<MaloteView> buscaMalotesFecharSepex(Localidade oDestino) {\n\t\tlogger.info(\"buscaMaloteFecharSepex: conferencia pelo destinatario.\");\r\n\t\tQuery q;\r\n\t\tif (null != oDestino) {\r\n\t\t\t// malotes conferidos pelo proprio setor-destinatario.\r\n\t\t\tq = em.createQuery(\"from \"\r\n\t\t\t\t\t+MaloteView.class.getName()+\" as m \"\r\n\t\t\t\t\t+\" join fetch m.destino r \" +\r\n\t\t\t\t\t\" where m.dtRecepcao is null \" +\r\n\t\t\t\t\t\" and m.tipoMalote > 0 \" +\r\n\t\t\t\t\t\" and m.fechado = false \" +\r\n\t\t\t\t\t\" and m.destino = :pDestino\" +\r\n\t\t\t\t\t\" order by m.dtEnvio, m.destino.descricao\");\r\n\t\t\t\t\tq.setParameter(\"pDestino\", oDestino);\r\n\t\t} else {\r\n\t\t\t// malotes conferidos pela sepex\r\n\t\t\tq = em.createQuery(\"from \" +\r\n\t\t\t MaloteView.class.getName()+\" as m \" + \r\n\t\t\t\t\" join fetch m.destino r \" + \r\n\t\t\t\t\" where m.dtRecepcao is null \" +\r\n\t\t\t\t\" and m.tipoMalote > 0 \" +\r\n\t\t\t\t\" and m.fechado = false \" +\r\n\t\t\t\t\" order by m.dtEnvio, m.destino.descricao\");\t\t\t\r\n\t\t}\r\n\t\treturn (List<MaloteView>) q.getResultList();\r\n\t}", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public ArrayList<Reserva> getReservaByUsuarioOperador(Long codigo, Long opID) throws Exception {\n\t\t\tArrayList<Reserva> respu = new ArrayList<>();\n\t\t\tDAOReserva daoReserva = new DAOReserva();\n\t\t\ttry \n\t\t\t{\n\t\t\t\tthis.conn = darConexion();\n\t\t\t\tdaoReserva.setConn(conn);\n\t\t\t\trespu = daoReserva.findReservaByUsuarioOperador(codigo, opID);\n\n\t\t\t} \n\t\t\tcatch (SQLException sqlException) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\t\tsqlException.printStackTrace();\n\t\t\t\tthrow sqlException;\n\t\t\t} \n\t\t\tcatch (Exception exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t} \n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tdaoReserva.cerrarRecursos();\n\t\t\t\t\tif(this.conn!=null){\n\t\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (SQLException exception) {\n\t\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn respu;\n\t\t}", "public Utente[] findWhereUteCartaNumeroEquals(String uteCartaNumero) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_carta_numero = ? ORDER BY ute_carta_numero\", new Object[] { uteCartaNumero } );\n\t}", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "private boolean existeCondicionTrabajoEspecifico(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\" SELECT * FROM planificacion.det_condicion_trabajo_especif \"\r\n\t\t\t\t+ \" where id_concurso_puesto_agr = \" + concursoPuestoAgr.getIdConcursoPuestoAgr()\r\n\t\t\t\t+ \" and tipo = 'GRUPO' \";\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "public TableModel GetPagineOpera (int cod, String Opera) throws SQLException {\n\t\t\n Connection dbConnection = model.connectionDataBase.ConnectionDB.Connect();\n\n // Execute the query and get the ResultSet\n PreparedStatement stmt = dbConnection.prepareStatement(\"SELECT * FROM pagine_opera INNER JOIN opera ON pagine_opera.cod_opera = opera.cod WHERE opera.cod = ? AND opera.nome = ?\");\n stmt.setInt(1, cod);\n stmt.setString(2, Opera);\n \n ResultSet rs = stmt.executeQuery();\n TableModel tm = DbUtils.resultSetToTableModel(rs);\n dbConnection.close();\n\n return tm;\n\t\t\n\t}", "public DefaultTableModel pedidosCocinero(){\r\n List<Pedido> lista =pedidos.listadosPedidosCocinero(GestionUsuarios.getInstance().getPersona());\r\n return Convertidor.pedidoToTableModel(lista); \r\n }", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public List<EntityClass> cerca(String testoRicerca, String colonnaFiltro){\n CriteriaContainer cc = new CriteriaContainer();\n // SELECT * FROM EntityClass\n cc.query.select(cc.root);\n // SELECT * FROM EntityClass WHERE colonnaFiltro LIKE :testoParam\n ParameterExpression<String> testoParam = cc.builder.parameter(String.class);\n cc.query.where(\n cc.builder.like(cc.root.get(colonnaFiltro), testoParam)\n );\n // Ottengo la lista risultante dalla query\n return getSession().createQuery(cc.query)\n .setParameter(testoParam, \"%\"+testoRicerca+\"%\") // :testoParam -> \"%testoRicerca%\"\n .getResultList();\n }", "public GrupoProducto colsultarPorCodigo(String codigo){\r\n for (int i = 0; i < listaGrupoProductos.size() ; i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n if (codigo.equals( listaGrupoProductos.get(i).getCodigo() ) ) {\r\n return listaGrupoProductos.get(i);\r\n }\r\n }\r\n }\r\n return null;\r\n }", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public Cliente[] findWhereGenericoEquals(int generico) throws ClienteDaoException;", "public Collection<AreaTrabajoDTO> buscarAreaTrabajoCentroDistribucion(int codigoCompania, String codigoFuncionario, boolean tipoBusqueda);", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "public SmsAgendaGrupo[] findWhereNombreGrupoEquals(String nombreGrupo) throws SmsAgendaGrupoDaoException;", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public ProductoDTO buscarproducto(ProductoDTO c) {\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ProductoDTO arrpdto = null;\r\n\r\n try {\r\n ps = conn.getConn().prepareStatement(SQL_READ);\r\n ps.setInt(1, c.getId());\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arrpdto = new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9));\r\n\r\n }\r\n return arrpdto;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n\r\n return null;\r\n }", "public Utente[] findByComuni2(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ?\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public void buscaxnombre() {\r\n try {\r\n modelo.setNombre(vistabuscapro.jTvnombre.getText());//C.P.M le mandamos a el modelo el nombre para consultarlo\r\n rs = modelo.Buscarxnombre();//C.P.M ejecutamo el metodo del modelo y atrapamos el resultado\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M se establese el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M no sera editable\r\n return false;\r\n }\r\n };\r\n vistabuscapro.Tproductos.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"los encabeados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de el resultado\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un objeto con la cantidad de columnas obtenidas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos\r\n fila[i] = rs.getObject(i + 1);//C.P.M le agregamos la informacion obtenida\r\n }\r\n buscar.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar por nombre\");\r\n }\r\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public DTOOIDs obtenerSolicitudesConsolidado(Long oidSolicitudConsolidado) \n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerSolicitudesConsolidado(Long \"\n +\"oidSolicitudConsolidado):Entrada\"); \n UtilidadesLog.debug(\"Entre a obtenerSolicitudesConsolidado con oidSolici\"\n +\"tudConsolidado: \" + oidSolicitudConsolidado);\n \n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet();\n BelcorpService belcorpService = null;\n DTOOIDs dtoOids= new DTOOIDs();\n BigDecimal oidSoliConRecom = null;\n Long oid = null;\n \n query.append(\" SELECT DISTINCT solCab.OID_SOLI_CABE \");\n query.append(\" FROM PED_SOLIC_CABEC solCab, \");\n query.append(\" INC_SOLIC_CONCU_PUNTA solConPunt \");\n query.append(\" WHERE solConPunt.SOCA_OID_SOLI_CABE = \");\n query.append(\" solCab.OID_SOLI_CABE \");\n query.append(\" AND solCab.SOCA_OID_SOLI_CABE = \" + \n oidSolicitudConsolidado);\n \n try {\n rs = belcorpService.getInstance().dbService.executeStaticQuery(\n query.toString());\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n UtilidadesLog.debug(\"resultado: \" + rs);\n \n // Coloco en el DTO los OIDs que devolvió la consulta\n int rows = rs.getRowCount();\n Long[] oids = new Long[rows];\n\n for (int i = 0; i < rows; i++) {\n oidSoliConRecom = (BigDecimal) rs.getValueAt(i, \"OID_SOLI_CABE\");\n oid = Long.valueOf(oidSoliConRecom.toString());\n oids[i] = oid;\n }\n\n dtoOids.setOids(oids);\n UtilidadesLog.info(\" DAOSolicitudes.obtenerSolicitudesConsolidado(Long \"\n +\"oidSolicitudConsolidado):Salida\"); \n return dtoOids;\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria){\n ArrayList <Producto> productosEncontrados = new ArrayList<>();\n for(Producto cadaProducto : UtilidadJavaPop.getProductosTotales()){\n if(cadaProducto.getCategoria().equals(categoria) && !productosEncontrados.contains(cadaProducto)\n && !cadaProducto.getVendedor().getCorreo().equals(this.getCorreo())){\n productosEncontrados.add(cadaProducto);\n }\n }\n ArrayList<Producto>productosEncontradosOrdenado = getProductosOrdenados(productosEncontrados, this);\n return productosEncontradosOrdenado;\n \n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public List<TdSecCxlc> existeDevengado(Integer secCxlcCiclo, Long secDevengado) {\n String existeDevengado = super.getQueryDefinition(\"existeDevengado\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"secCxlcCiclo\", secCxlcCiclo);\n mapValues.put(\"secDevengado\", secDevengado);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n return namedTemplate.query(existeDevengado, namedParameters, new TdSecCxlcRegistroAux());\n }", "public List<TcTipoNomina> getNominasValidasBenefComodin() {\n String nominasValidasBenefComodin = super.getQueryDefinition(\"nominasValidasBenefComodin\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n return namedTemplate.query(nominasValidasBenefComodin, namedParameters, new TcTipoNominasValidasBenefComodinAux());\n }", "public Utente[] findWhereUteCartaTipoEquals(int uteCartaTipo) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_carta_tipo = ? ORDER BY ute_carta_tipo\", new Object[] { new Integer(uteCartaTipo) } );\n\t}", "public Cliente[] findWhereNombreComercialEquals(String nombreComercial) throws ClienteDaoException;", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "public Utente[] findWhereUteConnessioneWifiGratuitaEquals(String uteConnessioneWifiGratuita) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_connessione_wifi_gratuita = ? ORDER BY ute_connessione_wifi_gratuita\", new Object[] { uteConnessioneWifiGratuita } );\n\t}", "public TipoDestino findByCodigo(String codigo);", "private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser consultado: \");\r\n id = read.nextInt();\r\n if (id <= 0) {\r\n erro = true;\r\n System.out.println(\"ID Inválida! \");\r\n }\r\n System.out.println();\r\n } while (erro);\r\n p = arqProdutos.pesquisar(id - 1);\r\n if (p != null && p.getID() != -1) {\r\n c = arqCategorias.pesquisar(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (c != null) {\r\n System.out.println(\"Categoria: \" + c.nome);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public NominaPuesto[] findWhereSueldoDiarioIntegradoEquals(double sueldoDiarioIntegrado) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;", "@GetMapping(\"buscarProductos\")\n\tpublic List<Producto> getProductos(){\n\t\treturn this.productoServicios.findAll();\n\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }" ]
[ "0.677244", "0.60757816", "0.5943511", "0.5852942", "0.57570314", "0.57024765", "0.5669441", "0.5651231", "0.56452256", "0.56439406", "0.5632523", "0.5622815", "0.5610037", "0.5603798", "0.5580834", "0.5566181", "0.55475867", "0.5537105", "0.55241185", "0.55158925", "0.5515076", "0.55113846", "0.54881966", "0.5475469", "0.5469637", "0.54645944", "0.54628587", "0.545412", "0.5449064", "0.54444504", "0.5429998", "0.5420812", "0.54161835", "0.54141074", "0.5409208", "0.5399983", "0.53974164", "0.5394936", "0.5393354", "0.5380797", "0.5359684", "0.5350925", "0.5343346", "0.533121", "0.5323722", "0.5315935", "0.5315103", "0.53034043", "0.53020793", "0.5301673", "0.5298391", "0.5296722", "0.5269291", "0.5263403", "0.5258182", "0.5251805", "0.5248441", "0.52260274", "0.5222672", "0.5212622", "0.5203686", "0.5193532", "0.5186702", "0.5181416", "0.51809496", "0.51746726", "0.5173654", "0.51580316", "0.5157836", "0.5156072", "0.5147721", "0.51459414", "0.51429254", "0.51397103", "0.51297426", "0.51292217", "0.5128576", "0.5127522", "0.51187456", "0.51183885", "0.5111477", "0.51080924", "0.5099412", "0.50882894", "0.50861895", "0.50831574", "0.5078519", "0.5073834", "0.5072402", "0.50649095", "0.50631154", "0.50620884", "0.5061857", "0.506072", "0.5059986", "0.5059278", "0.50576824", "0.5052636", "0.5052567", "0.50506127" ]
0.74638796
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'PORCENTAJE_COMISION_EMPLEADO = :porcentajeComisionEmpleado'.
public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public NominaPuesto[] findWhereIdEmpresaEquals(int idEmpresa) throws NominaPuestoDaoException;", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public Collection<Object[]> pesquisarMovimentoRoteiroEmpresa(Integer idRoteiroEmpresa, Integer anoMesFaturamento,\n\t\t\t\t\tInteger idFaturamentoGrupo) throws ErroRepositorioException;", "public OrdemServicoProgramacao pesquisarOSProgramacaoAtivaComDataRoteiroIdEquipe(Integer numeroOS, Date dataRoteiro, Integer idEquipe)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tOrdemServicoProgramacao retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \" + \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.ordemServico os \" + \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \" + \"WHERE os.id = :numeroOS \"\n\t\t\t\t\t\t\t+ \"AND equipe.id = :idEquipe \" + \"AND osProgramacao.indicadorAtivo = :indAtivo \"\n\t\t\t\t\t\t\t+ \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro\";\n\n\t\t\tretorno = (OrdemServicoProgramacao) session.createQuery(consulta).setInteger(\"numeroOS\", numeroOS)\n\t\t\t\t\t\t\t.setInteger(\"idEquipe\", idEquipe).setShort(\"indAtivo\", OrdemServicoProgramacao.INDICADOR_ATIVO)\n\t\t\t\t\t\t\t.setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro)\n\n\t\t\t\t\t\t\t.setMaxResults(1).uniqueResult();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public Collection<OrdemServicoProgramacao> pesquisarOSProgramacaoComDataRoteiroIdEquipeDiferenteOS(Integer numeroOS, Date dataRoteiro,\n\t\t\t\t\tInteger idEquipe) throws ErroRepositorioException{\n\n\t\tCollection<OrdemServicoProgramacao> retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \" + \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.ordemServico os \" + \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \"\n\t\t\t\t\t\t\t+ \"LEFT JOIN osProgramacao.osProgramNaoEncerMotivo osProgramNaoEncerMotivo \" + \"WHERE os.id <> :numeroOS \"\n\t\t\t\t\t\t\t+ \"AND equipe.id = :idEquipe \" + \"AND (osProgramacao.indicadorAtivo = 1 OR (osProgramacao.indicadorAtivo = 2 \"\n\t\t\t\t\t\t\t+ \" AND osProgramNaoEncerMotivo IS NULL)) \" + \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro\";\n\n\t\t\tretorno = (Collection<OrdemServicoProgramacao>) session.createQuery(consulta).setInteger(\"numeroOS\", numeroOS)\n\t\t\t\t\t\t\t.setInteger(\"idEquipe\", idEquipe).setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro).list();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public static ArrayList<Paciente> BuscarPacientesConConvenios(Empresa emp) {\n Session sesion;\n Transaction tr = null;\n ArrayList<Paciente> lis = null;\n String hql;\n try{ \n sesion = NewHibernateUtil.getSessionFactory().openSession();\n tr = sesion.beginTransaction();\n hql = \"SELECT DISTINCT c.paciente FROM Convenio c WHERE c.estado = 'Activo' AND c.empresa = \"+emp.getIdempresa();\n Query query = sesion.createQuery(hql); \n Iterator<Paciente> it = query.iterate();\n if(it.hasNext()){\n lis = new ArrayList();\n while(it.hasNext()){\n lis.add(it.next());\n }\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return lis;\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public Collection pesquisarParcelamentoContaUsuario(Integer idUsuario, Date dataInicial, Date dataFinal)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection retorno = null;\n\t\tSession session = HibernateUtil.getSession();\n\t\tStringBuffer consulta = new StringBuffer();\n\n\t\ttry{\n\t\t\tconsulta.append(\"SELECT MPCCDFUN AS mpccdfun, \");\n\t\t\tconsulta.append(\" MPCDTMPC AS mpcdtmpc, \");\n\t\t\tconsulta.append(\" MPCHRMPC AS mpchrmpc, \");\n\t\t\tconsulta.append(\" MPCAMINI AS mpcamini, \");\n\t\t\tconsulta.append(\" MPCAMFIN AS mpcamfin, \");\n\t\t\tconsulta.append(\" MPCNNMATUSU AS mpcnnatusu, \");\n\t\t\tconsulta.append(\" MPCNNMATUSUD AS mpcnnmatusud, \");\n\t\t\tconsulta.append(\" MPCNNPREST AS mpcnnprest, \");\n\t\t\tconsulta.append(\" MPCVLENTR AS mpcvlentr, \");\n\t\t\tconsulta.append(\" MPCVLPREST AS mpcvlprest, \");\n\t\t\tconsulta.append(\" MPCVLDEBHIST AS mpcvldebhist, \");\n\t\t\tconsulta.append(\" MPCVLDEBCORR AS mpcvldebcorr, \");\n\t\t\tconsulta.append(\" MPCVLTOTSACINCL AS mpcvltotsacincl, \");\n\t\t\tconsulta.append(\" MPCVLPARCEL AS mpcvlparcel, \");\n\t\t\tconsulta.append(\" MPCNNMATGER AS mpcnnmatger \");\n\t\t\tconsulta.append(\"FROM SCITMPC \");\n\t\t\tconsulta.append(\"WHERE MPCNNMATUSU = :idUsuario \");\n\t\t\tconsulta.append(\"AND MPCDTMPC BETWEEN :dataInicial AND :dataFinal \");\n\t\t\tconsulta.append(\"ORDER BY MPCDTMPC, MPCHRMPC, MPCNNMATUSU \");\n\n\t\t\tSQLQuery query = session.createSQLQuery(consulta.toString());\n\n\t\t\t// RETORNO\n\t\t\tquery.addScalar(\"mpccdfun\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcdtmpc\", Hibernate.DATE);\n\t\t\tquery.addScalar(\"mpchrmpc\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamini\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamfin\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnatusu\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnmatusud\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnprest\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcvlentr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlprest\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebhist\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebcorr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvltotsacincl\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlparcel\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcnnmatger\", Hibernate.INTEGER);\n\n\t\t\t// PARAMETROS\n\t\t\tquery.setInteger(\"idUsuario\", idUsuario);\n\t\t\tquery.setDate(\"dataInicial\", dataInicial);\n\t\t\tquery.setDate(\"dataFinal\", dataFinal);\n\n\t\t\tretorno = query.list();\n\n\t\t}catch(HibernateException e){\n\t\t\t// levanta a exceção para a próxima camada\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\t// fecha a sessão\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public java.sql.ResultSet consultaporespecialidadhorafecha(String CodigoEspecialidad,String hora,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.horas='\"+hora+\"' and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas \");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadhorafecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public DefaultTableModel pedidosCocinero(){\r\n List<Pedido> lista =pedidos.listadosPedidosCocinero(GestionUsuarios.getInstance().getPersona());\r\n return Convertidor.pedidoToTableModel(lista); \r\n }", "private Map<Long, List<ObligacionCoactivoDTO>> consultaObligacionesComparendo() {\n logger.debug(\"CoactivoEJB::consultaObligacionesComparendo()\");\n Map<Long, List<ObligacionCoactivoDTO>> obligacionesDeudor = new HashMap<>();\n StringBuilder consulta = new StringBuilder();\n consulta.append(\"SELECT \");\n consulta.append(\"p.id_cartera, \");\n consulta.append(\"ca.saldo_capital, \");\n consulta.append(\"ca.saldo_interes, \");\n consulta.append(\"p.numero_obligacion, \");\n consulta.append(\"p.id_deudor, \");\n consulta.append(\"p.fecha_obligacion, \");\n consulta.append(\"p.id_funcionario, \");\n consulta.append(\"p.id_cargue_coactivo, \");\n consulta.append(\"p.id_precoactivo \");\n consulta.append(\"FROM precoactivo p \");\n consulta.append(\"JOIN cartera ca on ca.id_cartera = p.id_cartera \");\n consulta.append(\"WHERE p.id_estado_precoactivo = :estadoAprobado \");\n consulta.append(\"AND p.codigo_tipo_obligacion = :tipoComparendo \");\n\n Query query = em.createNativeQuery(consulta.toString());\n query.setParameter(\"estadoAprobado\", EnumEstadoPrecoactivo.AUTORIZADO.getValue());\n query.setParameter(\"tipoComparendo\", EnumTipoObligacion.COMPARENDO.getValue());\n @SuppressWarnings({ \"unchecked\" })\n List<Object[]> lsObligacionesComparendos = Utilidades.safeList(query.getResultList());\n\n for (Object[] obligacionComparendo : lsObligacionesComparendos) {\n int i = 0;\n BigInteger idCartera = (BigInteger) obligacionComparendo[i++];\n BigDecimal saldoCapital = (BigDecimal) obligacionComparendo[i++];\n BigDecimal saldoInteres = (BigDecimal) obligacionComparendo[i++];\n String numObligacion = (String) obligacionComparendo[i++];\n Long idDeudor = ((BigInteger) obligacionComparendo[i++]).longValue();\n Date fechaObligacion = (Date) obligacionComparendo[i++];\n Integer idFuncionario = (Integer) obligacionComparendo[i++];\n Long idCargue = ((BigInteger) obligacionComparendo[i++]).longValue();\n Long idPrecoactivo = ((BigInteger) obligacionComparendo[i++]).longValue();\n\n CoactivoDTO coactivo = new CoactivoDTO();\n coactivo.setCargueCoactivo(new CargueCoactivoDTO(idCargue));\n coactivo.setFuncionario(new FuncionarioDTO(idFuncionario));\n coactivo.setPersona(new PersonaDTO(idDeudor));\n // Arma obligacion que va a entrar a coactivo\n ObligacionCoactivoDTO obligacion = new ObligacionCoactivoDTO();\n obligacion.setCodigoTipoObligacion(EnumTipoObligacion.COMPARENDO.getValue());\n obligacion.setCartera(new CarteraDTO(idCartera.longValue()));\n obligacion.setNumeroObligacion(numObligacion);\n obligacion.setCoactivo(coactivo);\n obligacion.setFechaObligacion(fechaObligacion);\n obligacion.setValorObligacion(saldoCapital);\n obligacion.setValorInteresMoratorios(saldoInteres);\n obligacion.setIdPrecoativo(idPrecoactivo);\n if (!obligacionesDeudor.containsKey(idDeudor)) {\n obligacionesDeudor.put(idDeudor, new ArrayList<ObligacionCoactivoDTO>());\n }\n obligacionesDeudor.get(idDeudor).add(obligacion);\n }\n return obligacionesDeudor;\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "public Collection pesquisarIdContasCliente(Integer codigoCliente,\n\t\t\tShort relacaoTipo, Integer anoMes, Date dataVencimentoContaInicio, \n\t\t\tDate dataVencimentoContaFim, Integer anoMesFim) throws ErroRepositorioException;", "public List<Emprestimos> buscarPorPropriedade(String whereClause, Object parametro) {\n\t\treturn manager.createQuery(\"select e from Emprestimos e \" + whereClause + parametro, Emprestimos.class)\n\t\t .getResultList();\n\t}", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "public Collection<OrdemServicoProgramacao> pesquisarOSProgramacaoComDataRoteiroIdEquipeOrdenada(Date dataRoteiro, Integer idEquipe)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection<OrdemServicoProgramacao> retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \"\n\t\t\t\t\t\t\t+ \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \"\n\t\t\t\t\t\t\t+ \"WHERE equipe.id = :idEquipe \"\n\t\t\t\t\t\t\t+ \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro \"\n\t\t\t\t\t\t\t+ \"AND (osProgramacao.indicadorAtivo = :indicadorAtivo \"\n\t\t\t\t\t\t\t+ \"OR (osProgramacao.indicadorAtivo = :indicadorAtivoNao AND osProgramacao.situacaoFechamento = :situacaoFechamento )) \"\n\t\t\t\t\t\t\t+ \"ORDER BY osProgramacao.nnSequencialProgramacao \";\n\n\t\t\tretorno = (Collection<OrdemServicoProgramacao>) session.createQuery(consulta).setInteger(\"idEquipe\", idEquipe)\n\t\t\t\t\t\t\t.setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro)\n\t\t\t\t\t\t\t.setShort(\"indicadorAtivo\", OrdemServicoProgramacao.INDICADOR_ATIVO)\n\t\t\t\t\t\t\t.setShort(\"indicadorAtivoNao\", OrdemServicoProgramacao.INDICADOR_ATIVO_NAO)\n\t\t\t\t\t\t\t.setShort(\"situacaoFechamento\", OrdemServicoProgramacao.SITUACAO_FECHAMENTO).list();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public List<ConsumoAnormalidadeFaixa> pesquisarConsumoAnormalidadeFaixa() throws ErroRepositorioException;", "@Override\n\tpublic Collection<String> consultarLineaComercialClasificacionAsignacionMasivaIngresar(String codigoClasificacion,String nivelClasificacion,String valorTipoLineaComercial,Long codigoLinPad,Long codigoLinCom)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Entr� a consultar Linea Comercial Clasificacion Asignacion Masiva Ingresar : {}\",codigoClasificacion);\n\t\tStringBuilder query = null;\n\t\tSQLQuery sqlQuery = null;\n\t\tSession session=null;\n\t\tString divDep=\" ) \";\n\t\ttry {\n\t\t\tsession = hibernateH.getHibernateSession();\n\t\t\tsession.clear();\n\t\t\tquery = new StringBuilder(\" SELECT t1.CODIGOCLASIFICACION \");\n\t\t\t\n\t\t\tquery.append(\" FROM ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\tdivDep+=\" ) ) \";\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tquery.append(\" where t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\tquery.append(\" select distinct lineacomer0_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCADMTLINCOMCLA lineacomer0_, SCADMTLINCOM lineacomer1_ \");\n\t\t\tquery.append(\" where lineacomer1_.CODIGOLINEACOMERCIAL=lineacomer0_.CODIGOLINEACOMERCIAL \");\n\t\t\tquery.append(\" and lineacomer1_.NIVEL=0 and lineacomer1_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and lineacomer1_.CODIGOLINEACOMERCIAL NOT IN( \"+codigoLinPad+\" ) \");\n\t\t\t}\n\t\t\tquery.append(\" and lineacomer0_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' and lineacomer1_.VALORTIPOLINEACOMERCIAL='\"+valorTipoLineaComercial+\"' \");\n\t\t\tquery.append(\" and ( lineacomer0_.CODIGOCLASIFICACION in ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" ) )\");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" ) ) \");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t///CODIGO EXTRA\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\t\tquery.append(\" SELECT CODIGOCLASIFICACION FROM SCADMTLINCOMCLA LCC, SCADMTLINCOM LC\t \");\n\t\t\t\tquery.append(\" where LCC.CODIGOCLASIFICACION IN(\t \");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\t}\n\t\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\"\"+divDep+\" \");\n\t\t\t\t}else{\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" \");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tquery.append(\" AND LCC.ESTADO='1' \");\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL=LC.CODIGOLINEACOMERCIAL \");\n\t\t\t\tquery.append(\" AND LC.CODIGOLINEACOMERCIALPADRE = \"+codigoLinPad);\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL NOT IN (\"+codigoLinCom+\") )\");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" ) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\n//\t\t\tsqlQuery.setParameter(\"estadoClasificacion\", SICConstantes.ESTADO_ACTIVO_NUMERICO);\n//\t\t\tsqlQuery.setParameter(\"codigoClasificacion\", codigoClasificacion);\n//\t\t\tsqlQuery.setParameter(\"valorTipoLineaComercial\", valorTipoLineaComercial);\n\t\t\t\n\t\t\tsqlQuery = hibernateH.getHibernateSession().createSQLQuery(query.toString());\n//\t\t\tsqlQuery.addEntity(\"vista\", ClasificacionDTO.class);\n\t\t\t\n//\t\t\tclasificacionDTOs =sqlQuery.list();\n\t\t\treturn sqlQuery.list();\n\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t}\n//\t\treturn clasificacionDTOs;\n\t\t\n\t}", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public java.sql.ResultSet consultaporespecialidadfecha(String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public Collection<OsExecucaoEquipe> obterOsExecucaoEquipePorOS(Integer idOS, Integer idAtividade) throws ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsExecucaoEquipe> colecaoOsExecucaoEquipe = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\t\t\tconsulta = \"SELECT osape.id, \" // 0\n\t\t\t\t\t\t\t+ \" osape.dataInicio, \" // 1\n\t\t\t\t\t\t\t+ \" osape.dataFim, \" // 2\n\t\t\t\t\t\t\t+ \" a.id, \" // 3\n\t\t\t\t\t\t\t+ \" a.descricao, \" // 4\n\t\t\t\t\t\t\t+ \" e.id, \" // 5\n\t\t\t\t\t\t\t+ \" e.nome, \" // 6\n\t\t\t\t\t\t\t+ \" osape.valorAtividadePeriodo \" // 7\n\t\t\t\t\t\t\t+ \"FROM OsExecucaoEquipe osee \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.equipe e \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.osAtividadePeriodoExecucao osape \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osape.ordemServicoAtividade osa \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osa.atividade a \" + \"INNER JOIN osa.ordemServico os \"\n\t\t\t\t\t\t\t+ \"WHERE os.id = :idOS \"\n\t\t\t\t\t\t\t+ \" and a.id = :idAtividade \" + \"ORDER BY a.descricao \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idOS\", idOS)\n\t\t\t\t\t\t\t.setInteger(\"idAtividade\", idAtividade).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\t\t\t\tOsExecucaoEquipe osExecucaoEquipe = null;\n\t\t\t\tfor(Object[] periodo : retornoConsulta){\n\t\t\t\t\tosExecucaoEquipe = new OsExecucaoEquipe();\n\t\t\t\t\tEquipe equipe = new Equipe();\n\t\t\t\t\tequipe.setId((Integer) periodo[5]);\n\t\t\t\t\tequipe.setNome((String) periodo[6]);\n\t\t\t\t\tosExecucaoEquipe.setEquipe(equipe);\n\t\t\t\t\tOsAtividadePeriodoExecucao osAtividadePeriodoExecucao = new OsAtividadePeriodoExecucao();\n\t\t\t\t\tosAtividadePeriodoExecucao.setId((Integer) periodo[0]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataInicio((Date) periodo[1]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataFim((Date) periodo[2]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setValorAtividadePeriodo((BigDecimal) periodo[7]);\n\t\t\t\t\tOrdemServicoAtividade ordemServicoAtividade = new OrdemServicoAtividade();\n\t\t\t\t\tAtividade atividade = new Atividade();\n\t\t\t\t\tatividade.setId((Integer) periodo[3]);\n\t\t\t\t\tatividade.setDescricao((String) periodo[4]);\n\t\t\t\t\tordemServicoAtividade.setAtividade(atividade);\n\t\t\t\t\tOrdemServico ordemServico = new OrdemServico();\n\t\t\t\t\tordemServico.setId(idOS);\n\t\t\t\t\tordemServicoAtividade.setOrdemServico(ordemServico);\n\t\t\t\t\tosAtividadePeriodoExecucao.setOrdemServicoAtividade(ordemServicoAtividade);\n\t\t\t\t\tosExecucaoEquipe.setOsAtividadePeriodoExecucao(osAtividadePeriodoExecucao);\n\t\t\t\t\tcolecaoOsExecucaoEquipe.add(osExecucaoEquipe);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsExecucaoEquipe;\n\t}", "@Query(\"select pu from ProcesoUsuario pu join pu.proceso p where p.estado = true and p.juzgado=?1\")\r\n\tPage<ProcesoUsuario> findAllByJuzgado(Juzgado juzgado, Pageable pageable);", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public List<Pago> findByEmpresa(Empresa empresa);", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public List<Batiment> rechercheBatimentEntreprise(int numE){\n\t\tList<Batiment> bat=(List <Batiment>) em.createQuery(\"from Batiment b where b.entreprise.numero=\"+numE).getResultList();\n\t\treturn bat;\n\t}", "public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "public java.sql.ResultSet consultaporespecialidadhora(String CodigoEspecialidad,String hora){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.horas='\"+hora+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadhora \"+ex);\r\n }\t\r\n return rs;\r\n }", "public Collection pesquisarDadosTxtContasProjetosEspeciais(String anoMes,\n\t\t\tInteger idCliente, Integer quantidadeRegistros , Integer numeroIndice) throws ErroRepositorioException;", "public Collection<OrdemServicoProgramacao> pesquisarOSProgramacaoComDataRoteiroIdEquipe(Date dataRoteiro, Integer idEquipe,\n\t\t\t\t\tboolean ordernadoPorSequencial) throws ErroRepositorioException{\n\n\t\tCollection<OrdemServicoProgramacao> retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \"\n\t\t\t\t\t\t\t+ \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \"\n\t\t\t\t\t\t\t+ \"WHERE equipe.id = :idEquipe \"\n\t\t\t\t\t\t\t+ \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro \"\n\t\t\t\t\t\t\t+ \"AND (osProgramacao.indicadorAtivo = :indicadorAtivo \"\n\t\t\t\t\t\t\t+ \"OR (osProgramacao.indicadorAtivo = :indicadorAtivoNao AND osProgramacao.situacaoFechamento = :situacaoFechamento )) \";\n\n\t\t\tif(ordernadoPorSequencial){\n\t\t\t\tconsulta += \"order by osProgramacao.nnSequencialProgramacao asc\";\n\t\t\t}\n\n\t\t\tretorno = (Collection<OrdemServicoProgramacao>) session.createQuery(consulta).setInteger(\"idEquipe\", idEquipe)\n\t\t\t\t\t\t\t.setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro)\n\t\t\t\t\t\t\t.setShort(\"indicadorAtivo\", OrdemServicoProgramacao.INDICADOR_ATIVO)\n\t\t\t\t\t\t\t.setShort(\"indicadorAtivoNao\", OrdemServicoProgramacao.INDICADOR_ATIVO_NAO)\n\t\t\t\t\t\t\t.setShort(\"situacaoFechamento\", OrdemServicoProgramacao.SITUACAO_FECHAMENTO).list();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }", "protected void exibirPacientes(){\n System.out.println(\"--- PACIENTES CADASTRADOS ----\");\r\n String comando = \"select * from paciente order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nomepaciente\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public Integer pesquisarQuantidadeSetorComercialPorRoteiroEmpresa(Integer idRoteiroEmpresa, Integer anoMesFaturamento,\n\t\t\t\t\tInteger idFaturamentoGrupo) throws ErroRepositorioException;", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public Collection<OsExecucaoEquipe> obterOsExecucaoEquipePorOS(Integer idOS) throws ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsExecucaoEquipe> colecaoOsExecucaoEquipe = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\t\t\tconsulta = \"SELECT DISTINCT osape.id, \" // 0\n\t\t\t\t\t\t\t+ \" osape.dataInicio, \" // 1\n\t\t\t\t\t\t\t+ \" osape.dataFim, \" // 2\n\t\t\t\t\t\t\t+ \" a.id, \" // 3\n\t\t\t\t\t\t\t+ \" a.descricao, \" // 4\n\t\t\t\t\t\t\t+ \" e.id, \" // 5\n\t\t\t\t\t\t\t+ \" e.nome \" // 6\n\t\t\t\t\t\t\t+ \"FROM OsExecucaoEquipe osee \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.equipe e \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.osAtividadePeriodoExecucao osape \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osape.ordemServicoAtividade osa \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osa.atividade a \" + \"INNER JOIN osa.ordemServico os \"\n\t\t\t\t\t\t\t+ \"WHERE os.id = :idOS \"\n\t\t\t\t\t\t\t+ \"ORDER BY a.descricao \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idOS\", idOS).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\t\t\t\tOsExecucaoEquipe osExecucaoEquipe = null;\n\t\t\t\tfor(Object[] periodo : retornoConsulta){\n\t\t\t\t\tosExecucaoEquipe = new OsExecucaoEquipe();\n\t\t\t\t\tEquipe equipe = new Equipe();\n\t\t\t\t\tequipe.setId((Integer) periodo[5]);\n\t\t\t\t\tequipe.setNome((String) periodo[6]);\n\t\t\t\t\tosExecucaoEquipe.setEquipe(equipe);\n\t\t\t\t\tOsAtividadePeriodoExecucao osAtividadePeriodoExecucao = new OsAtividadePeriodoExecucao();\n\t\t\t\t\tosAtividadePeriodoExecucao.setId((Integer) periodo[0]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataInicio((Date) periodo[1]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataFim((Date) periodo[2]);\n\t\t\t\t\tOrdemServicoAtividade ordemServicoAtividade = new OrdemServicoAtividade();\n\t\t\t\t\tAtividade atividade = new Atividade();\n\t\t\t\t\tatividade.setId((Integer) periodo[3]);\n\t\t\t\t\tatividade.setDescricao((String) periodo[4]);\n\t\t\t\t\tordemServicoAtividade.setAtividade(atividade);\n\t\t\t\t\tOrdemServico ordemServico = new OrdemServico();\n\t\t\t\t\tordemServico.setId(idOS);\n\t\t\t\t\tordemServicoAtividade.setOrdemServico(ordemServico);\n\t\t\t\t\tosAtividadePeriodoExecucao.setOrdemServicoAtividade(ordemServicoAtividade);\n\t\t\t\t\tosExecucaoEquipe.setOsAtividadePeriodoExecucao(osAtividadePeriodoExecucao);\n\t\t\t\t\tcolecaoOsExecucaoEquipe.add(osExecucaoEquipe);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsExecucaoEquipe;\n\t}", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public Cliente[] findWhereApellidoPaternoClienteEquals(String apellidoPaternoCliente) throws ClienteDaoException;", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public Collection<OrdemServicoProgramacao> pesquisarOSProgramacaoComSequencialMaior(Integer numeroOS, Date dataRoteiro,\n\t\t\t\t\tInteger idEquipe, short sequencialReferencia) throws ErroRepositorioException{\n\n\t\tCollection<OrdemServicoProgramacao> retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \" + \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.ordemServico os \" + \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \" + \"WHERE equipe.id = :idEquipe \"\n\t\t\t\t\t\t\t+ \"AND os.id = :numeroOS \" + \"AND (osProgramacao.indicadorAtivo = 1 \"\n\t\t\t\t\t\t\t+ \"OR (osProgramacao.indicadorAtivo = 2 AND osProgramacao.situacaoFechamento = 2)) \"\n\t\t\t\t\t\t\t+ \"AND osProgramacao.nnSequencialProgramacao > :sequencialReferencia \"\n\t\t\t\t\t\t\t+ \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro\";\n\n\t\t\tretorno = (Collection<OrdemServicoProgramacao>) session.createQuery(consulta).setInteger(\"numeroOS\", numeroOS)\n\t\t\t\t\t\t\t.setInteger(\"idEquipe\", idEquipe).setShort(\"sequencialReferencia\", sequencialReferencia)\n\t\t\t\t\t\t\t.setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro).list();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public Cliente[] findWhereNumeroEquals(String numero) throws ClienteDaoException;", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public Cliente[] findWhereAccesoConsolaXmlPdfEquals(int accesoConsolaXmlPdf) throws ClienteDaoException;", "@Override\n\tpublic Produto pesquisar(Produto entidade) {\n\t\treturn null;\n\t}", "@Override\r\n public List<QuestaoMultiplaEscolha> consultarTodosQuestaoMultiplaEscolha()\r\n throws Exception {\n return rnQuestaoMultiplaEscolha.consultarTodos();\r\n }", "public Cliente[] findWhereNumeroInteriorEquals(String numeroInterior) throws ClienteDaoException;", "public Cliente[] findWhereNombreComercialEquals(String nombreComercial) throws ClienteDaoException;", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public ArrayList findPersonalAsistencia(String dbpool, String criterio,\n\t\t\tString valor, String periodo, HashMap seguridad)\n\t\t\tthrows SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select t02cod_pers, substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) cod_uorga \"\n\t\t\t\t\t).append( \" from t02perdp \" ).append( \" where t02cod_stat = ? \");\n\n\t\t\tif (criterio.equals(\"0\")) {\n\t\t\t\tstrSQL.append(\" and t02cod_pers = '\" ).append( valor.trim().toUpperCase()\n\t\t\t\t\t\t).append( \"'\");\n\t\t\t}\n\n\t\t\tif (criterio.equals(\"1\")) {\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) = '\"\n\t\t\t\t\t\t).append( valor.trim().toUpperCase() ).append( \"'\");\n\t\t\t}\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\" ).append( Constantes.PROCESO_ASISTENCIA\n\t\t\t\t\t\t).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by t02cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, Constantes.ACTIVO);\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tHashMap det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"t02cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"cod_uorga\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "@Query(value= \" select \tpa.id as codigoPaciente, \"+\n\t\t\t\t\t\"\t\tpa.nome as nomePaciente, \"+\n\t\t\t\t\t\"\t\tpa.sexo as sexoPaciente, \"+\n\t\t\t\t\t\"\t\tDATE_FORMAT(pa.data_nascimento,'%d/%m/%Y') as dataNascimentoPaciente, \"+\n\t\t\t\t\t\"\t\tCONCAT(pa.endereco,', ',ci.nome,' - ',ci.uf) as enderecoPaciente \"+\n\t\t\t\t\t\" from tbl_paciente pa \"+\n\t\t\t\t\t\" inner join tbl_bairro ba on ba.id = pa.id_bairro \"+\n\t\t\t\t\t\" inner join tbl_cidade ci on ci.id = ba.id_cidade \"+\n\t\t\t\t\t\" where pa.nome like :pNome\"+\n\t\t\t\t\t\" order by pa.nome, ci.nome \", nativeQuery=true)\n\tpublic List<Object> consultaPacientesPorNome(@Param(\"pNome\") String pNome);", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }" ]
[ "0.6390023", "0.61240184", "0.60551775", "0.6022716", "0.60220605", "0.60051817", "0.59785885", "0.59756285", "0.5939052", "0.59236735", "0.58850783", "0.5876176", "0.5801687", "0.57886654", "0.578339", "0.57708144", "0.5770178", "0.5769651", "0.57618076", "0.5758541", "0.5740685", "0.5740248", "0.57241464", "0.57099754", "0.568999", "0.5667487", "0.56573284", "0.5640709", "0.56372774", "0.5636469", "0.5617914", "0.56152594", "0.5610667", "0.5600495", "0.559201", "0.559158", "0.5582098", "0.5580427", "0.55759203", "0.55709404", "0.5565753", "0.55624604", "0.5562018", "0.5530923", "0.55277205", "0.5514332", "0.55036074", "0.5498773", "0.54981536", "0.54971755", "0.549414", "0.54930866", "0.54857254", "0.5485092", "0.5480287", "0.5478499", "0.547641", "0.5473473", "0.5469303", "0.54640496", "0.54614455", "0.5460609", "0.5460473", "0.545911", "0.54588807", "0.5452231", "0.5441486", "0.543917", "0.5423944", "0.5423132", "0.54173297", "0.5416721", "0.5413408", "0.5412119", "0.5408895", "0.5407708", "0.5405959", "0.54056865", "0.5403999", "0.5403914", "0.5400471", "0.539171", "0.5390018", "0.53871775", "0.53866106", "0.5380822", "0.5378701", "0.5374556", "0.53668207", "0.536643", "0.53571707", "0.5353581", "0.5351808", "0.5338919", "0.5336644", "0.5333167", "0.5333149", "0.5327747", "0.53267205", "0.53234375" ]
0.71730024
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'CANTIDAD_ENTREGADA = :cantidadEntregada'.
public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public RelacionConceptoEmbalaje[] findWhereCantidadEquals(double cantidad) throws RelacionConceptoEmbalajeDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\r\n public Resultado consultar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n // instanciando DAO de acordo com a classe\r\n IDAO dao = daos.get(nmClass);\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"PESQUISAR\");\r\n if (msg.isEmpty()) {\r\n if (dao.consultar(entidade).isEmpty()) {\r\n //caso dados não foram encontrados\r\n resultado.setMsg(\"dados nao encontrados\");\r\n } else {\r\n //caso dados foram encontrados \r\n resultado.setMsg(\"pesquisa feita com sucesso\");\r\n }\r\n resultado.setEntidades(dao.consultar(entidade));\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public Integer consultaCantidadesXId(Integer idProducto){\n\t\tInteger rta = 0;\n\t\ttry {\n\t\t\tList<ExistenciaXSedeEntity> lista = new ArrayList<>();\n\t\t\tlista = conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t\tif(lista==null || lista.isEmpty()){\n\t\t\t\trta =0;\n\t\t\t}else{\n\t\t\t\trta = lista.get(0).getExistencias();\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rta;\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "@RequestMapping(method=RequestMethod.GET,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Producto> consultaPorTipoDeProductoYCantidad(\n\t\t\t@RequestParam String tipo, @RequestParam int cantidad\n\t\t\t){\n\t\treturn null;\n\t}", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\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\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public Cliente[] findWhereGenericoEquals(int generico) throws ClienteDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public Integer consultaExistenciasTotales(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t Integer respuesta = 0;\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t\tif(lista!=null && !lista.isEmpty()){\n\t\t\t\tfor(ExistenciaXSedeEntity item:lista){\n\t\t\t\t\trespuesta += item.getExistencias();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return respuesta;\n\t}", "@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public static Boolean existeProducto(String nombre, String tabla, String parametro) {\n Statement statement;\n try {\n iniciarConexion();\n statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM \" + tabla +\n \" WHERE \" + parametro + \" = '\" + nombre + \"'\");\n\n while (result.next()) {\n return true;\n }\n statement.close();\n \n } catch (SQLException e) {\n System.out.println(e);\n }\n return false;\n }", "public List<Extincteur> rechercheExtincteurBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Extincteur e WHERE e.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "public List<Batiment> rechercheBatimentEntreprise(int numE){\n\t\tList<Batiment> bat=(List <Batiment>) em.createQuery(\"from Batiment b where b.entreprise.numero=\"+numE).getResultList();\n\t\treturn bat;\n\t}", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "public List<ReciboPension> buscarRecibosPendientesAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public Ruta[] findWhereIdTipoRutaEquals(int idTipoRuta) throws RutaDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public NominaPuesto[] findWhereSueldoDiarioIntegradoEquals(double sueldoDiarioIntegrado) throws NominaPuestoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public void obtenerCantidadProducto() {\n \n if (codigoBarra.equals(\"\")) {\n return; //para que nos mantenga siempre en el imput\n }\n\n ProductoDao productoDao = new ProductoDaoImp();\n try {\n //obtenemos la instancia de Producto en Base a su codigo de Barra\n producto = productoDao.obtenerProductoPorCodigoBarra(codigoBarra);\n\n if (producto != null) {\n //Levantamos dialog\n RequestContext.getCurrentInstance().execute(\"PF('dialogCantidadProducto2').show();\");\n } else {\n codigoBarra = \"\";\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Error\", \n \"Producto No encontrado con ese Codigo de Barra\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\r\n public List<QuestaoDiscursiva> consultarTodosQuestaoDiscursiva()\r\n throws Exception {\n return rnQuestaoDiscursiva.consultarTodos();\r\n }", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "@Override\n\tpublic List<EntidadeDominio> PegarCartoesCliente(EntidadeDominio entidade) throws SQLException {\n\t\treturn null;\n\t}", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "@Override\r\n public List<Entradas> consultarEntradasPorCole(Colecciones coleccion){\r\n \tString hql = \"SELECT ent FROM Colecciones col, ColeccionesRss colrss, Entradas ent WHERE \"\r\n \t\t\t+ \" col.codigoCole = colrss.colecciones.codigoCole AND colrss.rss.codigoRss = ent.rss.codigoRss AND \"\r\n \t\t\t+ \" col.codigoCole = \"+coleccion.getCodigoCole();\r\n \tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n \tList<Entradas> lasEntradas = query.list();\r\n \treturn lasEntradas;\r\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Organe> rechercheOrganeBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Organe o WHERE o.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "public java.sql.ResultSet consultaporespecialidadfecha(String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public Cliente[] findWhereNumeroEquals(String numero) throws ClienteDaoException;", "public List<Poteaux> recherchePoteauxBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Poteaux p WHERE p.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "public ArrayList<Ingrediente> buscarTodos() {\n\n\t\tConnection conn = null;\n\t\tResultSet resultSet = null;\n\t\tPreparedStatement stmt = null;\n\t\tconn = getConnection();\n\t\tArrayList<Ingrediente> listaIngredientes = null;\n\n\t\ttry {\n\n\t\t\tstmt = conn\n\t\t\t\t\t.prepareStatement(\"SELECT * FROM IDINGREDIENTE ORDER BY ID\");\n\t\t\tresultSet = stmt.executeQuery();\n\t\t\tlistaIngredientes = new ArrayList<Ingrediente>();\n\t\t\tIngrediente ingrediente = null;\n\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tingrediente = new Ingrediente();\n\t\t\t\tingrediente.setNome(resultSet.getString(\"nome\"));\n\t\t\t\tlistaIngredientes.add(ingrediente);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlistaIngredientes = null;\n\t\t} finally {\n\t\t\tcloseConnection(conn, stmt, resultSet);\n\t\t}\n\t\treturn listaIngredientes;\n\t}", "public SgfensPedidoProducto[] findWhereEstatusEquals(short estatus) throws SgfensPedidoProductoDaoException;", "public List<Garantia> getxEnte(EnteExterno ente ) {\n\t \n\t\t\n\t\tList<Garantia> entities = null; \n\t\t\n Session em =SessionDao.getInstance().getCurrentSession( );\n Transaction tx = null;\n \n try { \n \ttx = em.beginTransaction();\n \tentities = em.createCriteria(Garantia.class).add(Restrictions.eq(\"ente\",ente)).list();\n tx.commit();\n } catch (Exception e) { \n \ttx.rollback();\n \te.printStackTrace();\n } \n return entities; \n\t}", "public java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;", "private boolean existeCondicionTrabajoEspecifico(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\" SELECT * FROM planificacion.det_condicion_trabajo_especif \"\r\n\t\t\t\t+ \" where id_concurso_puesto_agr = \" + concursoPuestoAgr.getIdConcursoPuestoAgr()\r\n\t\t\t\t+ \" and tipo = 'GRUPO' \";\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "public CrGrupoFormulario[] findWhereNombreEquals(String nombre) throws CrGrupoFormularioDaoException;", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public void alertasexistencia() {\r\n try {\r\n rs = modelo.alertaexistenciapro();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel tabla = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(tabla);//C.P.M le mandamos el modelo\r\n modelo.estructuraAlrta(tabla);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de las columnas de la consulta\r\n while (rs.next()) {\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con la cantidad de columnas \r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y agregamos la informacion de la consulta\r\n }\r\n tabla.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio algun error al consultar las alertas\");\r\n }\r\n }", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public List<Eclairage> rechercheEclairageBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Eclairage e WHERE e.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "public Utente[] findWhereFkComuneAziendaEquals(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ? ORDER BY fk_comune_azienda\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "@Override\r\n public List<QuestaoMultiplaEscolha> consultarTodosQuestaoMultiplaEscolha()\r\n throws Exception {\n return rnQuestaoMultiplaEscolha.consultarTodos();\r\n }", "@Override\r\n public Resultado excluir(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"EXCLUIR\");\r\n if (msg.isEmpty()) {\r\n IDAO dao = daos.get(nmClass);\r\n dao.excluir(entidade);\r\n resultado.setMsg(\"Dados excluidos\");\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "public Utente[] findWhereUteCartaTipoEquals(int uteCartaTipo) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_carta_tipo = ? ORDER BY ute_carta_tipo\", new Object[] { new Integer(uteCartaTipo) } );\n\t}", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public List<ReciboPension> buscarRecibosPendientesDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public String[] getEspecialidades() throws SQLException {\n ArrayList<String> especialidades = new ArrayList<>();\n String sql;\n ResultSet resultSet;\n\n sql = \"SELECT nombre \"\n + \"FROM centromedico.especialidad\" + \";\";\n resultSet = conexion.makeQuery(sql);\n\n while (resultSet.next()) {\n especialidades.add(resultSet.getString(\"nombre\"));\n }\n return (String[]) especialidades.toArray();\n }", "public Cliente[] findWhereApellidoPaternoClienteEquals(String apellidoPaternoCliente) throws ClienteDaoException;" ]
[ "0.691811", "0.61743665", "0.61731005", "0.60938585", "0.597939", "0.59228295", "0.59179115", "0.58951944", "0.58618855", "0.5847117", "0.58040446", "0.57778597", "0.5744128", "0.5732734", "0.56573343", "0.5594336", "0.55691195", "0.5559343", "0.54969454", "0.5495836", "0.54739094", "0.54493004", "0.54490185", "0.5420053", "0.5397608", "0.5394457", "0.5389159", "0.53693956", "0.5362972", "0.53583133", "0.535756", "0.5344278", "0.5331573", "0.5327561", "0.5323846", "0.53217036", "0.5286347", "0.5268409", "0.52347267", "0.522759", "0.5210941", "0.52097094", "0.5208996", "0.5201657", "0.52004224", "0.51990867", "0.51983064", "0.51827824", "0.5178523", "0.5167275", "0.5161178", "0.51332676", "0.51282597", "0.51279426", "0.51217586", "0.51041394", "0.51012766", "0.50984097", "0.5089524", "0.50887173", "0.5084255", "0.507958", "0.50729203", "0.50679433", "0.5065325", "0.5055768", "0.5046138", "0.5039741", "0.5032155", "0.50202554", "0.50071365", "0.49934196", "0.49817726", "0.4979606", "0.49746212", "0.49744037", "0.49555", "0.4953307", "0.49532512", "0.49507195", "0.493869", "0.49381664", "0.49366862", "0.49345425", "0.49188426", "0.49165457", "0.49120584", "0.49093288", "0.49087942", "0.49068692", "0.49052113", "0.49029675", "0.49004492", "0.49000493", "0.4897873", "0.48946518", "0.48936644", "0.48894075", "0.48857123", "0.4882071" ]
0.7235258
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'FECHA_ENTREGA = :fechaEntrega'.
public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<FecetProrrogaOrden> findWhereFechaFirmaEquals(Date fechaFirma) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_FIRMA = ? ORDER BY FECHA_FIRMA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaFirma);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public Cliente[] findWhereFechaRegistroEquals(Date fechaRegistro) throws ClienteDaoException;", "public java.sql.ResultSet consultaporespecialidadfecha(String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public Cliente[] findWhereFechaUltimaVisitaEquals(Date fechaUltimaVisita) throws ClienteDaoException;", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public Ruta[] findWhereFhModificaRutaEquals(Date fhModificaRuta) throws RutaDaoException;", "@Override\n\tpublic ArrayList<VOFactura> getAllFacturasByClienteDate(VOCliente cliente,\n\t\t\tCalendar fechaDesde, Calendar fechaHasta) {\n\t\t\n\t\tDBConnection con = null;\n\t\tStatement stm = null;\n\t\tString sql = null;\n\t\tResultSet res = null;\n\t\t\n\t\tVOFactura factura;\n\t\tArrayList<VOFactura> listaFacturas = new ArrayList<VOFactura>();\n\t\t\n\t\tjava.sql.Date sqlDesde = new java.sql.Date(fechaDesde.getTimeInMillis());\n\t\tjava.sql.Date sqlHasta = new java.sql.Date(fechaHasta.getTimeInMillis());\n\t\t\n\t\t try {\n\t\t\tcon = new DBConnection(\"root\",\"walkirias84\");\n\t\t\tstm = con.getConnection().createStatement();\n\t\t\tsql = \"SELECT * FROM factura fac\"+\n\t\t\t\" WHERE fac.facfecha >= '\"+sqlDesde+\"' \"+\n\t\t\t\" AND fac.facfecha < '\"+sqlHasta+\"' \"+\n\t\t\t\" AND fac.cliente_cliid = \"+cliente.getId()+\"\";\n\t\t\tres = stm.executeQuery(sql);\n\n\t\t\tSystem.out.println(\"comparando fechas sql: \"+sql);\n\n\t\t\twhile(res.next()) {\n\t\t\t\tfactura = new VOFactura();\n\t\t\t\tfactura.setId(res.getInt(1));\n\t\t\t\tfactura.setNumero(res.getInt(2));\n\t\t\t\tfactura.setIdCliente(res.getInt(3));\n\t\t\t\tCalendar fecha = Calendar.getInstance();\n\t\t\t\tfecha.setTimeInMillis(res.getDate(4).getTime());\n\t\t\t\tfactura.setFecha(fecha);\n\t\t\t\tfactura.setValorNeto(res.getBigDecimal(5));\n\t\t\t\tfactura.setValorIva(res.getBigDecimal(6));\n\t\t\t\tfactura.setValorTotal(res.getBigDecimal(7));\n\t\t\t\t\n\t\t\t\tlistaFacturas.add(factura);\n\t\t\t}\n\n\t\t\treturn listaFacturas;\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\tSystem.out.println(e);\n\t\t} finally {\n\t if (res != null) try { res.close(); } catch (SQLException logOrIgnore) {}\n\t if (stm != null) try { stm.close(); } catch (SQLException logOrIgnore) {}\n\t if (con != null) try { con.getConnection().close(); } catch (SQLException logOrIgnore) {}\n\t }\n\t\t\n\t\treturn null;\n\t}", "public java.sql.ResultSet consultaporespecialidadhorafecha(String CodigoEspecialidad,String hora,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.horas='\"+hora+\"' and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas \");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadhorafecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Utente[] findWhereFkComuneAziendaEquals(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ? ORDER BY fk_comune_azienda\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "public java.sql.ResultSet consultapormedicoespecialidadfecha(String CodigoMedico,String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pmd.codigo=\"+CodigoMedico+\" and pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicoespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "public java.sql.ResultSet consultaporfecha(String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public boolean esDiaFestivo(int idOrganizacion, Date fecha)\r\n/* 68: */ {\r\n/* 69:74 */ String sql = \"SELECT d FROM DiaFestivo d WHERE d.idOrganizacion=:idOrganizacion AND d.fecha=:fecha AND d.activo = TRUE \";\r\n/* 70:75 */ Query query = this.em.createQuery(sql);\r\n/* 71:76 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 72:77 */ query.setParameter(\"fecha\", fecha, TemporalType.DATE);\r\n/* 73: */ try\r\n/* 74: */ {\r\n/* 75:80 */ query.getSingleResult();\r\n/* 76:81 */ return true;\r\n/* 77: */ }\r\n/* 78: */ catch (NoResultException e) {}\r\n/* 79:83 */ return false;\r\n/* 80: */ }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public Utente[] findWhereUtePivaAziendaEquals(String utePivaAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_piva_azienda = ? ORDER BY ute_piva_azienda\", new Object[] { utePivaAzienda } );\n\t}", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@Override\r\n\tpublic List<Producto> productosMasVendidos(@DateTimeFormat(pattern = \"dd-MM-yyyy\")Date fecha) {\n\t\treturn (List<Producto>)productoFacturaClienteDao.productosMasVendidos(fecha);\r\n\t}", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public java.sql.ResultSet consultaporespecialidadhora(String CodigoEspecialidad,String hora){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.horas='\"+hora+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadhora \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic ArrayList<VOFactura> getAllFacturasByDate(Calendar fechaDesde,\n\t\t\tCalendar fechaHasta) {\n\t\t\n\t\tSystem.out.println(\"@DAOFACTURAS: getallfacturasbydate!\");\n\t\t\n\t\tDBConnection con = null;\n\t\tStatement stm = null;\n\t\tString sql = null;\n\t\tResultSet res = null;\n\t\t\n\t\tVOFactura factura;\n\t\tArrayList<VOFactura> listaFacturas = new ArrayList<VOFactura>();\n\t\t\n\t\tjava.sql.Date sqlDesde = new java.sql.Date(fechaDesde.getTimeInMillis());\n\t\tjava.sql.Date sqlHasta = new java.sql.Date(fechaHasta.getTimeInMillis());\n\t\t\n\t\ttry {\n\t\t\tcon = new DBConnection(\"root\",\"walkirias84\");\n\t\t\tstm = con.getConnection().createStatement();\n\t\t\tsql = \"SELECT * FROM factura fac\"+\n\t\t\t\" WHERE fac.facfecha >= '\"+sqlDesde+\"' \"+\n\t\t\t\" AND fac.facfecha < '\"+sqlHasta+\"' \";\n\t\t\tres = stm.executeQuery(sql);\n\n\t\t\tSystem.out.println(\"comparando fechas sql: \"+sql);\n\t\t\t\n\t\t\twhile(res.next()) {\n\t\t\t\tfactura = new VOFactura();\n\t\t\t\tfactura.setId(res.getInt(1));\n\t\t\t\tfactura.setNumero(res.getInt(2));\n\t\t\t\tfactura.setIdCliente(res.getInt(3));\n\t\t\t\tCalendar fecha = Calendar.getInstance();\n\t\t\t\tfecha.setTimeInMillis(res.getDate(4).getTime());\n\t\t\t\tfactura.setFecha(fecha);\n\t\t\t\tfactura.setValorNeto(res.getBigDecimal(5));\n\t\t\t\tfactura.setValorIva(res.getBigDecimal(6));\n\t\t\t\tfactura.setValorTotal(res.getBigDecimal(7));\n\t\t\t\t\n\t\t\t\tlistaFacturas.add(factura);\n\t\t\t}\n\n\t\t\treturn listaFacturas;\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\tSystem.out.println(e);\n\t\t} finally {\n\t if (res != null) try { res.close(); } catch (SQLException logOrIgnore) {}\n\t if (stm != null) try { stm.close(); } catch (SQLException logOrIgnore) {}\n\t if (con != null) try { con.getConnection().close(); } catch (SQLException logOrIgnore) {}\n\t }\n\t\t\n\t\treturn null;\n\t}", "public List<RecepcionSero> getAllSerologias()throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Date date = new Date();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(date);\n int year = calendar.get(Calendar.YEAR);\n Integer a = year;\n Query query = session.createQuery(\"from RecepcionSero s where year(s.fecreg) =:a order by s.fecreg desc\");\n query.setParameter(\"a\",a);\n return query.list();\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public List<OrdenSalida> findByFechas(Date fechaInicio, Date fechaFin) throws GenericPersistenceEAOException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "@Query(\"FROM Consulta c WHERE c.fecha BETWEEN :fechaConsulta AND :fechaSgte\")\n\tList<Consulta> buscarFecha(@Param(\"fechaConsulta\") LocalDateTime fechaConsulta,@Param(\"fechaSgte\") LocalDateTime fechaSgte);", "public Utente[] findWhereUteDataNascitaEquals(Date uteDataNascita) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_data_nascita = ? ORDER BY ute_data_nascita\", new Object[] { uteDataNascita==null ? null : new java.sql.Date( uteDataNascita.getTime() ) } );\n\t}", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public List<ExistenciaMaq> buscarExistencias(final Long almacenId,final Date fecha);", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "@Override\r\n public Resultado consultar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n // instanciando DAO de acordo com a classe\r\n IDAO dao = daos.get(nmClass);\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"PESQUISAR\");\r\n if (msg.isEmpty()) {\r\n if (dao.consultar(entidade).isEmpty()) {\r\n //caso dados não foram encontrados\r\n resultado.setMsg(\"dados nao encontrados\");\r\n } else {\r\n //caso dados foram encontrados \r\n resultado.setMsg(\"pesquisa feita com sucesso\");\r\n }\r\n resultado.setEntidades(dao.consultar(entidade));\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public Cliente[] findWhereDiasVisitaEquals(String diasVisita) throws ClienteDaoException;", "public List<Empleado> buscarTodos() {\n\t\tList<Empleado> listEmpleados;\n\t\tQuery query = entityManager.createQuery(\"SELECT e FROM Empleado e WHERE estado = true\");\n\t\tlistEmpleados = query.getResultList();\n\t\tIterator iterator = listEmpleados.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\treturn listEmpleados;\n\t}", "public Utente[] findWhereUteTelefonoAziendaEquals(String uteTelefonoAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_telefono_azienda = ? ORDER BY ute_telefono_azienda\", new Object[] { uteTelefonoAzienda } );\n\t}", "@Override\n\tpublic List<EntidadeDominio> PegarCartoesCliente(EntidadeDominio entidade) throws SQLException {\n\t\treturn null;\n\t}", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "public Utente[] findByComuni2(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ?\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\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\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public java.sql.ResultSet consultapormedicofecha(String CodigoMedico,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pmd.codigo=\"+CodigoMedico+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "@GetMapping(\"/aceptada\")\n\tList<ReservasEntity> findByAceptadaTrue() {\n\t\treturn reservaRepo.findByAceptadaTrue();\n\t}", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "public CrGrupoFormulario[] findWhereFechaHrCreacionEquals(Date fechaHrCreacion) throws CrGrupoFormularioDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "public Utente[] findWhereUteAziendaEquals(String uteAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_azienda = ? ORDER BY ute_azienda\", new Object[] { uteAzienda } );\n\t}", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public Ruta[] findWhereFhRegRutaEquals(Date fhRegRuta) throws RutaDaoException;", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "public List<EspecieEntity> encontrarTodos(){\r\n Query todos =em.createQuery(\"select p from EspecieEntity p\");\r\n return todos.getResultList();\r\n }", "@Override\r\n public List<QuestaoDiscursiva> consultarTodosQuestaoDiscursiva()\r\n throws Exception {\n return rnQuestaoDiscursiva.consultarTodos();\r\n }", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public SgfensPedidoProducto[] findWhereEstatusEquals(short estatus) throws SgfensPedidoProductoDaoException;", "public List<Oferta> ofertasEmpresa(int idEmpresa) throws SQLException {\n\t\ttry {\n\t\t\tList<Oferta> lista = new ArrayList<>();\n\n\t\t\tString sql = \"SELECT * FROM ofertas where empresa_id = (?) ORDER BY fecha_registro DESC\";\n\n\t\t\tthis.conectar();\n\n\t\t\tcs = conexion.prepareCall(sql);\n\t\t\tcs.setInt(1, idEmpresa);\n\t\t\trs = cs.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tOferta oferta = new Oferta();\n\t\t\t\toferta.setIdOferta(rs.getInt(\"oferta_id\"));\n\t\t\t\toferta.setTituloOferta(rs.getString(\"titulo\"));\n\t\t\t\toferta.setCantidadCuponesOferta(rs.getInt(\"cantidad_cupones\"));\n\t\t\t\toferta.setDescripcionOferta(rs.getString(\"descripcion\"));\n\t\t\t\toferta.setPrecioRegularOferta(rs.getDouble(\"precio_regular\"));\n\t\t\t\toferta.setPrecio_ofertaOferta(rs.getDouble(\"precio_oferta\"));\n\t\t\t\toferta.setFechaInicioOferta(rs.getDate(\"fecha_inicio\"));\n\t\t\t\toferta.setFechaFinOferta(rs.getDate(\"fecha_fin\"));\n\t\t\t\toferta.setFechaRegistroOferta(rs.getDate(\"fecha_registro\"));\n\t\t\t\toferta.setEstadoOferta(rs.getInt(\"estado\"));\n\n\t\t\t\tlista.add(oferta);\n\t\t\t}\n\n\t\t\tthis.desconectar();\n\n\t\t\treturn lista;\n\t\t} catch (SQLException ex) {\n\t\t\tLogger.getLogger(UsuarioModel.class.getName()).log(Level.SEVERE, null, ex);\n\n\t\t\tthis.desconectar();\n\n\t\t\treturn null;\n\t\t}\n\t}", "public Cliente[] findWhereNombreClienteEquals(String nombreCliente) throws ClienteDaoException;", "@GetMapping(\"/fechas/{fecha}\")\n\tList<ReservasEntity> findByFechaGreaterThan(@PathVariable(\"fecha\") @DateTimeFormat(pattern = \"yyyy-MM-dd HH:mm:ss\") Date fecha) {\n\t\treturn reservaRepo.findByFechaGreaterThan(fecha);\n\t}", "@Query(nativeQuery = true, value = \"select * from vamus.eventos where \" +\n \"ini_evento>=:inicio and fim_evento<=:fim\")\n List<EventoEntity> findByDate(@Param(\"inicio\") LocalDateTime ini,\n @Param(\"fim\") LocalDateTime fim);", "public List<Endereco> findByEntidadeId(Long entidadeId);", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorTarifa(java.math.BigDecimal valorTarifa) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorTarifa = :valorTarifa \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorTarifa\", valorTarifa);\r\n return query.getResultList();\r\n }", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public Ruta[] findWhereIdEmpresaEquals(long idEmpresa) throws RutaDaoException;" ]
[ "0.6972869", "0.6600244", "0.65747815", "0.6399678", "0.6346512", "0.6286421", "0.61950284", "0.6183847", "0.6104801", "0.60448486", "0.60068357", "0.60031474", "0.59421325", "0.5941315", "0.5938322", "0.5930982", "0.592127", "0.5913557", "0.5912031", "0.5903964", "0.5886296", "0.5878023", "0.58679557", "0.5867811", "0.5863298", "0.5850868", "0.58346784", "0.58299816", "0.5824509", "0.58138627", "0.58009446", "0.5795623", "0.57953554", "0.57949114", "0.57837397", "0.57740706", "0.57721996", "0.5769076", "0.5768007", "0.5761805", "0.57495636", "0.5727", "0.5726701", "0.5710829", "0.56989425", "0.5698839", "0.5695781", "0.56879544", "0.5683867", "0.56752574", "0.5669465", "0.5655356", "0.56540745", "0.56536174", "0.5648057", "0.5643729", "0.56330186", "0.5626657", "0.5623376", "0.56188005", "0.5607654", "0.5605022", "0.55982035", "0.55963343", "0.5593378", "0.559043", "0.5587349", "0.5582742", "0.55634975", "0.55540234", "0.5549221", "0.55289775", "0.55217123", "0.55189025", "0.5512611", "0.55121166", "0.5510317", "0.54989684", "0.549817", "0.54981196", "0.5487673", "0.54866785", "0.5486148", "0.5483843", "0.5482658", "0.54750144", "0.54702955", "0.5469569", "0.5465868", "0.546215", "0.5458288", "0.5454578", "0.5453545", "0.5451963", "0.54428464", "0.54379684", "0.543746", "0.54367507", "0.5429883", "0.5427099" ]
0.7803694
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'ESTATUS = :estatus'.
public SgfensPedidoProducto[] findWhereEstatusEquals(short estatus) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public NominaPuesto[] findWhereIdEstatusEquals(int idEstatus) throws NominaPuestoDaoException;", "public SgfensBanco[] findWhereIdEstatusEquals(int idEstatus) throws SgfensBancoDaoException;", "public Cliente[] findWhereIdEstatusEquals(int idEstatus) throws ClienteDaoException;", "public List<Empresatb09EmpresaRegraRenegociacao> buscarPorPessoaStatus(Empresatb01Empresa vo, boolean status) {\n \n StringBuilder query = new StringBuilder();\n Object[] elements = new Object[2];\n\n query.append(\" select c from Empresatb09EmpresaRegraRenegociacao c where c.empresatb01Empresa = ?1 and c.ativo = ?2 \");\n\n elements[0] = vo;\n elements[1] = status;\n\n return super.getListEntity(query.toString(), elements);\n }", "public SmsAgendaGrupo[] findWhereIdEstatusEquals(int idEstatus) throws SmsAgendaGrupoDaoException;", "public List<StatusProveedor> findStatusProveedor() {\n\t\treturn find(StatusProveedor.class,\"from StatusProveedor\");\n\t}", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "List<Servico> findByClienteAndStatus(Usuario cliente, StatusServico statusServico);", "@Override\n\tpublic List<Orders> queryOrderStatus(int status) {\n\t\tQueryRunner qr= new QueryRunner(dataSource);\n\t\tString sql = \"select * from orders where status=?\";\n\t\ttry {\n\t\t\treturn qr.query(sql, new BeanListHandler<Orders>(Orders.class), status);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"根据状态查询订单出错\");\n\t\t}\n\t}", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public void setEstatus(EstatusVigenciaDetalle estatus) {\r\n this.estatus = estatus;\r\n }", "public CrGrupoFormulario[] findWhereIdEstatusEquals(int idEstatus) throws CrGrupoFormularioDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "public List<Empleado> buscarTodos() {\n\t\tList<Empleado> listEmpleados;\n\t\tQuery query = entityManager.createQuery(\"SELECT e FROM Empleado e WHERE estado = true\");\n\t\tlistEmpleados = query.getResultList();\n\t\tIterator iterator = listEmpleados.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\treturn listEmpleados;\n\t}", "public List<EstadoTicket> obtenerTodosLosEstados() {\n return this.estadoTicketFacade.findAll();\n }", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "public List<StatusDefinicao> retornaTodosStatus() throws Exception {\n return new StatusDao().retornaTodosStatus();\n }", "@Override\n\tpublic List<OrderStatus> findAll() throws Exception {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from OrderStatus\").list();\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "@Override\n\tpublic List<Order> findAllOrder(String status, int pageIndex, int pageSize) {\n\t\tList<Order> orderList=new ArrayList<Order>();\n\t\ttry {\n\t\t\tconn=getConn();\n\t\t\tString sql=\"SELECT id,orderNum,`date`,money,(SELECT title FROM code_list WHERE code_list.id=codeId ) AS title,(SELECT `name` FROM user_list WHERE user_list.id=userId ) AS userName,`status`FROM `order` \";\n\t\t\tif(status.equals(\"0\")){//待付款\n\t\t\t\tsql+=\" WHERE STATUS=0 ORDER BY `date` DESC\";\n\t\t\t}else if(status.equals(\"1\")){//成功\n\t\t\t\tsql+=\" WHERE STATUS=1 ORDER BY `date` DESC\";\n\t\t\t}else if(status.equals(\"2\")){//取消\n\t\t\t\tsql+=\" WHERE STATUS=2 ORDER BY `date` DESC\";\n\t\t\t}else{\n\t\t\t\tsql+=\" ORDER BY `date` DESC\";\n\t\t\t}\n\t\t\tsql+=\" LIMIT ?,?\";\n\t\t\tps=conn.prepareStatement(sql);\n\t\t\t//设置参数\n\t\t\tps.setInt(1, (pageIndex-1)*pageSize);\n\t\t\tps.setInt(2, pageSize);\n\t\t\t\n\t\t\trs=ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tOrder order=new Order();\n\t\t\t\torder.setId(rs.getInt(\"id\"));\n\t\t\t\torder.setOrderNum(rs.getString(\"orderNum\"));\n\t\t\t\torder.setDate(rs.getDate(\"date\"));\n\t\t\t\torder.setMoney(rs.getFloat(\"money\"));\n\t\t\t\torder.setTitle(rs.getString(\"title\"));\n\t\t\t\torder.setUserName(rs.getString(\"userName\"));\n\t\t\t\torder.setStatus(rs.getInt(\"status\"));\n\t\t\t\torderList.add(order);\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}finally{\n\t\t\tcloseAll(conn, ps, rs);\n\t\t}\n\t\treturn orderList;\n\t}", "public void obtenerHistoricoEstatusCliente(Cliente cliente)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerHistoricoEstatusCliente(\"\n +\"Cliente cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT ESTA_OID_ESTA_CLIE, OID_HIST_ESTA, \");\n query.append(\" PERD_OID_PERI, \");\n query.append(\" PERD_OID_PERI_PERI_FIN, \");\n query.append(\" PED.FEC_INIC as PED_FEC_INIC, \");\n query.append(\" PED.FEC_FINA as PED_FEC_FINA, \");\n query.append(\" PED.MARC_OID_MARC as PED_MARC_OID_MARC, \");\n query.append(\" PED.CANA_OID_CANA as PED_CANA_OID_CANA, \");\n query.append(\" PED.PAIS_OID_PAIS as PED_PAIS_OID_PAIS, \");\n query.append(\" PCD.COD_PERI as PCD_COD_PERI, \");\n query.append(\" PEH.FEC_INIC as PEH_FEC_INIC, \");\n query.append(\" PEH.FEC_FINA as PEH_FEC_FINA, \");\n query.append(\" PEH.MARC_OID_MARC as PEH_MARC_OID_MARC, \");\n query.append(\" PEH.CANA_OID_CANA as PEH_CANA_OID_CANA, \");\n query.append(\" PEH.PAIS_OID_PAIS as PEH_PAIS_OID_PAIS, \");\n query.append(\" PCH.COD_PERI as PCH_COD_PERI \");\n query.append(\" FROM MAE_CLIEN_HISTO_ESTAT, \");\n query.append(\" CRA_PERIO PED, \");\n query.append(\" SEG_PERIO_CORPO PCD, \");\n query.append(\" CRA_PERIO PEH, \");\n query.append(\" SEG_PERIO_CORPO PCH \");\n query.append(\" WHERE PERD_OID_PERI = PED.OID_PERI \");\n query.append(\" AND PED.PERI_OID_PERI = PCD.OID_PERI \");\n query.append(\" AND PERD_OID_PERI_PERI_FIN = PEH.OID_PERI(+) \");\n query.append(\" AND PEH.PERI_OID_PERI = PCH.OID_PERI(+) \");\n query.append(\" AND CLIE_OID_CLIE = \").append(cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\" obtenerHistoricoEstatusCliente respuesta \" + respuesta); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setHistoricoEstatusCliente(new HistoricoEstatusCliente[0]);\n } else {\n HistoricoEstatusCliente[] historico = new HistoricoEstatusCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Pongo un historico\");\n\n Periodo periodoDesde = new Periodo();\n periodoDesde.setOidPeriodo(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PERD_OID_PERI\")).longValue()));\n periodoDesde.setFechaDesde((Date) respuesta\n .getValueAt(i, \"PED_FEC_INIC\"));\n periodoDesde.setFechaHasta((Date) respuesta\n .getValueAt(i, \"PED_FEC_FINA\"));\n periodoDesde.setOidMarca(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_MARC_OID_MARC\")).longValue()));\n periodoDesde.setOidCanal(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_CANA_OID_CANA\")).longValue()));\n periodoDesde.setOidPais(new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PED_PAIS_OID_PAIS\")).longValue()));\n periodoDesde.setCodperiodo((String) respuesta\n .getValueAt(i, \"PCD_COD_PERI\"));\n\n Periodo periodoHasta;\n BigDecimal periodoFin = (BigDecimal) respuesta\n .getValueAt(i, \"PERD_OID_PERI_PERI_FIN\");\n\n if (periodoFin == null) {\n periodoHasta = null;\n } else {\n periodoHasta = new Periodo();\n periodoHasta.setOidPeriodo(new Long(periodoFin\n .longValue()));\n periodoHasta.setFechaDesde((Date) respuesta\n .getValueAt(i, \"PEH_FEC_INIC\"));\n periodoHasta.setFechaHasta((Date) respuesta\n .getValueAt(i, \"PEH_FEC_FINA\"));\n periodoHasta.setOidMarca((respuesta\n .getValueAt(i, \"PEH_MARC_OID_MARC\") != null)\n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_MARC_OID_MARC\")).longValue()) \n : null);\n periodoHasta.setOidCanal((respuesta\n .getValueAt(i, \"PEH_CANA_OID_CANA\") != null) \n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_CANA_OID_CANA\")).longValue()) \n : null);\n periodoHasta.setOidPais((respuesta\n .getValueAt(i, \"PEH_PAIS_OID_PAIS\") != null)\n ? new Long(((BigDecimal) respuesta\n .getValueAt(i, \"PEH_PAIS_OID_PAIS\")).longValue()) \n : null);\n periodoHasta.setCodperiodo((String) respuesta\n .getValueAt(i, \"PCH_COD_PERI\"));\n }\n\n historico[i] = new HistoricoEstatusCliente();\n historico[i].setOidEstatus(respuesta.getValueAt(i, \"ESTA_OID_ESTA_CLIE\")==null?null:\n new Long(((BigDecimal) respuesta.getValueAt(i, \"ESTA_OID_ESTA_CLIE\")).longValue()));\n historico[i].setPeriodoInicio(periodoDesde);\n historico[i].setPeriodoFin(periodoHasta);\n \n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Pongo un historico historico[i].setOidEs\"\n +\"tatus \" + historico[i].getOidEstatus());\n UtilidadesLog.debug(\"Pongo un historico historico[i].setPerio\"\n +\"doInicio \" + historico[i].getPeriodoInicio());\n UtilidadesLog.debug(\"Pongo un historico historico[i].setPerio\"\n +\"doFin \" + historico[i].getPeriodoFin());\n } \n }\n\n cliente.setHistoricoEstatusCliente(historico);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerHistoricoEstatusCliente(\"\n +\"Cliente cliente):Salida\");\n }", "public static List<CentroDeCusto> readAllAtivos() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto WHERE status = 'A'\");\n return query.list();\n }", "@GetMapping(\"/aceptada\")\n\tList<ReservasEntity> findByAceptadaTrue() {\n\t\treturn reservaRepo.findByAceptadaTrue();\n\t}", "@Override\r\n\tpublic List<EstadoDTO> listaEstados() throws Exception {\n\t\treturn objDAO.listaEstados();\r\n\t}", "Integer obtenerEstatusPolizaGeneral(int idEstatusPolizaPago);", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public Collection findAllByEstabliment(Long idEstabliment, Boolean valid) {\r\n\t\tCollection col;\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"findAllByEstabliment ini\");\r\n\t\t\tString q = \"from PartidaOli as par where 1 = 1 \";\r\n\t\t\tif (valid != null && valid.booleanValue()) q += \"and par.esActiu = true \";\r\n\t\t\tif (valid != null && !valid.booleanValue()) q += \"and par.esActiu = false \";\r\n\t\t\tif(idEstabliment != null) q += \"and par.establiment.id = \" + idEstabliment + \" \";\r\n\t\t\tq += \"order by par.nom\";\r\n\t\t\tcol = getHibernateTemplate().find(q);\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"findAllByEstabliment failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"findAllByEstabliment fin\");\r\n\t\treturn col;\r\n\t}", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "@Override\r\n\t@Transactional\r\n\tpublic List<eventuales> findBytipoEventuales(int tipo) {\n\t\treturn dao.findBytipoEventuales(tipo);\r\n\t}", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public ArrayList<EstacionServicio> getListadoEstacionServicio() throws Exception {\n\t\t\t\n\t\t\t\tConnection conn = ds.getConnection();\n\t\t\t\tArrayList<EstacionServicio> lista = new ArrayList<EstacionServicio>();\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM ESTACION_SERVICIO\");\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tlista.add (new EstacionServicio(rs.getInt(1),rs.getString(2),rs.getDate(3),rs.getFloat(4),rs.getFloat(5),rs.getString(6)));\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\trs.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn lista;\n\t\t\t}", "public EstatusVigenciaDetalle getEstatus() {\r\n return estatus;\r\n }", "List<Order> getOrderListByStatus(OrderStatusEnum orderStatus) throws ServiceException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }", "public ArrayList<FormularioServ> listaFServActivos(){\n\t\tArrayList<FormularioServ> listFServ = new ArrayList<FormularioServ>();\n\t\ttry{\n\t\t\tc = PoolConexion.getConnection();\n\t\t\tps = c.prepareStatement(\"select * from public.\\\"formularioServ\\\" where estado<>3\", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tFormularioServ Fserv = new FormularioServ();\n\t\t\t\tFserv.setIdFormulario(rs.getInt(\"idFormulario\"));\n\t\t\t\tFserv.setIdServ(rs.getInt(\"idServ\"));\n\t\t\t\tFserv.setNombreUsuario(rs.getString(\"nombreUsuario\"));\n\t\t\t\tFserv.setEmail(rs.getString(\"email\"));\n\t\t\t\tFserv.setCuerpoEmail(rs.getString(\"cuerpoEmail\"));\n\t\t\t\tFserv.setNumerotelefono(rs.getString(\"numerotelefono\"));\n\t\t\t\tFserv.setfCreacion(rs.getTimestamp(\"fcreacion\"));\n\t\t\t\tFserv.setEstado(rs.getInt(\"estado\"));\n\t\t\t\t\n\t\t\t\tlistFServ.add(Fserv);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"DATOS: ERROR EN LISTAR Formularios \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tif(rs != null){\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null){\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(c != null){\n\t\t\t\t\tPoolConexion.closeConnection(c);\n\t\t\t\t}\n\t\t\t\t\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}\n\t\t\t\n\t\t}\n\t\treturn listFServ;\n\t}", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public java.util.List<Todo> findByG_S(long groupId, int status);", "List<Status> getStatusAlteraveis() throws ServiceException;", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "public void setEstatus(String estatus) {\r\n this.estatus = estatus;\r\n }", "public List<Evento> listarEventos() throws Exception{\n\t\t// Hibernate.initialize(listaEspecialidades());\n\t\treturn super.findListByQueryDinamica(\" from Evento\");\n\t}", "public List<Status> selectAllStatuts(){\n\treturn statusDao.findAll();\n\t}", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public void alertasexistencia() {\r\n try {\r\n rs = modelo.alertaexistenciapro();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel tabla = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(tabla);//C.P.M le mandamos el modelo\r\n modelo.estructuraAlrta(tabla);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de las columnas de la consulta\r\n while (rs.next()) {\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con la cantidad de columnas \r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y agregamos la informacion de la consulta\r\n }\r\n tabla.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio algun error al consultar las alertas\");\r\n }\r\n }", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "@Override\r\n\tpublic List<Map<String, String>> selectStockResult(OrderSearchVO osVO) {\n\t\treturn getSqlSession().selectList(namespace+\".selectStockResult\", osVO);\r\n\t}", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public DTOUnidadAdministrativa obtenerUAActiva(Long oidCliente, Long oidPeriodo) throws MareException {\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Entrada\"); \n BelcorpService bs;\n RecordSet resultado = new RecordSet();\n bs = UtilidadesEJB.getBelcorpService();\n\n DTOUnidadAdministrativa dtoS = new DTOUnidadAdministrativa();\n\n StringBuffer query = new StringBuffer();\n\n try {\n query.append(\" SELECT distinct sub.PAIS_OID_PAIS, sub.MARC_OID_MARC, sub.CANA_OID_CANA, OID_SUBG_VENT, \");\n query.append(\" OID_REGI, OID_ZONA, OID_SECC, TERR_OID_TERR, t.COD_NSE1, t.COD_NSE2, t.COD_NSE3, \");\n query.append(\" OID_TERR_ADMI, pi.FEC_INIC, unid.PERD_OID_PERI_INI, unid.PERD_OID_PERI_FIN \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN unid, \");\n query.append(\" ZON_TERRI_ADMIN tadm, \");\n query.append(\" \t ZON_TERRI t, \");\n query.append(\" \t ZON_SECCI, \");\n query.append(\" \t ZON_ZONA, \");\n query.append(\" \t ZON_REGIO, \");\n query.append(\" \t ZON_SUB_GEREN_VENTA sub, \");\n query.append(\" CRA_PERIO pi, \");\n query.append(\" \t CRA_PERIO pi2 \");\n query.append(\" WHERE unid.CLIE_OID_CLIE = \" + oidCliente);\n query.append(\" AND unid.IND_ACTI = 1 \"); // Unidad Administrativa \"Activa\" \n query.append(\" AND unid.PERD_OID_PERI_INI = pi.OID_PERI \");\n query.append(\" AND pi.FEC_INIC <= (SELECT FEC_INIC FROM CRA_PERIO WHERE OID_PERI = \" + oidPeriodo + \")\");\n query.append(\" AND ((unid.PERD_OID_PERI_FIN = pi2.OID_PERI \");\n query.append(\" AND pi2.FEC_FINA >= (SELECT FEC_FINA FROM CRA_PERIO WHERE OID_PERI = \" + oidPeriodo + \") )\");\n query.append(\" OR unid.PERD_OID_PERI_FIN is NULL) \");\n query.append(\" AND ZTAD_OID_TERR_ADMI = OID_TERR_ADMI \");\n query.append(\" AND TERR_OID_TERR = OID_TERR \");\n query.append(\" AND ZSCC_OID_SECC = OID_SECC \");\n query.append(\" AND ZZON_OID_ZONA = OID_ZONA \");\n query.append(\" AND ZORG_OID_REGI = OID_REGI \");\n query.append(\" AND ZSGV_OID_SUBG_VENT = OID_SUBG_VENT \"); \n query.append(\" order by pi.FEC_INIC desc \");\n\n bs = BelcorpService.getInstance();\n resultado = bs.dbService.executeStaticQuery(query.toString());\n } catch (Exception e) {\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n if (resultado.esVacio()) {\n UtilidadesLog.debug(\"...no hay registros de obtenerUAActiva\");\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Salida\"); \n return null;\n } else {\n UtilidadesLog.debug(\"...resultado de obtenerUAActiva es: \" + resultado);\n dtoS.setNSE1(objToString(resultado.getValueAt(0, \"COD_NSE1\")));\n dtoS.setNSE2(objToString(resultado.getValueAt(0, \"COD_NSE2\")));\n dtoS.setNSE3(objToString(resultado.getValueAt(0, \"COD_NSE3\")));\n dtoS.setOidCanal(objToLong(resultado.getValueAt(0, \"CANA_OID_CANA\")));\n dtoS.setOidMarca(objToLong(resultado.getValueAt(0, \"MARC_OID_MARC\")));\n dtoS.setOidPais(objToLong(resultado.getValueAt(0, \"PAIS_OID_PAIS\")));\n dtoS.setOidRegion(objToLong(resultado.getValueAt(0, \"OID_REGI\")));\n dtoS.setOidSeccion(objToLong(resultado.getValueAt(0, \"OID_SECC\")));\n dtoS.setOidSGV(objToLong(resultado.getValueAt(0, \"OID_SUBG_VENT\")));\n dtoS.setOidTerritorio(objToLong(resultado.getValueAt(0, \"TERR_OID_TERR\")));\n dtoS.setOidTerritorioAdministrativo(objToLong(resultado.getValueAt(0, \"OID_TERR_ADMI\")));\n dtoS.setOidZona(objToLong(resultado.getValueAt(0, \"OID_ZONA\")));\n \n dtoS.setOidCliente(oidCliente);\n UtilidadesLog.info(\"DAOMAEMaestroClientes.obtenerUAActiva(Long oidCliente, Long oidPeriodo): Salida\"); \n return dtoS;\n }\n }", "@Override\r\n\tpublic List<Applier> retrieveApplierByStatus(String status) {\n\t\treturn em.createQuery(\"Select a from Applier a where a.status like '\" + status + \"'\").getResultList();\r\n\t}", "List<ApparelProductModel> getProductsWithStatus(CatalogVersionModel catalogVersion, ArticleApprovalStatus productStatus);", "public void setNombreEstatusObjeto(String nombreEstatusObjeto) {\r\n\t\tthis.nombreEstatusObjeto = nombreEstatusObjeto;\r\n\t}", "private ArrayList<String[]> getTodasOS() {\n ArrayList <OrdemServico> os = new OS_Controller(this).buscarTodasOrdemServicos();\n\n ArrayList<String[]> rows = new ArrayList<>();\n ArrayList<OrdemServico> ordemServicos=new ArrayList<>();\n\n for (OrdemServico ordemServico :os){\n String id = String.valueOf(ordemServico.getId());\n String numero = ordemServico.getNumero_ordem_servico();\n String cliente = ordemServico.getCliente().getNome();\n SimpleDateFormat formato = new SimpleDateFormat(\"dd-MM-yyyy\");\n String dataEntrada = formato.format(ordemServico.getData_entrada());\n String status = ordemServico.getStatus_celular();\n String tecnico = ordemServico.getTecnico_responsavel();\n String precoFinal = ordemServico.getValor_final();\n String marca = ordemServico.getMarca();\n String modelo = ordemServico.getModelo();\n\n rows.add(new String[]{id,numero,dataEntrada, marca, modelo,cliente,status,tecnico, precoFinal});\n ordemServicos.add(ordemServico);\n }\n //String cliente = String.valueOf(os.getCliente());\n return rows;\n\n }", "public java.util.List<DataEntry> findByStatus(int status);", "public java.util.List<Todo> filterFindByG_S(long groupId, int status);", "public String getNombreEstatusObjeto() {\r\n\t\treturn nombreEstatusObjeto;\r\n\t}", "@Override\n\tpublic List<ServiceFee> getAllServiceByStatus() {\n\t\treturn servicefeerepo.getAllServiceByStatus();\n\t}", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\r\n\t@Transactional\r\n\tpublic List<eventuales> findBytipo(int tipo) {\n\t\treturn (List<eventuales>) dao.findBytipo(tipo);\r\n\t}", "public List<InsumoPedidoProveedorDAO> listarInsumosPedidos(){\n ArrayList<InsumoPedidoProveedorDAO> insumos_pedidos_proveedor = new ArrayList<InsumoPedidoProveedorDAO>();\n List<InsumoPedido> insumos_pedidos = this.procedureQueryPedido.listarInsumosPedidos();\n \n for (int i = 0; i< insumos_pedidos.size();i++){\n InsumoPedidoProveedorDAO ins = new InsumoPedidoProveedorDAO();\n ins.setInsumoPedido(insumos_pedidos.get(i));\n Insumo insumo = new Insumo();\n insumo = insumoService.retornarInsumoById(insumos_pedidos.get(i).getIdInsumo().getIdInsumo());\n ins.setInsumo(insumo);\n ins.setProveedores(this.procedureQueryPedido.listarProveedoresConInsumoPedido(BigInteger.valueOf(insumo.getIdInsumo())));\n insumos_pedidos_proveedor.add(ins);\n }\n return insumos_pedidos_proveedor;\n //return this.insumoPedidoDao.findAll();\n }", "public Collection<OsAtividadeMaterialExecucao> obterOsAtividadeMaterialExecucaoPorOS(Integer idOS) throws ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsAtividadeMaterialExecucao> colecaoOsAtividadeMaterialExecucao = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\t\t\tconsulta = \"SELECT osame.id, \" // 0\n\t\t\t\t\t\t\t+ \" osame.quantidadeMaterial, \" // 1\n\t\t\t\t\t\t\t+ \" a.id, \" // 2\n\t\t\t\t\t\t\t+ \" a.descricao, \" // 3\n\t\t\t\t\t\t\t+ \" m.id, \" // 4\n\t\t\t\t\t\t\t+ \" m.descricao, \" // 5\n\t\t\t\t\t\t\t+ \" mu.id, \" // 6\n\t\t\t\t\t\t\t+ \" mu.descricao \" // 7\n\t\t\t\t\t\t\t+ \"FROM OsAtividadeMaterialExecucao osame \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osame.material m \"\n\t\t\t\t\t\t\t+ \"INNER JOIN m.materialUnidade mu \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osame.ordemServicoAtividade osa \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osa.atividade a \" + \"INNER JOIN osa.ordemServico os \"\n\t\t\t\t\t\t\t+ \"WHERE os.id = :idOS \"\n\t\t\t\t\t\t\t+ \"ORDER BY a.descricao \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idOS\", idOS).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\t\t\t\tOsAtividadeMaterialExecucao osAtividadeMaterialExecucao = null;\n\t\t\t\tfor(Object[] execucao : retornoConsulta){\n\t\t\t\t\tosAtividadeMaterialExecucao = new OsAtividadeMaterialExecucao();\n\t\t\t\t\tosAtividadeMaterialExecucao.setId((Integer) execucao[0]);\n\t\t\t\t\tosAtividadeMaterialExecucao.setQuantidadeMaterial((BigDecimal) execucao[1]);\n\t\t\t\t\tOrdemServicoAtividade ordemServicoAtividade = new OrdemServicoAtividade();\n\t\t\t\t\tAtividade atividade = new Atividade();\n\t\t\t\t\tatividade.setId((Integer) execucao[2]);\n\t\t\t\t\tatividade.setDescricao((String) execucao[3]);\n\t\t\t\t\tordemServicoAtividade.setAtividade(atividade);\n\t\t\t\t\tOrdemServico ordemServico = new OrdemServico();\n\t\t\t\t\tordemServico.setId(idOS);\n\t\t\t\t\tordemServicoAtividade.setOrdemServico(ordemServico);\n\t\t\t\t\tosAtividadeMaterialExecucao.setOrdemServicoAtividade(ordemServicoAtividade);\n\t\t\t\t\tMaterial material = new Material();\n\t\t\t\t\tmaterial.setId((Integer) execucao[4]);\n\t\t\t\t\tmaterial.setDescricao((String) execucao[5]);\n\t\t\t\t\tosAtividadeMaterialExecucao.setMaterial(material);\n\t\t\t\t\tMaterialUnidade materialUnidade = new MaterialUnidade();\n\t\t\t\t\tmaterialUnidade.setId((Integer) execucao[6]);\n\t\t\t\t\tmaterialUnidade.setDescricao((String) execucao[7]);\n\t\t\t\t\tmaterial.setMaterialUnidade(materialUnidade);\n\t\t\t\t\tcolecaoOsAtividadeMaterialExecucao.add(osAtividadeMaterialExecucao);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn colecaoOsAtividadeMaterialExecucao;\n\t}", "public ArrayList<Reserva> getReservaByUsuarioOperador(Long codigo, Long opID) throws Exception {\n\t\t\tArrayList<Reserva> respu = new ArrayList<>();\n\t\t\tDAOReserva daoReserva = new DAOReserva();\n\t\t\ttry \n\t\t\t{\n\t\t\t\tthis.conn = darConexion();\n\t\t\t\tdaoReserva.setConn(conn);\n\t\t\t\trespu = daoReserva.findReservaByUsuarioOperador(codigo, opID);\n\n\t\t\t} \n\t\t\tcatch (SQLException sqlException) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\t\tsqlException.printStackTrace();\n\t\t\t\tthrow sqlException;\n\t\t\t} \n\t\t\tcatch (Exception exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t} \n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tdaoReserva.cerrarRecursos();\n\t\t\t\t\tif(this.conn!=null){\n\t\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (SQLException exception) {\n\t\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn respu;\n\t\t}", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public Collection<OsAtividadeMaterialExecucao> obterOsAtividadeMaterialExecucaoPorOS(Integer idOS, Integer idAtividade)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsAtividadeMaterialExecucao> colecaoOsAtividadeMaterialExecucao = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\t\t\tconsulta = \"SELECT osame.id, \" // 0\n\t\t\t\t\t\t\t+ \" osame.quantidadeMaterial, \" // 1\n\t\t\t\t\t\t\t+ \" a.id, \" // 2\n\t\t\t\t\t\t\t+ \" a.descricao, \" // 3\n\t\t\t\t\t\t\t+ \" m.id, \" // 4\n\t\t\t\t\t\t\t+ \" m.descricao, \" // 5\n\t\t\t\t\t\t\t+ \" mu.id, \" // 6\n\t\t\t\t\t\t\t+ \" mu.descricao, \" // 7\n\t\t\t\t\t\t\t+ \" osame.valorMaterial \" // 8\n\t\t\t\t\t\t\t+ \"FROM OsAtividadeMaterialExecucao osame \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osame.material m \"\n\t\t\t\t\t\t\t+ \"INNER JOIN m.materialUnidade mu \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osame.ordemServicoAtividade osa \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osa.atividade a \" + \"INNER JOIN osa.ordemServico os \"\n\t\t\t\t\t\t\t+ \"WHERE os.id = :idOS \"\n\t\t\t\t\t\t\t+ \" and a.id = :idAtividade \" + \"ORDER BY a.descricao \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idOS\", idOS)\n\t\t\t\t\t\t\t.setInteger(\"idAtividade\", idAtividade).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\t\t\t\tOsAtividadeMaterialExecucao osAtividadeMaterialExecucao = null;\n\t\t\t\tfor(Object[] execucao : retornoConsulta){\n\t\t\t\t\tosAtividadeMaterialExecucao = new OsAtividadeMaterialExecucao();\n\t\t\t\t\tosAtividadeMaterialExecucao.setId((Integer) execucao[0]);\n\t\t\t\t\tosAtividadeMaterialExecucao.setQuantidadeMaterial((BigDecimal) execucao[1]);\n\t\t\t\t\tOrdemServicoAtividade ordemServicoAtividade = new OrdemServicoAtividade();\n\t\t\t\t\tAtividade atividade = new Atividade();\n\t\t\t\t\tatividade.setId((Integer) execucao[2]);\n\t\t\t\t\tatividade.setDescricao((String) execucao[3]);\n\t\t\t\t\tordemServicoAtividade.setAtividade(atividade);\n\t\t\t\t\tOrdemServico ordemServico = new OrdemServico();\n\t\t\t\t\tordemServico.setId(idOS);\n\t\t\t\t\tordemServicoAtividade.setOrdemServico(ordemServico);\n\t\t\t\t\tosAtividadeMaterialExecucao.setOrdemServicoAtividade(ordemServicoAtividade);\n\t\t\t\t\tMaterial material = new Material();\n\t\t\t\t\tmaterial.setId((Integer) execucao[4]);\n\t\t\t\t\tmaterial.setDescricao((String) execucao[5]);\n\t\t\t\t\tosAtividadeMaterialExecucao.setMaterial(material);\n\t\t\t\t\tosAtividadeMaterialExecucao.setValorMaterial((BigDecimal) execucao[8]);\n\t\t\t\t\tMaterialUnidade materialUnidade = new MaterialUnidade();\n\t\t\t\t\tmaterialUnidade.setId((Integer) execucao[6]);\n\t\t\t\t\tmaterialUnidade.setDescricao((String) execucao[7]);\n\t\t\t\t\tmaterial.setMaterialUnidade(materialUnidade);\n\t\t\t\t\tcolecaoOsAtividadeMaterialExecucao.add(osAtividadeMaterialExecucao);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsAtividadeMaterialExecucao;\n\t}", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public Collection<OsExecucaoEquipe> obterOsExecucaoEquipePorOS(Integer idOS) throws ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsExecucaoEquipe> colecaoOsExecucaoEquipe = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\t\t\tconsulta = \"SELECT DISTINCT osape.id, \" // 0\n\t\t\t\t\t\t\t+ \" osape.dataInicio, \" // 1\n\t\t\t\t\t\t\t+ \" osape.dataFim, \" // 2\n\t\t\t\t\t\t\t+ \" a.id, \" // 3\n\t\t\t\t\t\t\t+ \" a.descricao, \" // 4\n\t\t\t\t\t\t\t+ \" e.id, \" // 5\n\t\t\t\t\t\t\t+ \" e.nome \" // 6\n\t\t\t\t\t\t\t+ \"FROM OsExecucaoEquipe osee \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.equipe e \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.osAtividadePeriodoExecucao osape \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osape.ordemServicoAtividade osa \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osa.atividade a \" + \"INNER JOIN osa.ordemServico os \"\n\t\t\t\t\t\t\t+ \"WHERE os.id = :idOS \"\n\t\t\t\t\t\t\t+ \"ORDER BY a.descricao \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idOS\", idOS).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\t\t\t\tOsExecucaoEquipe osExecucaoEquipe = null;\n\t\t\t\tfor(Object[] periodo : retornoConsulta){\n\t\t\t\t\tosExecucaoEquipe = new OsExecucaoEquipe();\n\t\t\t\t\tEquipe equipe = new Equipe();\n\t\t\t\t\tequipe.setId((Integer) periodo[5]);\n\t\t\t\t\tequipe.setNome((String) periodo[6]);\n\t\t\t\t\tosExecucaoEquipe.setEquipe(equipe);\n\t\t\t\t\tOsAtividadePeriodoExecucao osAtividadePeriodoExecucao = new OsAtividadePeriodoExecucao();\n\t\t\t\t\tosAtividadePeriodoExecucao.setId((Integer) periodo[0]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataInicio((Date) periodo[1]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataFim((Date) periodo[2]);\n\t\t\t\t\tOrdemServicoAtividade ordemServicoAtividade = new OrdemServicoAtividade();\n\t\t\t\t\tAtividade atividade = new Atividade();\n\t\t\t\t\tatividade.setId((Integer) periodo[3]);\n\t\t\t\t\tatividade.setDescricao((String) periodo[4]);\n\t\t\t\t\tordemServicoAtividade.setAtividade(atividade);\n\t\t\t\t\tOrdemServico ordemServico = new OrdemServico();\n\t\t\t\t\tordemServico.setId(idOS);\n\t\t\t\t\tordemServicoAtividade.setOrdemServico(ordemServico);\n\t\t\t\t\tosAtividadePeriodoExecucao.setOrdemServicoAtividade(ordemServicoAtividade);\n\t\t\t\t\tosExecucaoEquipe.setOsAtividadePeriodoExecucao(osAtividadePeriodoExecucao);\n\t\t\t\t\tcolecaoOsExecucaoEquipe.add(osExecucaoEquipe);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsExecucaoEquipe;\n\t}", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public List<Usuarios> findAllActive() throws javax.persistence.NoResultException {\r\n return EM.createNamedQuery(Usuarios.FIND_ALL_ACTIVE_USUARIOS)\r\n .setParameter(\"p2\", Estados.ACTIVO)\r\n .getResultList();\r\n }", "@GET\n\t\t\t@Path(\"/filter\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getEquipserviceRowsByFilter() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new EquipserviceDao(uriInfo,header).getEquipserviceByFilter();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getEquipserviceRowsByFilter()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "public List<Batiment> rechercheBatimentEntreprise(int numE){\n\t\tList<Batiment> bat=(List <Batiment>) em.createQuery(\"from Batiment b where b.entreprise.numero=\"+numE).getResultList();\n\t\treturn bat;\n\t}", "public Collection<OsExecucaoEquipe> obterOsExecucaoEquipePorOS(Integer idOS, Integer idAtividade) throws ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsExecucaoEquipe> colecaoOsExecucaoEquipe = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\t\t\tconsulta = \"SELECT osape.id, \" // 0\n\t\t\t\t\t\t\t+ \" osape.dataInicio, \" // 1\n\t\t\t\t\t\t\t+ \" osape.dataFim, \" // 2\n\t\t\t\t\t\t\t+ \" a.id, \" // 3\n\t\t\t\t\t\t\t+ \" a.descricao, \" // 4\n\t\t\t\t\t\t\t+ \" e.id, \" // 5\n\t\t\t\t\t\t\t+ \" e.nome, \" // 6\n\t\t\t\t\t\t\t+ \" osape.valorAtividadePeriodo \" // 7\n\t\t\t\t\t\t\t+ \"FROM OsExecucaoEquipe osee \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.equipe e \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osee.osAtividadePeriodoExecucao osape \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osape.ordemServicoAtividade osa \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osa.atividade a \" + \"INNER JOIN osa.ordemServico os \"\n\t\t\t\t\t\t\t+ \"WHERE os.id = :idOS \"\n\t\t\t\t\t\t\t+ \" and a.id = :idAtividade \" + \"ORDER BY a.descricao \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idOS\", idOS)\n\t\t\t\t\t\t\t.setInteger(\"idAtividade\", idAtividade).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\t\t\t\tOsExecucaoEquipe osExecucaoEquipe = null;\n\t\t\t\tfor(Object[] periodo : retornoConsulta){\n\t\t\t\t\tosExecucaoEquipe = new OsExecucaoEquipe();\n\t\t\t\t\tEquipe equipe = new Equipe();\n\t\t\t\t\tequipe.setId((Integer) periodo[5]);\n\t\t\t\t\tequipe.setNome((String) periodo[6]);\n\t\t\t\t\tosExecucaoEquipe.setEquipe(equipe);\n\t\t\t\t\tOsAtividadePeriodoExecucao osAtividadePeriodoExecucao = new OsAtividadePeriodoExecucao();\n\t\t\t\t\tosAtividadePeriodoExecucao.setId((Integer) periodo[0]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataInicio((Date) periodo[1]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataFim((Date) periodo[2]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setValorAtividadePeriodo((BigDecimal) periodo[7]);\n\t\t\t\t\tOrdemServicoAtividade ordemServicoAtividade = new OrdemServicoAtividade();\n\t\t\t\t\tAtividade atividade = new Atividade();\n\t\t\t\t\tatividade.setId((Integer) periodo[3]);\n\t\t\t\t\tatividade.setDescricao((String) periodo[4]);\n\t\t\t\t\tordemServicoAtividade.setAtividade(atividade);\n\t\t\t\t\tOrdemServico ordemServico = new OrdemServico();\n\t\t\t\t\tordemServico.setId(idOS);\n\t\t\t\t\tordemServicoAtividade.setOrdemServico(ordemServico);\n\t\t\t\t\tosAtividadePeriodoExecucao.setOrdemServicoAtividade(ordemServicoAtividade);\n\t\t\t\t\tosExecucaoEquipe.setOsAtividadePeriodoExecucao(osAtividadePeriodoExecucao);\n\t\t\t\t\tcolecaoOsExecucaoEquipe.add(osExecucaoEquipe);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsExecucaoEquipe;\n\t}", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public List<RjEstadoConservacion> getAllRjEstadoConservacion()throws Exception{\n\t\tList<RjEstadoConservacion> lista=new LinkedList<RjEstadoConservacion>();\n\t\ttry{\n\t\t\tStringBuffer SQL=new StringBuffer(\"SELECT conservacion_id,descripcion FROM \").append(Constante.schemadb).append(\".rj_estado_conservacion order by descripcion asc\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tRjEstadoConservacion obj=new RjEstadoConservacion(); \n\t\t\t\tobj.setConservacionId(rs.getInt(\"conservacion_id\"));\n\t\t\t\tobj.setDescripcion(rs.getString(\"descripcion\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic Page<ProductDTO> findByStatus_NameAndVisibleTrue(String status, Pageable pageable) {\n\t\tlog.debug(\"Request to get all Products by status \",status);\n return productRepository.findByStatus_NameIgnoreCaseAndVisibleTrue(status,pageable)\n .map(productMapper::toDto);\n\t}", "@Query(value = \"SELECT * FROM aluno a WHERE a.situacao = true ORDER BY ID\", nativeQuery = true)\n List<Aluno> findAlunosAprovados();", "public void setEstatus(boolean estatus) {\n\t\tthis.estatus = estatus;\n\t}", "public int getIdEstatusObjeto() {\r\n\t\treturn idEstatusObjeto;\r\n\t}", "public ArrayList<DatosNombre> listaNombre(){\n \n ArrayList<DatosNombre> respuesta = new ArrayList<>();\n Connection conexion = null;\n JDBCUtilities conex = new JDBCUtilities();\n \n try{\n conexion= conex.getConnection();\n \n String query = \"SELECT usuario, contrasenia, nombre\"\n + \" FROM empleado\"\n + \" WHERE estado=true\";\n \n PreparedStatement statement = conexion.prepareStatement(query);\n ResultSet resultado = statement.executeQuery();\n \n while(resultado.next()){\n DatosNombre consulta = new DatosNombre();\n consulta.setUsuario(resultado.getString(1));\n consulta.setContrasenia(resultado.getString(2));\n consulta.setNombreAnt(resultado.getString(3));\n \n respuesta.add(consulta);\n }\n }catch(SQLException e){\n JOptionPane.showMessageDialog(null, \"Error en la consulta \" + e);\n }\n return respuesta;\n }" ]
[ "0.6673916", "0.63716966", "0.62499464", "0.6196883", "0.61199397", "0.6089909", "0.60139763", "0.5986747", "0.59661305", "0.5706558", "0.5669159", "0.5574393", "0.55184954", "0.54539025", "0.5431364", "0.53943855", "0.53930885", "0.53757817", "0.5371651", "0.53696537", "0.53687066", "0.53574765", "0.5334609", "0.53221786", "0.53012866", "0.52991843", "0.528661", "0.5282467", "0.5276921", "0.5272459", "0.5231187", "0.5222759", "0.52086926", "0.5200442", "0.5196258", "0.5191267", "0.5161616", "0.5159842", "0.5156289", "0.51478845", "0.51470894", "0.51305336", "0.51029843", "0.50963897", "0.50938034", "0.50823617", "0.50819474", "0.50741744", "0.5073679", "0.507234", "0.5062222", "0.50559336", "0.5054315", "0.50542206", "0.5050932", "0.5045575", "0.5043812", "0.5036068", "0.50304437", "0.50296116", "0.50267196", "0.50175637", "0.5017018", "0.50142574", "0.50045335", "0.49960816", "0.49908185", "0.49893972", "0.49855536", "0.49849188", "0.4984213", "0.49791545", "0.49654305", "0.49565396", "0.49550536", "0.49549648", "0.49532345", "0.49451253", "0.49431762", "0.49429575", "0.49397212", "0.4939706", "0.49351034", "0.4934467", "0.49336308", "0.4932497", "0.49318528", "0.49314868", "0.49298355", "0.4929028", "0.49283645", "0.49157912", "0.4911251", "0.49090648", "0.49055445", "0.49027425", "0.48975194", "0.48923108", "0.48919895", "0.48891" ]
0.7304483
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'id_Almacen_Origen = :idAlmacenOrigen'.
public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "public Utente[] findWhereFkComuneAziendaEquals(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ? ORDER BY fk_comune_azienda\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public Ruta[] findWhereIdUsuarioEquals(int idUsuario) throws RutaDaoException;", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public Utente[] findByComuni2(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ?\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public SmsAgendaGrupo[] findWhereIdEmpresaEquals(int idEmpresa) throws SmsAgendaGrupoDaoException;", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public Ruta[] findWhereIdEmpresaEquals(long idEmpresa) throws RutaDaoException;", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "@Query(value = \"SELECT * FROM aluno a WHERE a.situacao = true ORDER BY ID\", nativeQuery = true)\n List<Aluno> findAlunosAprovados();", "public Utente[] findWhereUtePivaAziendaEquals(String utePivaAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_piva_azienda = ? ORDER BY ute_piva_azienda\", new Object[] { utePivaAzienda } );\n\t}", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "public NominaPuesto[] findWhereIdEmpresaEquals(int idEmpresa) throws NominaPuestoDaoException;", "public SgfensBanco[] findWhereIdBancoEquals(int idBanco) throws SgfensBancoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereFechaFirmaEquals(Date fechaFirma) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_FIRMA = ? ORDER BY FECHA_FIRMA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaFirma);\n\n }", "public Ruta[] findWhereIdTipoRutaEquals(int idTipoRuta) throws RutaDaoException;", "public Cliente[] findWhereIdClienteEquals(int idCliente) throws ClienteDaoException;", "public List<ReciboPension> buscarRecibosAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public ProductoExistencia buscarProductoExistencia(String codigo, Integer idAlmacen) throws Exception {\n\n logger.debug(\"Buscando producto con codigo: \" + codigo);\n\n try {\n\n //Obtener manager de producto\n ManagerProductoServiceBusiness mgrProducto = getMgrProductosService();\n\n //Buscar existencia del producto\n return mgrProducto.buscarProductoExistenciaPorAlmacen(codigo, idAlmacen);\n\n } catch (ManagerProductoServiceBusinessException e) {\n logger.error(e.getMessage(), e);\n throw new Exception(e.getMessage(), e);\n } catch (RemoteException e) {\n logger.error(e.getMessage(), e);\n throw new Exception(e.getMessage(), e);\n }\n }", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "@Override\n\tpublic List<AlmacenDTO> listarSalida() {\n\t\tList<AlmacenDTO> data = new ArrayList<AlmacenDTO>();\n\t\tAlmacenDTO obj = null;\n\t\tConnection cn = null;\n\t\tPreparedStatement pstm = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tcn = new MySqlDbConexion().getConexion();\n\t\t\tString sql = \"select me.codigo_salida,p.nombre_producto,me.cantidad_salida,me.fecha_salida\\r\\n\" + \n\t\t\t\t\t\"from material_salida me inner join producto p on me.codigo_producto=p.codigo_producto\";\n\n\t\t\tpstm = cn.prepareStatement(sql);\n\t\t\trs = pstm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobj = new AlmacenDTO();\n\t\t\t\tobj.setCodigo_salida(rs.getInt(1));\n\t\t\t\tobj.setNombre_producto(rs.getString(2));\n\t\t\t\tobj.setCantidad_salida(rs.getInt(3));\n\t\t\t\tobj.setFecha_salida(rs.getDate(4));\n\n\t\t\t\tdata.add(obj);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn data;\n\t}", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public List<Anuncio> getAnuncios(String idRevista) throws Exception{\n List<Anuncio> artigos = new ArrayList<>();\n Anuncio a = null;\n String idR, titulo, conteudo, categoria,nrConsultas,contacto,empresaID;\n\n try{\n connection = con.connect();\n PreparedStatement\n stm = connection.prepareStatement(\"SELECT Anuncio_ID FROM AnuncioRevista \" +\n \"WHERE Revista_ID = \" + idRevista);\n ResultSet rs = stm.executeQuery();\n ResultSet r;\n while(rs.next()){\n stm = connection.prepareStatement(\"SELECT * FROM Anuncio \" +\n \"WHERE ID = \" + rs.getString(\"Anuncio_ID\"));\n r = stm.executeQuery();\n if(r.next()){\n idR = r.getString(\"ID\");\n titulo = r.getString(\"Titulo\");\n conteudo = r.getString(\"Conteudo\");\n categoria = r.getString(\"Categoria\");\n nrConsultas = r.getString(\"NrConsultas\");\n contacto = r.getString(\"Contacto\");\n empresaID = r.getString(\"Empresa_ID\");\n a = new Anuncio(idR,titulo,conteudo,categoria,nrConsultas,contacto,empresaID);\n artigos.add(a);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return artigos;\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findAll() throws SgfensBancoDaoException;", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public Cliente[] findWhereAccesoConsolaXmlPdfEquals(int accesoConsolaXmlPdf) throws ClienteDaoException;", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<Approvatore> findByIdSala(long id_sala) {\n\t\treturn findByIdSala(id_sala, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "public DatiBancari[] findByComuni(long fkComune) throws DatiBancariDaoException;", "public List<Artigo> getArtigos(String idRevista){\n List<Artigo> artigos = new ArrayList<>();\n Artigo a;\n String id, revistaID, titulo, corpo, nrConsultas,categoria;\n LocalDate data;\n\n try{\n connection = con.connect();\n PreparedStatement\n stm = connection.prepareStatement(\"SELECT * FROM Artigo \" +\n \"INNER JOIN Revista ON Artigo.Revista_ID = Revista.ID \" +\n \"WHERE Artigo.Revista_ID = \" + idRevista);\n ResultSet rs = stm.executeQuery();\n while(rs.next()){\n id = rs.getString(\"ID\");\n revistaID = rs.getString(\"Revista_ID\");\n data = rs.getDate(\"Data\").toLocalDate();\n titulo = rs.getString(\"Titulo\");\n corpo = rs.getString(\"Corpo\");\n nrConsultas = rs.getString(\"NrConsultas\");\n categoria = rs.getString(\"Categoria\");\n a = new Artigo(id,revistaID,data,titulo,corpo,nrConsultas, categoria);\n artigos.add(a);\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return artigos;\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "@Override\n\t@Transactional\n\tpublic List<Cliente> getAll(Long idCliente) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> client =getCurrentSession().createQuery(\"from Cliente where activo=true and id='\"+idCliente+\"'\").list();\n \treturn client;\n\t}", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public Long obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais,\n String codsgv, String codRegion, String codZona, String codSeccion,\n String codTer) throws MareException {\n \n UtilidadesLog.info(\"DAOZON.obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais, String codsgv, String codRegion, String codZona, String codSeccion, String codTer): Entrada\");\n \n BigDecimal result;\n BelcorpService belcorpService;\n RecordSet respuestaRecordSet = null;\n Vector parametros = new Vector();\n\n StringBuffer stringBuffer = null;\n\n try {\n belcorpService = BelcorpService.getInstance();\n\n if (checkStr(codSeccion) && checkStr(codZona) &&\n checkStr(codRegion) && checkStr(codsgv) &&\n checkStr(codTer)) {\n //Chequeo sobre CodSGV,Region,Zona,Seccion. Para Territorio\n stringBuffer = new StringBuffer(\"SELECT T.OID_TERR as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R, ZON_ZONA Z, ZON_SECCI S, ZON_TERRI T, ZON_TERRI_ADMIN TA \");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\" AND Z.COD_ZONA = '\" + codZona + \"' \");\n stringBuffer.append(\" AND S.COD_SECC = '\" + codSeccion + \"' \");\n stringBuffer.append(\" AND T.COD_TERR = '\" + codTer + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND Z.ZORG_OID_REGI = R.OID_REGI \");\n stringBuffer.append(\" AND S.ZZON_OID_ZONA = Z.OID_ZONA \");\n stringBuffer.append(\" AND TA.ZSCC_OID_SECC = S.OID_SECC \");\n stringBuffer.append(\" AND TA.TERR_OID_TERR = T.OID_TERR \"); \n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n stringBuffer.append(\" AND Z.IND_BORR = 0 \");\n stringBuffer.append(\" AND S.IND_BORR = 0 \");\n stringBuffer.append(\" AND T.IND_BORR = 0 \");\n stringBuffer.append(\" AND TA.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codSeccion) && checkStr(codZona) &&\n checkStr(codRegion) && checkStr(codsgv)) {\n //Chequeo sobre CodSGV,Region,Zona,Seccion. Para Territorio\n stringBuffer = new StringBuffer(\"SELECT S.OID_SECC as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R, ZON_ZONA Z, ZON_SECCI S\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\" AND Z.COD_ZONA = '\" + codZona + \"' \");\n stringBuffer.append(\" AND S.COD_SECC = '\" + codSeccion + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND Z.ZORG_OID_REGI = R.OID_REGI \");\n stringBuffer.append(\" AND S.ZZON_OID_ZONA = Z.OID_ZONA \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n stringBuffer.append(\" AND Z.IND_BORR = 0 \");\n stringBuffer.append(\" AND S.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codsgv) && checkStr(codRegion) &&\n checkStr(codZona)) {\n //Chequeo sobre codSgv,Region,Zona. Para Seccion\n stringBuffer = new StringBuffer(\"SELECT Z.OID_ZONA as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R, ZON_ZONA Z\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\" AND Z.COD_ZONA = '\" + codZona + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND Z.ZORG_OID_REGI = R.OID_REGI \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n stringBuffer.append(\" AND Z.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codsgv) && checkStr(codRegion)) {\n //Chequeo sobre codSgv,Region. Para Zona.\n stringBuffer = new StringBuffer(\"SELECT R.OID_REGI as UA\");\n stringBuffer.append(\n \" FROM ZON_SUB_GEREN_VENTA SGV, ZON_REGIO R\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv +\n \"' \");\n stringBuffer.append(\" AND R.COD_REGI = '\" + codRegion + \"' \");\n stringBuffer.append(\n \" AND R.ZSGV_OID_SUBG_VENT = SGV.OID_SUBG_VENT \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n stringBuffer.append(\" AND R.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n } else if (checkStr(codsgv)) {\n //Chequeo sobre codSgv. Para Region\n stringBuffer = new StringBuffer(\n \"SELECT SGV.OID_SUBG_VENT as UA\");\n stringBuffer.append(\" FROM ZON_SUB_GEREN_VENTA SGV\");\n stringBuffer.append(\" WHERE \");\n stringBuffer.append(\" SGV.CANA_OID_CANA = \" +\n oidCanal.toString());\n stringBuffer.append(\" AND SGV.MARC_OID_MARC = \" +\n oidMarca.toString());\n stringBuffer.append(\" AND SGV.PAIS_OID_PAIS = \" +\n oidPais.toString());\n stringBuffer.append(\" AND SGV.COD_SUBG_VENT = '\" + codsgv + \"' \");\n stringBuffer.append(\" AND SGV.IND_BORR = 0 \");\n \n respuestaRecordSet = belcorpService.dbService.executeStaticQuery(stringBuffer.toString());\n }\n } catch (MareMiiServiceNotFoundException serviceNotFoundException) {\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(serviceNotFoundException,\n UtilidadesError.armarCodigoError(codigoError));\n } catch (Exception exception) {\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(exception,\n UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (respuestaRecordSet.esVacio()) {\n UtilidadesLog.info(\"DAOZON.obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais, String codsgv, String codRegion, String codZona, String codSeccion, String codTer): Salida\");\n return null;\n } else {\n result = (BigDecimal) respuestaRecordSet.getValueAt(0, \"UA\");\n }\n UtilidadesLog.info(\"DAOZON.obtenerUAporcodigo(Long oidMarca, Long oidCanal, Long oidPais, String codsgv, String codRegion, String codZona, String codSeccion, String codTer): Salida\");\n return new Long(result.longValue());\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "@GetMapping(\"/aceptada\")\n\tList<ReservasEntity> findByAceptadaTrue() {\n\t\treturn reservaRepo.findByAceptadaTrue();\n\t}", "public ArrayList<Reserva> getReservaByUsuarioOperador(Long codigo, Long opID) throws Exception {\n\t\t\tArrayList<Reserva> respu = new ArrayList<>();\n\t\t\tDAOReserva daoReserva = new DAOReserva();\n\t\t\ttry \n\t\t\t{\n\t\t\t\tthis.conn = darConexion();\n\t\t\t\tdaoReserva.setConn(conn);\n\t\t\t\trespu = daoReserva.findReservaByUsuarioOperador(codigo, opID);\n\n\t\t\t} \n\t\t\tcatch (SQLException sqlException) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\t\tsqlException.printStackTrace();\n\t\t\t\tthrow sqlException;\n\t\t\t} \n\t\t\tcatch (Exception exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t} \n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tdaoReserva.cerrarRecursos();\n\t\t\t\t\tif(this.conn!=null){\n\t\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (SQLException exception) {\n\t\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn respu;\n\t\t}", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;" ]
[ "0.68822324", "0.6444281", "0.6383116", "0.63407236", "0.62753", "0.6240923", "0.61998796", "0.6185798", "0.6167448", "0.6164216", "0.61476713", "0.6118605", "0.61010814", "0.6100246", "0.60554796", "0.60545653", "0.599259", "0.59878623", "0.5975751", "0.5932196", "0.5927207", "0.5909851", "0.59044415", "0.58935225", "0.58746105", "0.5866034", "0.58616006", "0.5857698", "0.5848086", "0.58352304", "0.5833752", "0.58300465", "0.5821486", "0.5791541", "0.57860297", "0.5754366", "0.57490474", "0.5731725", "0.57295144", "0.5726717", "0.57262176", "0.57002527", "0.5693746", "0.5649405", "0.5644315", "0.5628238", "0.56234163", "0.561756", "0.5610051", "0.5593937", "0.5592643", "0.55871546", "0.55867034", "0.55832535", "0.55731004", "0.5547576", "0.55436915", "0.5543686", "0.5534793", "0.5534527", "0.55310786", "0.5527778", "0.5526055", "0.5513336", "0.5509475", "0.55080926", "0.5506372", "0.5501075", "0.54990304", "0.5494709", "0.54925895", "0.54880065", "0.548608", "0.548541", "0.54786783", "0.5465498", "0.54639137", "0.5460822", "0.5460327", "0.5444668", "0.54443157", "0.5440952", "0.5436375", "0.5426833", "0.542467", "0.5420327", "0.54196954", "0.5419354", "0.54118395", "0.5411007", "0.53970146", "0.5394876", "0.53927624", "0.5388247", "0.5387397", "0.53871775", "0.538625", "0.5369478", "0.536661", "0.5365522" ]
0.79582804
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'APTO_PARA_VENTA = :aptoParaVenta'.
public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public Utente[] findWhereUtePivaAziendaEquals(String utePivaAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_piva_azienda = ? ORDER BY ute_piva_azienda\", new Object[] { utePivaAzienda } );\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\r\n }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "@GetMapping(\"/aceptada\")\n\tList<ReservasEntity> findByAceptadaTrue() {\n\t\treturn reservaRepo.findByAceptadaTrue();\n\t}", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "@Override\r\n public ProductosPuntoVenta[] findByDynamicWhere(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n // construct the SQL statement\r\n final String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n System.out.println(\"Executing \" + SQL);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(SQL);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereFechaFirmaEquals(Date fechaFirma) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_FIRMA = ? ORDER BY FECHA_FIRMA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaFirma);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public Venta[] listarVentas(String nombreVendedor)throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\tResultSet rs3 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\tResultSet rs5 = null;\n\t\tPreparedStatement pst5 = null;\n\t\t\n System.out.println(\"Listando ventas...\");\n\t\t\n\t\tString sql = \"SELECT COUNT(IdentificadorVenta) FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\tint cantidadVentas = 0;\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, nombreVendedor);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantidadVentas = rs.getInt(1);\n }\n\t\t\t\n\t\t\tVenta[] ventas = new Venta[cantidadVentas];\n\t\t\tString sql2 = \"SELECT NombreComprador, ApellidoComprador, DocumentoComprador, AnioVenta, MesVenta, DiaVenta, IdentificadorVenta FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\tpst2.setString(1, nombreVendedor);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tString nombreComprador = rs2.getString(1);\n\t\t\t\tString apellidoComprador = rs2.getString(2);\n\t\t\t\tString numeroDocumentoComprador = rs2.getString(3);\n\t\t\t\t\n\t\t\t\tint anioVenta = rs2.getInt(4);\n\t\t\t\tint mesVenta = rs2.getInt(5);\n\t\t\t\tint diaVenta = rs2.getInt(6);\n\t\t\t\t\n\t\t\t\tint identificadorVenta = rs2.getInt(7);\n\t\t\t\t\n\t\t\t\tString sql3 = \"SELECT COUNT(A_NombreArticulo) FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs3 = pst3.executeQuery(); \n\t\t\t\t\n\t\t\t\tint cantArticulosVenta = 0;\n\t\t\t\t\n\t\t\t\tif (rs3.next()){\n\t\t\t\t\tcantArticulosVenta = rs3.getInt(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArticuloVenta[] listaArticulosVenta = new ArticuloVenta[cantArticulosVenta];\n\t\t\t\tString sql4 = \"SELECT A_NombreArticulo, Cantidad FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\n\t\t\t\tint j=0;\n\t\t\t\twhile (rs4.next()){\n\t\t\t\t\tString nombreArticulo = rs4.getString(1);\n\t\t\t\t\tint cantidadArticulo = rs4.getInt(2);\n\t\t\t\t\t\n\t\t\t\t\tArticuloVenta articulo = new ArticuloVenta(nombreArticulo, cantidadArticulo);\n\t\t\t\t\tlistaArticulosVenta[j] = articulo;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tVenta venta = new Venta(nombreComprador, apellidoComprador, numeroDocumentoComprador, anioVenta, mesVenta, diaVenta, listaArticulosVenta);\n\t\t\t\t\n\t\t\t\tventas[k] = venta;\n\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn ventas;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar las ventas.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n }", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "@Query(value = \"SELECT * FROM aluno a WHERE a.situacao = true ORDER BY ID\", nativeQuery = true)\n List<Aluno> findAlunosAprovados();", "VentaJPA obtenerVenta(int comprobante);", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public Cliente[] findWhereApellidoPaternoClienteEquals(String apellidoPaternoCliente) throws ClienteDaoException;", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public Utente[] findByPaesi(long fkPaesi) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_paesi = ?\", new Object[] { new Long(fkPaesi) } );\n\t}", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public Cliente[] findWhereFechaUltimaVisitaEquals(Date fechaUltimaVisita) throws ClienteDaoException;", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "private boolean pistaReservada(List<ReservaEntity> reservaEntities, int idPista) {\n\n for (ReservaEntity reservaEntity : reservaEntities) {\n if (idPista == reservaEntity.getIdPista()) {\n return true;\n }\n }\n return false;\n }", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public Utente[] findWhereFkComuneAziendaEquals(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ? ORDER BY fk_comune_azienda\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public Cliente[] findWhereDiasVisitaEquals(String diasVisita) throws ClienteDaoException;", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByDynamicSelect(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + sql);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(sql);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public List<Res_Agente_P> getAgentesNuevoP(int efiscal, int p, int idAgencia){\r\n\t\treturn resAgenteDAO.getAgentesNuevoP(efiscal, p, idAgencia);\r\n\t}", "public Utente[] findWhereFkPaesiEquals(long fkPaesi) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_paesi = ? ORDER BY fk_paesi\", new Object[] { new Long(fkPaesi) } );\n\t}", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public NominaPuesto[] findWhereIdEmpresaEquals(int idEmpresa) throws NominaPuestoDaoException;", "public ArrayList<ServicioDTO> consultarServicios(String columna, String informacion) throws Exception {\r\n ArrayList<ServicioDTO> dtos = new ArrayList<>();\r\n conn = Conexion.generarConexion();\r\n String sql = \"\";\r\n if (columna.equals(\"nom\")) \r\n sql = \" WHERE SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ?\";\r\n else if (columna.equals(\"cod\"))\r\n sql = \" WHERE SerCodigo = ? \";\r\n if (conn != null) {\r\n PreparedStatement stmt = conn.prepareStatement(\"SELECT SerCodigo, \"\r\n + \"SerNombre, SerCaracter, SerNotas, SerHabilitado \"\r\n + \"FROM tblservicio\" + sql);\r\n if (columna.equals(\"cod\")) {\r\n stmt.setString(1, informacion);\r\n } else if (columna.equals(\"nom\")) {\r\n stmt.setString(1, informacion);\r\n stmt.setString(2, \"%\" + informacion);\r\n stmt.setString(3, informacion + \"%\");\r\n stmt.setString(4, \"%\" + informacion + \"%\");\r\n }\r\n ResultSet rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n ServicioDTO dto = new ServicioDTO();\r\n dto.setCodigo(rs.getInt(1));\r\n dto.setNombre(rs.getString(2));\r\n dto.setCaracter(rs.getString(3));\r\n dto.setNotas(rs.getString(4));\r\n String habilitado = rs.getString(5);\r\n if(habilitado.equals(\"si\"))\r\n dto.setHabilitado(true);\r\n else\r\n dto.setHabilitado(false);\r\n dtos.add(dto);\r\n }\r\n stmt.close();\r\n rs.close();\r\n conn.close();\r\n }\r\n return dtos;\r\n }", "public Cliente[] findWherePaisEquals(String pais) throws ClienteDaoException;", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "private String armarWhere(DTOBusquedaRapidaCliente dto) {\n UtilidadesLog.info(\" DAOMAEMaestroClientes.armarWhere(DTOBusquedaRapidaCliente): Entrada\");\n StringBuffer query = new StringBuffer();\n String[] camposWhere = new String[] {\n \"c.PAIS_OID_PAIS\", \"c.COD_CLIE\", \"c.VAL_CRIT_BUS1\",\n \"c.VAL_CRIT_BUS2\", \"i.NUM_DOCU_IDEN\"\n };\n\n Object[] valoresWhere = new Object[] {\n dto.getOidPais(), dto.getCodigoCliente(), dto.getCriterioBusqueda1(),\n dto.getCriterioBusqueda2(), dto.getDocumentoIdentidad()\n };\n\n boolean[] operadores = new boolean[] { false, false, false, false, false };\n UtilidadesLog.info(\" DAOMAEMaestroClientes.armarWhere(DTOBusquedaRapidaCliente): Salida\"); \n return UtilidadesBD.armarSQLWhere(camposWhere, valoresWhere, operadores);\n }", "public List<Voto> getVotos(){\n\t\treturn em.createQuery(\"SELECT c from Voto c\", Voto.class).getResultList();\n\t}", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "public ArrayList findPersonalAsistencia(String dbpool, String criterio,\n\t\t\tString valor, String periodo, HashMap seguridad)\n\t\t\tthrows SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select t02cod_pers, substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) cod_uorga \"\n\t\t\t\t\t).append( \" from t02perdp \" ).append( \" where t02cod_stat = ? \");\n\n\t\t\tif (criterio.equals(\"0\")) {\n\t\t\t\tstrSQL.append(\" and t02cod_pers = '\" ).append( valor.trim().toUpperCase()\n\t\t\t\t\t\t).append( \"'\");\n\t\t\t}\n\n\t\t\tif (criterio.equals(\"1\")) {\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) = '\"\n\t\t\t\t\t\t).append( valor.trim().toUpperCase() ).append( \"'\");\n\t\t\t}\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\" ).append( Constantes.PROCESO_ASISTENCIA\n\t\t\t\t\t\t).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by t02cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, Constantes.ACTIVO);\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tHashMap det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"t02cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"cod_uorga\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "@Override\n\tpublic List<Approvatore> findByIdSala(long id_sala) {\n\t\treturn findByIdSala(id_sala, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public List<InvAjusteProducto> findAllAjustes() {\n\t\treturn em.createNamedQuery(\"InvAjusteProducto.findAll\", InvAjusteProducto.class).getResultList();\n\t}", "public Ruta[] findWhereIdEmpresaEquals(long idEmpresa) throws RutaDaoException;", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "@Override\r\n\tpublic List<Producto> productosMasVendidos(@DateTimeFormat(pattern = \"dd-MM-yyyy\")Date fecha) {\n\t\treturn (List<Producto>)productoFacturaClienteDao.productosMasVendidos(fecha);\r\n\t}", "public Vector listaAsignaturas(String nombre_titulacion)\n {\n try\n {\n Date fechaActual = new Date();\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE fechainicio <='\" + formato.format(fechaActual) +\"' \";\n query += \"AND fechafin >= '\"+formato.format(fechaActual)+\"' AND tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query \n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n \n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n \n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n \n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }" ]
[ "0.6873144", "0.6814443", "0.6508284", "0.6447737", "0.6375466", "0.630746", "0.62736964", "0.6252246", "0.618885", "0.60111105", "0.5987986", "0.5987623", "0.5981542", "0.5966428", "0.59395325", "0.5895171", "0.5845436", "0.58095723", "0.58036137", "0.5765737", "0.5734698", "0.5722772", "0.5693661", "0.56562895", "0.56017464", "0.55865663", "0.5574079", "0.5570015", "0.5552617", "0.55520254", "0.55279917", "0.5500073", "0.5497213", "0.54960746", "0.5495456", "0.5492359", "0.5467292", "0.54666984", "0.5459419", "0.5453648", "0.5444134", "0.54249495", "0.5402207", "0.53755593", "0.5374125", "0.5372911", "0.53561836", "0.5353563", "0.5353365", "0.5348324", "0.53440267", "0.53435004", "0.534113", "0.5337861", "0.5334974", "0.533462", "0.5333955", "0.53301895", "0.53278935", "0.5325299", "0.5324874", "0.5322932", "0.5321692", "0.53143275", "0.5303301", "0.5299293", "0.529877", "0.52926666", "0.5291683", "0.528841", "0.5282773", "0.5281487", "0.5277194", "0.52766275", "0.52698654", "0.5265083", "0.52638704", "0.52622086", "0.5259979", "0.52598196", "0.52584404", "0.52548593", "0.5252968", "0.5250775", "0.5246962", "0.5241885", "0.52407724", "0.52378654", "0.52375346", "0.52290374", "0.5227388", "0.5220585", "0.521803", "0.5212671", "0.52125216", "0.5212521", "0.52057433", "0.5195978", "0.5193439", "0.51872903" ]
0.7247009
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'NO_APTO_PARA_VENTA = :noAptoParaVenta'.
public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "public Utente[] findWhereUtePivaAziendaEquals(String utePivaAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE ute_piva_azienda = ? ORDER BY ute_piva_azienda\", new Object[] { utePivaAzienda } );\n\t}", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\r\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public OrdemServicoProgramacao pesquisarOSProgramacaoAtivaComDataRoteiroIdEquipe(Integer numeroOS, Date dataRoteiro, Integer idEquipe)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tOrdemServicoProgramacao retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \" + \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.ordemServico os \" + \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \" + \"WHERE os.id = :numeroOS \"\n\t\t\t\t\t\t\t+ \"AND equipe.id = :idEquipe \" + \"AND osProgramacao.indicadorAtivo = :indAtivo \"\n\t\t\t\t\t\t\t+ \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro\";\n\n\t\t\tretorno = (OrdemServicoProgramacao) session.createQuery(consulta).setInteger(\"numeroOS\", numeroOS)\n\t\t\t\t\t\t\t.setInteger(\"idEquipe\", idEquipe).setShort(\"indAtivo\", OrdemServicoProgramacao.INDICADOR_ATIVO)\n\t\t\t\t\t\t\t.setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro)\n\n\t\t\t\t\t\t\t.setMaxResults(1).uniqueResult();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public Venta[] listarVentas(String nombreVendedor)throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\tResultSet rs3 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\tResultSet rs5 = null;\n\t\tPreparedStatement pst5 = null;\n\t\t\n System.out.println(\"Listando ventas...\");\n\t\t\n\t\tString sql = \"SELECT COUNT(IdentificadorVenta) FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\tint cantidadVentas = 0;\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, nombreVendedor);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantidadVentas = rs.getInt(1);\n }\n\t\t\t\n\t\t\tVenta[] ventas = new Venta[cantidadVentas];\n\t\t\tString sql2 = \"SELECT NombreComprador, ApellidoComprador, DocumentoComprador, AnioVenta, MesVenta, DiaVenta, IdentificadorVenta FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\tpst2.setString(1, nombreVendedor);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tString nombreComprador = rs2.getString(1);\n\t\t\t\tString apellidoComprador = rs2.getString(2);\n\t\t\t\tString numeroDocumentoComprador = rs2.getString(3);\n\t\t\t\t\n\t\t\t\tint anioVenta = rs2.getInt(4);\n\t\t\t\tint mesVenta = rs2.getInt(5);\n\t\t\t\tint diaVenta = rs2.getInt(6);\n\t\t\t\t\n\t\t\t\tint identificadorVenta = rs2.getInt(7);\n\t\t\t\t\n\t\t\t\tString sql3 = \"SELECT COUNT(A_NombreArticulo) FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs3 = pst3.executeQuery(); \n\t\t\t\t\n\t\t\t\tint cantArticulosVenta = 0;\n\t\t\t\t\n\t\t\t\tif (rs3.next()){\n\t\t\t\t\tcantArticulosVenta = rs3.getInt(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArticuloVenta[] listaArticulosVenta = new ArticuloVenta[cantArticulosVenta];\n\t\t\t\tString sql4 = \"SELECT A_NombreArticulo, Cantidad FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\n\t\t\t\tint j=0;\n\t\t\t\twhile (rs4.next()){\n\t\t\t\t\tString nombreArticulo = rs4.getString(1);\n\t\t\t\t\tint cantidadArticulo = rs4.getInt(2);\n\t\t\t\t\t\n\t\t\t\t\tArticuloVenta articulo = new ArticuloVenta(nombreArticulo, cantidadArticulo);\n\t\t\t\t\tlistaArticulosVenta[j] = articulo;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tVenta venta = new Venta(nombreComprador, apellidoComprador, numeroDocumentoComprador, anioVenta, mesVenta, diaVenta, listaArticulosVenta);\n\t\t\t\t\n\t\t\t\tventas[k] = venta;\n\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn ventas;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar las ventas.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "@Override\r\n public ProductosPuntoVenta[] findByDynamicWhere(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n // construct the SQL statement\r\n final String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n System.out.println(\"Executing \" + SQL);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(SQL);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "@GetMapping(\"/aceptada\")\n\tList<ReservasEntity> findByAceptadaTrue() {\n\t\treturn reservaRepo.findByAceptadaTrue();\n\t}", "public NominaPuesto[] findWhereIdEmpresaEquals(int idEmpresa) throws NominaPuestoDaoException;", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> findWhereFechaFirmaEquals(Date fechaFirma) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_FIRMA = ? ORDER BY FECHA_FIRMA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaFirma);\n\n }", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "@Query(value = \"SELECT * FROM aluno a WHERE a.situacao = true ORDER BY ID\", nativeQuery = true)\n List<Aluno> findAlunosAprovados();", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public ArrayList<ServicioDTO> consultarServicios(String columna, String informacion) throws Exception {\r\n ArrayList<ServicioDTO> dtos = new ArrayList<>();\r\n conn = Conexion.generarConexion();\r\n String sql = \"\";\r\n if (columna.equals(\"nom\")) \r\n sql = \" WHERE SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ?\";\r\n else if (columna.equals(\"cod\"))\r\n sql = \" WHERE SerCodigo = ? \";\r\n if (conn != null) {\r\n PreparedStatement stmt = conn.prepareStatement(\"SELECT SerCodigo, \"\r\n + \"SerNombre, SerCaracter, SerNotas, SerHabilitado \"\r\n + \"FROM tblservicio\" + sql);\r\n if (columna.equals(\"cod\")) {\r\n stmt.setString(1, informacion);\r\n } else if (columna.equals(\"nom\")) {\r\n stmt.setString(1, informacion);\r\n stmt.setString(2, \"%\" + informacion);\r\n stmt.setString(3, informacion + \"%\");\r\n stmt.setString(4, \"%\" + informacion + \"%\");\r\n }\r\n ResultSet rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n ServicioDTO dto = new ServicioDTO();\r\n dto.setCodigo(rs.getInt(1));\r\n dto.setNombre(rs.getString(2));\r\n dto.setCaracter(rs.getString(3));\r\n dto.setNotas(rs.getString(4));\r\n String habilitado = rs.getString(5);\r\n if(habilitado.equals(\"si\"))\r\n dto.setHabilitado(true);\r\n else\r\n dto.setHabilitado(false);\r\n dtos.add(dto);\r\n }\r\n stmt.close();\r\n rs.close();\r\n conn.close();\r\n }\r\n return dtos;\r\n }", "public ArrayList findPersonalAsistencia(String dbpool, String criterio,\n\t\t\tString valor, String periodo, HashMap seguridad)\n\t\t\tthrows SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select t02cod_pers, substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) cod_uorga \"\n\t\t\t\t\t).append( \" from t02perdp \" ).append( \" where t02cod_stat = ? \");\n\n\t\t\tif (criterio.equals(\"0\")) {\n\t\t\t\tstrSQL.append(\" and t02cod_pers = '\" ).append( valor.trim().toUpperCase()\n\t\t\t\t\t\t).append( \"'\");\n\t\t\t}\n\n\t\t\tif (criterio.equals(\"1\")) {\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) = '\"\n\t\t\t\t\t\t).append( valor.trim().toUpperCase() ).append( \"'\");\n\t\t\t}\n\n\t\t\t//criterios de visibilidad\n\t\t\tif (seguridad != null) {\n\t\t\t\tString codPers = (String) seguridad.get(\"codPers\");\n\t\t\t\tstrSQL.append(\" and substr(trim(nvl(t02cod_uorgl,'')||nvl(t02cod_uorg,'')),1,6) in \");\n\t\t\t\tstrSQL.append(\" (select u_organ from t1485seg_uorga \"\n\t\t\t\t\t\t).append( \" where cod_pers = '\" ).append( codPers\n\t\t\t\t\t\t).append( \"' and operacion = '\" ).append( Constantes.PROCESO_ASISTENCIA\n\t\t\t\t\t\t).append( \"') \");\n\t\t\t}\n\n\t\t\tstrSQL.append(\" order by t02cod_pers\");\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, Constantes.ACTIVO);\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tHashMap det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new HashMap();\n\n\t\t\t\tdet.put(\"codigo\", rs.getString(\"t02cod_pers\"));\n\t\t\t\tdet.put(\"uo\", rs.getString(\"cod_uorga\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public Utente[] findWhereFkComuneAziendaEquals(long fkComuneAzienda) throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE fk_comune_azienda = ? ORDER BY fk_comune_azienda\", new Object[] { new Long(fkComuneAzienda) } );\n\t}", "public Cliente[] findWhereIdEmpresaEquals(int idEmpresa) throws ClienteDaoException;", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public Collection<OrdemServicoProgramacao> pesquisarOSProgramacaoComDataRoteiroIdEquipeDiferenteOS(Integer numeroOS, Date dataRoteiro,\n\t\t\t\t\tInteger idEquipe) throws ErroRepositorioException{\n\n\t\tCollection<OrdemServicoProgramacao> retorno = null;\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT osProgramacao \" + \"FROM OrdemServicoProgramacao osProgramacao \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.ordemServico os \" + \"INNER JOIN osProgramacao.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osProgramacao.programacaoRoteiro progRoteiro \"\n\t\t\t\t\t\t\t+ \"LEFT JOIN osProgramacao.osProgramNaoEncerMotivo osProgramNaoEncerMotivo \" + \"WHERE os.id <> :numeroOS \"\n\t\t\t\t\t\t\t+ \"AND equipe.id = :idEquipe \" + \"AND (osProgramacao.indicadorAtivo = 1 OR (osProgramacao.indicadorAtivo = 2 \"\n\t\t\t\t\t\t\t+ \" AND osProgramNaoEncerMotivo IS NULL)) \" + \"AND progRoteiro.dataRoteiro = :dataProgramacaoRoteiro\";\n\n\t\t\tretorno = (Collection<OrdemServicoProgramacao>) session.createQuery(consulta).setInteger(\"numeroOS\", numeroOS)\n\t\t\t\t\t\t\t.setInteger(\"idEquipe\", idEquipe).setTimestamp(\"dataProgramacaoRoteiro\", dataRoteiro).list();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public Cliente[] findWhereFechaUltimaVisitaEquals(Date fechaUltimaVisita) throws ClienteDaoException;", "public List<Pais> findAll() throws NoResultException {\r\n return EM.createNamedQuery(Pais.FIND_ALL,Pais.class)\r\n .setParameter(\"p1\", Estados.ACTIVO)\r\n .getResultList();\r\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "VentaJPA obtenerVenta(int comprobante);", "@Override\r\n public ProductosPuntoVenta[] findByDynamicSelect(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + sql);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(sql);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;" ]
[ "0.69931555", "0.6689523", "0.66315705", "0.6470416", "0.638277", "0.62318116", "0.6150536", "0.60776365", "0.60618955", "0.6026005", "0.5998933", "0.59802014", "0.59761757", "0.5962395", "0.5946052", "0.5890182", "0.585412", "0.5830781", "0.58033913", "0.5714447", "0.5697832", "0.5657816", "0.56333214", "0.5622843", "0.5610911", "0.5576247", "0.5574963", "0.55724514", "0.55680263", "0.55577266", "0.5557406", "0.55554944", "0.5535357", "0.5532285", "0.5517381", "0.5514103", "0.5513296", "0.55130017", "0.5507506", "0.55035865", "0.55029637", "0.5498039", "0.54962695", "0.5494751", "0.54940295", "0.5484736", "0.5470857", "0.5467955", "0.5467421", "0.54565454", "0.5452856", "0.54495144", "0.544326", "0.54429257", "0.5437999", "0.5433713", "0.5424774", "0.54181045", "0.54089916", "0.54085857", "0.5391663", "0.53847754", "0.5378194", "0.5375075", "0.53722477", "0.5369251", "0.5364819", "0.53567773", "0.53495705", "0.5344646", "0.534411", "0.5340198", "0.53375113", "0.53360367", "0.5318372", "0.53142893", "0.53139144", "0.5310919", "0.5310718", "0.53104705", "0.53006923", "0.52958554", "0.5292722", "0.527917", "0.52710605", "0.52696687", "0.52690154", "0.52652955", "0.5263295", "0.5258815", "0.52568763", "0.5255662", "0.5254036", "0.52530694", "0.5246552", "0.52451956", "0.5240226", "0.5239948", "0.52384585", "0.5238169" ]
0.7013138
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'ID_CLASIFICACION = :idClasificacion'.
public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "@Override\r\n\tpublic List<Requisito> getRequisitos(int cursoId, int centroId) {\r\n\t\tList<Requisito> requisitos = new ArrayList<Requisito>();\r\n\t\ttry\r\n\t\t{\r\n\t\t\trequisitos = jdbcTemplate.query(\r\n\t\t\t\t\t\t\tSQL_SELECT_REQUISITOS_CERTIFICACION + \" where ac.centroid='\" + centroId + \"' and c.id= \" + cursoId + \" order by cr.descripcion\",\r\n\t\t\t\t\t\t\tnew RowMapper<Requisito>() {\r\n\t\t\t\t\t\t\t\tpublic Requisito mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\tRequisito requisito = new Requisito();\r\n\t\t\t\t\t\t\t\t\trequisito.setCodigo(rs.getString(\"codigo_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setDescripcion(rs.getString(\"descripcion_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setAcreditacion(rs.getString(\"codigo_acreditacion\"));\r\n\t\t\t\t\t\t\t\t\treturn requisito;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}); \r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn requisitos;\r\n\t}", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa)\n\t\t\tthrows ErroRepositorioException;", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\r\n\tpublic List<UCompetencia> getCertificacionesSinPlanificar(Integer entidadId) {\r\n\t\tList<UCompetencia> certificaciones = this.jdbcTemplate.query(\r\n\t\t\t\tSQL_CERTIFICACIONES_SIN_PLANIFICAR + \" and ci.centroid = case '\" + entidadId + \"' when '1000' then ci.centroid else '\" + entidadId+ \"' end order by c.descripcion\",\r\n\t\t new RowMapper<UCompetencia>() {\r\n\t\t public UCompetencia mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t UCompetencia certificacion = new UCompetencia();\r\n\t\t //certificacion.setOfertaId(rs.getInt(\"oferta_id\"));\r\n\t\t certificacion.setOfertaId(null);\r\n\t\t certificacion.setEstructuraId(rs.getInt(\"estructura_id\"));\r\n\t\t certificacion.setGrupo(rs.getString(\"grupo_clase\"));\r\n\t\t certificacion.setIdCentro(rs.getInt(\"id_centro\"));\r\n\t\t certificacion.setNombreCentro(rs.getString(\"nombre\"));\r\n\t\t certificacion.setDireccion(rs.getString(\"direccion\"));\r\n\t\t certificacion.setIdUCompetencia(rs.getInt(\"id_curso\"));\r\n\t\t certificacion.setNombreUCompetencia(rs.getString(\"nombre_curso\"));\r\n\t\t //certificacion.setCosto(rs.getFloat(\"costo\"));\r\n\t\t certificacion.setCosto(null);\r\n\t\t //certificacion.setDisponibilidad(rs.getInt(\"disponibilidad\"));\r\n\t\t certificacion.setDisponibilidad(null);\r\n\t\t certificacion.setFechaInicio(rs.getDate(\"fecha_inicio\"));\r\n\t\t certificacion.setFechaFin(rs.getDate(\"fecha_fin\"));\r\n\t\t return certificacion;\r\n\t\t }\r\n\t\t });\r\n\t\treturn certificaciones;\r\n\t}", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@SuppressWarnings({ \"unchecked\" })\n\t@Override\n\tpublic Collection<LineaComercialClasificacionDTO> buscarClasificacionesLinCom(Integer codigoCompania, Long codigoLineaComercial, String estado, Map<String, DynamicCriteriaRestriction> restrictionMap)throws SICException{\n\t\t\n\t\ttry{\n\t\t\n\t\t\tthis.sessionFactory.getCurrentSession().clear();\n\t\t\tCriteria criteria = this.sessionFactory.getCurrentSession().createCriteria(LineaComercialClasificacionDTO.class, \"root\");\t\t\n\t\t\tcriteria.createAlias(\"clasificacion\", \"clasificacion\", CriteriaSpecification.LEFT_JOIN);\n\t\t\tcriteria.setProjection(Projections.projectionList()\n\t\t\t\t\t.add(Projections.property(\"clasificacion.id.codigoClasificacion\"),\"clasificacion.id.codigoClasificacion\")\n\t\t\t\t\t.add(Projections.property(\"codigoLineaComercial\"),\"codigoLineaComercial\")\n\t\t\t\t\t.add(Projections.property(\"id.codigoClasificacion\"),\"id.codigoClasificacion\")\n\t\t\t\t\t.add(Projections.property(\"idUsuarioRegistro\"),\"idUsuarioRegistro\")\n\t\t\t\t\t.add(Projections.property(\"idUsuarioModificacion\"),\"idUsuarioModificacion\")\n\t\t\t\t\t.add(Projections.property(\"fechaRegistro\"),\"fechaRegistro\")\n\t\t\t\t\t.add(Projections.property(\"id.codigoCompania\"),\"id.codigoCompania\")\n\t\t\t\t\t.add(Projections.property(\"id.codigoLineaComercialClasificacion\"),\"id.codigoLineaComercialClasificacion\")\n\t\t\t\t\t.add(Projections.property(\"clasificacion.descripcionClasificacion\"),\"clasificacion.descripcionClasificacion\")\n\t\t\t\t);\n\t\t\tcriteria.add(Restrictions.eq(\"id.codigoCompania\", codigoCompania));\n\t\t\tcriteria.add(Restrictions.eq(\"codigoLineaComercial\",codigoLineaComercial));\n\t\t\tcriteria.add(Restrictions.eq(\"estado\", estado));\n\t\t\tcriteria.add(Restrictions.eq(\"clasificacion.estadoClasificacion\", SICConstantes.ESTADO_ACTIVO_NUMERICO));\n\t\t\tcriteria.add(Restrictions.eq(\"clasificacion.valorTipoEstructura\", CorporativoConstantes.TIPO_ESTRUCTURA_COMERCIAL));\n\t\t\tcriteria.add(Restrictions.eq(\"clasificacion.codigoTipoEstructura\", TiposCatalogoConstantes.TIPO_ESTRUCTURA));\n\t\t\t\n\t\t\tif(restrictionMap != null && restrictionMap.containsKey(\"linComCla\")){\n\t\t\t\tcriteria.add(restrictionMap.get(\"linComCla\").getCriteriaRestriction());\n\t\t\t}\n\t\t\t\n\t\t\tcriteria.addOrder(Order.asc(\"clasificacion.id.codigoClasificacion\"));\n\t\t\t\n\t\t\tcriteria.setResultTransformer(new DtoResultTransformer(LineaComercialClasificacionDTO.class));\n\t\t\t\n\t\t\treturn (Collection<LineaComercialClasificacionDTO>)criteria.list();\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.error(\"Error al consultar clasificaciones en lineas comerciales {0}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones en lineas comerciales\", e);\n\t\t}\n\t}", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public Collection<Object[]> pesquisarDadosConsumoTarifaVigencia(Integer idConsumoTarifa, Integer idCategoria, Date dataFaturamento)\n\t\t\tthrows ErroRepositorioException;", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "@Override\n\tpublic Collection<String> consultarLineaComercialClasificacionAsignacionMasivaIngresar(String codigoClasificacion,String nivelClasificacion,String valorTipoLineaComercial,Long codigoLinPad,Long codigoLinCom)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Entr� a consultar Linea Comercial Clasificacion Asignacion Masiva Ingresar : {}\",codigoClasificacion);\n\t\tStringBuilder query = null;\n\t\tSQLQuery sqlQuery = null;\n\t\tSession session=null;\n\t\tString divDep=\" ) \";\n\t\ttry {\n\t\t\tsession = hibernateH.getHibernateSession();\n\t\t\tsession.clear();\n\t\t\tquery = new StringBuilder(\" SELECT t1.CODIGOCLASIFICACION \");\n\t\t\t\n\t\t\tquery.append(\" FROM ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\tdivDep+=\" ) ) \";\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tquery.append(\" where t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\tquery.append(\" select distinct lineacomer0_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCADMTLINCOMCLA lineacomer0_, SCADMTLINCOM lineacomer1_ \");\n\t\t\tquery.append(\" where lineacomer1_.CODIGOLINEACOMERCIAL=lineacomer0_.CODIGOLINEACOMERCIAL \");\n\t\t\tquery.append(\" and lineacomer1_.NIVEL=0 and lineacomer1_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and lineacomer1_.CODIGOLINEACOMERCIAL NOT IN( \"+codigoLinPad+\" ) \");\n\t\t\t}\n\t\t\tquery.append(\" and lineacomer0_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' and lineacomer1_.VALORTIPOLINEACOMERCIAL='\"+valorTipoLineaComercial+\"' \");\n\t\t\tquery.append(\" and ( lineacomer0_.CODIGOCLASIFICACION in ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" ) )\");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" ) ) \");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t///CODIGO EXTRA\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\t\tquery.append(\" SELECT CODIGOCLASIFICACION FROM SCADMTLINCOMCLA LCC, SCADMTLINCOM LC\t \");\n\t\t\t\tquery.append(\" where LCC.CODIGOCLASIFICACION IN(\t \");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\t}\n\t\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\"\"+divDep+\" \");\n\t\t\t\t}else{\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" \");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tquery.append(\" AND LCC.ESTADO='1' \");\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL=LC.CODIGOLINEACOMERCIAL \");\n\t\t\t\tquery.append(\" AND LC.CODIGOLINEACOMERCIALPADRE = \"+codigoLinPad);\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL NOT IN (\"+codigoLinCom+\") )\");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" ) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\n//\t\t\tsqlQuery.setParameter(\"estadoClasificacion\", SICConstantes.ESTADO_ACTIVO_NUMERICO);\n//\t\t\tsqlQuery.setParameter(\"codigoClasificacion\", codigoClasificacion);\n//\t\t\tsqlQuery.setParameter(\"valorTipoLineaComercial\", valorTipoLineaComercial);\n\t\t\t\n\t\t\tsqlQuery = hibernateH.getHibernateSession().createSQLQuery(query.toString());\n//\t\t\tsqlQuery.addEntity(\"vista\", ClasificacionDTO.class);\n\t\t\t\n//\t\t\tclasificacionDTOs =sqlQuery.list();\n\t\t\treturn sqlQuery.list();\n\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t}\n//\t\treturn clasificacionDTOs;\n\t\t\n\t}", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@SuppressWarnings(\"unchecked\")\n\tpublic List<CartaVO> cartasToProducto(int id) {\n String queryString = \"SELECT DISTINCT c FROM CartaVO c\"\n + \" INNER JOIN c.ProdCarta t WHERE t.producto.id=:x\";\n\n Query query = this.entityManager.createQuery(queryString);\n\n query.setParameter(\"x\", id);\n\n List<CartaVO> resultList = (List<CartaVO>) query.getResultList();\n return resultList;\n\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public Cliente[] findWhereAccesoConsolaXmlPdfEquals(int accesoConsolaXmlPdf) throws ClienteDaoException;", "@Override\r\n public List<Entradas> consultarEntradasPorCole(Colecciones coleccion){\r\n \tString hql = \"SELECT ent FROM Colecciones col, ColeccionesRss colrss, Entradas ent WHERE \"\r\n \t\t\t+ \" col.codigoCole = colrss.colecciones.codigoCole AND colrss.rss.codigoRss = ent.rss.codigoRss AND \"\r\n \t\t\t+ \" col.codigoCole = \"+coleccion.getCodigoCole();\r\n \tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n \tList<Entradas> lasEntradas = query.list();\r\n \treturn lasEntradas;\r\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<ReciboPension> buscarRecibosDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public List<Tbl_campo> getAllCamposByFase(Long id_fase){\n\t\tList<Tbl_campo> list = (List<Tbl_campo>) currentSession().\n\t\t\t\tgetNamedQuery(\"com.uniandes.db.vo.Tbl_campo.findAllByFase\")\n\t\t\t\t.setParameter(\"id_fase\", id_fase).list();\n\t\treturn list;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Curso> listarCursosPorDocente(int docente) {\r\n\t\tSession session = sf.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tQuery query = session.createQuery(\"select c from DocenteBean d join d.cursos c \"\r\n\t\t\t\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\t//Query query = session.createQuery(\"select c from CursoBean c join d.cursos c \"\r\n\t\t\t//\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\tquery.setInteger(0, docente);\r\n\t\tList<Curso> cursos = new ArrayList<Curso>();\r\n\t\ttry {\r\n\t\t\tList<CursoBean> cursosBean = new ArrayList<CursoBean>();\r\n\t\t\tcursosBean = query.list();\r\n\t\t\tfor(CursoBean cursoBean : cursosBean){\r\n\t\t\t\tCurso curso = cursoBean.pasarNegocio();\r\n\t\t\t\tcursos.add(curso);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tsession.flush();\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\treturn cursos;\r\n\t}", "public DatiBancari[] findByComuni(long fkComune) throws DatiBancariDaoException;", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "public ProductoDTO buscarproducto(ProductoDTO c) {\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ProductoDTO arrpdto = null;\r\n\r\n try {\r\n ps = conn.getConn().prepareStatement(SQL_READ);\r\n ps.setInt(1, c.getId());\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arrpdto = new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9));\r\n\r\n }\r\n return arrpdto;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n\r\n return null;\r\n }", "public List<ProyeccionKid> getListaProyeccionKids(int idOrganizacion, Producto producto, Bodega bodega, Date fechaDesde, Date fechaHasta)\r\n/* 34: */ {\r\n/* 35:62 */ List<ProyeccionKid> listaProyeccionKid = new ArrayList();\r\n/* 36:63 */ for (ProductoMaterial productoMaterial : getListaProductoMaterial(0, null, null, null, null))\r\n/* 37: */ {\r\n/* 38:64 */ ProyeccionKid proyeccionKid = new ProyeccionKid();\r\n/* 39:65 */ proyeccionKid.setProductoMaterial(productoMaterial);\r\n/* 40:66 */ proyeccionKid.setStock(getStock(productoMaterial.getMaterial(), null, null, null));\r\n/* 41:67 */ proyeccionKid.setSaldo(proyeccionKid.getStock().divide(productoMaterial.getCantidad(), RoundingMode.HALF_UP));\r\n/* 42:68 */ listaProyeccionKid.add(proyeccionKid);\r\n/* 43: */ }\r\n/* 44:70 */ return listaProyeccionKid;\r\n/* 45: */ }", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public Collection pesquisarRoteiroEmpresaPorGrupoFaturamento(Integer idGrupoFaturamento) throws ErroRepositorioException;", "private void cargardatos() {\n String sql = \"SELECT * FROM nomPercepciones\";\n\n Object datos[] = new Object[13];\n try {\n conn = (this.userConn != null) ? this.userConn : Conexion.getConnection();\n stmt = conn.prepareStatement(sql);\n rs = stmt.executeQuery();\n while (rs.next()) {\n datos[0] = rs.getString(\"idNomPer\");\n datos[1] = rs.getString(\"nombre\");\n datos[2] = rs.getString(\"dias\");\n if (rs.getString(\"estatus\").equalsIgnoreCase(\"1\")) {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/actulizadoj.png\")));\n } else {\n datos[3] = new JLabel(new ImageIcon(getClass().getResource(\"/View/img/noactualizadoj.png\")));\n }\n\n tabla1.addRow(datos);\n }\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"Error al cargar los datos\\n\" + e, \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } finally {\n Conexion.close(rs);\n Conexion.close(stmt);\n if (this.userConn == null) {\n Conexion.close(conn);\n }\n }\n }", "public List<Activo> _queryCentroCosto_ActivoList(Long centrocosto_id) {\n synchronized (this) {\n if (centroCosto_ActivoListQuery == null) {\n QueryBuilder<Activo> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Centrocosto_id.eq(null));\n centroCosto_ActivoListQuery = queryBuilder.build();\n }\n }\n Query<Activo> query = centroCosto_ActivoListQuery.forCurrentThread();\n query.setParameter(0, centrocosto_id);\n return query.list();\n }", "public List<Catalogo> buscarPorTipoCatalogoId(final Long codigo) throws DaoException {\n try {\n return buscarPorConsultaNombrada(Catalogo.BUSCAR_POR_TIPO_CATALOGO_ID, codigo);\n } catch (DaoException ex) {\n Logger.getLogger(DatoAdicionalDao.class.getName()).log(Level.SEVERE, null, ex);\n throw new DaoException(ex);\n }\n }", "@Override\n\tpublic List<Cliente> getbyidAndGrupo(long id, Long idGrupo) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> clients =getCurrentSession().createQuery(\"from Cliente c join fetch c.grupos grupos where grupos.id='\"+idGrupo+\"' and c.id=\"+id+\" and c.activo=1\" ).list();\n \tif(clients != null){\n \treturn clients;}\n \telse {return null;}\n\t}", "public List<EntityClass> cerca(String testoRicerca, String colonnaFiltro){\n CriteriaContainer cc = new CriteriaContainer();\n // SELECT * FROM EntityClass\n cc.query.select(cc.root);\n // SELECT * FROM EntityClass WHERE colonnaFiltro LIKE :testoParam\n ParameterExpression<String> testoParam = cc.builder.parameter(String.class);\n cc.query.where(\n cc.builder.like(cc.root.get(colonnaFiltro), testoParam)\n );\n // Ottengo la lista risultante dalla query\n return getSession().createQuery(cc.query)\n .setParameter(testoParam, \"%\"+testoRicerca+\"%\") // :testoParam -> \"%testoRicerca%\"\n .getResultList();\n }", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public ResultSet MostrarCitaCliente(String nif) throws SQLException {\n\t\t\n\t\tString sql = \"SELECT cita.idCita, cita.fechaCita, cita.estadoCita,horas.Hora,sala.idSala, sala.tamanoSala,medico.nombreMedico FROM(cita INNER JOIN cliente on cita.idClienteAux = cliente.idCliente INNER JOIN medico ON cita.idMedicoAux = medico.idMedico INNER JOIN sala ON cita.idSalaAux = sala.idSala INNER JOIN horas ON cita.idHoraAux = horas.idHora) WHERE cliente.nifCliente like'\"+nif+\"' ORDER BY fechaCita ASC , Hora ASC\";\n\t\ttry {\n\t\t\tconn = conexion.getConexion(); // nueva conexion a la bbdd CREARLO EN TODOS LOS METODOS\n\t\t\tst=(Statement) conn.createStatement();\n\t\t\tresultado = st.executeQuery(sql);\n\t\t\t\t//st.close();\n\t\t\t\t//con.close();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public Cliente[] findWhereIdClienteCategoriaEquals(int idClienteCategoria) throws ClienteDaoException;", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public List<TdSecCxlc> existeDevengado(Integer secCxlcCiclo, Long secDevengado) {\n String existeDevengado = super.getQueryDefinition(\"existeDevengado\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"secCxlcCiclo\", secCxlcCiclo);\n mapValues.put(\"secDevengado\", secDevengado);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n return namedTemplate.query(existeDevengado, namedParameters, new TdSecCxlcRegistroAux());\n }", "Boolean findExistsCampania(GestionPrecioID id) ;", "public List<PersonEntity> obtenerDatosPersonasPorId(int idCliente) {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes filtrando por ID\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONA_ID(), PersonEntity.class)\n\n\t\t\t\t\t// Entradas\n\t\t\t\t\t.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN)\n\n\t\t\t\t\t// Parametros\n\t\t\t\t\t.setParameter(1, idCliente);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONA_ID() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }", "public SgfensBanco[] findWhereIdBancoEquals(int idBanco) throws SgfensBancoDaoException;", "@Override\n\tpublic CLIENTE pesquisar(int id_cliente) {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE WHERE ID_CLIENTE = ?\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setInt(1, id_cliente);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente.setId_cliente(res.getInt(\"ID_CLIENTE\"));\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cliente;\n\t}", "public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public Collection pesquisarParcelamentoContaFuncionario(Integer idFuncionario, Date dataInicial, Date dataFinal)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection retorno = null;\n\t\tSession session = HibernateUtil.getSession();\n\t\tStringBuffer consulta = new StringBuffer();\n\n\t\ttry{\n\t\t\tconsulta.append(\"SELECT MPCCDFUN AS mpccdfun, \");\n\t\t\tconsulta.append(\" MPCDTMPC AS mpcdtmpc, \");\n\t\t\tconsulta.append(\" MPCHRMPC AS mpchrmpc, \");\n\t\t\tconsulta.append(\" MPCAMINI AS mpcamini, \");\n\t\t\tconsulta.append(\" MPCAMFIN AS mpcamfin, \");\n\t\t\tconsulta.append(\" MPCNNMATUSU AS mpcnnatusu, \");\n\t\t\tconsulta.append(\" MPCNNMATUSUD AS mpcnnmatusud, \");\n\t\t\tconsulta.append(\" MPCNNPREST AS mpcnnprest, \");\n\t\t\tconsulta.append(\" MPCVLENTR AS mpcvlentr, \");\n\t\t\tconsulta.append(\" MPCVLPREST AS mpcvlprest, \");\n\t\t\tconsulta.append(\" MPCVLDEBHIST AS mpcvldebhist, \");\n\t\t\tconsulta.append(\" MPCVLDEBCORR AS mpcvldebcorr, \");\n\t\t\tconsulta.append(\" MPCVLTOTSACINCL AS mpcvltotsacincl, \");\n\t\t\tconsulta.append(\" MPCVLPARCEL AS mpcvlparcel, \");\n\t\t\tconsulta.append(\" MPCNNMATGER AS mpcnnmatger \");\n\t\t\tconsulta.append(\"FROM SCITMPC \");\n\t\t\tconsulta.append(\"WHERE MPCCDFUN = :idFuncionario \");\n\t\t\tconsulta.append(\"AND MPCDTMPC BETWEEN :dataInicial AND :dataFinal \");\n\t\t\tconsulta.append(\"ORDER BY MPCDTMPC, MPCHRMPC, MPCCDFUN \");\n\n\t\t\tSQLQuery query = session.createSQLQuery(consulta.toString());\n\n\t\t\t// RETORNO\n\t\t\tquery.addScalar(\"mpccdfun\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcdtmpc\", Hibernate.DATE);\n\t\t\tquery.addScalar(\"mpchrmpc\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamini\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamfin\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnatusu\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnmatusud\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnprest\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcvlentr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlprest\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebhist\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebcorr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvltotsacincl\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlparcel\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcnnmatger\", Hibernate.INTEGER);\n\n\t\t\t// PARAMETROS\n\t\t\tquery.setInteger(\"idFuncionario\", idFuncionario);\n\t\t\tquery.setDate(\"dataInicial\", dataInicial);\n\t\t\tquery.setDate(\"dataFinal\", dataFinal);\n\n\t\t\tretorno = query.list();\n\n\t\t}catch(HibernateException e){\n\t\t\t// levanta a exceção para a próxima camada\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\t// fecha a sessão\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public List<ReciboPension> buscarRecibosAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "@Override\n\tpublic Collection<LineaComercialClasificacionDTO> consultarLineaComercialClasificacionAsignacionMasivaNoIngresar(String codigoClasificacion,String nivelClasificacion,String valorTipoLineaComercial,String codigoLinCom)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Entr� a consultar Linea Comercial Clasificacion Asignacion Masiva No Ingresar: {}\",codigoClasificacion);\n\t\tStringBuilder query = null;\n\t\tQuery sqlQuery = null;\n\t\tSession session=null;\n\t\tBoolean clearCache = Boolean.TRUE;\n\t\tCollection<LineaComercialClasificacionDTO> lineaComercialClasificacionDTOs = new ArrayList<LineaComercialClasificacionDTO>();\n\t\ttry {\n\t\t\tsession = hibernateHLineaComercialClasificacion.getHibernateSession();\n\t\t\tsession.clear();\n\t\t\n\t\t\t\n\t\t\tquery = new StringBuilder();\n\t\t\tquery.append(\" SELECT LC, L, C, CV \");\n\t\t\tquery.append(\" FROM LineaComercialClasificacionDTO LC, LineaComercialDTO L, ClasificacionDTO C, CatalogoValorDTO CV \");\n\t\t\tquery.append(\" WHERE L.id.codigoLineaComercial = LC.codigoLineaComercial \");\n//\t\t\tquery.append(\" AND L.nivel = 0 \");\n\t\t\tquery.append(\" AND L.estado = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tquery.append(\" AND LC.estado = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tquery.append(\" AND L.valorTipoLineaComercial = '\"+valorTipoLineaComercial+\"' \");\n\t\t\tquery.append(\" AND LC.id.codigoClasificacion = C.id.codigoClasificacion \");\n\t\tif(!codigoLinCom.equals(\"null\")){\t\n\t\t\tquery.append(\" AND L.id.codigoLineaComercial != \"+codigoLinCom);\n\t\t}\t\n\t\t\tquery.append(\" AND L.valorTipoLineaComercial = CV.id.codigoCatalogoValor \");\n\t\t\tquery.append(\" AND L.codigoTipoLineaComercial = CV.id.codigoCatalogoTipo \");\n\t\t\tquery.append(\" AND LC.id.codigoClasificacion IN ( \");\n\t\t\tif(!nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" SELECT id.codigoClasificacion FROM ClasificacionDTO \");\n\t\t\t\tquery.append(\" WHERE estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\tquery.append(\" AND codigoClasificacionPadre IN( \");\n\t\t\t}\n\t\t\tquery.append(\" SELECT id.codigoClasificacion FROM ClasificacionDTO \");\n\t\t\tquery.append(\" WHERE estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tquery.append(\" AND codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+\" )) \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" \"+codigoClasificacion+\") \");\n\t\t\t}\n\n\t\t\tsqlQuery = hibernateHLineaComercialClasificacion.createQuery(query.toString(), clearCache);\n\t\t\t\n\t\t\t/**\n\t\t\t * aqui se asigna al objeto LineaComercialClasificacionDTO los objetos (ClasificacionDTO,LineaComercialDTO)\n\t\t\t * que nos entrego la consulta por separado\n\t\t\t */\n\t\t\tCollection<Object[]> var = sqlQuery.list();\n\t\t\tfor(Object[] object:var){\n\t\t\t\tLineaComercialClasificacionDTO l=(LineaComercialClasificacionDTO)object[0];\n\t\t\t\tl.setLineaComercial((LineaComercialDTO)object[1]);\n\t\t\t\tl.setClasificacion((ClasificacionDTO)object[2]);\n\t\t\t\tl.getLineaComercial().setTipoLineaComercial((CatalogoValorDTO)object[3]);\n\t\t\t\tlineaComercialClasificacionDTOs.add(l);\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t}\n\t\t\n\t\t\n\t\treturn lineaComercialClasificacionDTOs;\n\t}", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }", "@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}", "public ResultSet MostrarCitasClienteHoy(String nif) throws SQLException { // muestra TODAS las citas de HOY\n\t\t\n\t\tString sql = \"SELECT cita.idCita,cita.fechaCita,cita.estadoCita,cliente.nombreCliente,cliente.nifCliente,medico.nombreMedico,sala.idSala,sala.tamanoSala, horas.Hora FROM cita INNER JOIN cliente ON cita.idClienteAux = cliente.idCliente INNER JOIN medico ON cita.idMedicoAux = medico.idMedico INNER JOIN sala ON cita.idSalaAux = sala.idSala INNER JOIN horas ON cita.idHoraAux = horas.idHora WHERE DATE(fechaCita) >= DATE(NOW()) AND cliente.nifCliente = '\"+nif+\"' ORDER BY fechaCita ASC , Hora ASC\"; // sentencia busqueda CITA de cliente Hoy\n\t\ttry {\n\t\t\tconn = conexion.getConexion(); // nueva conexion a la bbdd CREARLO EN TODOS LOS METODOS\n\t\t\tst=(Statement) conn.createStatement();\n\t\t\tresultado = st.executeQuery(sql);\n\t\t\t\t//st.close();\n\t\t\t\t//con.close();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public static OpcaoComida Search(int ID) throws SQLException{\n Connection con = ConnectionFactory.getConnection();\n PreparedStatement stmt = null;\n ResultSet rs = null;\n String search = \"SELECT * FROM OPCAO WHERE ID = \"+ID;\n stmt = con.prepareStatement(\"SELECT * FROM OPCAO WHERE ID = ID\");\n stmt.execute();\n rs = stmt.executeQuery(search);\n OpcaoComida l = new OpcaoComida();\n if (rs.next()) {\n l.setID(rs.getInt(\"ID\"));\n l.setCategoria(rs.getString(\"categoria\"));\n l.setNomeComida(rs.getString(\"nomeComida\"));\n }\n ConnectionFactory.closeConnection(con, stmt);\n return l;\n }" ]
[ "0.6637476", "0.6290505", "0.6265425", "0.61949366", "0.6127397", "0.61118203", "0.6073922", "0.60415214", "0.60159117", "0.59299767", "0.5928777", "0.5907531", "0.5887444", "0.58471215", "0.5843371", "0.5838384", "0.58266103", "0.58184284", "0.58067626", "0.5776658", "0.57440794", "0.57253456", "0.5705323", "0.56878126", "0.56698334", "0.56572384", "0.5655704", "0.56525356", "0.56418884", "0.5640804", "0.56379235", "0.5635862", "0.56306356", "0.5627087", "0.56077117", "0.5607033", "0.55992085", "0.5593433", "0.55896944", "0.55892944", "0.5579614", "0.5578672", "0.5574108", "0.5567721", "0.5552292", "0.553894", "0.5529687", "0.55286", "0.5516521", "0.55057365", "0.5497836", "0.549643", "0.5479369", "0.54716694", "0.54674906", "0.54516995", "0.54422104", "0.5440795", "0.5436576", "0.54344696", "0.5432488", "0.54306203", "0.5429469", "0.54226965", "0.54174197", "0.5410737", "0.5406652", "0.5406303", "0.54018193", "0.53998786", "0.5397607", "0.53938276", "0.53864276", "0.53796923", "0.53796846", "0.5377154", "0.53764904", "0.53740525", "0.53708667", "0.5370554", "0.5364184", "0.53554523", "0.53371006", "0.5334978", "0.53335583", "0.5332702", "0.5331947", "0.5331651", "0.5324173", "0.5324082", "0.5321634", "0.5318954", "0.5306646", "0.5305408", "0.5292236", "0.52856845", "0.52806056", "0.52749574", "0.52746385", "0.5263085" ]
0.74948955
0
Returns all rows from the sgfens_pedido_producto table that match the criteria 'COMENTARIOS = :comentarios'.
public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public void setComentarios(String comentarios) {\n this.comentarios = comentarios;\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereNumeroSucursalEquals(String numeroSucursal) throws SgfensBancoDaoException;", "public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;", "public DefaultTableModel pedidosCocinero(){\r\n List<Pedido> lista =pedidos.listadosPedidosCocinero(GestionUsuarios.getInstance().getPersona());\r\n return Convertidor.pedidoToTableModel(lista); \r\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public Cliente[] findWhereFolioClienteMovilEquals(String folioClienteMovil) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereMunicipioEquals(String municipio) throws ClienteDaoException;", "public void setComentariosSoporte(String comentariosSoporte) {\n this.comentariosSoporte = comentariosSoporte;\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public List<Calificar> list_comentarios(String nombre){\n List<Calificar> comentarios = null;\n\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n\n try{\n\n tx = session.beginTransaction();\n String hql = \"from Calificar c where c.puesto.idNombre = :puesto\";\n Query query = session.createQuery(hql);\n query.setParameter(\"puesto\", nombre);\n comentarios = (List<Calificar>)query.list();\n tx.commit();\n\n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n\n return comentarios;\n }", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public RelacionConceptoEmbalaje[] findWhereCantidadEquals(double cantidad) throws RelacionConceptoEmbalajeDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public Cliente[] findWhereNombreComercialEquals(String nombreComercial) throws ClienteDaoException;", "public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public java.util.Collection findPlanMedioMesByValorDescuento(java.math.BigDecimal valorDescuento) {\r\n\r\n String queryString = \"from PlanMedioMesEJB e where e.valorDescuento = :valorDescuento \";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setParameter(\"valorDescuento\", valorDescuento);\r\n return query.getResultList();\r\n }", "@Override\r\n\tpublic List<Requisito> getRequisitos(int cursoId, int centroId) {\r\n\t\tList<Requisito> requisitos = new ArrayList<Requisito>();\r\n\t\ttry\r\n\t\t{\r\n\t\t\trequisitos = jdbcTemplate.query(\r\n\t\t\t\t\t\t\tSQL_SELECT_REQUISITOS_CERTIFICACION + \" where ac.centroid='\" + centroId + \"' and c.id= \" + cursoId + \" order by cr.descripcion\",\r\n\t\t\t\t\t\t\tnew RowMapper<Requisito>() {\r\n\t\t\t\t\t\t\t\tpublic Requisito mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t\t\t\t\t\tRequisito requisito = new Requisito();\r\n\t\t\t\t\t\t\t\t\trequisito.setCodigo(rs.getString(\"codigo_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setDescripcion(rs.getString(\"descripcion_requisito\"));\r\n\t\t\t\t\t\t\t\t\trequisito.setAcreditacion(rs.getString(\"codigo_acreditacion\"));\r\n\t\t\t\t\t\t\t\t\treturn requisito;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}); \r\n\t\t}\r\n\t\tcatch(EmptyResultDataAccessException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn requisitos;\r\n\t}", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "@GetMapping(\"/tema/{id}/comentarios\")\n public Iterable<Comentario> findAllComentarios(@PathVariable(\"id\") Long id) {\n return repository.findById(id).get().getComentarios();\n }", "public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereFechaCargaEquals(Date fechaCarga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE FECHA_CARGA = ? ORDER BY FECHA_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), fechaCarga);\n\n }", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "@Override\r\n public List<Entradas> consultarEntradasPorCole(Colecciones coleccion){\r\n \tString hql = \"SELECT ent FROM Colecciones col, ColeccionesRss colrss, Entradas ent WHERE \"\r\n \t\t\t+ \" col.codigoCole = colrss.colecciones.codigoCole AND colrss.rss.codigoRss = ent.rss.codigoRss AND \"\r\n \t\t\t+ \" col.codigoCole = \"+coleccion.getCodigoCole();\r\n \tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n \tList<Entradas> lasEntradas = query.list();\r\n \treturn lasEntradas;\r\n }", "public static String [] getModelosCaballerosProvicional() {\n\n\t\tSession session = SessionHibernate.getInstance().openSession();\n\t\tsession.beginTransaction();\n\t\t\n\t\tString str = \"FROM ModeloCaballero\";\n\t\tQuery query = session.createQuery(str);\n\t\tint i=0;\n\n\t\tString [] list =new String [query.list().size()];\n\t\t\n\t\tfor (Object obj : query.list()) {\n\t\t\tModeloCaballero ma = (ModeloCaballero) obj;\n\t\t\tlist[i++]=ma.getNombreModelo();\n\t\t\n\t\t\tSystem.err.println(ma.getId() + \"; \" + ma.getNombreModelo());\n\t\t}\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t\t\n\t\treturn list;\n\t}", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "public Cliente[] findWhereTelefonoEquals(String telefono) throws ClienteDaoException;", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public NominaPuesto[] findWhereNombreEquals(String nombre) throws NominaPuestoDaoException;", "public Collection pesquisarParcelamentoContaUsuario(Integer idUsuario, Date dataInicial, Date dataFinal)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection retorno = null;\n\t\tSession session = HibernateUtil.getSession();\n\t\tStringBuffer consulta = new StringBuffer();\n\n\t\ttry{\n\t\t\tconsulta.append(\"SELECT MPCCDFUN AS mpccdfun, \");\n\t\t\tconsulta.append(\" MPCDTMPC AS mpcdtmpc, \");\n\t\t\tconsulta.append(\" MPCHRMPC AS mpchrmpc, \");\n\t\t\tconsulta.append(\" MPCAMINI AS mpcamini, \");\n\t\t\tconsulta.append(\" MPCAMFIN AS mpcamfin, \");\n\t\t\tconsulta.append(\" MPCNNMATUSU AS mpcnnatusu, \");\n\t\t\tconsulta.append(\" MPCNNMATUSUD AS mpcnnmatusud, \");\n\t\t\tconsulta.append(\" MPCNNPREST AS mpcnnprest, \");\n\t\t\tconsulta.append(\" MPCVLENTR AS mpcvlentr, \");\n\t\t\tconsulta.append(\" MPCVLPREST AS mpcvlprest, \");\n\t\t\tconsulta.append(\" MPCVLDEBHIST AS mpcvldebhist, \");\n\t\t\tconsulta.append(\" MPCVLDEBCORR AS mpcvldebcorr, \");\n\t\t\tconsulta.append(\" MPCVLTOTSACINCL AS mpcvltotsacincl, \");\n\t\t\tconsulta.append(\" MPCVLPARCEL AS mpcvlparcel, \");\n\t\t\tconsulta.append(\" MPCNNMATGER AS mpcnnmatger \");\n\t\t\tconsulta.append(\"FROM SCITMPC \");\n\t\t\tconsulta.append(\"WHERE MPCNNMATUSU = :idUsuario \");\n\t\t\tconsulta.append(\"AND MPCDTMPC BETWEEN :dataInicial AND :dataFinal \");\n\t\t\tconsulta.append(\"ORDER BY MPCDTMPC, MPCHRMPC, MPCNNMATUSU \");\n\n\t\t\tSQLQuery query = session.createSQLQuery(consulta.toString());\n\n\t\t\t// RETORNO\n\t\t\tquery.addScalar(\"mpccdfun\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcdtmpc\", Hibernate.DATE);\n\t\t\tquery.addScalar(\"mpchrmpc\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamini\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcamfin\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnatusu\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnmatusud\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcnnprest\", Hibernate.INTEGER);\n\t\t\tquery.addScalar(\"mpcvlentr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlprest\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebhist\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvldebcorr\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvltotsacincl\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcvlparcel\", Hibernate.BIG_DECIMAL);\n\t\t\tquery.addScalar(\"mpcnnmatger\", Hibernate.INTEGER);\n\n\t\t\t// PARAMETROS\n\t\t\tquery.setInteger(\"idUsuario\", idUsuario);\n\t\t\tquery.setDate(\"dataInicial\", dataInicial);\n\t\t\tquery.setDate(\"dataFinal\", dataFinal);\n\n\t\t\tretorno = query.list();\n\n\t\t}catch(HibernateException e){\n\t\t\t// levanta a exceção para a próxima camada\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\t// fecha a sessão\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\n\t\treturn retorno;\n\t}", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public String getComentarios() {\n return comentarios;\n }", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findWhereNombreBancoEquals(String nombreBanco) throws SgfensBancoDaoException;", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "public List<Coupefeu> rechercheCoupefeuBatiment(int numeroBatiment){\n\t\treturn em.createQuery(\"from Coupefeu c WHERE c.batiment.numero = \"+numeroBatiment).getResultList();\n\t}", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public SgfensBanco[] findWhereIdEmpresaEquals(int idEmpresa) throws SgfensBancoDaoException;", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "public Collection pesquisarIdContasCliente(Integer codigoCliente,\n\t\t\tShort relacaoTipo, Integer anoMes, Date dataVencimentoContaInicio, \n\t\t\tDate dataVencimentoContaFim, Integer anoMesFim) throws ErroRepositorioException;", "public Ruta[] findWhereIdUsuarioEquals(int idUsuario) throws RutaDaoException;", "public DatiBancari[] findWhereFkComuneEquals(long fkComune) throws DatiBancariDaoException;", "public SgfensBanco[] findAll() throws SgfensBancoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public Cliente[] findWhereCorreoEquals(String correo) throws ClienteDaoException;", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public List<ConsumoAnormalidadeFaixa> pesquisarConsumoAnormalidadeFaixa() throws ErroRepositorioException;", "public DatiBancari[] findByComuni(long fkComune) throws DatiBancariDaoException;", "public CrGrupoFormulario[] findWhereNombreEquals(String nombre) throws CrGrupoFormularioDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public ArrayList<DTOValoracion> listaValoraciones() {\n ArrayList<DTOValoracion> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select valoracion, COUNT (valoracion) cantidad\\n\"\n + \"from Comentarios\\n\"\n + \"where valoracion is not null\\n\"\n + \"group by valoracion \");\n\n while (rs.next()) {\n\n int valoracion = rs.getInt(1);\n int cantidad = rs.getInt(2);\n\n DTOValoracion v = new DTOValoracion(valoracion, cantidad);\n\n lista.add(v);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public List<Calificar> comentarios(){\n List<Calificar> comentarios = null;\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n \n try{\n \n tx = session.beginTransaction();\n String hql = \"from Calificar\";\n Query query = session.createQuery(hql);\n comentarios = (List<Calificar>)query.list();\n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return comentarios;\n }", "public Collection<OrdemServicoFotoOcorrencia> listarOSFoto(OrdemServicoFotoOcorrencia osFoto) throws ErroRepositorioException{\n\n\t\tSession session = HibernateUtil.getSession();\n\t\ttry{\n\t\t\tCriteria criteria = session.createCriteria(OrdemServicoFotoOcorrencia.class);\n\n\t\t\tif(osFoto.getId() != null){\n\t\t\t\tcriteria.add(Restrictions.eq(\"id\", osFoto.getId()));\n\t\t\t}\n\t\t\tif(osFoto.getIdOrdemServico() != null){\n\t\t\t\tcriteria.add(Restrictions.eq(\"idOrdemServico\", osFoto.getIdOrdemServico()));\n\t\t\t}\n\t\t\tif(osFoto.getIdOrdemServicoProgramacao() != null){\n\t\t\t\tcriteria.add(Restrictions.eq(\"idOrdemServicoProgramacao\", osFoto.getIdOrdemServicoProgramacao()));\n\t\t\t}\n\t\t\tif(osFoto.getNumeroSequenciaFoto() != null){\n\t\t\t\tcriteria.add(Restrictions.eq(\"numeroSequenciaFoto\", osFoto.getNumeroSequenciaFoto()));\n\t\t\t}\n\n\t\t\treturn criteria.list();\n\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t}", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "public List<FecetProrrogaOrden> findWhereIdFirmanteEquals(final BigDecimal idFirmante) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_FIRMANTE = ? ORDER BY ID_FIRMANTE\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idFirmante);\n\n }", "public Cliente[] findWhereNombreClienteEquals(String nombreCliente) throws ClienteDaoException;", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Curso> listarCursosPorDocente(int docente) {\r\n\t\tSession session = sf.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tQuery query = session.createQuery(\"select c from DocenteBean d join d.cursos c \"\r\n\t\t\t\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\t//Query query = session.createQuery(\"select c from CursoBean c join d.cursos c \"\r\n\t\t\t//\t+ \"where d.id = ? and c.activo = 1\");\r\n\t\tquery.setInteger(0, docente);\r\n\t\tList<Curso> cursos = new ArrayList<Curso>();\r\n\t\ttry {\r\n\t\t\tList<CursoBean> cursosBean = new ArrayList<CursoBean>();\r\n\t\t\tcursosBean = query.list();\r\n\t\t\tfor(CursoBean cursoBean : cursosBean){\r\n\t\t\t\tCurso curso = cursoBean.pasarNegocio();\r\n\t\t\t\tcursos.add(curso);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tsession.flush();\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\treturn cursos;\r\n\t}", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public Cliente[] findWhereNumeroEquals(String numero) throws ClienteDaoException;", "public static List<Produto> consultaProduto(int codigo, String nome, String tipo, String fornecedor) throws Exception {\n List<Produto> produto = ProdutoDAO.procurarProduto(codigo, nome, tipo, fornecedor);\r\n for (int i = 0; i < produto.size(); i++) {\r\n if (!produto.isEmpty()) {\r\n return produto;\r\n }\r\n }\r\n return null;\r\n }", "public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public Ruta[] findWhereComentarioRutaEquals(String comentarioRuta) throws RutaDaoException;", "public List<TdSecCxlc> existeDevengado(Integer secCxlcCiclo, Long secDevengado) {\n String existeDevengado = super.getQueryDefinition(\"existeDevengado\");\n \n Map<String, Object> mapValues = new HashMap<String, Object>();\n mapValues.put(\"secCxlcCiclo\", secCxlcCiclo);\n mapValues.put(\"secDevengado\", secDevengado);\n \n SqlParameterSource namedParameters = new MapSqlParameterSource(mapValues);\n DataSource ds = super.getJdbcTemplate().getDataSource();\n NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(ds);\n \n super.getJdbcTemplate().setFetchSize(100);\n return namedTemplate.query(existeDevengado, namedParameters, new TdSecCxlcRegistroAux());\n }", "@Query(\"select pu from ProcesoUsuario pu join pu.proceso p where p.estado = true and p.juzgado=?1\")\r\n\tPage<ProcesoUsuario> findAllByJuzgado(Juzgado juzgado, Pageable pageable);" ]
[ "0.7148809", "0.6294366", "0.6265672", "0.62293416", "0.6122599", "0.60329604", "0.60092837", "0.6005074", "0.59714866", "0.5950814", "0.59444535", "0.59400266", "0.59171385", "0.58975685", "0.5896584", "0.5867767", "0.5855981", "0.58544636", "0.5849017", "0.5829055", "0.58289236", "0.5810549", "0.58068645", "0.57964104", "0.57882595", "0.57650834", "0.57573706", "0.57519853", "0.57507694", "0.5749098", "0.5746773", "0.5741059", "0.5737939", "0.573253", "0.57281494", "0.5724803", "0.56881326", "0.5678968", "0.56691295", "0.56637484", "0.5660841", "0.56481624", "0.56400293", "0.562921", "0.5626774", "0.5625952", "0.5620189", "0.5615343", "0.56111014", "0.56042445", "0.5599399", "0.55973846", "0.55966085", "0.5585684", "0.55853736", "0.5585064", "0.5580983", "0.5577526", "0.55774456", "0.5576936", "0.5559043", "0.5538209", "0.5533252", "0.5530176", "0.5520751", "0.5517168", "0.55154157", "0.55106634", "0.55106103", "0.5507986", "0.5507061", "0.5506294", "0.5504272", "0.55011195", "0.5492609", "0.5490028", "0.5483302", "0.5480646", "0.5478419", "0.54772615", "0.54744947", "0.5474111", "0.5472762", "0.54718935", "0.5470234", "0.54650486", "0.546317", "0.54619336", "0.5460195", "0.54565644", "0.54544073", "0.5446807", "0.54461527", "0.5444728", "0.54437023", "0.54395413", "0.54368067", "0.5434444", "0.54260385", "0.5422878" ]
0.7423586
0
Sets the value of maxRows
public void setMaxRows(int maxRows);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMaxRows(int maxRows)\r\n\t{\r\n\t\tthis.maxRows = maxRows;\r\n\t}", "public void setMaxRows(int maxRows)\r\n\t{\r\n\t\tthis.maxRows = maxRows;\r\n\t}", "public void setMaxRows(int maxRows) {\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows) {\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows) {\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows)\n\t{\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows)\n\t{\n\t\tthis.maxRows = maxRows;\n\t}", "@Override\n public void setMaxRows( int max ) throws SQLException {\n max_rows = max;\n }", "@Override\n\tpublic void setMaxRows(final int max) throws SQLException {\n\t\tmaxRows = max;\n\t}", "@Override\r\n public void setMaxRow(int maxRow) {\n }", "public void setMaxRows(int max) throws SQLException {\n\r\n }", "public void setMaxRows(int max) throws SQLException {\n currentPreparedStatement.setMaxRows(max);\n }", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows() {\n\t\treturn maxRows;\n\t}", "public int getMaxRows() {\n\t\treturn maxRows;\n\t}", "public void setMaxRows(String off) {\n\t\ttry {\n\t\t\tmaxRows = Integer.parseInt(off);\n\t\t} catch (Exception e) {\n\t\t\tmaxRows = 0;\n\t\t}\n\t}", "public final void setMaxRowsInBatch(int numRows){\n if (numRows <= 0){\n throw new IllegalArgumentException(\"The number of rows in a batch must be > 0\");\n }\n myMaxRowsInBatch = numRows;\n }", "public void setMaxInSingleRow(int value) {\n maxInSingleRow = value;\n }", "public void setMaxRecords(int maxRecords) {\n this.maxRecords = maxRecords;\n }", "public void setMaxRecords(Integer maxRecords) {\n this.maxRecords = maxRecords;\n }", "public void setMaxRecords(Integer maxRecords) {\n this.maxRecords = maxRecords;\n }", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public int getMaxRows();", "public void setMaxResults(int max) {\n\r\n\t}", "@Override\n public int getMaxRows() throws SQLException {\n return max_rows;\n }", "public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }", "public void setMaxResult(int maxResult) {\n this.maxResult = maxResult;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setMaxEntries(int maxEntries) {\n this.maxEntries = maxEntries;\n }", "public void setRowLimit(int newVal, ObjectChangeSink sink)\n {\n if(newVal==getRowLimit()) return;\n\n if(rootObj.isAutoValidate())\n _get_objectmanager().validate_rowLimit(new ObjectManagerContextImpl(Action.SET), newVal, this);\n\n ((TableReadCapabilityAttributesExtension)_imfObject).setRowLimit(newVal);\n Utils.setBitCascade(sink, getAdaptee());\n if (sink != null) {\n ObjectChange change = createPropertyChange(getAdaptee(), TableReadCapabilityAttributesExtension.Properties.ROW_LIMIT);\n sink.addObjectChange(getAdaptee(), change);\n }\n\n\n }", "int getMaxNumberOfRows();", "@Override\n public void setFetchSize(int rows) throws SQLException {\n if( (rows <= 0) || (rows >= this.getMaxRows ()) ) {\n throw new SQLException ( \"Condition 0 <= rows <= \" + \n \"this.getMaxRows() is not satisfied\");\n }\n fetchsize = rows; \n }", "protected void setMaxLineCount(int maxLineCount) {\n\t\tthis.maxLineCount = maxLineCount;\n\t}", "public void setMaxResults(Integer maxResults) {\n this.maxResults = maxResults;\n }", "public void setMaxResults(Integer maxResults) {\n this.maxResults = maxResults;\n }", "public void setMaxResults(Integer maxResults) {\n this.maxResults = maxResults;\n }", "public void setMaxResults(Integer maxResults) {\n this.maxResults = maxResults;\n }", "public final native void setMaxResults(double maxResults) /*-{\n this.setMaxResults(maxResults);\n }-*/;", "public void setFetchSize(int rows) throws SQLException {\n\n try {\n debugCodeCall(\"setFetchSize\", rows);\n checkClosed();\n\n if (rows < 0) {\n throw Message.getInvalidValueException(\"\" + rows, \"rows\");\n }\n else if (rows > 0) {\n if (stat != null) {\n int maxRows = stat.getMaxRows();\n if (maxRows > 0 && rows > maxRows) { throw Message.getInvalidValueException(\"\" + rows, \"rows\"); }\n }\n }\n else {\n rows = SysProperties.SERVER_RESULT_SET_FETCH_SIZE;\n }\n result.setFetchSize(rows);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void setMaxResults(int val) throws HibException;", "public final void setRowLimit(int newObj)throws SL_Exception\n {\n setRowLimit(newObj, null);\n }", "int maxNumberOfPutRows();", "public void setMaxValue(int maxValue) {\n this.maxValue = maxValue;\n }", "public int getMaxRow() {\n return maxRow;\n }", "public void SetMaxVal(int max_val);", "void setMaximum(int max);", "private void limitRows()\n {\n paginate(currentPage, getResultsPerPage());\n }", "void setMaxResults(int limit);", "public void setMaxDataPoints(int max){\n maxDataPoints=max;\n plotXYSettings();\n }", "int maxRowSize();", "public void setMaxAmount(int max) {\n _max = max;\n }", "public SizeLimitRowMapper(long maxSize){\r\n\t\tthis.maxBytes = maxSize;\r\n\t}", "public void setMaximumPoints(int maximum);", "public void setMAX_ITERACOES(int MAX_ITERACOES) \r\n {\r\n if(MAX_ITERACOES > 0)\r\n this.MAX_ITERACOES = MAX_ITERACOES;\r\n }", "public void setMax(int max)\n\t{\n\t\tif (max < 0)\n\t\t\tthrow new IllegalArgumentException(\"max < 0\");\n\t\tthis.max = max;\n\t}", "public void setMaximumPagesToFetch(int max)\n\t{\n\t\tFrontier.setMaximumPagesToFetch(max);\n\t}", "public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }", "public void setMaximum(Number max) {\n this.max = max;\n }", "public void setMaxLines(int maxLines) {\n if (mMaxLines == maxLines || maxLines <= 0) {\n return;\n }\n mMaxLines = maxLines;\n mNeedUpdateLayout = true;\n }", "public void setMaxConnections(int maxConnections)\n {\n _maxConnections = maxConnections;\n }", "@Override\n public int getMaxRowSize() {\n return 1048576;\n }", "public int getMaxRows() throws SQLException {\n return 0;\r\n }", "private void setNoOfRows(int noOfRows) {\n this.noOfRows = noOfRows;\n }" ]
[ "0.87787557", "0.87787557", "0.87161684", "0.87161684", "0.87161684", "0.8707965", "0.8707965", "0.8358402", "0.8312648", "0.82936466", "0.7996199", "0.7944771", "0.760557", "0.760557", "0.755075", "0.755075", "0.7532389", "0.7532389", "0.7522595", "0.7461296", "0.74321204", "0.7250749", "0.7211232", "0.7211232", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7206416", "0.7194438", "0.7049415", "0.7038704", "0.70095605", "0.6990791", "0.6990791", "0.6916085", "0.6901513", "0.689171", "0.6870818", "0.6823341", "0.6822854", "0.6822854", "0.6822854", "0.6822854", "0.6795611", "0.67948973", "0.67762315", "0.67606133", "0.6755137", "0.6751007", "0.6744056", "0.673087", "0.6720027", "0.6663037", "0.66466224", "0.6629949", "0.65913737", "0.65747625", "0.65388906", "0.653651", "0.65097034", "0.6503576", "0.6486399", "0.64812696", "0.645752", "0.64556515", "0.6445272", "0.6444005", "0.64390767", "0.6435976" ]
0.8893311
17
Gets the value of maxRows
public int getMaxRows();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows() {\n\t\treturn maxRows;\n\t}", "public int getMaxRows() {\n\t\treturn maxRows;\n\t}", "int getMaxNumberOfRows();", "public int getMaxRow() {\n return maxRow;\n }", "public int getMaxRow();", "@Override\n\tpublic Integer findMaxRows() {\n\t\treturn daoService.getEmpMapper().findMaxRows();\n\t}", "@Override\n public int getMaxRows() throws SQLException {\n return max_rows;\n }", "int maxRowSize();", "public int getMaxRows() throws SQLException {\n return 0;\r\n }", "public int getMaxInSingleRow() {\n return maxInSingleRow;\n }", "public Integer getMaxRecords() {\n return maxRecords;\n }", "public Integer getMaxRecords() {\n return maxRecords;\n }", "public int getMaxRecords() {\n return maxRecords;\n }", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public int getRowLimit()\n {\n return _get_imfObject().getRowLimit();\n }", "public int getMaxRows() throws SQLException {\n return currentPreparedStatement.getMaxRows();\n }", "public int getMaxRow() {\n return seatPlan.length;\n }", "public int getMaxRows() {\r\n\t\treturn boardcell.length;\r\n\t}", "int maxNumberOfPutRows();", "public int getmaxPeriodInOneRow() {\n return maxPeriodInOneRow;\n }", "public Integer getMaxResults() {\n return maxResults;\n }", "protected int getMaxResults() {\n\t\treturn maxResults;\n\t}", "int getMaxRecords();", "public void setMaxRows(int maxRows)\r\n\t{\r\n\t\tthis.maxRows = maxRows;\r\n\t}", "public void setMaxRows(int maxRows)\r\n\t{\r\n\t\tthis.maxRows = maxRows;\r\n\t}", "public void setMaxRows(int maxRows) {\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows) {\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows) {\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows)\n\t{\n\t\tthis.maxRows = maxRows;\n\t}", "public void setMaxRows(int maxRows)\n\t{\n\t\tthis.maxRows = maxRows;\n\t}", "public int getMaxValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getmaxvalue\",\n\t\t\t\tgetRefId());\n\t}", "@Override\r\n public void setMaxRow(int maxRow) {\n }", "public Integer getMaxPageSize() {\n return maxPageSize;\n }", "public java.lang.Integer getMaximumResultSize()\r\n {\r\n return this.maximumResultSize;\r\n }", "public java.lang.Integer getMaxResultados()\n {\n return this.maxResultados;\n }", "@Override\n public int getMaxRows() throws SQLException {\n return 0;\n }", "public Integer getMaxResults() {\n return this.maxResults;\n }", "public Integer getMaxResults() {\n return this.maxResults;\n }", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "Integer getMaximumResults();", "public double getMaxValue() {\n double max = Double.NEGATIVE_INFINITY;\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (data[i][j] > max)\n max = data[i][j];\n }\n }\n return max;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public int getMaxResults() {\n return this.maxResults;\n }", "@Override\n public void setMaxRows( int max ) throws SQLException {\n max_rows = max;\n }", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public final native double getMaxResults() /*-{\n return this.getMaxResults();\n }-*/;", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public Integer getMax() {\n\t\t\tif (hotMinMax) {\n\t\t\t\tConfigValue rawMinMax = new ConfigValue();\n\t\t\t\ttry {\n\t\t\t\t\trawSrv.getCfgMinMax(name, rawMinMax);\n\t\t\t\t\t// TODO: FIX HERE\n\t\t\t\t\treturn 100;\n\t\t\t\t} catch (TVMException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn new Integer(max);\n\t\t\t}\n\t\t\t// ....\n\t\t\treturn 100;\n\t\t}", "public Integer getMaxResultSize() {\n return maxResultSize;\n }", "public int getMaxId() {\n int count = driver.findElements(By.xpath(xpathTableRows)).size();\n int maxID = -1;\n if (count > 0) {\n maxID = Integer.parseInt(assertAndGetText(xpathTableRows + \"[\" + count + \"]//td[1]\"));\n }\n return maxID;\n }", "int getMaxResults();", "public void setMaxRows(int max) throws SQLException {\n\r\n }", "public int getMaxItems()\n {\n return maxItems;\n }", "Integer getMaxPageResults();", "public int getMaximum() {\n return this.iMaximum;\n }", "@Override\n\tpublic void setMaxRows(final int max) throws SQLException {\n\t\tmaxRows = max;\n\t}", "public int getMaxElements() {\n return maxElements;\n }", "public int getMax(){\n return tab[rangMax()];\n }" ]
[ "0.89268667", "0.89268667", "0.8919737", "0.8919737", "0.89009005", "0.89009005", "0.8418783", "0.8381294", "0.8103122", "0.79800224", "0.7852489", "0.77319413", "0.76905364", "0.76470834", "0.75391483", "0.75391483", "0.75257224", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.74832594", "0.7372313", "0.7369621", "0.7364564", "0.7295958", "0.7287318", "0.7227767", "0.7210394", "0.7193303", "0.71896225", "0.71606654", "0.71606654", "0.7136532", "0.7136532", "0.7136532", "0.7106515", "0.7106515", "0.70903057", "0.70656985", "0.70479", "0.70379514", "0.7024993", "0.7006349", "0.7006035", "0.7006035", "0.7000819", "0.69921553", "0.69717044", "0.6938672", "0.69186574", "0.69127005", "0.6908933", "0.68949735", "0.68949735", "0.68838125", "0.6882293", "0.6882293", "0.6882293", "0.68709135", "0.6869549", "0.6834367", "0.6828804", "0.6792899", "0.67889905", "0.6787045", "0.67777336", "0.67773193", "0.6764461", "0.67630714" ]
0.8692703
23
Returns all rows from the sgfens_pedido_producto table that match the specified arbitrary SQL statement
public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByDynamicWhere(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n // construct the SQL statement\r\n final String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n System.out.println(\"Executing \" + SQL);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(SQL);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "@Override\r\n public ProductosPuntoVenta[] findByDynamicSelect(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + sql);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(sql);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public List<Tema> findBySql(String sql) {\n //SQLiteDatabase db = getReadableDatabase();\n Log.d(\"[IFMG]\", \"SQL: \" + sql);\n try {\n Log.d(\"[IFMG]\", \"Vai consultar\");\n Cursor c = dbr.rawQuery(sql, null);\n Log.d(\"[IFMG]\", \"Consultou...\");\n return toList(c);\n } finally {\n\n //dbr.close();\n }\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public SgfensBanco[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "public List<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "public Cliente[] findByDynamicWhere(String sql, Object[] sqlParams) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "public TipologiaStruttura[] findByDynamicSelect(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public NominaPuesto[] findByDynamicSelect(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "public TipologiaStruttura[] findByDynamicWhere(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "public static ru.terralink.mvideo.sap.Orders findByPrimaryKey(java.lang.String IV_FO_TOR_ID\n ,java.lang.String IV_FU_TOR_ID)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByPrimaryKey\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \"SELECT x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x\"\n + \".\\\"_rf\\\",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ? AND x.\\\"bm\\\" = ?)\";\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n IV_FU_TOR_ID,\n };\n Object res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, ru.terralink.mvideo.sap.Orders.class);\n return (ru.terralink.mvideo.sap.Orders)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public NominaPuesto[] findByDynamicWhere(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public List<Map<String,Object>> ejecutarQuery(String sql){\n return this.jdbcTemplate.queryForList(sql);\n }", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public DatiBancari[] findByDynamicSelect(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "public Utente[] findByDynamicWhere(String sql, Object[] sqlParams) throws UtenteDaoException\n\t{\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\t\n\t\ttry {\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\n\t\t\n\t\t\n\t\t\tSystem.out.println( \"Executing \" + SQL );\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement( SQL );\n\t\t\tstmt.setMaxRows( maxRows );\n\t\t\n\t\t\t// bind parameters\n\t\t\tfor (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {\n\t\t\t\tstmt.setObject( i+1, sqlParams[i] );\n\t\t\t}\n\t\t\n\t\t\n\t\t\trs = stmt.executeQuery();\n\t\t\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t}\n\t\tcatch (Exception _e) {\n\t\t\t_e.printStackTrace();\n\t\t\tthrow new UtenteDaoException( \"Exception: \" + _e.getMessage(), _e );\n\t\t}\n\t\tfinally {\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied) {\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "public List<String> selectSQL(final String sql, final Object... objects) {\n\t\tlogger.debug(\"select(), entered. sql: {}\", sql);\n\n\t\ttry (Handle handle = Jdbi.open(pooledDataSource.getConnection()); Query q = handle.createQuery(sql);) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tq.bind(i, objects[i]);\n\t\t\t}\n\t\t\tfinal List<String> list = q.map((rs, ctx) -> {\n\t\t\t\treturn rs.getString(1);\n\t\t\t}).list();\n\t\t\thandle.close();\n\t\t\tlogger.debug(\"select(), exiting. list-size: {}\", list.size());\n\t\t\treturn list;\n\t\t} catch (final Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public DatiBancari[] findByDynamicWhere(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<OrderItem> searchOrderIdOrder(int OrderIdOrder) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT order_Item.*, product.*, category.* FROM order_Item, product, category WHERE order_Item.product_id_Product = product.id_Product AND product.category_id_Category = category.id_Category AND order_Item.order_id_Order = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, OrderIdOrder);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n oi.setIdProduct(rs.getInt(\"id_Product\"));\n oi.setCategoryIdCategory(rs.getInt(\"category_id_Category\"));\n oi.setColor(rs.getString(\"color\"));\n oi.setFinishingProcess(rs.getString(\"finishing_Process\"));\n oi.setCubaType(rs.getString(\"cuba_Type\"));\n oi.setDescription(rs.getString(\"description\"));\n oi.setStock(rs.getInt(\"stock\"));\n oi.setUnitaryValue(rs.getDouble(\"unitary_Value\"));\n oi.setImageLink(rs.getString(\"image_Link\"));\n\n oi.setIdCategory(rs.getInt(\"id_Category\"));\n oi.setCategory(rs.getString(\"category\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "List<Object[]> findBySql(String sql, final Object... objects);", "public Usuario[] findByDynamicWhere(String sql, Object[] sqlParams) throws SQLException;", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "@Query(value = \"SELECT * FROM produtos WHERE prd_nome LIKE %?%\", nativeQuery = true)\r\n public List<ProdutosModel> findAllLike (String pesquisa);", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public SmsAgendaGrupo[] findByDynamicWhere(String sql, Object[] sqlParams) throws SmsAgendaGrupoDaoException;", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "public void ProductsSearch(DefaultTableModel tableModel, String parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE descripcion LIKE ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, \"%\" + parameter + \"%\");\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public Ruta[] findByDynamicWhere(String sql, Object[] sqlParams) throws RutaDaoException;", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public Usuario[] findByDynamicSelect(String sql, Object[] sqlParams) throws SQLException;", "public static ResultSet mostrar(int cod) throws SQLException {\n int nFilas = 0;\r\n String lineaSQL = \"Select * from pago WHERE codigo LIKE '%\"+ cod +\"%';\" ;\r\n ResultSet resultado = Conexion.getInstance().execute_Select(lineaSQL);\r\n \r\n return resultado;\r\n \r\n }", "public RelacionConceptoEmbalaje[] findByDynamicSelect(String sql, Object[] sqlParams) throws RelacionConceptoEmbalajeDaoException;", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n }\n }", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public Items[] findByDynamicWhere(String sql, Object[] sqlParams) throws ItemsDaoException;", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public ResultSet select(String pCampos, String pTabla, String pCondicion) {\n ResultSet rs = null; //obtener los datos del select\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n sentencia = \" SELECT \" + pCampos + \" FROM \" + pTabla; // se crea el select\n if (!pCondicion.isEmpty()) {\n sentencia += \" WHERE \" + pCondicion;\n }\n rs = s.executeQuery(sentencia); // \n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n }\n return rs;\n }", "public SmsAgendaGrupo[] findByDynamicSelect(String sql, Object[] sqlParams) throws SmsAgendaGrupoDaoException;", "public Utente[] findByDynamicSelect(String sql, Object[] sqlParams) throws UtenteDaoException\n\t{\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\t\n\t\ttry {\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = sql;\n\t\t\n\t\t\n\t\t\tSystem.out.println( \"Executing \" + SQL );\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement( SQL );\n\t\t\tstmt.setMaxRows( maxRows );\n\t\t\n\t\t\t// bind parameters\n\t\t\tfor (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {\n\t\t\t\tstmt.setObject( i+1, sqlParams[i] );\n\t\t\t}\n\t\t\n\t\t\n\t\t\trs = stmt.executeQuery();\n\t\t\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t}\n\t\tcatch (Exception _e) {\n\t\t\t_e.printStackTrace();\n\t\t\tthrow new UtenteDaoException( \"Exception: \" + _e.getMessage(), _e );\n\t\t}\n\t\tfinally {\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied) {\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public List<OrderItem> searchOrderItem() throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n }\n \n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "public List<ReporteComprasVentasRetenciones> getReporteRetencionClientes(int mes, int anio, int idOrganizacion)\r\n/* 231: */ {\r\n/* 232:307 */ StringBuffer sql = new StringBuffer();\r\n/* 233:308 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(fp.codigo, fp.nombre, COUNT(fp.codigo),\");\r\n/* 234:309 */ sql.append(\" (CASE WHEN fp.indicadorRetencionIva = true OR fp.indicadorRetencionFuente = true THEN SUM(dcfc.valor) END),\");\r\n/* 235:310 */ sql.append(\" 'Ventas', '' )\");\r\n/* 236:311 */ sql.append(\" FROM DetalleCobroFormaCobro dcfc\");\r\n/* 237:312 */ sql.append(\" JOIN dcfc.detalleFormaCobro dfc\");\r\n/* 238:313 */ sql.append(\" LEFT JOIN dfc.cobro c\");\r\n/* 239:314 */ sql.append(\" LEFT OUTER JOIN dfc.formaPago fp\");\r\n/* 240:315 */ sql.append(\" LEFT OUTER JOIN dcfc.detalleCobro dc\");\r\n/* 241:316 */ sql.append(\" LEFT OUTER JOIN dc.cuentaPorCobrar cpc\");\r\n/* 242:317 */ sql.append(\" LEFT OUTER JOIN cpc.facturaCliente fc\");\r\n/* 243:318 */ sql.append(\" WHERE MONTH(c.fecha) =:mes\");\r\n/* 244:319 */ sql.append(\" AND YEAR(c.fecha) =:anio\");\r\n/* 245:320 */ sql.append(\" AND fc.estado!=:estadoAnulado\");\r\n/* 246:321 */ sql.append(\" AND c.estado!=:estadoAnulado\");\r\n/* 247:322 */ sql.append(\" AND (fp.indicadorRetencionIva=true OR fp.indicadorRetencionFuente=true)\");\r\n/* 248:323 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 249:324 */ sql.append(\" GROUP BY fp.codigo, fp.nombre, fp.indicadorRetencionIva, fp.indicadorRetencionFuente\");\r\n/* 250:325 */ sql.append(\" ORDER BY fp.codigo, fp.nombre\");\r\n/* 251:326 */ Query query = this.em.createQuery(sql.toString());\r\n/* 252:327 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 253:328 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 254:329 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 255:330 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 256:331 */ return query.getResultList();\r\n/* 257: */ }", "public RelacionConceptoEmbalaje[] findByDynamicWhere(String sql, Object[] sqlParams) throws RelacionConceptoEmbalajeDaoException;", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "private void armarQuery(String filtro) throws DatabaseErrorException {\n String query = null;\n if (filtro != null && filtro.length() > 0) {\n query = \"SELECT * FROM \" + CLASS_NAME + \" o WHERE o.nombre ILIKE '\" + filtro + \"%' ORDER BY o.nombre\";\n }\n cargarContenedorTabla(query);\n }", "public List<Tags> query(String sql) {\n return tagsDao.query(sql);\n }", "public PaypalIpn[] findByDynamicWhere(String sql, Object[] sqlParams) throws PaypalIpnDaoException\r\n\t{\r\n\t\t// declare variables\r\n\t\tfinal boolean isConnSupplied = (userConn != null);\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\r\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\r\n\t\t\r\n\t\t\t// construct the SQL statement\r\n\t\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n\t\t\r\n\t\t\r\n\t\t\tSystem.out.println( \"Executing \" + SQL );\r\n\t\t\t// prepare statement\r\n\t\t\tstmt = conn.prepareStatement( SQL );\r\n\t\t\tstmt.setMaxRows( maxRows );\r\n\t\t\r\n\t\t\t// bind parameters\r\n\t\t\tfor (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {\r\n\t\t\t\tstmt.setObject( i+1, sqlParams[i] );\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\r\n\t\t\t// fetch the results\r\n\t\t\treturn fetchMultiResults(rs);\r\n\t\t}\r\n\t\tcatch (Exception _e) {\r\n\t\t\t_e.printStackTrace();\r\n\t\t\tthrow new PaypalIpnDaoException( \"Exception: \" + _e.getMessage(), _e );\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tResourceManager.close(rs);\r\n\t\t\tResourceManager.close(stmt);\r\n\t\t\tif (!isConnSupplied) {\r\n\t\t\t\tResourceManager.close(conn);\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public List<Payment> retrievePaymentsByPedido(Order order) throws DatabaseException {\n\t\ttry {\n\t\t\tthis.startConnection();\n\t\t\tString sql = \"SELECT id_payment FROM purchase WHERE id_order = \"\n\t\t\t\t\t+ returnValueStringBD(String.valueOf(order.getId()));\n\t\t\tResultSet rs = command.executeQuery(sql);\n\t\t\tList<String> id_payments = new ArrayList<String>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString pu = rs.getString(\"id_payment\");\n\t\t\t\tid_payments.add(pu);\n\t\t\t}\n\t\t\tList<Payment> payments = new ArrayList<Payment>();\n\t\t\tfor (String id : id_payments) {\n\t\t\t\tPayment pa = this.select(Integer.parseInt(id));\n\t\t\t\tpayments.add(pa);\n\t\t\t}\n\t\t\treturn payments;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.closeConnection();\n\t\t}\n\t\treturn null;\n\t}", "public Faq[] findByDynamicWhere(String sql, Object[] sqlParams) throws FaqDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }", "public void refresh() {\n String sql = \"\";\n sql += \"select m.id\"\n + \", m.data\"\n + \", CAST(CONCAT(dep.nome, ' [', dep.id, ']') AS CHAR(50)) as deposito\"\n + \", cau.descrizione as causale\"\n + \", m.articolo\"\n + \", if (cau.segno = -1 , -m.quantita, m.quantita) as quantita\"\n + \", m.note\"\n + \", cast(concat(IF(m.da_tipo_fattura = 7, 'Scontr.', \"\n + \" IF(m.da_tabella = 'test_fatt', 'Fatt. Vend.', \"\n + \" IF(m.da_tabella = 'test_ddt', 'DDT Vend.',\"\n + \" IF(m.da_tabella = 'test_fatt_acquisto', 'Fatt. Acq.',\"\n + \" IF(m.da_tabella = 'test_ddt_acquisto', 'DDT Acq.', m.da_tabella)))))\"\n + \" , da_serie, ' ', da_numero, '/', da_anno, ' - [ID ', da_id, ']') as CHAR)as origine\"\n // + \", m.da_tabella\"\n // + \", m.da_anno\"\n // + \", m.da_serie\"\n // + \", m.da_numero\"\n // + \", m.da_id\"\n + \", m.matricola\"\n + \", m.lotto\"\n + \", a.codice_fornitore, a.codice_a_barre from movimenti_magazzino m left join articoli a on m.articolo = a.codice\"\n + \" left join tipi_causali_magazzino cau on m.causale = cau.codice\"\n + \" left join depositi dep ON m.deposito = dep.id\";\n sql += \" where 1 = 1\";\n System.out.println(\"articolo_selezionato_filtro_ref = \" + articolo_selezionato_filtro_ref);\n System.out.println(\"articolo_selezionato_filtro_ref get = \" + articolo_selezionato_filtro_ref.get());\n if (articolo_selezionato_filtro_ref.get() != null && StringUtils.isNotBlank(articolo_selezionato_filtro_ref.get().codice)) {\n sql += \" and m.articolo like '\" + Db.aa(articolo_selezionato_filtro_ref.get().codice) + \"'\";\n }\n if (filtro_barre.getText().length() > 0) {\n sql += \" and a.codice_a_barre like '%\" + Db.aa(filtro_barre.getText()) + \"%'\";\n }\n if (filtro_lotto.getText().length() > 0) {\n sql += \" and m.lotto like '%\" + Db.aa(filtro_lotto.getText()) + \"%'\";\n }\n if (filtro_matricola.getText().length() > 0) {\n sql += \" and m.matricola like '%\" + Db.aa(filtro_matricola.getText()) + \"%'\";\n }\n if (filtro_fornitore.getText().length() > 0) {\n sql += \" and a.codice_fornitore like '%\" + Db.aa(filtro_fornitore.getText()) + \"%'\";\n }\n if (filtro_deposito.getSelectedIndex() >= 0) {\n sql += \" and m.deposito = \" + cu.s(filtro_deposito.getSelectedKey());\n }\n sql += \" order by m.data desc, id desc\";\n System.out.println(\"sql movimenti: \" + sql);\n griglia.dbOpen(Db.getConn(), sql, Db.INSTANCE, true);\n griglia.dbSelezionaRiga();\n }", "@Override\n\tpublic Collection<String> consultarLineaComercialClasificacionAsignacionMasivaIngresar(String codigoClasificacion,String nivelClasificacion,String valorTipoLineaComercial,Long codigoLinPad,Long codigoLinCom)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Entr� a consultar Linea Comercial Clasificacion Asignacion Masiva Ingresar : {}\",codigoClasificacion);\n\t\tStringBuilder query = null;\n\t\tSQLQuery sqlQuery = null;\n\t\tSession session=null;\n\t\tString divDep=\" ) \";\n\t\ttry {\n\t\t\tsession = hibernateH.getHibernateSession();\n\t\t\tsession.clear();\n\t\t\tquery = new StringBuilder(\" SELECT t1.CODIGOCLASIFICACION \");\n\t\t\t\n\t\t\tquery.append(\" FROM ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\tdivDep+=\" ) ) \";\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tquery.append(\" where t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\tquery.append(\" select distinct lineacomer0_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCADMTLINCOMCLA lineacomer0_, SCADMTLINCOM lineacomer1_ \");\n\t\t\tquery.append(\" where lineacomer1_.CODIGOLINEACOMERCIAL=lineacomer0_.CODIGOLINEACOMERCIAL \");\n\t\t\tquery.append(\" and lineacomer1_.NIVEL=0 and lineacomer1_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and lineacomer1_.CODIGOLINEACOMERCIAL NOT IN( \"+codigoLinPad+\" ) \");\n\t\t\t}\n\t\t\tquery.append(\" and lineacomer0_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' and lineacomer1_.VALORTIPOLINEACOMERCIAL='\"+valorTipoLineaComercial+\"' \");\n\t\t\tquery.append(\" and ( lineacomer0_.CODIGOCLASIFICACION in ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" ) )\");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" ) ) \");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t///CODIGO EXTRA\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\t\tquery.append(\" SELECT CODIGOCLASIFICACION FROM SCADMTLINCOMCLA LCC, SCADMTLINCOM LC\t \");\n\t\t\t\tquery.append(\" where LCC.CODIGOCLASIFICACION IN(\t \");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\t}\n\t\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\"\"+divDep+\" \");\n\t\t\t\t}else{\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" \");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tquery.append(\" AND LCC.ESTADO='1' \");\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL=LC.CODIGOLINEACOMERCIAL \");\n\t\t\t\tquery.append(\" AND LC.CODIGOLINEACOMERCIALPADRE = \"+codigoLinPad);\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL NOT IN (\"+codigoLinCom+\") )\");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" ) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\n//\t\t\tsqlQuery.setParameter(\"estadoClasificacion\", SICConstantes.ESTADO_ACTIVO_NUMERICO);\n//\t\t\tsqlQuery.setParameter(\"codigoClasificacion\", codigoClasificacion);\n//\t\t\tsqlQuery.setParameter(\"valorTipoLineaComercial\", valorTipoLineaComercial);\n\t\t\t\n\t\t\tsqlQuery = hibernateH.getHibernateSession().createSQLQuery(query.toString());\n//\t\t\tsqlQuery.addEntity(\"vista\", ClasificacionDTO.class);\n\t\t\t\n//\t\t\tclasificacionDTOs =sqlQuery.list();\n\t\t\treturn sqlQuery.list();\n\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t}\n//\t\treturn clasificacionDTOs;\n\t\t\n\t}", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public List<Product> select(Product product) {\n StringBuilder sql = new StringBuilder(\"select * from book where 1=1 \");\n //sql语句\n List<Object> list = new ArrayList<Object>();\n if (product != null) {\n\n if (product.getProductId() != 0) {\n sql.append(\" and productId=? \");\n list.add(product.getProductId());\n }\n }\n\n return MySqlDataStoreUtilities.select(sql.toString(), list.toArray());\n }", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;" ]
[ "0.6396459", "0.6326005", "0.61733353", "0.60115546", "0.588676", "0.58576953", "0.5811237", "0.5788915", "0.57886446", "0.57736796", "0.57593846", "0.5750646", "0.5736255", "0.5734371", "0.56961334", "0.5669764", "0.56349623", "0.5630816", "0.5609022", "0.5604425", "0.55843365", "0.55734915", "0.5561637", "0.554876", "0.5516387", "0.5497547", "0.54803234", "0.54550827", "0.53895885", "0.537203", "0.5369635", "0.5363441", "0.53624505", "0.5361365", "0.53229105", "0.5321921", "0.5309642", "0.5293715", "0.5290616", "0.52821386", "0.5274249", "0.52705276", "0.5264023", "0.5262035", "0.52394456", "0.5234216", "0.5224648", "0.52226603", "0.52226233", "0.5222388", "0.52150494", "0.5209362", "0.52070224", "0.52065057", "0.52053034", "0.5200827", "0.52002096", "0.5197866", "0.5195829", "0.518887", "0.51883864", "0.5185253", "0.51831126", "0.5171924", "0.51608187", "0.51606935", "0.51520914", "0.5151545", "0.51438344", "0.51260775", "0.5119393", "0.5114114", "0.5112505", "0.5107558", "0.5105323", "0.5096057", "0.5093081", "0.50888586", "0.5072317", "0.5062492", "0.50565267", "0.50530267", "0.50441575", "0.5044082", "0.5042343", "0.5040891", "0.5040488", "0.5039737", "0.5037763", "0.5036518", "0.5030065", "0.50219697", "0.50168777", "0.50134665", "0.50133944", "0.50132114", "0.5004857", "0.5001956", "0.50018287", "0.4987441" ]
0.64207315
0
Returns all rows from the sgfens_pedido_producto table that match the specified arbitrary SQL statement
public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByDynamicWhere(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n // construct the SQL statement\r\n final String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n System.out.println(\"Executing \" + SQL);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(SQL);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "@Override\r\n public ProductosPuntoVenta[] findByDynamicSelect(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + sql);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(sql);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public List<Tema> findBySql(String sql) {\n //SQLiteDatabase db = getReadableDatabase();\n Log.d(\"[IFMG]\", \"SQL: \" + sql);\n try {\n Log.d(\"[IFMG]\", \"Vai consultar\");\n Cursor c = dbr.rawQuery(sql, null);\n Log.d(\"[IFMG]\", \"Consultou...\");\n return toList(c);\n } finally {\n\n //dbr.close();\n }\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public SgfensBanco[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "public List<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "public Cliente[] findByDynamicWhere(String sql, Object[] sqlParams) throws ClienteDaoException;", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensBanco[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensBancoDaoException;", "public TipologiaStruttura[] findByDynamicSelect(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public NominaPuesto[] findByDynamicSelect(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "public TipologiaStruttura[] findByDynamicWhere(String sql, Object[] sqlParams) throws TipologiaStrutturaDaoException;", "public static ru.terralink.mvideo.sap.Orders findByPrimaryKey(java.lang.String IV_FO_TOR_ID\n ,java.lang.String IV_FU_TOR_ID)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByPrimaryKey\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \"SELECT x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x\"\n + \".\\\"_rf\\\",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ? AND x.\\\"bm\\\" = ?)\";\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n IV_FU_TOR_ID,\n };\n Object res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, ru.terralink.mvideo.sap.Orders.class);\n return (ru.terralink.mvideo.sap.Orders)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public NominaPuesto[] findByDynamicWhere(String sql, Object[] sqlParams) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "public List<Map<String,Object>> ejecutarQuery(String sql){\n return this.jdbcTemplate.queryForList(sql);\n }", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public DatiBancari[] findByDynamicSelect(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "public Utente[] findByDynamicWhere(String sql, Object[] sqlParams) throws UtenteDaoException\n\t{\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\t\n\t\ttry {\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\n\t\t\n\t\t\n\t\t\tSystem.out.println( \"Executing \" + SQL );\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement( SQL );\n\t\t\tstmt.setMaxRows( maxRows );\n\t\t\n\t\t\t// bind parameters\n\t\t\tfor (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {\n\t\t\t\tstmt.setObject( i+1, sqlParams[i] );\n\t\t\t}\n\t\t\n\t\t\n\t\t\trs = stmt.executeQuery();\n\t\t\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t}\n\t\tcatch (Exception _e) {\n\t\t\t_e.printStackTrace();\n\t\t\tthrow new UtenteDaoException( \"Exception: \" + _e.getMessage(), _e );\n\t\t}\n\t\tfinally {\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied) {\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "public List<String> selectSQL(final String sql, final Object... objects) {\n\t\tlogger.debug(\"select(), entered. sql: {}\", sql);\n\n\t\ttry (Handle handle = Jdbi.open(pooledDataSource.getConnection()); Query q = handle.createQuery(sql);) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tq.bind(i, objects[i]);\n\t\t\t}\n\t\t\tfinal List<String> list = q.map((rs, ctx) -> {\n\t\t\t\treturn rs.getString(1);\n\t\t\t}).list();\n\t\t\thandle.close();\n\t\t\tlogger.debug(\"select(), exiting. list-size: {}\", list.size());\n\t\t\treturn list;\n\t\t} catch (final Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public DatiBancari[] findByDynamicWhere(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<OrderItem> searchOrderIdOrder(int OrderIdOrder) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT order_Item.*, product.*, category.* FROM order_Item, product, category WHERE order_Item.product_id_Product = product.id_Product AND product.category_id_Category = category.id_Category AND order_Item.order_id_Order = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, OrderIdOrder);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n oi.setIdProduct(rs.getInt(\"id_Product\"));\n oi.setCategoryIdCategory(rs.getInt(\"category_id_Category\"));\n oi.setColor(rs.getString(\"color\"));\n oi.setFinishingProcess(rs.getString(\"finishing_Process\"));\n oi.setCubaType(rs.getString(\"cuba_Type\"));\n oi.setDescription(rs.getString(\"description\"));\n oi.setStock(rs.getInt(\"stock\"));\n oi.setUnitaryValue(rs.getDouble(\"unitary_Value\"));\n oi.setImageLink(rs.getString(\"image_Link\"));\n\n oi.setIdCategory(rs.getInt(\"id_Category\"));\n oi.setCategory(rs.getString(\"category\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Iscrizioni> find(RicercaDb o)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\tString key = o.getKey();\n\t\tString value = o.getValue();\n\n\t\tList<Iscrizioni> res = new ArrayList<>();\n\t\tString[] allowed = { \"idCorso\", \"idDipendente\", \"idDocente\", \"idIscrizione\" };\n\t\tboolean notAllowed = true;\n\t\tfor (String allow : allowed) {\n\t\t\tif (key.equals(allow)) {\n\t\t\t\tnotAllowed = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (notAllowed) {\n\t\t\tthrow new SQLException(\"Chiave colonna '\" + key + \"' non valida\");\n\t\t}\n\t\tint intValue = Integer.parseInt(value);\n\t\tQuery q = em.createQuery(\"FROM Iscrizioni c WHERE \" + key + \" = :value\");\n\t\tq.setParameter(\"value\", intValue);\n\n\t\tres = q.getResultList();\n//\t\tObject[] campi = { value };\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `\" + key + \"`=? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tIscrizioni c = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t\tres.add(c);\n//\t\t}\n\t\treturn res;\n\t}", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public Usuario[] findByDynamicWhere(String sql, Object[] sqlParams) throws SQLException;", "List<Object[]> findBySql(String sql, final Object... objects);", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "@Query(value = \"SELECT * FROM produtos WHERE prd_nome LIKE %?%\", nativeQuery = true)\r\n public List<ProdutosModel> findAllLike (String pesquisa);", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "public SmsAgendaGrupo[] findByDynamicWhere(String sql, Object[] sqlParams) throws SmsAgendaGrupoDaoException;", "public void ProductsSearch(DefaultTableModel tableModel, String parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE descripcion LIKE ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, \"%\" + parameter + \"%\");\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public Ruta[] findByDynamicWhere(String sql, Object[] sqlParams) throws RutaDaoException;", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public Usuario[] findByDynamicSelect(String sql, Object[] sqlParams) throws SQLException;", "public RelacionConceptoEmbalaje[] findByDynamicSelect(String sql, Object[] sqlParams) throws RelacionConceptoEmbalajeDaoException;", "public static ResultSet mostrar(int cod) throws SQLException {\n int nFilas = 0;\r\n String lineaSQL = \"Select * from pago WHERE codigo LIKE '%\"+ cod +\"%';\" ;\r\n ResultSet resultado = Conexion.getInstance().execute_Select(lineaSQL);\r\n \r\n return resultado;\r\n \r\n }", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n }\n }", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public Items[] findByDynamicWhere(String sql, Object[] sqlParams) throws ItemsDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public ResultSet select(String pCampos, String pTabla, String pCondicion) {\n ResultSet rs = null; //obtener los datos del select\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n sentencia = \" SELECT \" + pCampos + \" FROM \" + pTabla; // se crea el select\n if (!pCondicion.isEmpty()) {\n sentencia += \" WHERE \" + pCondicion;\n }\n rs = s.executeQuery(sentencia); // \n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n }\n return rs;\n }", "public SmsAgendaGrupo[] findByDynamicSelect(String sql, Object[] sqlParams) throws SmsAgendaGrupoDaoException;", "public Utente[] findByDynamicSelect(String sql, Object[] sqlParams) throws UtenteDaoException\n\t{\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\t\n\t\ttry {\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = sql;\n\t\t\n\t\t\n\t\t\tSystem.out.println( \"Executing \" + SQL );\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement( SQL );\n\t\t\tstmt.setMaxRows( maxRows );\n\t\t\n\t\t\t// bind parameters\n\t\t\tfor (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {\n\t\t\t\tstmt.setObject( i+1, sqlParams[i] );\n\t\t\t}\n\t\t\n\t\t\n\t\t\trs = stmt.executeQuery();\n\t\t\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t}\n\t\tcatch (Exception _e) {\n\t\t\t_e.printStackTrace();\n\t\t\tthrow new UtenteDaoException( \"Exception: \" + _e.getMessage(), _e );\n\t\t}\n\t\tfinally {\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied) {\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "public List<OrderItem> searchOrderItem() throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n }\n \n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "public List<ReporteComprasVentasRetenciones> getReporteRetencionClientes(int mes, int anio, int idOrganizacion)\r\n/* 231: */ {\r\n/* 232:307 */ StringBuffer sql = new StringBuffer();\r\n/* 233:308 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(fp.codigo, fp.nombre, COUNT(fp.codigo),\");\r\n/* 234:309 */ sql.append(\" (CASE WHEN fp.indicadorRetencionIva = true OR fp.indicadorRetencionFuente = true THEN SUM(dcfc.valor) END),\");\r\n/* 235:310 */ sql.append(\" 'Ventas', '' )\");\r\n/* 236:311 */ sql.append(\" FROM DetalleCobroFormaCobro dcfc\");\r\n/* 237:312 */ sql.append(\" JOIN dcfc.detalleFormaCobro dfc\");\r\n/* 238:313 */ sql.append(\" LEFT JOIN dfc.cobro c\");\r\n/* 239:314 */ sql.append(\" LEFT OUTER JOIN dfc.formaPago fp\");\r\n/* 240:315 */ sql.append(\" LEFT OUTER JOIN dcfc.detalleCobro dc\");\r\n/* 241:316 */ sql.append(\" LEFT OUTER JOIN dc.cuentaPorCobrar cpc\");\r\n/* 242:317 */ sql.append(\" LEFT OUTER JOIN cpc.facturaCliente fc\");\r\n/* 243:318 */ sql.append(\" WHERE MONTH(c.fecha) =:mes\");\r\n/* 244:319 */ sql.append(\" AND YEAR(c.fecha) =:anio\");\r\n/* 245:320 */ sql.append(\" AND fc.estado!=:estadoAnulado\");\r\n/* 246:321 */ sql.append(\" AND c.estado!=:estadoAnulado\");\r\n/* 247:322 */ sql.append(\" AND (fp.indicadorRetencionIva=true OR fp.indicadorRetencionFuente=true)\");\r\n/* 248:323 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 249:324 */ sql.append(\" GROUP BY fp.codigo, fp.nombre, fp.indicadorRetencionIva, fp.indicadorRetencionFuente\");\r\n/* 250:325 */ sql.append(\" ORDER BY fp.codigo, fp.nombre\");\r\n/* 251:326 */ Query query = this.em.createQuery(sql.toString());\r\n/* 252:327 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 253:328 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 254:329 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 255:330 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 256:331 */ return query.getResultList();\r\n/* 257: */ }", "public RelacionConceptoEmbalaje[] findByDynamicWhere(String sql, Object[] sqlParams) throws RelacionConceptoEmbalajeDaoException;", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "private void armarQuery(String filtro) throws DatabaseErrorException {\n String query = null;\n if (filtro != null && filtro.length() > 0) {\n query = \"SELECT * FROM \" + CLASS_NAME + \" o WHERE o.nombre ILIKE '\" + filtro + \"%' ORDER BY o.nombre\";\n }\n cargarContenedorTabla(query);\n }", "public List<Tags> query(String sql) {\n return tagsDao.query(sql);\n }", "public PaypalIpn[] findByDynamicWhere(String sql, Object[] sqlParams) throws PaypalIpnDaoException\r\n\t{\r\n\t\t// declare variables\r\n\t\tfinal boolean isConnSupplied = (userConn != null);\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\r\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\r\n\t\t\r\n\t\t\t// construct the SQL statement\r\n\t\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\r\n\t\t\r\n\t\t\r\n\t\t\tSystem.out.println( \"Executing \" + SQL );\r\n\t\t\t// prepare statement\r\n\t\t\tstmt = conn.prepareStatement( SQL );\r\n\t\t\tstmt.setMaxRows( maxRows );\r\n\t\t\r\n\t\t\t// bind parameters\r\n\t\t\tfor (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {\r\n\t\t\t\tstmt.setObject( i+1, sqlParams[i] );\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\r\n\t\t\t// fetch the results\r\n\t\t\treturn fetchMultiResults(rs);\r\n\t\t}\r\n\t\tcatch (Exception _e) {\r\n\t\t\t_e.printStackTrace();\r\n\t\t\tthrow new PaypalIpnDaoException( \"Exception: \" + _e.getMessage(), _e );\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tResourceManager.close(rs);\r\n\t\t\tResourceManager.close(stmt);\r\n\t\t\tif (!isConnSupplied) {\r\n\t\t\t\tResourceManager.close(conn);\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public DatiBancari[] findWhereFkStrutturaEquals(long fkStruttura) throws DatiBancariDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "public boolean existeorden(String ordenservicio){\n boolean existe=false;\n \n conex con=new conex(); \n ResultSet rsR = null; \n String myQuery = \"select tipocorte from to_estetica where (estatus='ABIERTA' or estatus='CERRADA') and tipocorte='\"+ordenservicio+\"'\";\n System.out.println(\"\"+myQuery);\n try {\n Statement st = con.getConnection().createStatement();\n rsR = st.executeQuery(myQuery);\n while(rsR.next()) { \n existe=true; \n } \n rsR.close(); \n st.close();\n con.desconectar();\n } catch (SQLException ex) { \n existe=true; \n JOptionPane.showMessageDialog(null, \"Error al obtener los datos: \"+ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } \n \n return existe;\n }", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public SgfensBanco[] findWhereComentariosEquals(String comentarios) throws SgfensBancoDaoException;", "public List<Payment> retrievePaymentsByPedido(Order order) throws DatabaseException {\n\t\ttry {\n\t\t\tthis.startConnection();\n\t\t\tString sql = \"SELECT id_payment FROM purchase WHERE id_order = \"\n\t\t\t\t\t+ returnValueStringBD(String.valueOf(order.getId()));\n\t\t\tResultSet rs = command.executeQuery(sql);\n\t\t\tList<String> id_payments = new ArrayList<String>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tString pu = rs.getString(\"id_payment\");\n\t\t\t\tid_payments.add(pu);\n\t\t\t}\n\t\t\tList<Payment> payments = new ArrayList<Payment>();\n\t\t\tfor (String id : id_payments) {\n\t\t\t\tPayment pa = this.select(Integer.parseInt(id));\n\t\t\t\tpayments.add(pa);\n\t\t\t}\n\t\t\treturn payments;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.closeConnection();\n\t\t}\n\t\treturn null;\n\t}", "public Faq[] findByDynamicWhere(String sql, Object[] sqlParams) throws FaqDaoException;", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }", "public void refresh() {\n String sql = \"\";\n sql += \"select m.id\"\n + \", m.data\"\n + \", CAST(CONCAT(dep.nome, ' [', dep.id, ']') AS CHAR(50)) as deposito\"\n + \", cau.descrizione as causale\"\n + \", m.articolo\"\n + \", if (cau.segno = -1 , -m.quantita, m.quantita) as quantita\"\n + \", m.note\"\n + \", cast(concat(IF(m.da_tipo_fattura = 7, 'Scontr.', \"\n + \" IF(m.da_tabella = 'test_fatt', 'Fatt. Vend.', \"\n + \" IF(m.da_tabella = 'test_ddt', 'DDT Vend.',\"\n + \" IF(m.da_tabella = 'test_fatt_acquisto', 'Fatt. Acq.',\"\n + \" IF(m.da_tabella = 'test_ddt_acquisto', 'DDT Acq.', m.da_tabella)))))\"\n + \" , da_serie, ' ', da_numero, '/', da_anno, ' - [ID ', da_id, ']') as CHAR)as origine\"\n // + \", m.da_tabella\"\n // + \", m.da_anno\"\n // + \", m.da_serie\"\n // + \", m.da_numero\"\n // + \", m.da_id\"\n + \", m.matricola\"\n + \", m.lotto\"\n + \", a.codice_fornitore, a.codice_a_barre from movimenti_magazzino m left join articoli a on m.articolo = a.codice\"\n + \" left join tipi_causali_magazzino cau on m.causale = cau.codice\"\n + \" left join depositi dep ON m.deposito = dep.id\";\n sql += \" where 1 = 1\";\n System.out.println(\"articolo_selezionato_filtro_ref = \" + articolo_selezionato_filtro_ref);\n System.out.println(\"articolo_selezionato_filtro_ref get = \" + articolo_selezionato_filtro_ref.get());\n if (articolo_selezionato_filtro_ref.get() != null && StringUtils.isNotBlank(articolo_selezionato_filtro_ref.get().codice)) {\n sql += \" and m.articolo like '\" + Db.aa(articolo_selezionato_filtro_ref.get().codice) + \"'\";\n }\n if (filtro_barre.getText().length() > 0) {\n sql += \" and a.codice_a_barre like '%\" + Db.aa(filtro_barre.getText()) + \"%'\";\n }\n if (filtro_lotto.getText().length() > 0) {\n sql += \" and m.lotto like '%\" + Db.aa(filtro_lotto.getText()) + \"%'\";\n }\n if (filtro_matricola.getText().length() > 0) {\n sql += \" and m.matricola like '%\" + Db.aa(filtro_matricola.getText()) + \"%'\";\n }\n if (filtro_fornitore.getText().length() > 0) {\n sql += \" and a.codice_fornitore like '%\" + Db.aa(filtro_fornitore.getText()) + \"%'\";\n }\n if (filtro_deposito.getSelectedIndex() >= 0) {\n sql += \" and m.deposito = \" + cu.s(filtro_deposito.getSelectedKey());\n }\n sql += \" order by m.data desc, id desc\";\n System.out.println(\"sql movimenti: \" + sql);\n griglia.dbOpen(Db.getConn(), sql, Db.INSTANCE, true);\n griglia.dbSelezionaRiga();\n }", "@Override\n\tpublic Collection<String> consultarLineaComercialClasificacionAsignacionMasivaIngresar(String codigoClasificacion,String nivelClasificacion,String valorTipoLineaComercial,Long codigoLinPad,Long codigoLinCom)throws SICException{\n\t\tLogeable.LOG_SICV2.info(\"Entr� a consultar Linea Comercial Clasificacion Asignacion Masiva Ingresar : {}\",codigoClasificacion);\n\t\tStringBuilder query = null;\n\t\tSQLQuery sqlQuery = null;\n\t\tSession session=null;\n\t\tString divDep=\" ) \";\n\t\ttry {\n\t\t\tsession = hibernateH.getHibernateSession();\n\t\t\tsession.clear();\n\t\t\tquery = new StringBuilder(\" SELECT t1.CODIGOCLASIFICACION \");\n\t\t\t\n\t\t\tquery.append(\" FROM ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\tdivDep+=\" ) ) \";\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" t1 \");\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tquery.append(\" where t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\tquery.append(\" select distinct lineacomer0_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCADMTLINCOMCLA lineacomer0_, SCADMTLINCOM lineacomer1_ \");\n\t\t\tquery.append(\" where lineacomer1_.CODIGOLINEACOMERCIAL=lineacomer0_.CODIGOLINEACOMERCIAL \");\n\t\t\tquery.append(\" and lineacomer1_.NIVEL=0 and lineacomer1_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and lineacomer1_.CODIGOLINEACOMERCIAL NOT IN( \"+codigoLinPad+\" ) \");\n\t\t\t}\n\t\t\tquery.append(\" and lineacomer0_.ESTADO='\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' and lineacomer1_.VALORTIPOLINEACOMERCIAL='\"+valorTipoLineaComercial+\"' \");\n\t\t\tquery.append(\" and ( lineacomer0_.CODIGOCLASIFICACION in ( \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t}\n\t\t\t\n\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\") \"+divDep+\" ) )\");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" ) ) \");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t///CODIGO EXTRA\n\t\t\tif(codigoLinPad != null){\n\t\t\t\tquery.append(\" and t1.CODIGOCLASIFICACION NOT IN(\t \");\n\t\t\t\tquery.append(\" SELECT CODIGOCLASIFICACION FROM SCADMTLINCOMCLA LCC, SCADMTLINCOM LC\t \");\n\t\t\t\tquery.append(\" where LCC.CODIGOCLASIFICACION IN(\t \");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_DIVISION)){\n\t\t\t\t\tquery.append(\" select clasificac2_.CODIGOCLASIFICACION \");\n\t\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac2_ \");\n\t\t\t\t\tquery.append(\" where clasificac2_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\tquery.append(\" and ( clasificac2_.codigoClasificacionPadre in ( \");\n\t\t\t\t}\n\t\t\t\tquery.append(\" select clasificac3_.CODIGOCLASIFICACION \");\n\t\t\t\tquery.append(\" from SCSPETCLASIFICACION clasificac3_ \");\n\t\t\t\tquery.append(\" where clasificac3_.estadoClasificacion = '\"+SICConstantes.ESTADO_ACTIVO_NUMERICO+\"' \");\n\t\t\t\t\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacion IN (\"+codigoClasificacion+\"\"+divDep+\" \");\n\t\t\t\t}else{\n\t\t\t\t\tquery.append(\" and clasificac3_.codigoClasificacionPadre IN (\"+codigoClasificacion+\") \"+divDep+\" \");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tquery.append(\" AND LCC.ESTADO='1' \");\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL=LC.CODIGOLINEACOMERCIAL \");\n\t\t\t\tquery.append(\" AND LC.CODIGOLINEACOMERCIALPADRE = \"+codigoLinPad);\n\t\t\t\tquery.append(\" AND LCC.CODIGOLINEACOMERCIAL NOT IN (\"+codigoLinCom+\") )\");\n\t\t\t\tif(nivelClasificacion.equals(SICConstantes.TIPCLA_CLASIFICACION)){\n\t\t\t\t\tquery.append(\" ) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\n//\t\t\tsqlQuery.setParameter(\"estadoClasificacion\", SICConstantes.ESTADO_ACTIVO_NUMERICO);\n//\t\t\tsqlQuery.setParameter(\"codigoClasificacion\", codigoClasificacion);\n//\t\t\tsqlQuery.setParameter(\"valorTipoLineaComercial\", valorTipoLineaComercial);\n\t\t\t\n\t\t\tsqlQuery = hibernateH.getHibernateSession().createSQLQuery(query.toString());\n//\t\t\tsqlQuery.addEntity(\"vista\", ClasificacionDTO.class);\n\t\t\t\n//\t\t\tclasificacionDTOs =sqlQuery.list();\n\t\t\treturn sqlQuery.list();\n\n\t\t} catch (Exception e) {\n\t\t\tLogeable.LOG_SICV2.info(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t\tthrow new SICException(\"Error al consultar clasificaciones asignacion masiva {}\", e);\n\t\t}\n//\t\treturn clasificacionDTOs;\n\t\t\n\t}", "public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;", "public List<Product> select(Product product) {\n StringBuilder sql = new StringBuilder(\"select * from book where 1=1 \");\n //sql语句\n List<Object> list = new ArrayList<Object>();\n if (product != null) {\n\n if (product.getProductId() != 0) {\n sql.append(\" and productId=? \");\n list.add(product.getProductId());\n }\n }\n\n return MySqlDataStoreUtilities.select(sql.toString(), list.toArray());\n }", "@Override\n public List<FecetProrrogaOrden> findWhereAprobadaEquals(final String aprobada) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE APROBADA = ? ORDER BY APROBADA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), aprobada);\n\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;" ]
[ "0.642091", "0.63256747", "0.61734253", "0.60099053", "0.588646", "0.5857562", "0.5810495", "0.5789702", "0.578918", "0.577355", "0.5757561", "0.5750166", "0.5734133", "0.5733459", "0.56956697", "0.5669183", "0.56350535", "0.5629646", "0.5609412", "0.5603529", "0.5585217", "0.55728734", "0.55593497", "0.55491817", "0.5517361", "0.5496792", "0.54798746", "0.5455678", "0.5389945", "0.53718567", "0.53689754", "0.53633195", "0.5362077", "0.5361114", "0.5323673", "0.5321067", "0.53102267", "0.5293525", "0.52901536", "0.528115", "0.527306", "0.5270261", "0.5262504", "0.52616084", "0.52393895", "0.52349275", "0.5224448", "0.522238", "0.52222764", "0.5222112", "0.52130514", "0.5209482", "0.52068245", "0.5206744", "0.5206134", "0.5200651", "0.5199727", "0.51981646", "0.5196258", "0.51890826", "0.51888484", "0.518616", "0.5183748", "0.5171805", "0.51605976", "0.51597613", "0.51522493", "0.51503724", "0.51451856", "0.51257885", "0.5119325", "0.51131153", "0.5112353", "0.51087695", "0.5104914", "0.50960076", "0.5093331", "0.50875247", "0.50723267", "0.5062923", "0.50548893", "0.50515926", "0.5043617", "0.5043463", "0.5040319", "0.5040207", "0.5039767", "0.5039093", "0.5037049", "0.5034761", "0.5030372", "0.50224406", "0.50159645", "0.50146806", "0.5012983", "0.5012045", "0.5004372", "0.5003331", "0.5000802", "0.49864006" ]
0.63959897
1
TODO Autogenerated method stub
@Override public int getCount() { return list.size(); }
{ "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
TODO Autogenerated method stub
@Override public Object getItem(int arg0) { return list.get(arg0); }
{ "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
TODO Autogenerated method stub
@Override public long getItemId(int arg0) { return arg0; }
{ "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
TODO Autogenerated method stub
@Override public View getView(int arg0, View arg1, ViewGroup arg2) { if (arg1 == null) { arg1 = inflater.inflate(R.layout.mesconf_fragment, arg2, false); } TextView title = (TextView) arg1.findViewById(R.id.tvTitle); TextView description = (TextView) arg1.findViewById(R.id.tvDescription); MyConferences chapter = list.get(arg0); title.setText(chapter.conferenceName); description.setText(chapter.conferenceDescription); return arg1; }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
Parse the time in milliseconds into String with the format: hh:mm:ss or mm:ss
@SuppressLint("DefaultLocale") public static String formatDuration(int duration) { duration /= 1000; // milliseconds into seconds int minute = duration / 60; int hour = minute / 60; minute %= 60; int second = duration % 60; if (hour != 0) return String.format("%2d:%02d:%02d", hour, minute, second); else return String.format("%02d:%02d", minute, second); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String displayTime(long milliseconds) {\n String displayTime = \"\";\n double seconds = milliseconds / 1000.0;\n int minute = (int) (seconds / 60);\n double second = seconds % 60;\n displayTime = String.format(\"%02d:%06.3f\", minute, second);\n\n return displayTime;\n }", "public static String formatTime(final long ms){\n long s = ms / 1000, m = s / 60, h = m / 60;\n s %= 60; m %= 60; h %= 24;\n return String.format(\"%02d:%02d:%02d\", h, m, s);\n }", "public static String millisToStr(long time) {\r\n long ms = time;\r\n long h = ms / 3600000;\r\n ms = ms % 3600000;\r\n long m = ms / 60000;\r\n ms = ms % 60000;\r\n long s = ms / 1000;\r\n ms = ms % 1000;\r\n return String.format(\"%02d:%02d:%02d.%03d\", h, m, s, ms);\r\n }", "public static String milliSecondsToTimer(long milliseconds){\r\n String finalTimerString = \"\";\r\n String secondsString = \"\";\r\n \r\n // Convert total duration into time\r\n int hours = (int)( milliseconds / (1000*60*60));\r\n int minutes = (int)(milliseconds % (1000*60*60)) / (1000*60);\r\n int seconds = (int) ((milliseconds % (1000*60*60)) % (1000*60) / 1000);\r\n // Add hours if there\r\n if(hours > 0){\r\n finalTimerString = hours + \":\";\r\n }\r\n \r\n // Prepending 0 to seconds if it is one digit\r\n if(seconds < 10){\r\n secondsString = \"0\" + seconds;\r\n }else{\r\n secondsString = \"\" + seconds;}\r\n \r\n finalTimerString = finalTimerString + minutes + \":\" + secondsString;\r\n \r\n // return timer string\r\n return finalTimerString;\r\n }", "public static String longToHHMM(long longTime)\r\n/* 150: */ {\r\n/* 151:219 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 152:220 */ Date strtodate = new Date(longTime);\r\n/* 153:221 */ return formatter.format(strtodate);\r\n/* 154: */ }", "public static String convertTimeMillisecondsAsLongToDuration(long milliseconds) {\n\t\t\t\tString hours = String.format(\"%02d\", TimeUnit.MILLISECONDS.toHours(milliseconds));\n\t\t\t\tString minutes = String.format(\"%02d\",\n\t\t\t\t\t TimeUnit.MILLISECONDS.toMinutes(milliseconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliseconds)));\n\t\t\t String seconds = String.format(\"%02d\",\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(milliseconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliseconds)));\n\t\t\t String duration = Integer.valueOf(hours) + \":\" + minutes + \":\" + seconds;\n\t\t\t return duration; \n\t\t\t}", "public String milliSecondsToTimer(long milliseconds){\n\t\tString finalTimerString = \"\";\n\t\tString secondsString = \"\";\n\t\t\n\t\t// Convert total duration into time\n\t\t int hours = (int)( milliseconds / (1000*60*60));\n\t\t int minutes = (int)(milliseconds % (1000*60*60)) / (1000*60);\n\t\t int seconds = (int) ((milliseconds % (1000*60*60)) % (1000*60) / 1000);\n\t\t // Add hours if there\n\t\t if(hours > 0){\n\t\t\t finalTimerString = hours + \":\";\n\t\t }\n\t\t \n\t\t // Prepending 0 to seconds if it is one digit\n\t\t if(seconds < 10){ \n\t\t\t secondsString = \"0\" + seconds;\n\t\t }else{\n\t\t\t secondsString = \"\" + seconds;}\n\t\t \n\t\t finalTimerString = finalTimerString + minutes + \":\" + secondsString;\n\t\t\n\t\t// return timer string\n\t\treturn finalTimerString;\n\t}", "public static String millisecondsToString(long milliseconds) {\n if (milliseconds == 0 || milliseconds < MINUTE_IN_MILLIS) {\n return \"0 min\";\n }\n\n String output = \"\";\n\n long hours = MILLISECONDS.toHours(milliseconds);\n if (hours > 0) {\n output = hours + \" hr \";\n }\n\n long minutes = MILLISECONDS.toMinutes(milliseconds);\n long leftOverMinutes = minutes - HOURS.toMinutes(hours);\n\n if (leftOverMinutes > 0) {\n output += leftOverMinutes + \" min\";\n }\n return output.trim();\n }", "public static String convertMillis(long millis){\n\t\tlong hours = millis / 3600000;\r\n\t\tmillis = millis % 3600000;\r\n\t\tlong minutes = millis / 60000;\r\n\t\tmillis = millis % 60000;\r\n\t\tlong seconds = millis / 1000;\r\n\t\t\r\n\t\tString strHours = hours + \"\";\t\t\t\t\t//pretvaranje cjelobrojnih vrijednosti u satima, minutama i sekundama\r\n\t\tString strMinutes = minutes + \"\";\t\t\t\t//u String vrijednosti \r\n\t\tString strSeconds = seconds + \"\";\r\n\t\t\r\n\t\treturn strHours + \":\" + strMinutes + \":\" + strSeconds + \".\";\t\r\n\t}", "public static String showTime(long ms)\n {\n long minutes = ms/1000/60;\n long seconds = (ms - 1000*60*minutes)/1000;\n long millis = ms % 1000;\n return minutes + \"m \" + seconds + \"s \" + millis +\"ms\";\n }", "public String convertTimeMillisecondsAsLongToDurationAuto(long milliseconds) {\n\t\t\t\tString hours = String.format(\"%02d\", TimeUnit.MILLISECONDS.toHours(milliseconds));\n\t\t\t\tString minutes = String.format(\"%02d\",\n\t\t\t\t\t TimeUnit.MILLISECONDS.toMinutes(milliseconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliseconds)));\n\t\t\t String seconds = String.format(\"%02d\",\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(milliseconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliseconds)));\n\t\t\tif (Integer.valueOf(hours) == 0) {\n\t\t\t\tString duration = minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} else {\n\t\t\t String duration = hours + \":\" + minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} \n\t\t\t}", "public static String updateText(long milliseconds) {\n\t\tString finalTimeString = \"\";\n\t\tString secondsString = \"\";\n\n\t\tint hours = (int) (milliseconds / (1000 * 60 * 60));\n\t\tint minutes = (int) ((milliseconds % (1000 * 60 * 60)) / (1000 * 60));\n\t\tint seconds = (int) ((milliseconds % (1000 * 60 * 60)) % (1000 * 60) / 1000);\n\n\t\tif (hours > 0)\n\t\t\tfinalTimeString = hours + \":\";\n\n\t\tif (seconds < 10)\n\t\t\tsecondsString = \"0\" + seconds;\n\t\telse\n\t\t\tsecondsString = \"\" + seconds;\n\n\t\tfinalTimeString = finalTimeString + minutes + \":\" + secondsString;\n\n\t\treturn finalTimeString;\n\t}", "public String convertTimeMillisecondsAsLongToDurationNoLeadZero(long milliseconds) {\n\t\t\t\tString hours = String.format(\"%02d\", TimeUnit.MILLISECONDS.toHours(milliseconds));\n\t\t\t\tString minutes = String.format(\"%02d\",\n\t\t\t\t\t TimeUnit.MILLISECONDS.toMinutes(milliseconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliseconds)));\n\t\t\t String seconds = String.format(\"%02d\",\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(milliseconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliseconds)));\n\t\t\tif (Integer.valueOf(hours) == 0) {\n\t\t\t\tint min = Integer.valueOf(minutes);\n\t\t\t if (min != 0) { minutes = String.valueOf(min); }\n\t\t\t String duration = minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} else {\n\t\t\t hours = String.valueOf(Integer.valueOf(hours));\n\t\t\t String duration = hours + \":\" + minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} \n\t\t\t}", "private String formatTime(long ms) {\n String format = String.format(\"%%.%df s\", decimals);\n return String.format(format, ms > 0 ? ms/1000f : 0f);\n }", "public static String toHumanReadableTime(long milliseconds) {\n StringBuilder sb = new StringBuilder();\n int len = TIME_UNITS.length;\n int i = 0;\n for (; i < len; i++) {\n long quotient = milliseconds / TIME_UNITS[i];\n if (quotient > 0) {\n if (sb.length() > 0) {\n sb.append(' ');\n }\n sb.append(quotient).append(TIME_UNITS_ABBR[i]);\n milliseconds = milliseconds % TIME_UNITS[i];\n }\n }\n if (sb.length() > 0) {\n if (milliseconds > 0) {\n sb.append(' ').append(milliseconds).append(TIME_UNITS_ABBR[i]);\n }\n } else {\n sb.append(milliseconds).append(TIME_UNITS_ABBR[i]);\n }\n return sb.toString();\n }", "public static String formattime(long millis) {\n\t\treturn String.format(\"%02d:%02d:%02d:%03d\", //This formats the time correctly\n\t\t\t\tTimeUnit.MILLISECONDS.toHours(millis),\n\t\t\t TimeUnit.MILLISECONDS.toMinutes(millis) -\n\t\t\t TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)),\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(millis) -\n\t\t\t TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)),\n\t\t\t millis -\n\t\t\t TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(millis)));\n\t\t\n\t}", "public static String getElapsedTimeFromMilliseconds(long inputTime)\r\n {\r\n String format = String.format(\"%%0%dd\", 2);\r\n long elapsedTime = inputTime / 1000000;\r\n String millisecond = String.format(format, elapsedTime % 1000);\r\n String seconds = String.format(format, (elapsedTime/1000) % 60);\r\n String minutes = String.format(format, ((elapsedTime/1000) % 3600) / 60);\r\n String hours = String.format(format, (elapsedTime/1000) / 3600);\r\n\r\n hours = hours.equals(\"00\") ? \"\" : (Integer.parseInt(hours) < 9 ? hours.substring(hours.lastIndexOf(\"0\") + 1)+\":\" :hours+\":\");\r\n minutes = minutes.equals(\"00\") ? \"\" : (Integer.parseInt(minutes) < 9 ? minutes.substring(minutes.lastIndexOf(\"0\") + 1)+\":\" :minutes+\":\");\r\n seconds = seconds.equals(\"00\") ? \"\" : (Integer.parseInt(seconds) < 9 ? seconds.substring(seconds.lastIndexOf(\"0\") + 1)+\",\" :seconds+\",\");\r\n millisecond = millisecond.equals(\"00\") ? \"\" : millisecond+(seconds.equals(\"\") ? \"ms\":(minutes.equals(\"\") ? \" sec\" : \" min\"));\r\n String time = hours+minutes+seconds+millisecond;\r\n return time;\r\n }", "public static String getMillisecondTimeString(long hour, long minute, long second, long millisecond)\n\t{\n\t\tString hourString = null;\n\t\tString minuteString = null;\n\t\tString secondString = null;\n\t\tString millisecondString = null;\n\t\t\n\t\tif (hour < 10)\n\t\t{\n\t\t\thourString = \"0\" + hour;\n\t\t}\n\t\telse\n\t\t{\n\t\t\thourString = \"\" + hour;\n\t\t}\n\t\t\n\t\tif (minute < 10)\n\t\t{\n\t\t\tminuteString = \"0\" + minute;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tminuteString = \"\" + minute;\n\t\t}\n\t\t\n\t\tif (second < 10)\n\t\t{\n\t\t\tsecondString = \"0\" + second;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsecondString = \"\" + second;\n\t\t}\n\t\t\n\t\tif (millisecond < 10)\n\t\t{\n\t\t\tmillisecondString = \"00\" + millisecond;\n\t\t}\n\t\telse if (millisecond < 100)\n\t\t{\n\t\t\tmillisecondString = \"0\" + millisecond;\n\t\t}\t\n\t\telse \n\t\t{\n\t\t\tmillisecondString = \"\" + millisecond;\n\t\t}\n\t\t\n\t\treturn hourString + \":\" + minuteString + \":\" + secondString + \":\" + millisecondString;\n\t}", "public String convertTime(long milliseconds) {\n Date date = new Date(milliseconds);\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"Asia/Shanghai\"));\n return formatter.format(date);\n }", "static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }", "public static String convertMillisTime(long time_millis, String format) {\n String result = \"\";\n if (time_millis <= 0) {\n return result;\n }\n\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(format, Locale.US);\n result = dateFormat.format(new Date(time_millis));\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n }\n\n return result;\n }", "public static String formatConsumeTimeMillis(long millis) { \r\n\t long days = millis / (1000 * 60 * 60 * 24); \r\n\t long hours = (millis % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60); \r\n\t long minutes = (millis % (1000 * 60 * 60)) / (1000 * 60); \r\n\t double seconds = (millis % (1000 * 60)) / 1000.0; \r\n\t return days + \" dats \" + hours + \" hours \" + minutes + \" mins \" \r\n\t + seconds + \" seconds\";\r\n\t}", "public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }", "public static String formatTime(long timeDiff){\n StringBuilder buf = new StringBuilder();\n long hours = timeDiff / (60*60*1000);\n long rem = (timeDiff % (60*60*1000));\n long minutes = rem / (60*1000);\n rem = rem % (60*1000);\n long seconds = rem / 1000;\n\n if (hours != 0){\n buf.append(hours);\n buf.append(\" hrs, \");\n }\n if (minutes != 0){\n buf.append(minutes);\n buf.append(\" mins, \");\n }\n\n if (seconds != 0) {\n buf.append(seconds);\n buf.append(\" sec\");\n }\n\n if (timeDiff < 1000) {\n buf.append(timeDiff);\n buf.append(\" msec\");\n }\n return buf.toString();\n }", "public static String format( long elapsedMillis ) {\n String s = \"\";\n int hours = (int) ( elapsedMillis / ( 1000 * 60 * 60 ) );\n int minutes = (int) ( ( elapsedMillis % ( 1000 * 60 * 60 ) ) / ( 1000 * 60 ) );\n int seconds = (int) ( ( ( elapsedMillis % ( 1000 * 60 * 60 ) ) % ( 1000 * 60 ) ) / 1000 );\n if ( hours > 0 ) {\n // hours:minutes:seconds\n Object[] args = { ONE_DIGIT_TIME_FORMAT.format( hours ), TWO_DIGIT_TIME_FORMAT.format( minutes ), TWO_DIGIT_TIME_FORMAT.format( seconds ) };\n s = MessageFormat.format( \"{0}:{1}:{2}\", args );\n }\n else {\n // minutes:seconds\n Object[] args = { ONE_DIGIT_TIME_FORMAT.format( minutes ), TWO_DIGIT_TIME_FORMAT.format( seconds ) };\n s = MessageFormat.format( \"{0}:{1}\", args );\n }\n return s;\n }", "public static String getReadableTime(long time_ms) {\n String output = \"\";\n long time_delta = time_ms;\n\n int milliseconds = (int) (time_delta % 1000);\n time_delta /= 1000;\n int seconds = (int) (time_delta % 60);\n time_delta /= 60;\n int minutes = (int) (time_delta % 60);\n time_delta /= 60;\n int hours = (int) (time_delta % 24);\n int days = (int) (time_delta / 24);\n\n if (days != 0) {\n output += String.format(\"%d day\", days);\n if (days > 1) {\n output += \"s\";\n }\n if ((hours != 0) || (minutes != 0) || (seconds != 0)) {\n output += \" \";\n }\n }\n if ((hours != 0) || (minutes != 0)) {\n return output + String.format(\"%d:%02d:%02d\", hours, minutes, seconds);\n }\n if (seconds != 0) {\n return output + String.format(\"%d.%d seconds\", seconds, milliseconds);\n }\n if (milliseconds != 0) {\n return output + String.format(\"%d ms\", milliseconds);\n }\n\n return (output.length() == 0 ? \"0\" : output);\n }", "public static String formatMillis(int millis) {\n String result = \"\";\n int hr = millis / 3600000;\n millis %= 3600000;\n int min = millis / 60000;\n millis %= 60000;\n int sec = millis / 1000;\n if (hr > 0) {\n result += hr + \":\";\n }\n if (min >= 0) {\n if (min > 9) {\n result += min + \":\";\n } else {\n result += \"0\" + min + \":\";\n }\n }\n if (sec > 9) {\n result += sec;\n } else {\n result += \"0\" + sec;\n }\n return result;\n }", "public static String formatMillis(int millis) {\n String result = \"\";\n int hr = millis / 3600000;\n millis %= 3600000;\n int min = millis / 60000;\n millis %= 60000;\n int sec = millis / 1000;\n if (hr > 0) {\n result += hr + \":\";\n }\n if (min >= 0) {\n if (min > 9) {\n result += min + \":\";\n } else {\n result += \"0\" + min + \":\";\n }\n }\n if (sec > 9) {\n result += sec;\n } else {\n result += \"0\" + sec;\n }\n return result;\n }", "public static String timeAsString(long totalTime) {\n long second = totalTime / 1000 % 60;\n long minute = totalTime / (1000 * 60) % 60;\n long hour = totalTime / (1000 * 60 * 60);\n\n return String.format(\"%02d:%02d:%02d\", hour, minute, second);\n }", "private String formatTime(final long time) {\n if ( time == 0 ) {\n return \"-\";\n }\n if ( time < 1000 ) {\n return time + \" ms\";\n } else if ( time < 1000 * 60 ) {\n return time / 1000 + \" secs\";\n }\n final long min = time / 1000 / 60;\n final long secs = (time - min * 1000 * 60);\n return min + \" min \" + secs / 1000 + \" secs\";\n }", "public static String millisecondsToDateTimeDuration(long milliseconds) {\n long hours = MILLISECONDS.toHours(milliseconds);\n long minutes = MILLISECONDS.toMinutes(milliseconds % MINUTES_MOD);\n long seconds = MILLISECONDS.toSeconds((milliseconds % MINUTES_MOD) % SECONDS_MOD);\n\n return String.format(\"PT%02dH%02dM%02dS\", hours, minutes, seconds);\n }", "public static String TimeConverter(long t)\r\n {\r\n int h, m, s, ms;\r\n ms = (int)t;\r\n h = ms / 3600000;\r\n ms = ms % 3600000;\r\n m = ms / 60000;\r\n ms = ms % 60000;\r\n s = ms / 1000;\r\n ms = ms % 1000;\r\n return h + \" :: \" + m + \" :: \" + s + \" :: \" + ms;\r\n }", "public static String timem( long p_lMillis ) {\n String sTime = \"\";\n if ( p_lMillis > 999 ) sTime =time( p_lMillis );\n sTime += \" \" + (p_lMillis % 1000 ) + \"ms\"; \n return sTime;\n }", "private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}", "@SuppressLint(\"SimpleDateFormat\")\n\tpublic static String getStringTime(Long time){\n\t\tSimpleDateFormat dateaf = new SimpleDateFormat(\"MM-dd\"); \n\t\tSimpleDateFormat timef = new SimpleDateFormat(\"HH:mm\"); \n\t\tString date = dateaf.format(time);\n\t\tString times = timef.format(time);\n\t\tString result = date+\" \"+times;\n\t\treturn result;\n\t}", "public static String convertMillisTime(long time_millis) {\n return convertMillisTime(time_millis, \"yyyy-MM-dd\");\n }", "public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }", "static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "public static long strToMillis(String time) {\r\n long result = 0;\r\n try {\r\n Pattern p = Pattern\r\n .compile(\"([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})(\\\\.([0-9]{1,3}))?\");\r\n Matcher m = p.matcher(time.trim());\r\n m.find();\r\n result += Long.parseLong(m.group(1)) * 3600000\r\n + Long.parseLong(m.group(2)) * 60000 + Long.parseLong(m.group(3))\r\n * 1000;\r\n if (m.group(5) != null)\r\n result += Long.parseLong(m.group(5));\r\n } catch (Exception e) {\r\n // don't complain, just return 0\r\n return 0;\r\n }\r\n return result;\r\n }", "private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }", "public String timeToText(long timeInMillis)\n {\n // FIRST CALCULATE THE NUMBER OF HOURS,\n // SECONDS, AND MINUTES\n long hours = timeInMillis/MILLIS_IN_AN_HOUR;\n timeInMillis -= hours * MILLIS_IN_AN_HOUR; \n long minutes = timeInMillis/MILLIS_IN_A_MINUTE;\n timeInMillis -= minutes * MILLIS_IN_A_MINUTE;\n long seconds = timeInMillis/MILLIS_IN_A_SECOND;\n \n // THEN ADD THE TIME OF GAME SUMMARIZED IN PARENTHESES\n String minutesText = \"\" + minutes;\n if (minutes < 10) minutesText = \"0\" + minutesText;\n String secondsText = \"\" + seconds;\n if (seconds < 10) secondsText = \"0\" + secondsText;\n return hours + \":\" + minutesText + \":\" + secondsText;\n }", "java.lang.String getTime();", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public static String mSecsToString(long actualTimeInMseconds) {\n Date date = new Date(actualTimeInMseconds);\n DateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return (formatter.format(date));\n }", "private String formatTimeout(long timeout) {\n Date date = new Date(timeout);\n DateFormat formatter = new SimpleDateFormat(\"mm:ss\");\n return formatter.format(date);\n }", "public static String formatTimeInterval(final long intervalMilliseconds) {\r\n \tlong l = intervalMilliseconds;\r\n final long hr = TimeUnit.MILLISECONDS.toHours(l);\r\n final long min = TimeUnit.MILLISECONDS.toMinutes(l - TimeUnit.HOURS.toMillis(hr));\r\n final long sec = TimeUnit.MILLISECONDS.toSeconds(l - TimeUnit.HOURS.toMillis(hr) - TimeUnit.MINUTES.toMillis(min));\r\n// final long ms = TimeUnit.MILLISECONDS.toMillis(l - TimeUnit.HOURS.toMillis(hr) - TimeUnit.MINUTES.toMillis(min) - TimeUnit.SECONDS.toMillis(sec));\r\n return String.format(\"%02d:%02d:%02d\" /* + \".%03d\" */, hr, min, sec /*, ms */);\r\n }", "private String getMinutesInTime(int time) {\n String hour = String.valueOf(time / 60);\n String minutes = String.valueOf(time % 60);\n\n if(minutes.length() < 2) {\n minutes = \"0\" + minutes;\n }\n\n return hour + \":\" + minutes;\n\n }", "private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }", "public static String getFormattedInterval(final long ms) {\n long x = ms / 1000;\n long seconds = x % 60;\n x = x / 60;\n long minutes = x % 60;\n x /= 60;\n long hours = x % 24;\n\n return String.format(Locale.US, \"%02d:%02d:%02d\", hours, minutes, seconds);\n }", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "public String timeToString() {\n\t\tString start = \"\";\n\t\tString hmSep = \":\";\n\t\tString msSep = \":\";\n\t\tif (hour < 10)\n\t\t\tstart = new String(\"0\");\n\t\tif (minute < 10)\n\t\t\thmSep = new String(\":0\");\n\t\tif (second < 10)\n\t\t\tmsSep = new String(\":0\");\n\t\treturn new String(start\n\t\t\t\t+ hour + hmSep\n\t\t\t\t+ minute + msSep\n\t\t\t\t+ second);\n\t}", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "public String timeFormatter(String time) throws ParseException {\n\t\tfinal String oldFormat = \"HH mm\";\n\t\tfinal String newFormat = \"HH:mm:ss\";\n\t\tString newTimeString;\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(oldFormat);\n\t\tDate d = sdf.parse(time);\n\t\tsdf.applyPattern(newFormat);\n\t\tnewTimeString = sdf.format(d);\n\t\treturn newTimeString;\t\n\t}", "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "public static String longToYYYYMMDDHHMM(long longTime)\r\n/* 157: */ {\r\n/* 158:232 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd HH:mm\");\r\n/* 159:233 */ Date strtodate = new Date(longTime);\r\n/* 160:234 */ return formatter.format(strtodate);\r\n/* 161: */ }", "public synchronized static DateFormat getMillisecondTimeFormat()\n\t{\n\t\treturn MILLISECOND_TIME_FORMAT;\n\t}", "private String formatTime(long nanoSeconds)\n {\n int hours, minutes, remainder, totalSecondsNoFraction;\n double totalSeconds, seconds;\n\n totalSeconds = (double) nanoSeconds / 1000000000.0;\n\n hours = (int) totalSeconds / 3600;\n totalSeconds -= hours * 3600;\n\n minutes = (int) totalSeconds / 60;\n totalSeconds -= minutes * 60;\n\n seconds = totalSeconds;\n\n // Formatting the string that conatins hours, minutes and seconds\n StringBuilder result = new StringBuilder(\"\");\n if (hours > 0) {\n if (hours < 10)\n result.append(\"0\");\n result.append(hours);\n }\n else\n result.append(\"00\");\n result.append(\":\");\n if (minutes > 0) {\n if (minutes < 10)\n result.append(\"0\");\n result.append(minutes);\n }\n else\n result.append(\"00\");\n result.append(\":\");\n if (seconds > 0) {\n if (seconds < 10)\n result.append(\"0\");\n DecimalFormat df = new DecimalFormat(\"##.00\");\n result.append(df.format(seconds));\n }\n else\n result.append(\"00\");\n return result.toString();\n }", "public long toTimelineValue(long millisecond) { return millisecond; }", "static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }", "public static String getUTCStringFromMillis(long millisecondTime) {\n return getUTCStringFromDate(new Date(millisecondTime));\n }", "private static Date parseTimestringWithMillis(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n int len = timestring.length();\r\n char dot = timestring.charAt(len-4);\r\n boolean containsDot = false;\r\n if(dot == '.'){\r\n containsDot = true;\r\n }\r\n if(!containsT && containsSpace && containsDot){\r\n try {\r\n Date date = formatMiliSecs.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace && containsDot){\r\n try {\r\n Date date = formatMiliSecsWT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }", "private String readableTime(Integer minutes) {\r\n String time = \"\";\r\n if (minutes / 60.0 > 1) {\r\n time = (minutes / 60) + \" hrs, \"\r\n + (minutes % 60) + \" min\";\r\n } else {\r\n time = minutes + \" min\";\r\n }\r\n return time;\r\n }", "private String getTimeDifference(long actualTime) {\n\t\tlong seconds = actualTime % (1000 * 60);\n\t\tlong minutes = actualTime / (1000 * 60);\n\n\t\tString result = null;\n\n\t\tif (minutes < 10) {\n\t\t\tresult = \"0\" + minutes + \":\";\n\t\t} else {\n\t\t\tresult = minutes + \":\";\n\t\t}\n\n\t\tif (seconds < 10) {\n\t\t\tresult += \"0\" + seconds;\n\t\t} else {\n\t\t\tString sec = seconds + \"\";\n\t\t\tresult += sec.substring(0, 2);\n\t\t}\n\n\t\treturn result;\n\t}", "public static String parseTime(final int timeInSec)\n {\n String output = \"\";\n final int weeks = timeInSec / (86400 * 7);\n int remainder = timeInSec % (86400 * 7);\n final int days = remainder / 86400;\n remainder = timeInSec % 86400;\n final int hours = remainder / 3600;\n remainder = timeInSec % 3600;\n final int minutes = remainder / 60;\n final int seconds = remainder % 60;\n\n if (weeks != 0)\n {\n output += weeks + \" weeks \";\n }\n\n if (days != 0)\n {\n output += (days < 10 ? days > 0 ? \"0\" : \"\" : \"\") + days + \" days \";\n }\n\n if (hours != 0)\n {\n output += (hours < 10 ? hours > 0 ? \"0\" : \"\" : \"\") + hours + \" h \";\n }\n\n if (minutes != 0)\n {\n output += (minutes < 10 ? minutes > 0 ? \"0\" : \"\" : \"\") + minutes + \" min \";\n }\n\n output += (seconds < 10 ? seconds > 0 ? \"0\" : \"\" : \"\") + seconds + \" sec\";\n\n return output;\n }", "protected String timeToSpeed() {\n String speedValueText = \"\";\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"hh:mm:ss aa\");\n localDate = dateFormat.parse(mLastUpdateTimeTextView.getText().toString());\n long localDateMS = localDate.getTime();\n long previousDateMs = previousDate.getTime();\n double timeValueSecond = (localDateMS - previousDateMs) / 1000;\n timeSingleValue = timeValueSecond;\n double distance = Double.parseDouble(mMoveTextView.getText().toString().substring(0, mMoveTextView.length() - 2));\n double speedValue = Math.round(((distance / timeValueSecond) * 3600 / 1000)*100)/100.0;\n if (speedValue < 0.01 || Double.isNaN(speedValue) || speedValue > 10000) speedValue = 0;\n speedValueText = String.valueOf(speedValue);\n previousDate = localDate;\n }\n catch (ParseException e) {\n mSpeedTextView.setText(e.getMessage());\n }\n return speedValueText ; // String.valueOf(timeValueMS);\n }", "public static String parseTime(String sTime) {\n\t\treturn sTime.substring(4, 6);\n\t}", "public static long convertTimeMillisecondsAsStringToSeconds(String milliseconds) {\n\t\t\t\tint MILLISECONDS_IN_A_SECOND = 1000;\n\t\t\t\tDouble d = Double.valueOf(milliseconds) / Double.valueOf(MILLISECONDS_IN_A_SECOND);\n\t\t\t\treturn Math.round(d);\n\t\t\t}", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }", "private String parseTime(TimePicker start){\n String time = \"\";\n if (start.getHour() < 10){\n time += \"0\" + start.getHour() + \":\";\n } else {\n time += start.getHour() + \":\";\n }\n if (start.getMinute() < 10){\n time += \"0\" + start.getMinute();\n } else {\n time += start.getMinute();\n }\n return time;\n }", "private String secondsToMinutesAndSeconds(double seconds) {\n\t\tint numberOfminutes = (int) (seconds / 60);\n\t\tint numberOfSeconds = (int) (seconds % 60);\n\t\tif (numberOfSeconds < 10) {\n\t\t\treturn numberOfminutes + \":0\" + numberOfSeconds;\n\t\t} else {\n\t\t\treturn numberOfminutes + \":\" + numberOfSeconds;\n\t\t}\n\t}", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "public static String timeAsLabelStr(long totalTime) {\n long second = totalTime / 1000 % 60;\n long minute = totalTime / (1000 * 60) % 60;\n long hour = totalTime / (1000 * 60 * 60);\n\n // build string (checking for zeroes)\n String str = String.format(\"%d sec\", second);\n if (minute > 0) str = String.format(\"%d min \", minute) + str;\n if (hour > 0) str = String.format(\"%d hrs \", hour) + str;\n\n return str;\n }", "public static String formatTime(long elapsed) {\n int[] convConst = {100, 60, 60, 24};\n int[] formatValues = new int[convConst.length];\n\n for (int i = 0; i < (convConst.length & formatValues.length); i++) {\n if (i > 0) elapsed /= convConst[i - 1];\n formatValues[i] = (int) (elapsed % convConst[i]);\n }\n\n int[] trimmed = ArrayUtils.autobox(ArrayUtils.reverse(ArrayUtils.trimBack(ArrayUtils.autobox(formatValues), 0)));\n String[] filled = new String[trimmed.length];\n\n for (int i = 0; i < (trimmed.length & filled.length); i++)\n filled[i] = i > 0 ? StringUtils.fillLeading(\"\" + trimmed[i], '0', 2) : \"\" + trimmed[i];\n\n List<String> filledList = new ArrayList<>(Arrays.asList(filled));\n if (filledList.size() <= 1) filledList.add(0, \"0\");\n\n return String.join(\".\", String.join(\":\", filledList.subList(0, filledList.size() - 1)), filledList.get(filledList.size() - 1));\n }", "public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }", "public static double parse_time(String s) {\n double tm = -1;\n String patternStr = \"[:]\";\n String [] fields2 = s.split(patternStr);\n if (fields2.length >= 3) {\n tm = parse_double(fields2[2]) + 60 * parse_double(fields2[1]) + 3600 * parse_double(fields2[0]); // hrs:min:sec\n } else if (fields2.length == 2) {\n tm = parse_double(fields2[1]) + 60 * parse_double(fields2[0]); // min:sec\n } else if (fields2.length == 1){\n tm = parse_double(fields2[0]); //getColumn(_sec, head[TM_CLK]);\n }\n return tm;\n }", "public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }", "public static String getTimeAsString(final double timeInMillis, final Locale locale) {\n\t\tif (timeInMillis > 1.0) {\n\t\t\treturn getTimeAsString((long) timeInMillis, locale);\n\t\t}\n\t\tFormat nf = new DecimalFormat(\"#.###\", new DecimalFormatSymbols(locale));\n\t\treturn nf.format(timeInMillis) + \" ms\";\n\t}", "public static String buildTimeString(long time) {\r\n\t\t\r\n\t\t// Days\r\n\t\tlong days = time / (1000 * 60 * 60 * 24);\r\n\t\ttime = time % (1000 * 60 * 60 * 24);\r\n\t\t\r\n\t\tlong hours = time / (1000 * 60 * 60);\r\n\t\ttime = time % (1000 * 60 * 60);\r\n\t\t\r\n\t\tlong mins = time / (1000 * 60);\r\n\t\ttime = time % (1000 * 60);\r\n\t\t\r\n\t\tlong secs = time / 1000;\r\n\t\t\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (days>0) {\r\n\t\t\tbuilder.append(days + \" d : \");\r\n\t\t}\r\n\t\tbuilder.append(String.format(\"%02d h : \", hours));\r\n\t\tbuilder.append(String.format(\"%02d m : \", mins));\r\n\t\tbuilder.append(String.format(\"%02d s\", secs));\r\n\r\n\t\treturn builder.toString();\r\n\t}", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "private String secsToTime(int secs) {\n String min = secs / 60 + \"\";\n String sec = secs % 60 + \"\";\n if(sec.length() == 1) {\n sec = \"0\" + sec;\n }\n\n return min + \":\" + sec;\n }", "public static String formatDuration(int hours, int minutes, int seconds, int millis){\n Date tmpDate = new Date();\n long durationMillis = (hours * 60 * 60 * 1000) + (minutes * 60 * 1000) + (seconds * 1000) + millis;\n\n int totalHours = (int) Math.floor(durationMillis / 60 / 60 / 1000);\n int totalMinutes = (int) Math.floor((durationMillis - (totalHours * 60 * 60 * 1000)) / 60 / 1000);\n int totalSeconds = (int) Math.floor((durationMillis - (totalHours * 60 * 60 * 1000) - (totalMinutes * 60 * 1000)) / 1000);\n //Milliseconds are... whatever.\n\n tmpDate.setHours(totalHours);\n tmpDate.setMinutes(totalMinutes);\n tmpDate.setSeconds(totalSeconds);\n if(totalHours > 0){\n return HOURS_MINUTES_SECONDS.format(tmpDate);\n } else {\n return MINUTES_SECONDS.format(tmpDate);\n }\n }", "public static String hoursMinutesSeconds(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n //return String.format(\"%2d:%02d:%02d\", hours, mins, secs);\n return String.format(\"%d:%02d:%02d\", hours, mins, secs);\n }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "public static String millisToLongDHMS(long duration) {\n StringBuilder res = new StringBuilder();\n long temp = 0;\n if (duration >= ONE_SECOND) {\n temp = duration / ONE_DAY;\n if (temp > 0) {\n duration -= temp * ONE_DAY;\n res.append(temp).append(\" day\").append(temp > 1 ? \"s\" : \"\").append(duration >= ONE_MINUTE ? \", \" : \"\");\n }\n \n temp = duration / ONE_HOUR;\n if (temp > 0) {\n duration -= temp * ONE_HOUR;\n res.append(temp).append(\" hour\").append(temp > 1 ? \"s\" : \"\").append(duration >= ONE_MINUTE ? \", \" : \"\");\n }\n \n temp = duration / ONE_MINUTE;\n if (temp > 0) {\n duration -= temp * ONE_MINUTE;\n res.append(temp).append(\" minute\").append(temp > 1 ? \"s\" : \"\");\n }\n \n if (!res.toString().equals(\"\") && duration >= ONE_SECOND) {\n res.append(\" and \");\n }\n \n temp = duration / ONE_SECOND;\n if (temp > 0) {\n res.append(temp).append(\" second\").append(temp > 1 ? \"s\" : \"\");\n }\n return res.toString();\n } else {\n return \"0 second\";\n }\n }", "long toMillisecond(long timelineValue);", "String formatTime(int time) {\r\n\t\tint h = time / 3600;\r\n\t\ttime %= 3600;\r\n\t\tint m = time / 60;\r\n\t\ttime %= 60;\r\n\t\tint s = time;\r\n\t\treturn String.format(\"%02d:%02d:%02d\", h, m, s);\r\n\t}", "public static String convertFromTime(int time){\n int hour = time/100;\n int min = time%100;\n String hourStr = String.format(\"%02d\", hour);\n String minStr = String.format(\"%02d\",min);\n return hourStr + \":\" + minStr;\n }", "public static String millisToLongDhms(long duration) {\r\n if (duration < ONE_SECOND) {\r\n return \"0 second\";\r\n }\r\n int[] items = millisToDHMS(duration);\r\n StringBuilder res = new StringBuilder();\r\n if (items[0] > 0) {\r\n res.append(items[0]).append(\" day\").append(items[0] > 1 ? \"s\" : \"\")\r\n .append(items[1] > 0 ? \", \" : \"\");\r\n }\r\n if (items[1] > 0) {\r\n res.append(items[1]).append(\" hour\").append(items[1] > 1 ? \"s\" : \"\")\r\n .append(items[2] > 0 ? \", \" : \"\");\r\n }\r\n if (items[2] > 0) {\r\n res.append(items[2]).append(\" minute\").append(items[2] > 1 ? \"s\" : \"\");\r\n }\r\n if (res.length() > 0 && items[3] > 0) {\r\n res.append(\" and \");\r\n }\r\n if (items[3] > 0) {\r\n res.append(items[3]).append(\" second\").append(items[3] > 1 ? \"s\" : \"\");\r\n }\r\n return res.toString();\r\n }", "public String getElapsedTimeHoursMinutesSecondsString(int milisec) {\n\t\t int time = milisec/1000;\n\t\t String seconds = Integer.toString((int)(time % 60)); \n\t\t String minutes = Integer.toString((int)((time % 3600) / 60)); \n\t\t String hours = Integer.toString((int)(time / 3600)); \n\t\t for (int i = 0; i < 2; i++) { \n\t\t if (seconds.length() < 2) { \n\t\t seconds = \"0\" + seconds; \n\t\t } \n\t\t if (minutes.length() < 2) { \n\t\t minutes = \"0\" + minutes; \n\t\t } \n\t\t if (hours.length() < 2) { \n\t\t hours = \"0\" + hours; \n\t\t } \n\t\t }\n\t\t String timeString = hours + \":\" + minutes + \":\" + seconds; \n\t\t return timeString;\n\t }", "public String getFormattedTime(){\r\n\t\tlong timestampInMs = ((long) timestamp * 1000);\r\n\t\tmessageTimestampTimeFormat = new SimpleDateFormat(messageTimestampTimeFormatString, Locale.getDefault()); \t//Initialise the time object we will use\r\n\t\tmessageTimestampTimeFormat.setTimeZone(TimeZone.getDefault());\r\n\t\tString messageSentString = messageTimestampTimeFormat.format(new Date(timestampInMs));\r\n\t\treturn messageSentString;\r\n\t}", "static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}", "public static String getDateFromLong(String milliseconds){\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM dd,yyyy HH:mm\");\n Date resultdate = new Date(Long.parseLong(milliseconds));\n return sdf.format(resultdate);\n }", "public static String setHoursMinutes(Long microseconds) {\n LocalTime startTime = LocalTime.of(0, 0);\n long seconds = TimeUnit.MICROSECONDS.toSeconds(microseconds);\n LocalTime finalTime = startTime.plusSeconds(seconds);\n return finalTime.format(DateTimeFormatter.ofPattern(\"HH:mm\"));\n }", "public static String getTime(int second) {\n if (second < 10) {\n return \"00:00:0\" + second;\n }\n if (second < 60) {\n return \"00:00:\" + second;\n }\n if (second < 3600) {\n int minute = second / 60;\n second = second - minute * 60;\n if (minute < 10) {\n if (second < 10) {\n return \"00:\" + \"0\" + minute + \":0\" + second;\n }\n return \"00:\" + \"0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"00:\" + minute + \":0\" + second;\n }\n return \"00:\" + minute + \":\" + second;\n }\n int hour = second / 3600;\n int minute = (second - hour * 3600) / 60;\n second = second - hour * 3600 - minute * 60;\n if (hour < 10) {\n if (minute < 10) {\n if (second < 10) {\n return \"0\" + hour + \":0\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"0\" + hour + \":\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":\" + minute + \":\" + second;\n }\n if (minute < 10) {\n if (second < 10) {\n return hour + \":0\" + minute + \":0\" + second;\n }\n return hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return hour + \":\" + minute + \":0\" + second;\n }\n return hour + \":\" + minute + \":\" + second;\n }", "private static Long parseTimeStrictly(String s) throws IllegalArgumentException\n {\n String nanos_s;\n\n long hour;\n long minute;\n long second;\n long a_nanos = 0;\n\n String formatError = \"Timestamp format must be hh:mm:ss[.fffffffff]\";\n String zeros = \"000000000\";\n\n if (s == null)\n throw new java.lang.IllegalArgumentException(formatError);\n s = s.trim();\n\n // Parse the time\n int firstColon = s.indexOf(':');\n int secondColon = s.indexOf(':', firstColon+1);\n\n // Convert the time; default missing nanos\n if (firstColon > 0 && secondColon > 0 && secondColon < s.length() - 1)\n {\n int period = s.indexOf('.', secondColon+1);\n hour = Integer.parseInt(s.substring(0, firstColon));\n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"Hour out of bounds.\");\n\n minute = Integer.parseInt(s.substring(firstColon + 1, secondColon));\n if (minute < 0 || minute >= 60)\n throw new IllegalArgumentException(\"Minute out of bounds.\");\n\n if (period > 0 && period < s.length() - 1)\n {\n second = Integer.parseInt(s.substring(secondColon + 1, period));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n\n nanos_s = s.substring(period + 1);\n if (nanos_s.length() > 9)\n throw new IllegalArgumentException(formatError);\n if (!Character.isDigit(nanos_s.charAt(0)))\n throw new IllegalArgumentException(formatError);\n nanos_s = nanos_s + zeros.substring(0, 9 - nanos_s.length());\n a_nanos = Integer.parseInt(nanos_s);\n }\n else if (period > 0)\n throw new IllegalArgumentException(formatError);\n else\n {\n second = Integer.parseInt(s.substring(secondColon + 1));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n }\n }\n else\n throw new IllegalArgumentException(formatError);\n\n long rawTime = 0;\n rawTime += TimeUnit.HOURS.toNanos(hour);\n rawTime += TimeUnit.MINUTES.toNanos(minute);\n rawTime += TimeUnit.SECONDS.toNanos(second);\n rawTime += a_nanos;\n return rawTime;\n }", "public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }", "public static String getWorkTimeSecondsInFormattedString(long seconds) {\r\n int totalMinutos = (int) (seconds/60);\r\n int totalHoras = totalMinutos / 60;\r\n int restoMinutos = totalMinutos % 60;\r\n int restoSegundos = (int) (seconds % 60);\r\n\r\n return (totalHoras + \":\" + restoMinutos + \":\" + restoSegundos);\r\n\r\n }", "static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }", "private long extractMillis(String value)\r\n/* 364: */ {\r\n/* 365:318 */ int start = value.indexOf(\"\\\"\");\r\n/* 366:319 */ int end = value.lastIndexOf(\"\\\"\");\r\n/* 367:320 */ String time = value.substring(start + 1, end);\r\n/* 368: */ \r\n/* 369:322 */ Date result = null;\r\n/* 370: */ try\r\n/* 371: */ {\r\n/* 372:324 */ result = this.format.parse(time);\r\n/* 373: */ }\r\n/* 374: */ catch (ParseException e)\r\n/* 375: */ {\r\n/* 376:327 */ Mark.err(new Object[] {\"Unalble to get milliseconds from\", value });\r\n/* 377:328 */ return 0L;\r\n/* 378: */ }\r\n/* 379:331 */ return result.getTime();\r\n/* 380: */ }" ]
[ "0.6928571", "0.68795097", "0.6769713", "0.673803", "0.67201215", "0.6695832", "0.660763", "0.660017", "0.6582585", "0.65696245", "0.6512893", "0.6487785", "0.64873546", "0.64605796", "0.645595", "0.6433018", "0.64264905", "0.6337126", "0.632736", "0.62911546", "0.628012", "0.624592", "0.6241583", "0.62065935", "0.6190862", "0.618511", "0.6160559", "0.6160559", "0.6073563", "0.6068115", "0.60399014", "0.60361564", "0.603099", "0.6030021", "0.59842306", "0.59807646", "0.59650546", "0.5954124", "0.5918371", "0.59142125", "0.59000194", "0.58958936", "0.58953214", "0.58768034", "0.5866509", "0.58644515", "0.5841275", "0.58410925", "0.58372414", "0.5833841", "0.5806196", "0.5804881", "0.5784808", "0.5769292", "0.576856", "0.5768316", "0.57575125", "0.57521206", "0.57376593", "0.5732614", "0.57318336", "0.57293755", "0.57264715", "0.5712726", "0.57112926", "0.5708913", "0.56866056", "0.5683612", "0.56772023", "0.5675118", "0.5626007", "0.5624864", "0.5622944", "0.56220233", "0.561967", "0.561713", "0.56028354", "0.55882394", "0.55871636", "0.55775946", "0.55725735", "0.5570487", "0.554662", "0.55460924", "0.554465", "0.554403", "0.5543815", "0.5525135", "0.5516962", "0.5514752", "0.5496919", "0.54907507", "0.5472528", "0.5469403", "0.5468228", "0.54538006", "0.5453546", "0.54533905", "0.54343706", "0.5429623", "0.5427662" ]
0.0
-1
Method to format date according to the date string value
public static String formatDate(String dateValue) { Date uploadDateTime = null; try { uploadDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US).parse(dateValue); } catch (ParseException e) { e.printStackTrace(); } return new SimpleDateFormat("dd/MM/yyyy HH:mm", Locale.US).format(uploadDateTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String formatDate(String dateString) {\n DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"LLL dd, yyyy\");\n LocalDate localDate = LocalDate.parse(dateString.substring(0, 10));\n return dateTimeFormatter.format(localDate);\n }", "private String formatDate(String dateStr) {\n try {\n SimpleDateFormat fmt = new SimpleDateFormat(Properties.DATE_FORMAT_ALL);\n Date date = fmt.parse(dateStr);\n SimpleDateFormat fmtOut = new SimpleDateFormat(Properties.DATE_FORMAT);\n return fmtOut.format(date);\n } catch (ParseException e) {\n System.out.println( Properties.K_WARNING + \" \" + e.getMessage());\n }\n return \"\";\n }", "public String format (Date date , String dateFormat) ;", "String formatDateCondition(Date date);", "public static String formatDate(String strDate) {\n return formatDate(strDate, false);\n }", "private String formatDate(Date dateObject) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\r\n return dateFormat.format(dateObject);\r\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\n return dateFormat.format(dateObject);\n }", "private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }", "public String changeDateFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy\";\n String outputPattern = \"MMMM dd, yyyy\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\", Locale.getDefault());\n return dateFormat.format(dateObject);\n }", "public String changeDateTimeFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy hh:mm a\";\n String outputPattern = \"MMMM dd, yyyy hh:mm a\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "public static String formatDate(Date date) {\n\t\tString newstring = new SimpleDateFormat(\"MM-dd-yyyy\").format(date);\n\t\treturn newstring;\n\t}", "private String getFormattedDate(String date) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.received_import_date_format));\n SimpleDateFormat desiredDateFormat = new SimpleDateFormat(getString(R.string.desired_import_date_format));\n Date parsedDate;\n try {\n parsedDate = dateFormat.parse(date);\n return desiredDateFormat.format(parsedDate);\n } catch (ParseException e) {\n // Return an empty string in case of issues parsing the date string received.\n e.printStackTrace();\n return \"\";\n }\n }", "@Method(selector = \"stringFromDate:toDate:\")\n public native String format(NSDate fromDate, NSDate toDate);", "private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}", "private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}", "public static String formatDate(String date){\n String formatedDate = date;\n if (!date.matches(\"[0-9]{2}-[0-9]{2}-[0-9]{4}\")){\n if (date.matches(\"[0-9]{1,2}/[0-9]{1,2}/([0-9]{2}|[0-9]{4})\"))\n formatedDate = date.replace('/', '-');\n if (date.matches(\"[0-9]{1,2}.[0-9]{1,2}.([0-9]{2}|[0-9]{4})\")){\n if (formatedDate.matches(\"[0-9]{1}.[0-9]{1,2}.([0-9]{2}|[0-9]{4})\"))\n formatedDate = \"0\" + formatedDate;\n if (formatedDate.matches(\"[0-9]{2}.[0-9]{1}.([0-9]{2}|[0-9]{4})\"))\n formatedDate = formatedDate.substring(0, 3) + \"0\" + \n formatedDate.substring(3);\n if (formatedDate.matches(\"[0-9]{2}.[0-9]{2}.[0-9]{2}\")){\n String thisYear = String.valueOf(LocalDate.now().getYear());\n String century = thisYear.substring(0,2);\n /* If the last two digits of the date are larger than the two last digits of \n * the current date, then we can suppose that the year corresponds to the last \n * century.\n */ \n if (Integer.valueOf(formatedDate.substring(6)) > Integer.valueOf(thisYear.substring(2)))\n century = String.valueOf(Integer.valueOf(century) - 1);\n formatedDate = formatedDate.substring(0, 6) + century +\n formatedDate.substring(6); \n }\n }\n }\n return formatedDate;\n }", "public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}", "private String formatReleaseDate(String releaseDate) {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date dateObject;\n try {\n dateObject = format.parse(releaseDate);\n }\n catch (ParseException pe) {\n Log.e(LOG_TAG, \"Error while retrieving movie information\");\n return releaseDate;\n }\n format = new SimpleDateFormat(\"LLL dd, yyyy\");\n\n return format.format(dateObject);\n }", "public java.sql.Date format(String date) {\n int i = 0;\n int dateAttr[];\n dateAttr = new int[3];\n for(String v : date.split(\"/\")) {\n dateAttr[i] = Integer.parseInt(v);\n i++;\n }\n\n GregorianCalendar gcalendar = new GregorianCalendar();\n gcalendar.set(dateAttr[2], dateAttr[0]-1, dateAttr[1]); // Year,Month,Day Of Month\n java.sql.Date sdate = new java.sql.Date(gcalendar.getTimeInMillis());\n return sdate;\n }", "public Date formatForDate(String data) throws ParseException{\n //definindo a forma da Data Recebida\n DateFormat formatUS = new SimpleDateFormat(\"dd-MM-yyyy\");\n return formatUS.parse(data);\n }", "public String dateFormatter(String fromDate) {\n\t\tString newDateString=\"\";\n\t\ttry {\n\t\t\tfinal String oldFormat = \"yyyy/MM/dd\";\n\t\t\tfinal String newFormat = \"yyyy-MM-dd\";\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(oldFormat);\n\t\t\tDate d = sdf.parse(fromDate);\n\t\t\tsdf.applyPattern(newFormat);\n\t\t\tnewDateString = sdf.format(d);\n\t\t} catch(Exception exp) {\n\t\t\tthrow ExceptionUtil.getYFSException(ExceptionLiterals.ERRORCODE_INVALID_DATE, exp);\n\t\t}\n\t\treturn newDateString;\n\t}", "public static String formatDateToString(Date d, String formatoData) {\n\t\tfinal String OLD_FORMAT = \"yyyy-MM-dd\";\r\n\r\n\t\tString newDateString;\r\n\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);\r\n\t\tsdf.applyPattern(formatoData);\r\n\t\tnewDateString = sdf.format(d);\r\n\t\t\r\n\t\treturn newDateString;\r\n\t}", "public static String formatDate(Date date) {\n final SimpleDateFormat formatter = new SimpleDateFormat(\"MM-dd-yyyy\");\n return formatter.format(date);\n }", "public String formatDate(Date date) {\n\t\tString formattedDate;\n\t\tif (date != null) {\n\t\t\tformattedDate = simpleDateFormat.format(date);\n\t\t\tformattedDate = formattedDate.substring(0,\n\t\t\t\t\tformattedDate.length() - 5);\n\t\t} else {\n\t\t\tformattedDate = Constants.EMPTY_STRING;\n\t\t}\n\t\treturn formattedDate;\n\t}", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }", "public static String date_d(String sourceDate,String format) throws ParseException {\n SimpleDateFormat sdf_ = new SimpleDateFormat(\"yyyy-MM-dd\");\n SimpleDateFormat sdfNew_ = new SimpleDateFormat(format);\n return sdfNew_.format(sdf_.parse(sourceDate));\n }", "private static String convertDate(String dateString) {\n String date = null;\n\n try {\n //Parse the string into a date variable\n Date parsedDate = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").parse(dateString);\n\n //Now reformat it using desired display pattern:\n date = new SimpleDateFormat(DATE_FORMAT).format(parsedDate);\n\n } catch (ParseException e) {\n Log.e(TAG, \"getDate: Error parsing date\", e);\n e.printStackTrace();\n }\n\n return date;\n }", "private static void formatDate(Date i) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tAnswer = formatter.format(i);\n\t}", "java.lang.String getToDate();", "private String formatDate(String date)\n\t{\n\t\tif(date == null || date.isEmpty())\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString[] dateSplit = date.split(\"/\");\n\t\t\tif(dateSplit.length != 3)\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn getMonthName(dateSplit[0]) + \" \"+ dateSplit[1]+\", \"+ dateSplit[2];\n\t\t\t}\n\t\t}\n\t}", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "private String formatDate(String dateObject) {\n SimpleDateFormat input = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); // format kita \"HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN\n SimpleDateFormat output= new SimpleDateFormat(\"dd-MM-yyyy\");\n Date tanggal = null;\n try {\n tanggal = input.parse(dateObject);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return output.format(tanggal);\n\n }", "public static String getFormattedDate(String dateStr, String toformat)\r\n\t{\r\n\t\tString mName = \"getFormattedDate()\";\r\n\t\tIDateFormatter dateFormatter = null;\r\n\t\tDateFormatConfig dateFormat = null;\r\n\t\tString formattedDate = null;\r\n\t\tdateFormat = getDateFormat(toformat);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tdateFormatter = (IDateFormatter) ResourceLoaderUtils.createInstance(dateFormat.getFormatterClass(),\r\n\t\t\t\t\t(Object[]) null);\r\n\t\t\tformattedDate = dateFormatter.formatDate(dateStr, dateFormat.getJavaDateFormat());\r\n\t\t} catch (Exception exp)\r\n\t\t{\r\n\t\t\tlogger.cterror(\"CTBAS00112\", exp, mName);\r\n\r\n\t\t}\r\n\t\treturn formattedDate;\r\n\t}", "public static synchronized String formatDate(Date d) {\n return dateFormat.format(d);\n }", "public static String formatDateForQuery(java.util.Date date){\n return (new SimpleDateFormat(\"yyyy-MM-dd\")).format(date);\n }", "public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}", "private static String dateFormatter(String date) {\n\t\tString[] dateArray = date.split(AnalyticsUDFConstants.SPACE_SEPARATOR);\n\t\ttry {\n\t\t\t// convert month which is in the format of string to an integer\n\t\t\tDate dateMonth = new SimpleDateFormat(AnalyticsUDFConstants.MONTH_FORMAT, Locale.ENGLISH).parse(dateArray[1]);\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(dateMonth);\n\t\t\t// months begin from 0, therefore add 1\n\t\t\tint month = cal.get(Calendar.MONTH) + 1;\n\t\t\tString dateString = dateArray[5] + AnalyticsUDFConstants.DATE_SEPARATOR + month + AnalyticsUDFConstants.DATE_SEPARATOR + dateArray[2];\n\t\t\tDateFormat df = new SimpleDateFormat(AnalyticsUDFConstants.DATE_FORMAT_WITHOUT_TIME);\n\t\t\treturn df.format(df.parse(dateString));\n\t\t} catch (ParseException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public static String formatDateToString(Date dateObj, String format) {\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n return formatter.format(dateObj);\n }", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "public String toString() { //toString method\n String startDateString2= \"\"; //Initialize\n try{\n Date date1 = new SimpleDateFormat(\"yyyyMMdd\").parse(full_Date);\n DateFormat df2 = new SimpleDateFormat(\"MMM dd, yyyy\");\n startDateString2 = df2.format(date1);\n \n return startDateString2;\n }catch(ParseException e){\n e.printStackTrace();\n }\n return startDateString2;\n \n}", "public static String dateStr(String input ){\n String mm = input.substring(0,2);\n String dd = input.substring(3,5);\n String yyyy = input.substring(6,10);\n return dd + \" - \" + mm + \" - \" + yyyy;\n }", "private String formatDate (Date date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss\", Locale.ENGLISH);\n return sdf.format(date);\n }", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "private String formatDueDate(Date date) {\n\t\t//TODO locale formatting via ResourceLoader\n\t\t\n\t\tif(date == null) {\n\t\t\treturn getString(\"label.studentsummary.noduedate\");\n\t\t}\n\t\t\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yy\");\n \treturn df.format(date);\n\t}", "public static String formatDateToString(Date dateObj) {\n return formatDateToString(dateObj, DATE_FORMAT.DEFAULT);\n }", "private String easyDateFormat(final String format) {\n Date today = new Date();\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n String datenewformat = formatter.format(today);\n return datenewformat;\n }", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "private String changeDateFormat (String oldDate) throws ParseException {\n // Source: https://stackoverflow.com/questions/3469507/how-can-i-change-the-date-format-in-java\n final String OLD_FORMAT = \"MM/dd/yyyy\";\n final String NEW_FORMAT = \"yyyyMMdd\";\n String newDateString;\n SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);\n Date d = sdf.parse(oldDate);\n sdf.applyPattern(NEW_FORMAT);\n newDateString = sdf.format(d);\n return newDateString;\n }", "public String formatDate (Date date){\r\n\t\tDateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm:ss z\", Locale.ENGLISH);\r\n\t\treturn df.format(date);\r\n\t}", "private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}", "public String dateStr(String date) {\n\t\treturn AnalyticsUDF.dateFormatter(date);\n\t}", "public String formatDate(Date date) {\n String result = \"\";\n if (date != null) {\n result = DateUtility.simpleFormat(date, MEDIUM_DATE_FORMAT);\n }\n return result;\n }", "@Override\n public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {\n String value = ISO8601Utils.format(date, true);\n toAppendTo.append(value);\n return toAppendTo;\n }", "public static String formartDate(String mDate) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"mm/dd/yyyy\");\n\t\t\t SimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-mm-dd\");\n\n\t\t\t \n\t\t\t String outDate = \"\";\n\t\t\t \n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t \n\t\t\t \n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "public static String formatterDateUS(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = df.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public Date formatDate( String date, String format )\n throws ParseException {\n SimpleDateFormat dateFormat = new SimpleDateFormat(format);\n dateFormat.setLenient(false);\n return dateFormat.parse(date);\n }", "private static Date getFormattedDate(String date){\n\t\tString dateStr = null;\n\t\tif(date.length()<11){\n\t\t\tdateStr = date+\" 00:00:00.0\";\n\t\t}else{\n\t\t\tdateStr = date;\n\t\t}\n\t\tDate formattedDate = null;\n\t\ttry {\n\t\t\tformattedDate = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.S\").parse(dateStr);\n\t\t} catch (ParseException e) {\n\t\t\tCommonUtilities.createErrorLogFile(e);\n\t\t}\n\t\treturn formattedDate;\n\n\t}", "public Date formatDate( String dob )\n throws ParseException {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n dateFormat.setLenient(false);\n return dateFormat.parse(dob);\n }", "public void setDateFormatString(String value) {\n this.dateFormatString = value;\n }", "private String getDate(String str) {\n String[] arr = str.split(\"T\");\n DateFormat formatter = new SimpleDateFormat(\"yyyy-mm-d\", Locale.US);\n Date date = null;\n try {\n date = formatter.parse(arr[0]);\n } catch (java.text.ParseException e) {\n Log.e(LOG_TAG, \"Could not parse date\", e);\n }\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MMM d, yyyy\", Locale.US);\n\n return dateFormatter.format(date);\n }", "public static String convertDateToStandardFormat(String inComingDateformat, String date)\r\n\t{\r\n\t\tString cmName = \"DateFormatterManaager.convertDateToStandardFormat(String,String)\";\r\n\t\tString returnDate = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (date != null && !date.trim().equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tif (inComingDateformat != null && !inComingDateformat.trim().equals(\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(inComingDateformat);\r\n\t\t\t\t\tDate parsedDate = sdf.parse(date);\r\n\t\t\t\t\tSimpleDateFormat standardsdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\t\t\treturnDate = standardsdf.format(parsedDate);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\treturnDate = date;\r\n\t\t\t\t\tlogger.cterror(\"CTBAS00113\", cmName, date);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tlogger.ctdebug(\"CTBAS00114\", cmName);\r\n\t\t\t}\r\n\t\t} catch (ParseException pe) // just in case any runtime exception occurred just return input datestr as it is\r\n\t\t{\r\n\t\t\treturnDate = date;\r\n\t\t\tlogger.cterror(\"CTBAS00115\", pe, cmName, date, inComingDateformat);\r\n\t\t}\r\n\t\treturn returnDate;\r\n\t}", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public static String formartDateMpesa(String mDate) {\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t\t String outDate = \"\";\n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "public String formatDateAndTime(String date){\n\n return dateTimeFormatter.parse(date).toString();\n\n }", "public String formatDate(Date date, String format) {\n return this.convertDateToString(date, format);\n }", "public static String dateTran(String dateOri){\n\t\tDateFormat formatter1 ; \n\t\tDate date ; \n\t\tString newDate=null;\n\t\tformatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t\tdate=formatter1.parse(dateOri);\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat ( \"M/d/yy\" );\n\t\t\tnewDate = formatter.format(date);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newDate;\n\t}", "private String dateToString(Date d){\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.format(d);\r\n\t}", "public static String formatDateTime(String date) {\n\t\tif(date == null) return \"\";\n\t\tdate = date.trim();\n\t\tif(date.equals(\"&nbsp;\")) return \"\";\n\t\tif (date.length() == 0 || date.length() != 14) return date;\n\t\tdate = date.substring(0,4) + \"/\" + date.substring(4,6) \n\t\t\t\t+ \"/\" + date.substring(6,8)\n\t\t\t\t+\" \"+date.substring(8,10)\n\t\t\t\t+\":\"+date.substring(10,12)\n\t\t\t\t+\":\"+date.substring(12,14);\n\t\treturn date;\n\t}", "private String convertToDateFormat(String inputDateString) throws DateTimeParseException {\n\t\treturn inputDateString;\n\t}", "public static String yyyymmdddToddmmyyyy(String strDate) {\n DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = null;\n try {\n date = (Date) formatter.parse(strDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n SimpleDateFormat newFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n String finalString = newFormat.format(date);\n return finalString;\n }", "private String validateDateString(String dateString) {\n String returnValue = null;\n DateFormat dateFormat1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n DateFormat dateFormat2 = new SimpleDateFormat(\"yyyy-MM\");\n DateFormat dateFormat3 = new SimpleDateFormat(\"yyyy\");\n Date date = null;\n \n if (dateString == null || dateString.equals(\"\")) {\n return dateString;\n }\n else {\n try {\n date = dateFormat1.parse(dateString);\n returnValue = dateFormat1.format(date);\n }\n catch (ParseException e1) {\n try {\n date = dateFormat2.parse(dateString);\n returnValue = dateFormat2.format(date);\n }\n catch (ParseException e2) {\n try {\n date = dateFormat3.parse(dateString);\n returnValue = dateFormat3.format(date);\n }\n catch (ParseException e3) {\n logger.warn(\"Couldn't parse date string using any of the recognized formats: \" + dateString);\n } \n }\n }\n }\n \n return returnValue;\n }", "public String getFormatDate() {\n String formatDate = servletRequest.getHeader(ConstantsCustomers.CUSTOMER_FORMAT_DATE);\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = jwtTokenUtil.getFormatDateFromToken();\n }\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = ConstantsCustomers.APP_DATE_FORMAT_ES;\n }\n return formatDate;\n }", "public String getFormatedDate(Date date) {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\treturn sdf.format(date);\r\n\t}", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "public static String formatDate(Date date) {\n return DateFormat.getDateFormat(BaracusApplicationContext.getContext()).format(date);\n }", "public static String formatDateOnly(Date date, String userId)\n\t{\t\t\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMM dd, yyyy\", getPreferredLocale(userId));\n\t\tdateFormat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = dateFormat.format(date);\n\t\treturn rv;\n\t}", "public String convertDateFormate(String dt) {\n String formatedDate = \"\";\n if (dt.equals(\"\"))\n return \"1970-01-01\";\n String[] splitdt = dt.split(\"-\");\n formatedDate = splitdt[2] + \"-\" + splitdt[1] + \"-\" + splitdt[0];\n \n return formatedDate;\n \n }", "public static String formatDate(java.util.Date value, String pattern) {\r\n\t\tif (value != null) {\r\n\t\t\t// Cria Locale informando Portugues Brasil\r\n\t\t\tLocale locale = new Locale(\"pt\", \"BR\");\r\n\t\t\t// Cria Formatador de data informando padr�o\r\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(pattern, locale);\r\n\t\t\t// Passa o resultado final obtido para uma String\r\n\t\t\tString retorno = dateFormat.format(value);\r\n\t\t\t// Trata a String para que a primeira letra seja maiuscula (caso esteja no padr�o MMM/yyyy\r\n\t\t\tif ((retorno != null) && (retorno.length() > 0)) {\r\n\t\t\t\tretorno = (retorno.charAt(0) + \"\").toUpperCase() + retorno.substring(1);\r\n\t\t\t}\r\n\t\t\treturn retorno;\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public static String convertDateFormat(String date) {\n DateFormat originalFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n DateFormat targetFormat = new SimpleDateFormat(\"MMMM dd, yyyy\", Locale.ENGLISH);\n Date oldDate;\n try {\n oldDate = originalFormat.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n return targetFormat.format(oldDate);\n }", "public String formatDate(Object valor) {\r\n\t\tString aux = valor.toString();\r\n\t\tif (!aux.equalsIgnoreCase(\"&nbsp;\") && !aux.equalsIgnoreCase(\"\")) {\r\n\t\t\tString anio = aux.substring(0, 4);\r\n\t\t\tString mes = aux.substring(4, 6);\r\n\t\t\tString dia = aux.substring(6);\r\n\t\t\treturn dia + \"/\" + mes + \"/\" + anio;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn aux;\r\n\t}", "public static String formatDate(Calendar date, DateFormat format) {\n\n switch (format) {\n case COMPLETE_DATE_FORMAT:\n format = DateFormat.COMPLETE_DATE_FORMAT;\n break;\n case DAY_FORMAT:\n format = DateFormat.DAY_FORMAT;\n break;\n }\n\n SimpleDateFormat dateFormatter = new SimpleDateFormat(format.getFormat(), Locale.US);\n\n return dateFormatter.format(date.getTime());\n }", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }", "public static String formatDate(Date date) {\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);\n\n\t\tif (dateFormat instanceof SimpleDateFormat) {\n\t\t\tSimpleDateFormat sdf = (SimpleDateFormat) dateFormat;\n\t\t\t// we want short date format but with 4 digit year\n\t\t\tsdf.applyPattern(sdf.toPattern().replaceAll(\"y+\", \"yyyy\").concat(\" z\"));\n\t\t}\n\n\t\treturn dateFormat.format(date);\n\t}", "public static String formatDate(java.sql.Date date){\n\t\treturn date!=null?toTheString(date):\"\";\n\t}", "public String formatForAmericanModel(Date data){\n //definido modelo americano\n DateFormat formatBR = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatBR.format(data);\n \n }", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "public static String convertToDateStringWithsdf(String unformateddate, SimpleDateFormat sdf) {\n Date date = null;\n String dateStr = unformateddate;\n try {\n\n date = sdf.parse(unformateddate);\n dateStr = new SimpleDateFormat(\"dd MMM yyyy\").format(date);\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n }\n\n return dateStr;\n }", "public static String toStringFormat_1(Date date) {\r\n\r\n\t\treturn dateToString(date, DATE_FORMAT_1);\r\n\t}", "public static String formatDate(String strDate, boolean TimeOnly) {\n Date date = new Date();\n String finalDate = \"\";\n try {\n date = SDF_ISO_8601.parse(strDate);\n Calendar c = new GregorianCalendar(Locale.getDefault());\n TimeZone tzGMT = TimeZone.getTimeZone(\"GMT\");\n // c.setTimeZone(tzGMT);\n c.setTimeInMillis(date.getTime());\n\n if (IsDateToday(strDate)) {\n finalDate = String.format(\n \"Today at %02d:%02d %s\",\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else if (IsDateYesterday(strDate)) {\n finalDate = String.format(\n \"Yesterday at %02d:%02d%s\",\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else if (IsDateWithinThisWeek(strDate)) {\n finalDate = String.format(\n \"%s %02d:%02d %s\",\n DaysOfWeek[c.get(Calendar.DAY_OF_WEEK) - 1],\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else {\n finalDate = String.format(\n \"%s %s %s at %02d:%02d %s\",\n Months[c.get(Calendar.MONTH)],\n c.get(Calendar.DATE),\n c.get(Calendar.YEAR),\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n }\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return finalDate;\n\n }", "public static String formatDate(Date date, String format)\n\t{\n\t\tDateFormat dateFormat = new SimpleDateFormat(format);\n\t\treturn dateFormat.format(date);\n\t}", "public static String dateToStringFormat(Date date, String format){\n return new SimpleDateFormat(format).format(date);\n }", "public static String formatDate(Date date){\n\t\tCalendar now = Calendar.getInstance(); // Gets the current date and time\n\t\tint currentYear = now.get(Calendar.YEAR);\n\t\tint dateYear = Integer.parseInt(new SimpleDateFormat(\"yyyy\").format(date));\n\n\t\tif (dateYear <= currentYear){\n\t\t\treturn new SimpleDateFormat(\"E MMM dd HH:mm\").format(date);\n\t\t} else {\n\t\t\treturn new SimpleDateFormat(\"E yyyy MMM dd HH:mm\").format(date);\n\t\t}\n\t}", "public String convertDateToString(Date date) {\n\t\tString dateTime = SDF.format(date);\n\t\treturn dateTime;\t\n\t}", "protected String formatDateToString(Date date) {\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy.MM.dd HH:mm:ss\");\n\t\tString formatted = format.format(date);\n\t\treturn formatted;\n\t}", "public static String m24132a(Context context, Date date, String str) {\n return context != null ? new SimpleDateFormat(str, Locale.US).format(date) : \"\";\n }" ]
[ "0.7488953", "0.7427288", "0.7360176", "0.7238251", "0.71683884", "0.705636", "0.7054094", "0.7038914", "0.6984517", "0.69722444", "0.69233054", "0.69178385", "0.68780446", "0.6782788", "0.67701477", "0.6746438", "0.6733033", "0.67053896", "0.6699596", "0.6693902", "0.6689263", "0.6687018", "0.6685573", "0.6679329", "0.6655626", "0.664124", "0.6583835", "0.6570261", "0.6565153", "0.6558305", "0.6536702", "0.6532102", "0.6530876", "0.65224", "0.6501532", "0.6498368", "0.64948124", "0.6484152", "0.64807266", "0.6476431", "0.64716727", "0.6457845", "0.64367634", "0.642608", "0.6407153", "0.6398763", "0.6396743", "0.6391906", "0.6391207", "0.6372779", "0.63649154", "0.63588583", "0.6357102", "0.635279", "0.6351793", "0.634537", "0.6334082", "0.6314937", "0.63147455", "0.6308376", "0.62927586", "0.6289356", "0.62822896", "0.62590873", "0.6247816", "0.6227542", "0.62177247", "0.6214104", "0.6213102", "0.621007", "0.6203799", "0.6191659", "0.61909133", "0.6188487", "0.61882675", "0.61801845", "0.61720437", "0.6170237", "0.61641145", "0.6161866", "0.6161819", "0.61608344", "0.6158437", "0.6157992", "0.61437356", "0.6143534", "0.6129959", "0.6127628", "0.6121229", "0.61138", "0.61060065", "0.6100871", "0.60994434", "0.60976607", "0.60828066", "0.60810745", "0.6072124", "0.60659444", "0.6063829", "0.6049331" ]
0.6864967
13
getting email and password from edit texts
private void registerUser(){ final String email = editTextEmail.getText().toString().trim(); final String password = editTextPassword.getText().toString().trim(); final String name=editTextName.getText().toString().trim(); final String joiningdate=editTextJoiningDate.getText().toString().trim(); //final String uid=firebaseAuth.getCurrentUser().getUid(); //checking if email and passwords are empty if(TextUtils.isEmpty(email)){ Toast.makeText(this,"Please enter email",Toast.LENGTH_LONG).show(); return; } if(TextUtils.isEmpty(password)){ Toast.makeText(this,"Please enter password",Toast.LENGTH_LONG).show(); return; } if(TextUtils.isEmpty(name)){ Toast.makeText(this,"Please enter Name",Toast.LENGTH_LONG).show(); return; } if(TextUtils.isEmpty(joiningdate)){ Toast.makeText(this,"Please enter Joining Date",Toast.LENGTH_LONG).show(); return; } //if the email and password are not empty //displaying a progress dialog progressDialog.setMessage("Registering Please Wait..."); progressDialog.show(); getLocation(); //creating a new user firebaseAuth.createUserWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { Log.i("Hey Entered OnComplete",""); //checking if success if(task.isSuccessful()){ Log.i("Hey Entered issuccess",""); User user= new User(name,joiningdate,email,loc); // Map map=new HashMap(); // map.put("name",name); // map.put("joining date",joiningdate); // map.put("email",email); // map.put("uid",uid); database=FirebaseDatabase.getInstance(); myRef=database.getReference("Users"); myRef.child(FirebaseAuth.getInstance().getCurrentUser().getUid()) .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if(task.isSuccessful()){ Toast.makeText(MainActivity.this,"Registration Successful",Toast.LENGTH_LONG).show(); startActivity(new Intent(getApplicationContext(),MenuActivity.class)); } else{ Toast.makeText(MainActivity.this,"Registration Error",Toast.LENGTH_LONG).show(); } } }); // String id=myRef.push().getKey(); // myRef.child(id).setValue(user); } else{ //display some message here Toast.makeText(MainActivity.this,"Registration Error",Toast.LENGTH_LONG).show(); } progressDialog.dismiss(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n if (validate()) {\n\n //Get values from EditText fields\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n }\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable edit) {\n\t\t\t\tpassword = edit.toString();\r\n\t\t\t}", "private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }", "private void getValues(){\n username = etUsername.getText().toString();\n password = etPassword.getText().toString();\n }", "public String getpasswordinput() {\n return tf2.getText();\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable edit) {\n\t\t\t\tconfirmPassword = edit.toString();\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n String emailUser,userPassword,userConfirm;\n emailUser = email.getText().toString().trim();\n userPassword = password.getText().toString().trim();\n userConfirm = confirmPassword.getText().toString().trim();\n }", "private void userInformation()\n {\n name = eName.getText().toString();\n userName = eUserName.getText().toString();\n email = eEmail.getText().toString();\n password = ePassword.getText().toString();\n password = encryptionAlgo.encryptPass(password);//initialize new encrypt password\n address = eAddress.getText().toString();\n favouriteWord = eFavourite.getText().toString();\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable edit) {\n\t\t\t\temail = edit.toString();\r\n\t\t\t}", "private String extractPassword() {\n return SwingUtil.extract(passwordJPasswordField, Boolean.TRUE);\n }", "@Override\n public void onClick(View v) {\n String userName = \"\";\n String userPass = \"\";\n userName = name.getEditText().getText().toString();\n userPass = pass.getEditText().getText().toString();\n }", "String getPlayerMail() {\r\n EditText editText = (EditText) findViewById(R.id.mail_edit_text_view);\r\n return editText.getText().toString();\r\n }", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "public String getEmail() {\n\n String dataField = null;\n sharedPreference_login = new SharedPreference_Login(activity);\n if (sharedPreference_login.IsSaved()) {\n dataField = sharedPreference_login.email();\n }\n\n\n return dataField;\n }", "public String getPassword() {\n return txtPassword().getText();\n }", "private String getPlayerMail() {\n EditText mail = (EditText) findViewById(R.id.mail_edittext_view);\n return mail.getText().toString();\n }", "String getUserPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "public String getTxtUser() {\n return txtUser.getText();\n }", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }", "private String extractEMailAddress() {\n return SwingUtil.extract(emailJTextField, Boolean.TRUE);\n }", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\tString email=email_login.getText().toString().trim();\n\t\t\tString password=password_login.getText().toString().trim();\n\t\t\tif(!TextUtils.isEmpty(email)&&!TextUtils.isEmpty(password)){\n\t\t\t\tlogin_login.setEnabled(true);\n\t\t\t}else{\n\t\t\t\tlogin_login.setEnabled(false);\n\t\t\t}\n\t\t}", "public String getUserPass() {\n\t\treturn passText.getText().toString();\n\t}", "java.lang.String getUserEmail();", "public String valiationOfPasswordField()\n\t{\n\t\twaitForVisibility(validationPassword);\n\t\treturn validationPassword.getText();\n\t}", "private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }", "public void SaveEmailAddress(View view) {\r\n\t\tEditText edit = (EditText)findViewById(R.id.EmailText);\r\n\t\tString email = edit.getText().toString();\t\t\r\n\t\tToast.makeText(this, email, Toast.LENGTH_LONG).show();\r\n\t}", "public JTextField getTxtEmail() {\n return this.txtEmail;\n }", "@Override\n public void onClick(View view) {\n inputUsername = usernameInput.getText().toString().trim();\n inputPassword = passwordInput.getText().toString();\n\n if(!inputUsername.contains(\"@gmail.com\")){\n inputUsername = inputUsername.concat(\"@gmail.com\");\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n }\n\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n checkEmail(inputUsername);\n }", "@Override\n\tpublic void afterTextChanged(Editable arg0) {\n\t\t\n\t\tString sid=email.getText().toString();\n\t\t\n\t\tif(sid.indexOf(\"@\")!=-1 && sid.indexOf(\".\")!=-1 && sid.lastIndexOf(\".\")!=-1)\n\t\t{\n\t\t\tlogin.setEnabled(true);\n\t\t}\n\t\t\n\t}", "public String getPassword();", "public String getPassword();", "private String extractConfirmPassword() {\n return SwingUtil.extract(confirmPasswordJPasswordField, Boolean.TRUE);\n }", "public java.lang.String getPassword();", "@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\t\t\tu.setPassword(s.toString());\n\t\t\t\n\t\t\t}", "private String extractUsername() {\n return SwingUtil.extract(usernameJTextField, Boolean.TRUE);\n }", "@Override\n public void onClick(View view) {\n Editable userEditable = userName.getText();\n if (userEditable == null || userEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserName));\n return;\n }\n userNameStr = userEditable.toString();\n if (!Checker.isUserName(userNameStr)) {\n toastMessage(getString(R.string.inputSuitableUserName));\n return;\n }\n Log.i(TAG, \"get the user name: \" + userNameStr);\n\n\n //************************************************************************//\n //************************************************************************//\n // Get the passwd.\n Editable passwdEditable = passwd.getText();\n if (passwdEditable == null || passwdEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserPasswd));\n return;\n }\n passwdStr = passwdEditable.toString();\n if (!Checker.isPasswd(passwdStr)) {\n toastMessage(getString(R.string.inputSuitableUserPasswd));\n return;\n }\n\n\n //************************************************************************//\n //************************************************************************//\n // confirm the passwd.\n Editable passwdConfirmEditable = confirm.getText();\n if (passwdConfirmEditable == null\n || passwdConfirmEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserPasswdAgain));\n return;\n }\n String passwdConfirm = passwdConfirmEditable.toString();\n if (!passwdConfirm.equals(passwdStr)) {\n toastMessage(getString(R.string.inputSamePasswd));\n return;\n }\n Log.i(\"Register\", \"get the userPasswd: \" + passwdStr);\n\n AsyncInetClient.getInstance().addUser(userNameStr, passwdStr, signUpResponseHandler);\n\n }", "public static String validateMailInput(Context context, TextInputEditText editText) {\n // store input\n String rawMail = editText.getText().toString().trim();\n\n if (TextUtils.isEmpty(rawMail)) {\n editText.setError(context.getResources().getString(R.string.editor_edt_empty_input));\n return null;\n }\n\n if (!android.util.Patterns.EMAIL_ADDRESS.matcher(rawMail).matches()) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return null;\n }\n\n return rawMail;\n }", "@OnClick(R.id.sendData)\n void onSendDataClick() {\n String name = checkerNameInputView.getText().toString();\n String password = passwordInputView.getText().toString();\n }", "@WebElementLocator(webDesktop = \"//input[@type='email']\",webPhone = \"//input[@type='email']\")\n private static WebElement emailField() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"emailField\")));\n }", "@Override\npublic String getPassword() {\n\treturn senha;\n}", "@Override\r\n public void onClick(View v) {\n String username = etUsername.getText().toString();\r\n String password = etPassword.getText().toString();\r\n\r\n // cek apakah username dan password terisi\r\n if (username.length() > 0 && password.length() > 0) {\r\n loginWithEmailAndPassword(username, password);\r\n } else {\r\n Toast.makeText(login.this, \"Fill all field!\",\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n }", "private void RetrieveEditTextData() {\n\n strFirstName = etFirstName.getText().toString();\n strMiddleName = etMiddleName.getText().toString();\n strLastName = etLastName.getText().toString();\n strEmployId = etEmployId.getText().toString();\n strDesignation = etDesignation.getText().toString();\n strCompName = etCompName.getText().toString();\n strCategory = etCategory.getText().toString();\n strDOB = etDOB.getText().toString();\n\n }", "public String getPasswordValue() {\r\n\t\treturn txtPassword.getValue();\r\n\t}", "public void afterTextChanged(Editable s) {\n Validate.isEmailAddress(editTextLogin, true);\n }", "public void exportSubject() {\n @SuppressLint(\"InflateParams\") TextInputLayout inputText = (TextInputLayout) fragment.getLayoutInflater()\n .inflate(R.layout.popup_edittext, null);\n if (inputText.getEditText() != null) inputText.getEditText().setInputType(\n InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n inputText.setEndIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE);\n inputText.setHint(fragment.getString(R.string.set_blank_password));\n\n // Display the dialog\n DismissibleDialogFragment dismissibleFragment = new DismissibleDialogFragment(\n new AlertDialog.Builder(fragment.requireContext())\n .setTitle(R.string.n2_password_export)\n .setView(inputText)\n .create());\n dismissibleFragment.setPositiveButton(fragment.getString(android.R.string.ok), view -> {\n // Check if password is too short, must be 8 characters in length\n String responseText = \"\";\n if (inputText.getEditText() != null) responseText = inputText.getEditText().getText().toString();\n checkPasswordRequirement(dismissibleFragment, responseText, inputText);\n });\n dismissibleFragment.setNegativeButton(fragment.getString(android.R.string.cancel), view ->\n dismissibleFragment.dismiss());\n dismissibleFragment.show(fragment.getParentFragmentManager(), \"NotesSubjectFragment.6\");\n }", "private String getSendMailPasswordContent(UserForm userForm) {\n return \"\";\n\n }", "@WebElementLocator(webDesktop = \"//input[@type='password']\",webPhone = \"//input[@type='password']\")\n private static WebElement passwordField() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"passwordField\")));\n }", "private void validateEmailField() {\n userEmail = emailEditText.getText().toString();\n if (!isEmailValid()) {\n emailEditText.setTextColor(getResources().getColor(R.color.colorWrongText));\n loginButton.setEnabled(false);\n } else {\n emailEditText.setTextColor(getResources().getColor(R.color.colorRightText));\n loginButton.setEnabled(true);\n }\n }", "private void checkPreferences() {\n String email = pref.get(EMAIL, EMPTY);\n String hashedPassword = pref.get(PASSWORD, EMPTY);\n if(!email.equals(EMPTY) && !hashedPassword.equals(EMPTY)){\n rememberMe.setSelected(true);\n emailField.setText(email);\n String passTemp = getStringWithPasswordLength();\n passwordField.setText(passTemp);\n }\n }", "public WebElement getEmailFieldForLogin () {\n\t\treturn driver.findElement(By.id(\"email\"));\n\t}", "public boolean chkMailPswd(String email , String passwd){\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"Select * from user where email=? and passwd =?\",new String[]{email,passwd});\n if (cursor.getCount()>0) {\n maill = email;\n passwood = passwd;\n return true;\n }\n else return false;\n\n }", "String getUserMail();", "public void onClick(View v) {\n\t\t\t\tfname = edt_fname.getText().toString();\n\t\t\t\tlname = edt_lname.getText().toString();\n\t\t\t\tcontactno = edt_contactno.getText().toString();\n\t\t\t\temail = edt_email.getText().toString();\n\t\t\t\tpassword = edt_password.getText().toString();\n\t\t\t\tconfirmpassword = edt_confirmpassword.getText().toString();\n\n\t\t\t\tpattern = Pattern.compile(EMAIL_PATTERN);\n\t\t\t\tmatcher = pattern.matcher(email);\n\t\t\t\tif (fname.equals(\"\")\n\t\t\t\t\t\t|| !fname.matches(\"[a-zA-z]+([ '-][a-zA-Z]+)*\")) {\n\n\t\t\t\t\tedt_fname.setError(\"Enter valid firstname format\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (lname.equals(\"\")\n\t\t\t\t\t\t|| !lname.matches(\"[a-zA-z]+([ '-][a-zA-Z]+)*\")) {\n\n\t\t\t\t\tedt_lname.setError(\"Enter valid lastname format\");\n\n\t\t\t\t} else if (contactno.equals(\"\")\n\t\t\t\t\t\t|| !contactno.matches(MobilePattern)) {\n\n\t\t\t\t\tedt_contactno.setError(\"Enter valid contact number\");\n\n\t\t\t\t} else if (email.equals(\"\")) {\n\n\t\t\t\t\tedt_email.setError(\"Please enter email\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (!matcher.matches()) {\n\t\t\t\t\tedt_email.setError(\"Enter valid email.\");\n\t\t\t\t}\n\n\t\t\t\telse if (password.equals(\"\")) {\n\n\t\t\t\t\tedt_password.setError(\"Please enter password\");\n\n\t\t\t\t} else if (password.length() < 6) {\n\n\t\t\t\t\tedt_password\n\t\t\t\t\t\t\t.setError(\"Choose password length minimum 6 character.\");\n\n\t\t\t\t} else if (confirmpassword.equals(\"\")\n\t\t\t\t\t\t|| !password.matches(confirmpassword)) {\n\n\t\t\t\t\tedt_confirmpassword.setError(\"Password mismatch\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (StaticData.isNetworkAvailable(getApplicationContext())) {\n\n\t\t\t\t\tgetlocation();\n\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Internet not connected\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n UserName = edtEmail.getText().toString();\n Password = edtPassword.getText().toString();\n\n// final String email = edtEmail.getText().toString();\n// if (!isValidEmail(email)) {\n// edtEmail.setError(\"Invalid Email\");\n// }\n// final String password = edtPassword.getText().toString();\n// if (!isValidPassword(password)) {\n// edtPassword.setError(\"Invalid Password\");\n// }\n new LoginTask().execute(UserName, Password);\n\n\n\n }", "@Override\n public void onClick(View v) {\n biensoxe = etBienSoXe.getText().toString().toLowerCase().trim();\n passwordtx = etPasswordtx.getText().toString().trim();\n confirmPassword = etConfirmPassword.getText().toString().trim();\n tenchuxe = etTenChuXe.getText().toString().trim();\n sdt = etSDT.getText().toString().trim();\n mota = edMoTa.getText().toString().trim();\n loaixe = tenloaixe;\n trongtaixe = trongtai;\n if (validateInputs()) {\n registerUser();\n }\n\n }", "public Login(Context c, String urlAddress,EditText...editTexts) {\n this.c = c;\n this.urlAddress = urlAddress;\n\n //INPUT EDITTEXTS\n this.userTxt=editTexts[0];\n this.passTxt=editTexts[1];\n\n //GET TEXTS FROM EDITEXTS\n username=userTxt.getText().toString();\n password=passTxt.getText().toString();\n data[0] = new Data(\"username\", username);\n data[1] = new Data(\"password\", password);\n\n }", "private void listenToFields() {\n emailEditText.addTextChangedListener(new TextWatcher() {\n\n /**\n * This is auto-generated method that does something before listened fields' text changed\n * @param s\n * @param start\n * @param count\n * @param after\n */\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n /**\n * This is auto-generated method that does something when listened fields' text changed\n * @param s\n * @param start\n * @param before\n * @param count\n */\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n emailTyped = emailEditText.getText().toString();\n if ((emailTyped.isEmpty()) || (passwordTyped.isEmpty())) {\n signInEnabled = false;\n signIn.setEnabled(signInEnabled);\n } else {\n signInEnabled = true;\n signIn.setEnabled(signInEnabled);\n }\n }\n\n /**\n * This is auto-generated method that does something after listened fields' text changed\n * @param s\n */\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n passwordEditText.addTextChangedListener(new TextWatcher() {\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n passwordTyped = passwordEditText.getText().toString();\n if ((emailTyped.isEmpty()) || (passwordTyped.isEmpty())) {\n signInEnabled = false;\n signIn.setEnabled(signInEnabled);\n } else {\n signInEnabled = true;\n signIn.setEnabled(signInEnabled);\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "private String getUserName() {\n EditText nameEditText = (EditText) findViewById(R.id.name_edit_text);\n return nameEditText.getText().toString().trim();\n }", "public char[] getPassword();", "private String getEmail(){\n System.out.println(\"Enter The Email Address\");\n return sc.next();\n }", "@Override\n public boolean onEditorAction(TextView v, int actionId,\n KeyEvent event) {\n if (actionId == EditorInfo.IME_ACTION_DONE) {\n // do here your stuff f\n validateLogin(editUsername.getText().toString(),\n editPassword.getText().toString());\n return true;\n }\n return false;\n }", "public String getPassWord() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"PASSWORD\", null);\n\t}", "public String getReceptionist_password(){ return receptionist_password;}", "private String getPasswordFor(String name) {\n return new StringBuilder().append(PASSWORD_FOR).append(\" '\").append(name).append(\"': \").toString();\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn senha;\n\t}", "public String passwordField() {\n\t\tchar[] password = null;\n\t\tJPanel panel = new JPanel();\n\t\tJLabel label = new JLabel(\"Enter a password:\");\n\t\tJPasswordField pass = new JPasswordField(10);\n\t\tpanel.add(label);\n\t\tpanel.add(pass);\n\t\tString[] options = new String[] { \"OK\", \"Cancel\" };\n\t\tint option = JOptionPane.showOptionDialog(null, panel, \"The title\",\n\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null,\n\t\t\t\toptions, options[1]);\n\t\tif (option == 0) {\n\t\t\tpassword = pass.getPassword();\n\t\t}\n\n\t\treturn new String(password);\n\t}", "public List<String> TextInsideTextBoxes() {\n\tList<String> text_Of_Boxes=new ArrayList<String>();\n\tString text1=emailtextbox.getAttribute(\"placeholder\");\n\tString text2=passwordtextbox.getAttribute(\"placeholder\");\n\ttext_Of_Boxes.add(text1);\n\ttext_Of_Boxes.add(text2);\n\treturn text_Of_Boxes;\n}", "String getTemporaryPassword();", "private void checkEditTexts() {\n\n if (!validateEmail(Objects.requireNonNull(edInputEmail.getText()).toString().trim())) {\n Toasty.error(Objects.requireNonNull(getActivity()), getString(R.string.error_invalid_email), Toasty.LENGTH_SHORT, true).show();\n } else {\n\n if (Objects.requireNonNull(edInputPass.getText()).toString().trim().equalsIgnoreCase(\"\")) {\n\n Toasty.error(Objects.requireNonNull(getActivity()), getString(R.string.error_empty_password), Toasty.LENGTH_SHORT, true).show();\n\n } else {\n sendLoginRequest(edInputEmail.getText().toString(), edInputPass.getText().toString());\n CustomProgressBar.showProgress(loadingLayout);\n }\n }\n }", "public void showPasswordPrompt();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n emailTyped = emailEditText.getText().toString();\n if ((emailTyped.isEmpty()) || (passwordTyped.isEmpty())) {\n signInEnabled = false;\n signIn.setEnabled(signInEnabled);\n } else {\n signInEnabled = true;\n signIn.setEnabled(signInEnabled);\n }\n }", "public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }", "public void login_now(View view) {\n String userMailId = email_id.getText().toString();\n String userPassword = password.getText().toString();\n\n\n if (!userMailId.equals(\"\")) {\n if (!userPassword.equals(\"\")) {\n loginUser(userMailId, userPassword);\n } else {\n Toast.makeText(this, \"Enter Your Password\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n Toast.makeText(this, \"Enter Your Email Address\", Toast.LENGTH_SHORT).show();\n }\n }", "public java.lang.String getSpPassword(){\r\n return localSpPassword;\r\n }" ]
[ "0.68354255", "0.67291176", "0.6609396", "0.6513028", "0.65088433", "0.6393484", "0.63653255", "0.6329478", "0.62779546", "0.6253445", "0.6244409", "0.62174016", "0.62155163", "0.6205592", "0.6190317", "0.6146544", "0.6135588", "0.61281514", "0.61281514", "0.61281514", "0.61281514", "0.61281514", "0.61281514", "0.61281514", "0.61281514", "0.61281514", "0.61280864", "0.61262506", "0.61262506", "0.61262506", "0.61262506", "0.61262506", "0.61262506", "0.61262506", "0.60676754", "0.60230273", "0.6016346", "0.601586", "0.6009637", "0.5983342", "0.59791654", "0.5955646", "0.595103", "0.5943908", "0.5932476", "0.5926478", "0.5926478", "0.5915242", "0.5892585", "0.58710784", "0.58543193", "0.5850471", "0.5831963", "0.57926327", "0.5789696", "0.57895595", "0.5780614", "0.57569474", "0.57425624", "0.5722603", "0.56943864", "0.56804025", "0.56740534", "0.5666991", "0.566429", "0.56431144", "0.56425565", "0.5636454", "0.5630842", "0.5630681", "0.5624851", "0.561204", "0.560648", "0.56039506", "0.56039506", "0.56039506", "0.56039506", "0.56039506", "0.56039506", "0.56021386", "0.5591432", "0.5587323", "0.55805796", "0.5575799", "0.5574441", "0.5565864", "0.5565625", "0.5552443", "0.55517656", "0.55417556", "0.5540486", "0.5535116", "0.55292743", "0.55292743", "0.55292743", "0.55292743", "0.55292743", "0.5521572", "0.55212647", "0.55183065", "0.55153334" ]
0.0
-1
Manhattan distance (for 4 directions maps) see:
int distanceMan(Coord other) { int deltaX = abs(x - other.x); int deltaY = abs(y - other.y); return deltaX + deltaY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int manhattan() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n int value = _tiles[i][j];\n if (value != 0) {\n int yDim = (value - 1) % _N;\n int xDim = (value - 1) / _N;\n distance = distance + Math.abs(xDim - i) + Math.abs(yDim - j);\n }\n }\n }\n return distance;\n }", "public int manhattan() {\n int dist = 0;\n for(int x = 0; x < n; x++) {\n for(int y = 0; y < n; y++) {\n if(tiles[x][y] != goal[x][y] && tiles[x][y] != 0) {\n int target = tiles[x][y] -1;\n int dest_row = target/n;\n int dest_col = target%n;\n dist += Math.abs((x-dest_col)) + Math.abs(y-dest_row);\n }\n }\n }\n return dist;\n }", "public int manhattan() {\n if (manh != -1) return manh;\n int dist = 0;\n for (int row = 0; row < N; ++row) {\n for (int col = 0; col < N; ++col) {\n final int num = tiles[row][col];\n if (num != 0) {\n int xGoal = (num - 1) / N;\n int yGoal = (num - 1) % N;\n dist += Math.abs(xGoal - row) + Math.abs(yGoal - col);\n }\n }\n }\n manh = dist;\n return dist;\n }", "private static int calculateManhattanDistance(Node actualNode, Node targetNode) \n\t{\n\t\tint distance = 1;\n\t\t\n\t\tint dx = Math.abs(actualNode.getRow() - targetNode.getRow());\n\t\tint dy = Math.abs(actualNode.getColumn() - targetNode.getColumn());\n\t\t\n\t\treturn distance * (dx+dy);\n\t}", "public int manhattan() {\n int md = 0;\n int counter = 1;\n for (int i = 0; i < this.tiles.length; i++) {\n int n = this.tiles[i];\n if (n != counter && n > 0)\n md += findMD(i, n);\n counter++;\n }\n return md;\n }", "private int manhattanDistance(int i, int j) {\n int index = tiles[i][j] - 1;\n int row = Math.abs(index / dimension - i);\n int col = Math.abs(index % dimension - j);\n return row + col;\n }", "public int manhattan() {\n int s = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n int x = tiles[i][j];\n if (x == 0) continue;\n x--;\n if (x != i*n + j) {\n s = s + Math.abs(i - x / n) + Math.abs(j - x % n);\n }\n }\n }\n return s;\n }", "public int manhattan() {\n int sum = 0;\n int index = 0;\n\n for (int row = 0; row < N; row++)\n for (int col = 0; col < N; col++) {\n int correctIdx = tiles[row][col] - 1;\n\n if (correctIdx != -1 && correctIdx != index) {\n sum += Math.abs((correctIdx / N) - row);\n sum += Math.abs((correctIdx % N) - col);\n }\n index++;\n }\n return sum;\n }", "public int manhattan() {\r\n\t\tint manhattan = 0;\r\n\t\tint n = dimension();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tint val = this.blocks[i][j];\r\n\t\t\t\tif (val != 0) {\r\n\t\t\t\t\tboolean exact = val % n == 0;\r\n\t\t\t\t\tfloat a = (val / n) + (exact ? 0 : 1);\r\n\t\t\t\t\tint rx = (int) Math.round(a);\r\n\t\t\t\t\tint ry = val - n * (rx - 1);\r\n\t\t\t\t\tint dx = rx - (i + 1);\r\n\t\t\t\t\tint dy = ry - (j + 1);\r\n\t\t\t\t\tint dist = (dx < 0 ? dx * (-1) : dx) + (dy < 0 ? dy * (-1) : dy);\r\n\t\t\t\t\t// System.out.println(\" val= \" + val + \" dist = \" + dist);\r\n\t\t\t\t\tmanhattan += dist < 0 ? dist * (-1) : dist;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn manhattan;\r\n\t}", "public double getManhattanDistance(Point p2) {\n return Math.abs(t_location.x-p2.x) + Math.abs(t_location.y-p2.y);\n }", "public int manhattanDistance(String current, String goal) \r\n\t{\r\n int cost = 0;\r\n \r\n for (int i = 0; i < current.length(); i ++)\r\n {\r\n \tfor (int j = 0; j < goal.length(); j ++)\r\n \t{\r\n \t\t if (current.charAt(i) == goal.charAt(j) && current.charAt(i) != 0)\r\n {\r\n cost = cost + ((Math.abs(i % 3 - j % 3)) + Math.abs(i / 3 + j / 3));\r\n }\r\n \t}\r\n }\r\n \r\n return cost;\r\n }", "public int manhattan() {\n int total = 0;\n if (!isValid()) return 0;\n for (int n = 0; n < state.length; n++)\n total = total + Board.manhattanTable[state[n]][n];\n return total; \n }", "@Override\n public int estimatedDistanceToGoal() {\n return manhattan();\n }", "public int manhattan() {\n int manhattan = 0;\n for (int i = 0; i < dimension; i++)\n for (int j = 0; j < dimension; j++)\n if (isWrongPosition(i, j))\n manhattan += manhattanDistance(i, j);\n\n return manhattan;\n }", "public int manhattanDistance(int x1, int y1, int x2, int y2, int z1, int z2) {\n return Math.abs(x2 - x1) + Math.abs(y2 - y1) + Math.abs(z1 - z2);\n }", "public int manhattan() {\n int manhattan = 0; \n for (int row = 0; row < dimension(); row++) {\n for (int column = 0; column < dimension(); column++) { \n int currentValue = blocks[row][column]; \n if (currentValue == 0) continue; // Skip the blank \n int expectedRow = (currentValue - 1) / dimension();\n int expectedColumn = (currentValue - 1) % dimension(); \n int distance = Math.abs(row - expectedRow) + Math.abs(column - expectedColumn);\n manhattan += distance;\n }\n } \n return manhattan;\n }", "private void calculateManhattanDistance(Vertex source, Vertex target) {\n\t\tQueue<Vertex> fifo = new ArrayDeque<Vertex>();\n\t\ttarget.setNbr(1);\n\t\tfifo.add(target);\n\t\twhile(!fifo.isEmpty()) {\n\t\t\tVertex actual = fifo.remove();\n\t\t\tfor (direction dir : direction.values()) {\n\t\t\t\tif (!this.g.edgeDoesntExist(actual, dir)) {\n\t\t\t\t\tVertex next = g.getEqualVertex(g.vertexByDir(actual, dir));\n\t\t\t\t\tif (next.getNbr() == 0) {\n\t\t\t\t\t\tnext.setNbr(actual.getNbr()+1);\n\t\t\t\t\t\tif (next != source) {\n\t\t\t\t\t\t\tfifo.add(next);\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}", "public int manhattan() {\n int manhattanDis = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n int x, y;\n if (matrix[i][j] % N == 0) {\n x = matrix[i][j] / N - 1;\n y = N - 1;\n } else {\n x = matrix[i][j] / N;\n y = matrix[i][j] % N - 1;\n }\n manhattanDis += Math.abs(i-x) + Math.abs(j-y);\n }\n }\n return manhattanDis;\n }", "public int calculateManhattanDistance(List<Integer> currentState, List<Integer> goalState) {\n\t\tint edgeCost = 0;\n\t\tfor (int index = 0; index < currentState.size(); index++) {\n\t\t\tint manhattanDistance = 0;\n\t\t\tInteger currentStateElement = currentState.get(index);\n\t\t\tInteger goalStateElement = goalState.get(index);\n\t\t\tif (currentStateElement.equals(0)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!currentStateElement.equals(goalStateElement)) {\n\t\t\t\tint goalStateElementIndex = Utility.findIndex(goalState, currentStateElement);\n\t\t\t\tint currentStatexCo = index / (EightPuzzle.columnCount);\n\t\t\t\tint currentStateyCo = index % EightPuzzle.columnCount;\n\t\t\t\tint goalStatexCo = goalStateElementIndex / (EightPuzzle.columnCount);\n\t\t\t\tint goalStateyCo = goalStateElementIndex % EightPuzzle.columnCount;\n\n\t\t\t\tmanhattanDistance = Math.abs((goalStatexCo - currentStatexCo))\n\t\t\t\t\t\t+ Math.abs(goalStateyCo - currentStateyCo);\n\t\t\t\tedgeCost = edgeCost + manhattanDistance;\n\t\t\t}\n\t\t}\n\t\treturn edgeCost;\n\t}", "public final static float manhattanDistance(float[] a, float[] b) {\n\t\tint n = Math.min(a.length, b.length);\n\t\t\n\t\tfloat dis = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif ( Util.isUsed(a[i]) && Util.isUsed(b[i]) ) \n\t\t\t\tdis += Math.abs(a[i] - b[i]);\t\n\t\t}\n\t\t\n\t\treturn dis;\n\t}", "public int manhattan() {\n if (this.manhattan >= 0) return this.manhattan;\n \n int result = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n int idx = (i * N) + (j + 1);\n if (tiles[i][j] == idx) {\n result += 0;\n } else if (tiles[i][j] == 0) {\n continue;\n } else {\n result += manhattanHelper(tiles[i][j], i, j);\n }\n }\n }\n this.manhattan = result;\n return result;\n }", "private void manhattan(Node node){\n int row1 = this.row;\n int col1 = this.col;\n int row2 = node.getRow();\n int col2 = node.getCol();\n\n int x = Math.abs(row1-row2);\n int y = Math.abs(col1-col2);\n\n this.hVal = x+y;\n }", "public int manhattan() {\n return man;\n }", "public int manhattan() {\n int sum = 0;\n for (int i = 0; i < blocks.length; i++){\n for (int j = 0; j < blocks.length; j++){\n int value = blocks[i][j];\n if (value == 0)\n continue;\n\n sum += Math.abs((value-1) / dimension() - i);\n sum += Math.abs((value-1) % dimension() - j);\n }\n }\n return sum;\n }", "public int manhattan() {\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (blocks[i][j] != 0) {\n int row = (blocks[i][j] - 1) / N;\n int col = (blocks[i][j] - 1) % N;\n count += (Math.abs(row - i) + Math.abs(col - j));\n }\n }\n }\n return count;\n }", "public int manhattan(GameObject o1, GameObject o2){\n return Math.abs(o1.getX()-o2.getX()) + Math.abs(o1.getY()-o2.getY());\n }", "public int manhattan() \n {\n int manhattan = 0; \n \n for (int i = 0; i < SIZE; i++)\n {\n if ((int) blocks[i] != 0)\n {\n int target = (int) blocks[i] - 1;\n manhattan += (Math.abs(target % N - i % N) + \n Math.abs(target / N - i / N));\n }\n }\n \n return manhattan; \n }", "public int manhattan() {\n return manhattan;\n }", "public int manhattan() {\n\t\treturn manhattan;\n\t}", "public int manhattan() {\n return manhattan_score;\n }", "public int manhattan() {\n \tint manhattanScore = 0;\n \t\n \tfor (int row = 0; row < this.dimension(); row++) {\n \t\tfor (int column = 0; column < this.dimension(); column++) {\n \t\t\tif (blocks[row][column] != 0) {\n\t \t\t\tint compareValue = blocks[row][column];\n\t \t\t\t\n\t \t\t\tint expectedRow = (compareValue - 1 ) / this.dimension();\n\t \t\t\tint expectedColumn = (compareValue - 1) - (expectedRow * this.dimension());\n\t \t\t\t\n\t \t\t\tmanhattanScore += (Math.abs(expectedRow - row) + Math.abs(expectedColumn - column));\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn manhattanScore;\n }", "@Override\r\n protected Double h(Point from, Point to) {\r\n /* Use the Manhattan distance heuristic. */\r\n return (double) Math.abs(finish.x - to.x) + Math.abs(finish.y - to.y);\r\n }", "private int manhattanMoves(int val,int curr_row,int curr_col)\n\t{\n\t\tint correct_row = (int)Math.ceil((double) val/(double)this.dimension)-1;\n\t\tint mod_val = val%this.dimension;\n\t\tint correct_col = 0;\n\t\t// make corrections\n\t\tif (mod_val == 0)\n\t\t\tcorrect_col = this.dimension -1;\n\t\telse\n\t\t\tcorrect_col = mod_val -1;\n\t\tint vertical_moves = Math.abs(correct_row - curr_row);\n\t\tint horizontal_moves = Math.abs(correct_col - curr_col);\n\t\t\n\t\treturn vertical_moves+horizontal_moves;\n\t}", "public int distBonus(){\n Player currentplayer = state.getCurrentPlayer();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n ArrayList<GameObject> listObjectsOnCurrentCell;\n GameObject objectOnCell;\n int distTmp;\n int dist= tabcells.length+tabcells[0].length;\n for(int i=0;i<tabcells.length;i++){\n for(int j=0;j<tabcells[0].length;j++){\n listObjectsOnCurrentCell = tabcells[i][j].getGameObjects();\n for(GameObject object: listObjectsOnCurrentCell){\n if(object instanceof Bonus || object instanceof BonusWall){\n distTmp = manhattan(object,currentplayer);\n if(distTmp<dist){\n dist = distTmp;\n }\n }\n }\n }\n }\n return dist;\n }", "public static double mahnattan(InputSpacePoint a , InputSpacePoint b) {\n double sum = 0.0;\n for(String s : a.getKeysAsCollection()) {\n sum += Math.abs(a.getValue(s) - b.getValue(s));\n }\n return sum;\n }", "double getDistanceInMiles();", "public int hamming() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (_tiles[i][j] != _goal[i][j]) {\n distance++;\n }\n }\n }\n return distance;\n }", "double getDistance();", "public int getManhattenDist(MapCell goal){\n\t\tint rowDist = Math.abs(position[0] - goal.getMapPosition()[0]);\n\t\tint colDist = Math.abs(position[1] - goal.getMapPosition()[1]);\t\t\n\t\treturn (rowDist+colDist);\n\t}", "private void updateManhattanScore(int i, int j) {\n int value = blocks[i][j];\n if (value == 0) {\n // save MatrixIndex of free square\n free = new MatrixIndex(i, j);\n } else {\n // calculate goal position for this value\n int goal_i = (value - 1) / dimension();\n int goal_j = (value - 1) % dimension();\n\n // calculate vertical and horizontal distances\n int distance = Math.abs(i - goal_i) + Math.abs(j - goal_j);\n\n // update manhattan_score\n manhattan_score += distance;\n\n if (verbose) {\n // System.out.println(value + \" from \" + i + \",\" + j + \" to \" + goal_i + \",\" + goal_j + \" = \" + distance);\n }\n }\n }", "int Manhattan(ArrayList<ArrayList<Integer>> cur)\n {\n int Manhattan = 0;\n\n if (cur.get(0).get(0) == 1)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(0).get(0) == 2 || cur.get(0).get(0) == 4)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(0).get(0) == 3 || cur.get(0).get(0) == 7 || cur.get(0).get(0) == 5)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(0).get(0) == 6 || cur.get(0).get(0) == 8)\n {\n Manhattan += 3;\n }\n\n else if (cur.get(0).get(0) == 0)\n {\n Manhattan += 4;\n }\n\n\n if (cur.get(0).get(1) == 2)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(0).get(1) == 1 || cur.get(0).get(1) == 3 || cur.get(0).get(1) == 5)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(0).get(1) == 4 || cur.get(0).get(1) == 6 || cur.get(0).get(1) == 8)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(0).get(1) == 7 || cur.get(0).get(1) == 0)\n {\n Manhattan += 3;\n }\n\n\n if (cur.get(0).get(2) == 3)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(0).get(2) == 2 || cur.get(0).get(2) == 6)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(0).get(2) == 1 || cur.get(0).get(2) == 5 || cur.get(0).get(2) == 0)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(0).get(2) == 4 || cur.get(0).get(2) == 8)\n {\n Manhattan += 3;\n }\n\n else if (cur.get(0).get(2) == 7)\n {\n Manhattan += 4;\n }\n\n\n if (cur.get(1).get(0) == 4)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(1).get(0) == 1 || cur.get(1).get(0) == 5 || cur.get(1).get(0) == 7)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(1).get(0) == 2 || cur.get(1).get(0) == 6 || cur.get(1).get(0) == 8)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(1).get(0) == 3 || cur.get(1).get(0) == 0)\n {\n Manhattan += 3;\n }\n\n\n if (cur.get(1).get(1) == 5)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(1).get(1) == 2 || cur.get(1).get(1) == 4 || cur.get(1).get(1) == 6 || cur.get(1).get(1) == 8)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(1).get(1) == 1 || cur.get(1).get(1) == 3 || cur.get(1).get(1) == 7 || cur.get(1).get(1) == 0)\n {\n Manhattan += 2;\n }\n\n\n if (cur.get(1).get(2) == 6)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(1).get(2) == 5 || cur.get(1).get(2) == 3 || cur.get(1).get(2) == 0)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(1).get(2) == 2 || cur.get(1).get(2) == 4 || cur.get(1).get(2) == 8)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(1).get(2) == 1 || cur.get(1).get(2) == 7)\n {\n Manhattan += 3;\n }\n\n\n if (cur.get(2).get(0) == 7)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(2).get(0) == 4 || cur.get(2).get(0) == 8)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(2).get(0) == 1 || cur.get(2).get(0) == 5 || cur.get(2).get(0) == 0)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(2).get(0) == 2 || cur.get(2).get(0) == 6)\n {\n Manhattan += 3;\n }\n\n else if (cur.get(2).get(0) == 3)\n {\n Manhattan += 4;\n }\n\n\n if (cur.get(2).get(1) == 8)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(2).get(1) == 7 || cur.get(2).get(1) == 5 || cur.get(2).get(1) == 0)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(2).get(1) == 2 || cur.get(2).get(1) == 4 || cur.get(2).get(1) == 6)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(2).get(1) == 1 || cur.get(2).get(1) == 3)\n {\n Manhattan += 3;\n }\n\n if (cur.get(2).get(2) == 0)\n {\n Manhattan += 0;\n }\n\n else if (cur.get(2).get(2) == 8 || cur.get(2).get(2) == 6)\n {\n Manhattan += 1;\n }\n\n else if (cur.get(2).get(2) == 3 || cur.get(2).get(2) == 5 || cur.get(2).get(2) == 7)\n {\n Manhattan += 2;\n }\n\n else if (cur.get(2).get(2) == 2 || cur.get(2).get(2) == 4)\n {\n Manhattan += 3;\n }\n\n else if (cur.get(2).get(2) == 1)\n {\n Manhattan += 4;\n }\n\n return Manhattan;\n\n }", "public void launchManhattan(Vertex source, Vertex target) {\n\t\tfor (Object vertex : g.vertexSet()) {\n\t\t\t((Vertex) vertex).setNbr(0);\n\t\t}\n\t\tcalculateManhattanDistance(source, target);\n\t}", "double distance() {\r\n\t double dist_total = 0;\r\n\t for (int i = 0; i < index.length - 1; i++) {\r\n\t dist_total += city(i).distance(city(i + 1));\r\n\t }\r\n\t \r\n\t return dist_total;\r\n\t}", "public float getDistance();", "public WalkingDistance(ApplicationMode appMode) {\n rowSize = PuzzleConstants.getRowSize();\n keySize = 55;\n patternSize = 24964;\n priorKey = new int[] {0, 0x0E00, 0x0FC0, 0x0FF8};\n afterKey = new int[] {0x01FF, 0x003F, 0x0007, 0};\n partialPattern = new int[] {0x00000FFF, 0x00FC0000, 0x0000003F, 0x00FFF000};\n loadData(appMode);\n }", "private Distance(){}", "@Test\n\tpublic void checkDistanceRouteAD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"D\"), \"5\");\n\t}", "public double calcDistBetweenStops(){\n List<Location> locs = destinations.getLocationList();\r\n double totalDist = 0;\r\n for (int i = 0; i < (locs.size() - 1); i++){\r\n double distance = locs.get(i).DistanceTo(locs.get(i+1));\r\n totalDist += distance;\r\n }\r\n return totalDist;\r\n }", "public int getRideTime() {\r\n\r\n\t\treturn client_p.getManhattanDistanceTo(destination);\r\n\r\n\r\n\t}", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "@Test\n\tpublic void testDiagonalNeighbors() {\n\t\tPosition topLeft = new Position(0,0);\n\t\tPosition bottomRight = new Position(1,1);\n\n\t\tint distance = euclideanSquaredMetric.calculateCost(topLeft, bottomRight);\n\t\tassertEquals(2 * lateralDistanceWeight, distance);\n\n\t\tPosition topRight = new Position(0,1);\n\t\tPosition bottomLeft = new Position(1,0);\n\n\t\tdistance = euclideanSquaredMetric.calculateCost(topRight, bottomLeft);\n\t\tassertEquals(2*lateralDistanceWeight, distance);\n\n\t}", "private double getDistance(Vector2i tile, Vector2i goal) {\n\t\t double dx = tile.getX() - goal.getX();\n\t\t double dy = tile.getY() - goal.getY();\n\t\t return Math.sqrt(dx * dx + dy *dy); //distance \n\t }", "@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }", "void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}", "private void set_distance() {\n int[] k = new int[getQueue().length];\n distance = 0.0;\n for (int i = 1; i < getQueue().length; i++) {\n distance += getPoints().get(way[i]).distance(getPoints().get(way[i - 1]));\n }\n distance += getPoints().get(getQueue()[getPoints().size() - 1]).distance(getPoints().get(0));\n enterd = true;\n }", "public void findDistance(String address, String destinations) throws MalformedURLException{\n\t\tString s = \"https://maps.googleapis.com/maps/api/distancematrix/json?origins=\";\r\n\t\tthis.addr = address;\r\n\t\ttry {\r\n\t\t\ts += URLEncoder.encode(addr, \"UTF-8\");\r\n\t\t\ts += URLEncoder.encode(\"&destinations=\", \"UTF-8\");\r\n\t\t\ts += URLEncoder.encode(destinations, \"UTF-8\");\r\n\t\t\t\r\n\t\t\tURL url = new URL(s);\r\n\r\n\t\t\t// read from URL\r\n\t\t\tScanner input = new Scanner(url.openStream());\r\n\t\t\tString str = new String();\r\n\t\t\twhile (input.hasNext())\r\n\t\t\t\tstr += input.nextLine();\r\n\t\t\tinput.close();\r\n\r\n\t\t\tJSONObject obj = new JSONObject(str);\r\n\t\t\tJSONObject rows = obj.getJSONArray(\"rows\").getJSONObject(0);\r\n\t\t\tJSONArray loc = rows.getJSONArray(\"elements\");\r\n\t\t\tJSONObject dist = loc.getJSONObject(0);\r\n\t\t\tmiles = dist.getString(\"text\");\r\n\t\t\tJSONObject dur = loc.getJSONObject(1);\r\n\t\t\ttime = dur.getString(\"text\");\r\n\r\n\t\t\t\r\n\r\n\r\n\t\t} catch (UnsupportedEncodingException 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}", "public double getDistanceMoyenne() {\n\t\treturn getDistanceTotale () / 12;\n\t}", "public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}", "private int calcDistance()\n\t{\n\t\tint distance = 0;\n\n\t\t// Generate a sum of all of the difference in locations of each list element\n\t\tfor(int i = 0; i < listSize; i++) \n\t\t{\n\t\t\tdistance += Math.abs(indexOf(unsortedList, sortedList[i]) - i);\n\t\t}\n\n\t\treturn distance;\n\t}", "boolean hasDistance();", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "public static void main(String[] args) {\n System.out.println(hammingDistance(1,4));\n }", "@Test\n\tpublic void checkDistanceRouteAEBCD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"E\", \"B\", \"C\", \"D\"), \"22\");\n\t}", "public int distance(PuzzleState state) {\n int numOfTiles = 9;\n int rowLength = 3;\n int finalDistance = 0;\n for(int i = 1; i < numOfTiles; i++){\n if(goalState.posOf(i) != state.posOf(i)){\n int indexOfMissplacedTile = state.posOf(i);\n int indexOfGoalplacedTile = goalState.posOf(i);\n int indexDifference = Math.abs(indexOfGoalplacedTile - indexOfMissplacedTile);\n int finalDistanceOfThisTile = 0;\n if(indexDifference >= rowLength){\n finalDistanceOfThisTile += indexDifference / 3;// number of rows moved\n finalDistanceOfThisTile += indexDifference % 3;// number of columns moved\n }\n else if(indexDifference < rowLength && (indexDifference + 1)%rowLength == 0){//special case if the tile needs to travel ex(from index 3 to 4 or vice verca);\n finalDistanceOfThisTile += 3;\n }\n else{\n finalDistanceOfThisTile += indexDifference;\n }\n finalDistance += finalDistanceOfThisTile;\n }\n }\n return finalDistance;\n }", "private static long getShortestDistance(String origin, String destination) \n\t\tthrows IOException, ParserConfigurationException, SAXException{\n\t\t\t\t\n\t\tURL googleReq = new URL(\"http://maps.google.com/maps/api/directions/xml?origin=\"+origin.replace(\" \", \"+\").replace(\",\", \"\")+\n\t\t\t\t\"&destination=\"+destination.replace(\" \", \"+\").replace(\",\", \"\")+\"&sensor=false\");\n\t\t\n\t\tURLConnection urlConnection = googleReq.openConnection();\n\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\n\t\tDocument doc = db.parse(urlConnection.getInputStream());\n\t\ttry{\n\t\t\t/*\n\t\t\t * we write the response to an xml file\n\t\t\t * just for supervision\n\t\t\t */\n\t\t\tSource source = new DOMSource(doc);\n\t\t\tFile file = new File(\"response.xml\");\n\t\t\tResult result = new StreamResult(file);\n\n\t\t\t// Write the DOM document to the file\n\t\t\tTransformer xformer = TransformerFactory.newInstance().newTransformer();\n\t\t\txformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t} catch (TransformerException e) {\n\t\t}\n\n\t\tNode stNode = doc.getElementsByTagName(\"status\").item(0);\n\t\tlong dst = -1;\n\t\tif(stNode.getTextContent().equals(\"OK\")){\n\t\t\t//extract the distance from the response\n\t\t\tNodeList routeLst = doc.getElementsByTagName(\"route\");\n\t\t\t\n\t\t\tfor(int rCtr=0;rCtr<routeLst.getLength();rCtr++){\n\t\t\t\tlong routeDist = 0;\n\t\t\t\tNode route = routeLst.item(rCtr);\n\t\t\t\t\n\t\t\t\tNodeList distLst = ((Element)route).getElementsByTagName(\"distance\");\n\n\t\t\t\tfor(int dCtr=0;dCtr<distLst.getLength();dCtr++){\n\t\t\t\t\tNode distanceNode = distLst.item(dCtr);\n\t\t\t\t\tif(distanceNode.getParentNode().getNodeName().equals(\"leg\")){\n\t\t\t\t\t\tNodeList distChild = ((Element)distanceNode).getElementsByTagName(\"value\");\n\t\t\t\t\t\tfor(int ch=0;ch<distChild.getLength();ch++){\n\t\t\t\t\t\t\tNode tmpChild = distChild.item(ch);\n\t\t\t\t\t\t\t\trouteDist += Long.parseLong(tmpChild.getTextContent());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(routeDist<dst || dst==-1)\n\t\t\t\t\tdst=routeDist;\n\t\t\t} //end route\n\t\t\tSystem.out.println(\"Shortest distance: \"+dst+\" meters\");\n\t\t}\n\t\telse{\n\t\t\tSystem.err.println(\"RESPONSE STATUS NOT OK!\");\t//probably over_query_limit status\n\t\t}\n\t\t\n\t\treturn dst;\n\t}", "int cellDistance(int cell) {\n int d = GUTTER_SIZE;\n d += cell * (CELL_SIZE + GUTTER_SIZE);\n return d;\n }", "public int getDistance(){\n if (distance == 0) {\n int tourDistance = 0;\n // Loop through our tour's cities\n for (int cityIndex=0; cityIndex < tourSize(); cityIndex++) {\n // Get city we're travelling from\n City fromCity = getCity(cityIndex);\n // City we're travelling to\n City destinationCity;\n // Check we're not on our tour's last city, if we are set our \n // tour's final destination city to our starting city\n if(cityIndex+1 < tourSize()){\n destinationCity = getCity(cityIndex+1);\n }\n else{\n destinationCity = getCity(0);\n }\n // Get the distance between the two cities\n tourDistance += fromCity.distanceTo(destinationCity);\n }\n distance = tourDistance;\n }\n return distance;\n }", "public int distance() {\n return distance;\n }", "public static double getDistance(ArrayList<City> routine){ \n double totalDistance = 0.0;\n for (int i = 0; i < routine.size() - 1; i++) {\n totalDistance += routine.get(i).distance(routine.get(i+1));\n }\n return totalDistance;\n }", "private double distantziaKalkulatu() {\r\n\t\tdouble lurrarenRadioa = 6371;// kilometrotan Lurraren radioa\r\n\t\tdouble dLat = Math.toRadians(terLat - latitudea); //\r\n\t\tdouble dLng = Math.toRadians(termLong - longitudea);\r\n\t\tdouble sindLat = Math.sin(dLat / 2);\r\n\t\tdouble sindLng = Math.sin(dLng / 2);\r\n\t\tdouble va1 = Math.pow(sindLat, 2)\r\n\t\t\t\t+ Math.pow(sindLng, 2) * Math.cos(Math.toRadians(terLat)) * Math.cos(Math.toRadians(latitudea));\r\n\t\tdouble va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\r\n\t\tdouble distancia = lurrarenRadioa * va2;\r\n\r\n\t\treturn distancia;\r\n\t}", "public ChamferDistance5x5Short() {\n\t\tthis(new short[]{5, 7, 11}, true);\n\t}", "public int CalcDistance ( )\r\n\t{\r\n\t\tfor ( int i = 0; i<size; i++ )\r\n\t\t{\r\n\t\t\tfor ( int offR = 0; offR <= size/2; offR++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor ( int offR = size-1; offR >= size/2; offR-- )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\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\treturn maze [currentRow] [currentCol].getDistanceToExit();\r\n\t}", "public void getDistance() {\n if (curLocation == null) {\n Toast.makeText(getApplicationContext(), \"Retrieving location - Try Again\", Toast.LENGTH_LONG).show();\n return;\n }\n String url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial\" +\n \"&origins=\" + curLocation.latitude + \",\" + curLocation.longitude +\n \"&destinations=\" + dest.latitude + \",\" + dest.longitude +\n \"&mode=walking\" +\n \"&key=\" + getString(R.string.google_maps_key);\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n\n //callback for when get distance returns data\n @Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error retrieving directions\", Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(request);\n }", "public double distance(){\n return DistanceTraveled;\n }", "private static final double[][] computeDistances(Tree tree, IdGroup idGroup)\n\t{\n\t\treturn computeDistances(tree, idGroup, false, 0.0);\n\t}", "public static void ITdistances()\n\t{\n\t\t//System.err.println(\"Position\");\n\n\t\tclade = clad[k];\n\n\t\tclade.tipDistance = 0;\n\t\tclade.intDistance = 0;\n\t\tclade.tipDisNested = 0;\n\t\tclade.intDisNested = 0;\n\t\tclade.indTipClades = 0;\n\t\tclade.indIntClades = 0;\n\n\n\t\tif(clade.check != (double) clade.numSubClades && clade.check != 0)\n\t\t{ \n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tif (clade.Position[i] == tip)\n\t\t\t\t\tclade.indTipClades += clade.rowTotal[i];\n\t\t\t\telse\n\t\t\t\t\tclade.indIntClades += clade.rowTotal[i];\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\t// weigthing within class\n\t\t\t\tclade.tipDistance += clade.Position[i] * clade.Dc[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\tclade.tipDisNested += clade.Position[i] * clade.Dn[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\tclade.intDistance += (1 - clade.Position[i]) * clade.Dc[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\tclade.intDisNested += (1 - clade.Position[i]) * clade.Dn[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\t\n\t\t\t\t\n\t\t\t\t// unweighted\n\t\t\t\t//clade.tipDistance += clade.Position[i] * clade.Dc[i] / (double) clade.check;\n\t\t\t\t//clade.tipDisNested += clade.Position[i] * clade.Dn[i] / (double) clade.check;\n\t\t\t\t//clade.intDistance += (1 - clade.Position[i]) * clade.Dc[i] / (double) (clade.numSubClades - clade.check);\n\t\t\t\t//clade.intDisNested += (1 - clade.Position[i]) * clade.Dn[i] / (double) (clade.numSubClades - clade.check);\t\n\t\t\t}\n\n\t\t clade.tipIntDistance = clade.intDistance - clade.tipDistance;\n\t\t clade.tipIntDisNested = clade.intDisNested - clade.tipDisNested;\n\t\t if(verbose){\n\t\t\tlogfile.println(\"\\nIT \" + clade.cladeName + \" indTipClades = \" + clade.indTipClades\n\t\t\t\t+ \" indIntClades + \" + clade.indIntClades);\n\t\t\tlogfile.println(\"\\nITc \" + clade.cladeName + \" meanInt = \" + clade.intDistance\n\t\t\t\t+ \" meanTip = \" + clade.tipDistance);\n\t\t\tlogfile.println(\"ITn \" + clade.cladeName + \" meanInt = \" + clade.intDisNested\n\t\t\t\t+ \" meanTip = \" + clade.tipDisNested);\n\t\t }\n\t\t}\n\n\t\t//System.err.println(\"IT clade \" + clade.cladeName + \" meanInt = \" + clade.intDistance + \" meanTip = \" + clade.tipDistance);\n\n\t}", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "public double averageManhattanDot(Location pacManLocation, Collection<Location> dotLocations){\n\t\tdouble i=0, average = 0, sum = 0;\n\t\tfor(Location l: dotLocations){\n\t\t\tsum = sum + Location.manhattanDistance(pacManLocation, l);\n\t\t\ti++;\n\t\t}\n\t\taverage = sum/i;\n\t\treturn -(average*10)/maxdismanh;\n\t}", "public static Map<Cell, Map<Cell, Number>> getDistances() {\n\t\treturn distances;\n\t}", "private double getDistance(Vector2i tile, Vector2i goal) {\r\n\t\tdouble dx = tile.getX() - goal.getX();\r\n\t\tdouble dy = tile.getY() - goal.getY();\r\n\t\treturn Math.sqrt((dx * dx) + (dy * dy));\r\n\t}", "public ConjugatedTopologicalDistance()\n {\n descInfo = FeatureHelper.generateFeatureInfo(this.getClass(),\n BasicFeatureInfo.TYPE_NO_COORDINATES, null,\n joelib2.feature.result.AtomDynamicResult.class.getName());\n }", "public int distance(Coord coord1, Coord coord2);", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "public static int editDistance4(String s1, String s2) {\r\n\t\tint m = s1.length();\r\n\t\tint n = s2.length();\r\n\t\tint[][] mem = new int[m + 1][n + 1];\r\n\t\tfor (int j = 0; j <= n; ++j) \r\n\t\t\tmem[m][j] = n-j;\r\n\t\tfor (int i = 0; i <= m; ++i) \r\n\t\t\tmem[i][n] = m-i;\r\n\r\n\t\tfor (int i = m - 1; i >= 0; --i) {\r\n\t\t\tfor (int j = n - 1; j >= 0; --j) {\r\n\t\t\t\tif (s1.charAt(i) != s2.charAt(j)) {\r\n\t\t\t\t\tint rcost = mem[i + 1][j + 1];\r\n\t\t\t\t\tint icost = mem[i][j + 1];\r\n\t\t\t\t\tint dcost = mem[i + 1][j];\r\n\t\t\t\t\tmem[i][j] = Math.min(dcost, Math.min(rcost, icost)) + 1;\r\n\t\t\t\t} else \r\n\t\t\t\t\tmem[i][j] = mem[i + 1][j + 1];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mem[0][0];\r\n\t}", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public double distance(Customer i, Customer j);", "private double calculeDistanceLinaire(int[] tableauDeIntRandom) {\n double resultat = 0;\n for (int i = 0; i < tableauDeIntRandom.length; i++) {\n resultat += Math.abs(tableauDeIntRandom[i] - tableauDeIntRandom[(i + 1) % tableauDeIntRandom.length]);\n }\n return resultat;\n }", "@Override\n public void calculateTimeAndDist(String result) {\n //Create a calendar instance.\n Calendar date = Calendar.getInstance();\n long t = date.getTimeInMillis();\n\n String pattern = \"HH:mm\";\n\n // Create an instance of SimpleDateFormat used for formatting\n // the string representation of date according to the chosen pattern\n DateFormat df = new SimpleDateFormat(pattern);\n\n //Split the result returned by the Geotask.\n String res[] = result.split(\",\");\n// Double min = Double.parseDouble(res[0]) / 60;\n\n //Get the distance.\n Double dist = Double.parseDouble(res[1]) / 1000;\n\n\n //Get time to dest based on user's speed.\n Double d = Double.valueOf(dist);\n Double s = Double.valueOf(getAverageSpeed());\n int timeToDest = (int) ((d / s) * 60);\n\n //Add timeToDest to current time\n Date afterAddingTimeToDest = new Date(t + (timeToDest * ONE_MINUTE_IN_MILLIS));\n String todayAsString = df.format(afterAddingTimeToDest.getTime());\n\n //Set arrival txt to estimate arrival time.\n arrivalTxt.setText(todayAsString);\n\n }", "public static double totalDistance(ArrayList<Edge> tree) {\n double accumDistance = 0;\n \n \tfor (Edge e : tree) {\n \t\taccumDistance += e.distance();\n \t}\n \n \treturn accumDistance;\n }", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "public double getDistanceTo(CoordPair dest)\r\n\t{\n\t\tif(isAdjacent(dest))\r\n\t\t\treturn 1;\r\n\t\tint rowDiff = this.row - dest.getRow();\r\n\t\tint colDiff = this.col - dest.getCol();\r\n\t\tint sumSquares = (int) (Math.pow(rowDiff,2) + Math.pow(colDiff, 2));\r\n\t\tdouble distance = Math.sqrt(sumSquares);\r\n\t\t\r\n\t\treturn distance;\r\n\t}", "int getMinimalPaletteDistance();", "@Override\n\tpublic float getDistance(float[] fv1, float[] fv2) {\n\t\tif(settings.getMetric() == 1){\n\t\t\treturn getL1Distance(fv1, fv2);\n\t\t} else { //metric == 2\n\t\t\treturn getL2Distance(fv1, fv2);\n\t\t}\n\t\t\n\t\t\n\t}", "public double getDistance () {\n return distance;\n }", "double getSquareDistance();", "public CalculateDistance(LevelSetApplet japp, LevelSetCanvas canvas1)\r\n\t{\r\n\tthis.canvas1 = canvas1;\r\n\tthis.japp = japp;\t\r\n\t\t//System.out.println(\"got here\");\r\n\tinitializations();\t\r\n\t\t//System.out.println(\"got here2\");\r\n\t\tSystem.out.println(\"Finding Boundary\");\r\n\tfindBoundary(useDestinations);\r\n\t\tSystem.out.println(\"Building Initial Band\");\r\n\tbuildInitialBand();\r\n\t\tSystem.out.println(\"Running Algorithm\");\r\n\t\r\n\twhile(active.size()>0)\r\n\t\t{\r\n\t\trunAlgorithmStep();\r\n\t\t}\r\n \r\n System.out.println(\"Distance function calculated\");\r\n\t\r\n\tmaxPhi = findMaxPhi();\r\n\t//if(useDestinations) maxPhi = 150;\r\n \r\n // Save phi in phiTemp\r\n for(int i=0; i<pixelsWide; i++) {\r\n for(int j=0; j<pixelsHigh; j++) {\r\n phiTemp[i][j] = phi[i][j];\r\n }\r\n }\r\n\t}", "public static void main(String[] args) {\n\t\tchar[][] grid = {\r\n\t {'S', 'O', 'O', 'S', 'S'},\r\n\t {'D', 'O', 'D', 'O', 'D'},\r\n\t {'O', 'O', 'O', 'O', 'X'},\r\n\t {'X', 'D', 'D', 'O', 'O'},\r\n\t {'X', 'D', 'D', 'D', 'O'}};\r\n \tSystem.out.println(getDistance(grid));\r\n\t}", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}" ]
[ "0.83509433", "0.8180195", "0.77088535", "0.76643753", "0.7662323", "0.7535306", "0.75243175", "0.7457595", "0.7457348", "0.7399719", "0.73089343", "0.72267675", "0.7173386", "0.71336925", "0.70872843", "0.7075581", "0.7060137", "0.7049315", "0.70348865", "0.7024022", "0.6960563", "0.6829643", "0.6740068", "0.67327535", "0.66885823", "0.6670293", "0.6664206", "0.6582437", "0.63992786", "0.639605", "0.62932104", "0.61295253", "0.6054935", "0.6009013", "0.6007269", "0.59707844", "0.5941804", "0.5867807", "0.5823642", "0.5678962", "0.56300557", "0.5549485", "0.55163676", "0.54744047", "0.5448619", "0.54186434", "0.54140604", "0.5377232", "0.5372697", "0.53476274", "0.53473866", "0.5345779", "0.53407824", "0.53352267", "0.5308456", "0.53045195", "0.53014314", "0.52941877", "0.52876544", "0.5287261", "0.5284669", "0.52835095", "0.5279771", "0.52776754", "0.5274196", "0.52664465", "0.52534014", "0.52424383", "0.5220894", "0.5220198", "0.5220135", "0.5191581", "0.51771015", "0.5174221", "0.51514333", "0.51425046", "0.51324254", "0.51270324", "0.5126927", "0.5124279", "0.5086125", "0.50710005", "0.50667864", "0.506569", "0.5064313", "0.50560266", "0.5051586", "0.504523", "0.5043528", "0.503237", "0.5025596", "0.5023149", "0.5011329", "0.49956286", "0.49930564", "0.49927095", "0.49891534", "0.4986827", "0.49795246", "0.49781513", "0.49734336" ]
0.0
-1
Note: for hexa grid prefer using CubeCoord
Coord add(Direction6 dir) { return toCubeCoord().add(dir).toCoord(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int cubeCol() {\n return c; \n }", "@Override\r\n\t\tpublic int cube() {\n\t\t\treturn width*width*width;\r\n\t\t}", "public void coFromInt(int coord) {\n int twist = 0;\n for(int j = 0; j < 7; j ++) {\n co[6 - j] = coord % 3;\n twist = (twist + coord % 3) % 3;\n coord /= 3;\n }\n co[7] = (3 - twist) % 3;\n }", "public static void renderCube(double x, double y, double z, int xDim, int yDim, int zDim, int offsetU, int offsetV, IIcon icon, int flag)\n\t{\n\t\trenderCube(x, y, z, xDim, yDim, zDim, offsetU, offsetV, icon, flag, 16, 16);\n\t}", "public RubiksCube(){\n\t\tString[] c = {\n\t\t\t\t\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\n\t\t\t\t\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\n\t\t\t\t\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\n\t\t\t\t\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\n\t\t\t\t\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\n\t\t\t\t\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\n\t\t};\n\t\tthis.cube = c;\n\t}", "public Cube222 () {\n\t\tstate_ = new Cubie[8];\n\t\tstate_[0] = new Cubie('O','W','G',0); // front, clockwise\n\t\tstate_[1] = new Cubie('O','W','B',1);\n\t\tstate_[2] = new Cubie('R','W','B',2);\n\t\tstate_[3] = new Cubie('R','W','G',3);\n\t\tstate_[4] = new Cubie('O','Y','G',4); // back, behind front\n\t\tstate_[5] = new Cubie('O','Y','B',5);\n\t\tstate_[6] = new Cubie('R','Y','B',6);\n\t\tstate_[7] = new Cubie('R','Y','G',7);\n\t}", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Cube(\" + this.nom + \")@(\" + this.centre.getX() + \", \" + this.centre.getY() + \", \" + this.centre.getZ() + \") ar�te : \"+this.arete;\n\t}", "public Cube[][] getCubeGrid() {\n return cubeGrid;\n }", "public static float[] createTexCube(float x, float y, Block block) {\r\n float offset = 1/16f;\r\n switch(type.getID()) {\r\n case 0:\r\n switch(block.getID()) {\r\n case 0:\r\n return new float[] {\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 0, y + offset * 1,\r\n x + offset * 0, y + offset * 0,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1\r\n };\r\n case 1:\r\n return new float[] {\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1\r\n };\r\n case 2:\r\n return new float[] {\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12\r\n };\r\n case 3:\r\n return new float[] {\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0\r\n };\r\n case 4:\r\n return new float[] {\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0\r\n };\r\n case 5:\r\n return new float[] {\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1\r\n };\r\n }\r\n case 1:\r\n switch(block.getID()) {\r\n case 0:\r\n return new float[] {\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1\r\n };\r\n case 1:\r\n return new float[] {\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6\r\n };\r\n case 2:\r\n return new float[] {\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14\r\n };\r\n case 3:\r\n return new float[] {\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6\r\n };\r\n case 4:\r\n return new float[] {\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14\r\n };\r\n case 5:\r\n return new float[] {\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1\r\n };\r\n }\r\n }\r\n \r\n return new float[] {\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2\r\n };\r\n }", "public static float[] createCube (float x, float y, float z) {\r\n int offset = CUBE_LENGTH/2;\r\n return new float[] {\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z,\r\n x + offset, y - offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y + offset, z,\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z\r\n };\r\n }", "private void arretes_fY(){\n\t\tthis.cube[49] = this.cube[46]; \n\t\tthis.cube[46] = this.cube[48];\n\t\tthis.cube[48] = this.cube[52];\n\t\tthis.cube[52] = this.cube[50];\n\t\tthis.cube[50] = this.cube[49];\n\t}", "public CubeGL2(double width, double height, double depth) {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n\n for (int i = 0; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) width;\n }\n for (int i = 1; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) height;\n }\n for (int i = 2; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) depth;\n }\n\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int cubeRow() {\n return r;\n }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "private float[] createCubeVertexCol(float[] cubeColorArray) {\r\n float[] cubeColors = new float[cubeColorArray.length * 24];\r\n if (cubeColorArray[0] == 0) {\r\n for (int i = 0; i < cubeColors.length; i++) {\r\n cubeColors[i] = 1;\r\n }\r\n for (int i = 0; i < 12; i += 3) {\r\n cubeColors[i] = 0.8f;\r\n cubeColors[i + 1] = 1;\r\n cubeColors[i + 2] = 0.5f;\r\n }\r\n return cubeColors;\r\n }\r\n for (int i = 0; i < cubeColors.length; i++) {\r\n cubeColors[i] = cubeColorArray[i % cubeColorArray.length];\r\n }\r\n return cubeColors;\r\n }", "public E3DVector2F getTextureCoordC(){\r\n return vertices[2].getTextureCoord();\r\n }", "public CubeGL2() {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public boolean isOpaqueCube()\r\n/* 61: */ {\r\n/* 62: 82 */ return false;\r\n/* 63: */ }", "Cube(int l, int b, int h)\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=l;\r\n\t\tbredth=b;\r\n\t\theight=h;\r\n\t}", "public static void renderCube(double x, double y, double z, int xDim, int yDim, int zDim, int offsetU, int offsetV, IIcon icon, int flag, int textureWidth, int textureHeight)\n\t{\n\t\tTessellator tes = Tessellator.instance;\n\t\tdouble minU = icon.getMinU();\n\t\tdouble maxU = icon.getMaxU();\n\t\tdouble minV = icon.getMinV();\n\t\tdouble maxV = icon.getMaxV();\n\t\tdouble pu = (maxU - minU) / textureWidth;\n\t\tdouble pv = (maxV - minV) / textureHeight;\n\t\t\n\t\tif(flag > 5){\n\t\t\tSystem.out.println(\"Wrong flag (\"+ flag +\")used when using EasyTess! Using flag 0 instead.\");\n\t\t\tflag = 0;\n\t\t}\n\t\t\n\t\tswitch(flag){\n\t\tcase 3:\n\t\tcase 5:\n\t\t\txDimI = zDim;\n\t\t\tzDimI = xDim;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\txDimI = xDim;\n\t\t\tzDimI = zDim;\n\t\t}\n\t\t\n\t\tdouble U = minU + offsetU*pu;\n\t\tdouble V = minV + offsetV*pv;\n\t\t\n\t\trenderPosX(tes, x, y, z, xDim, yDim, zDim, U, V, pu, pv, flag);\n\t\trenderNegX(tes, x, y, z, xDim, yDim, zDim, U, V, pu, pv, flag);\n\t\trenderPosZ(tes, x, y, z, xDim, yDim, zDim, U, V, pu, pv, flag);\n\t\trenderNegZ(tes, x, y, z, xDim, yDim, zDim, U, V, pu, pv, flag);\n\t\trenderPosY(tes, x, y, z, xDim, yDim, zDim, U, V, pu, pv, flag);\n\t\trenderNegY(tes, x, y, z, xDim, yDim, zDim, U, V, pu, pv, flag);\n\t}", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "private int xyToOneD(int row, int col) {\n return ((row - 1) * grid.length) + (col - 1);\n }", "public int I(int x, int y, int z){\n //gets typeGrid index from location\n return x*yDim*zDim+y*zDim+z;\n }", "private Point2D.Float toGridPoint(int x, int y) {\n return new Point2D.Float((float)((x - centreX)*scale), (float)((centreY - y)*scale));\n }", "public boolean isOpaqueCube()\r\n/* 26: */ {\r\n/* 27:41 */ return false;\r\n/* 28: */ }", "public Pixel getCoordenadasCartesianas(){\r\n\t\tPixel p = new Pixel();\r\n\t\tp.setXDouble(this.getXCartesiano());\r\n\t\tp.setYDouble(this.getYCartesiano());\r\n\t\tp.setCol(this.getCol());\r\n\t\treturn p;\r\n\t}", "public AbstractCube7Idx3D() {\n super(7, 8, 5 * 12, 5 * 5 * 6, 1);\n init();\n }", "private Sprite.UV[] buildFontSpriteCoords() {\n Sprite.UV[] uvs = new Sprite.UV[16*16];\n float step = 1.0f / 16.0f;\n\n for (int y=0; y<16; y++) {\n for (int x=0; x<16; x++) {\n int offset = (y*16)+x;\n uvs[offset] = new Sprite.UV();\n uvs[offset].s = (x * step) + step;\n uvs[offset].t = (y * step) + step;\n uvs[offset].u = x * step;\n uvs[offset].v = y * step;\n }\n }\n\n return uvs;\n }", "private void aretes_aG(){\n\t\tthis.cube[31] = this.cube[14]; \n\t\tthis.cube[14] = this.cube[5];\n\t\tthis.cube[5] = this.cube[41];\n\t\tthis.cube[41] = this.cube[50];\n\t\tthis.cube[50] = this.cube[31];\n\t}", "public float gridUnitsToCentimetres(float gridUnits);", "private void aretes_aW(){\n\t\tthis.cube[4] = this.cube[16]; \n\t\tthis.cube[16] = this.cube[23];\n\t\tthis.cube[23] = this.cube[37];\n\t\tthis.cube[37] = this.cube[30];\n\t\tthis.cube[30] = this.cube[4];\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Coord[\" + this.x0 + \",\" + this.y0 + \"]\";\n\t}", "private void aretes_aY(){\n\t\tthis.cube[49] = this.cube[43]; \n\t\tthis.cube[43] = this.cube[21];\n\t\tthis.cube[21] = this.cube[10];\n\t\tthis.cube[10] = this.cube[32];\n\t\tthis.cube[32] = this.cube[49];\n\t}", "public E3DVector2F getTextureCoordDetail0C(){\r\n return vertices[2].getTextureCoordDetail0();\r\n }", "public String asCartesian(){\n return String.format(CARTESIAN_FORMAT, this.getX(), this.getY());\n }", "public CubieCube inverseCube() {\n\n CubieCube clone = this.clone();\n for (int i = 0; i < edgesValues.length; i++) {\n clone.eo[i] = this.eo[clone.ep[i]];\n }\n for (int i = 0; i < cornerValues.length; i++) {\n char ori = this.co[clone.cp[i]];\n if (ori >= 3)\n clone.co[i] = ori;\n else {\n clone.co[i] = (char) -ori;\n if (clone.co[i] < 0)\n clone.co[i] += 3;\n }\n }\n return clone;\n }", "public E3DVector2F getTextureCoordDetail1C(){\r\n\t\treturn vertices[2].getTextureCoordDetail1();\r\n\t}", "public GridCoord getCoord() {\n return coord;\n }", "protodef.b_math.coord getCoordInfo();", "public Coordinate() { row = col = -1; }", "private static char horizontalCoordinateForUser(int horizontalCoordinateForDeveloper){\n //column (1,2,3 instead of 0,1,2)\n return (char)((int) '1' + horizontalCoordinateForDeveloper);\n }", "public abstract int[] getCoords();", "@Override\n\tpublic Cube getCube(int cubeX, int cubeY, int cubeZ) {\n\t\tlong columnAddress = AddressTools.getAddress(cubeX, cubeZ);\n\t\tColumn column = this.loadedColumns.get(columnAddress);\n\t\tif (column == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn column.getCube(cubeY);\n\t}", "private int xyTo1D(int row, int col)\n {\n validate(row, col);\n return (row-1) * gridSize + col-1;\n }", "public Spatial boardCentre() {\r\n return tiles[2][2].tile;\r\n }", "private int getColPixelCoords(int col, int row) {\r\n\t\t\tint pixelCol;\r\n\t\t\t//If it's an odd numbered row it needs to be shifted along\r\n\t\t\tif (row % 2 == 0) {\r\n\t\t\t\tpixelCol = (col * HEX_WIDTH);// - hexWidth / 2;\r\n\t\t\t} else {\r\n\t\t\t\tpixelCol = ((col * HEX_WIDTH) - HEX_WIDTH / 2) + HEX_WIDTH;\r\n\t\t\t}\r\n\t\t\treturn pixelCol;\r\n\t\t}", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "public SoCubeWithoutTop()\n//\n////////////////////////////////////////////////////////////////////////\n{\n nodeHeader.SO_NODE_CONSTRUCTOR();\n\n nodeHeader.SO_NODE_ADD_SFIELD(width,\"width\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(height,\"height\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(depth,\"depth\", (2.0f));\n\n isBuiltIn = true;\n\n if (nodeHeader.SO_NODE_IS_FIRST_INSTANCE()) {\n // Initialize corner coordinate values\n coords[0].setValue(-1.0f, 1.0f, -1.0f); // Left Top Back\n coords[1].setValue( 1.0f, 1.0f, -1.0f); // Right Top Back\n coords[2].setValue(-1.0f, -1.0f, -1.0f); // Left Bottom Back\n coords[3].setValue( 1.0f, -1.0f, -1.0f); // Right Bottom Back\n coords[4].setValue(-1.0f, 1.0f, 1.0f); // Left Top Front\n coords[5].setValue( 1.0f, 1.0f, 1.0f); // Right Top Front\n coords[6].setValue(-1.0f, -1.0f, 1.0f); // Left Bottom Front\n coords[7].setValue( 1.0f, -1.0f, 1.0f); // Right Bottom Front\n\n // Initialize face vertices to point into coords. The order of\n // vertices around the faces is chosen so that the texture\n // coordinates match up: texture coord (0,0) is at the first\n // vertex and (1,1) is at the third. The vertices obey the\n // right-hand rule for each face.\n verts[1][2] = verts[2][3] = verts[4][3] = coords[0];\n verts[1][3] = verts[3][2] = verts[4][2] = coords[1];\n verts[1][1] = verts[2][0] = verts[5][0] = coords[2];\n verts[1][0] = verts[3][1] = verts[5][1] = coords[3];\n verts[0][3] = verts[2][2] = verts[4][0] = coords[4];\n verts[0][2] = verts[3][3] = verts[4][1] = coords[5];\n verts[0][0] = verts[2][1] = verts[5][3] = coords[6];\n verts[0][1] = verts[3][0] = verts[5][2] = coords[7];\n\n // Initialize texture coordinates. These are for the 4 corners of\n // each face, starting at the lower left corner\n texCoords[0].setValue(0.0f, 0.0f);\n texCoords[1].setValue(1.0f, 0.0f);\n texCoords[2].setValue(1.0f, 1.0f);\n texCoords[3].setValue(0.0f, 1.0f);\n\n // Initialize face normals\n normals[0].setValue( 0.0f, 0.0f, 1.0f); // Front\n normals[1].setValue( 0.0f, 0.0f, -1.0f); // Back\n normals[2].setValue(-1.0f, 0.0f, 0.0f); // Left\n normals[3].setValue( 1.0f, 0.0f, 0.0f); // Right\n normals[4].setValue( 0.0f, 1.0f, 0.0f); // Top\n normals[5].setValue( 0.0f, -1.0f, 0.0f); // Bottom\n\n }\n}", "int getLatE6();", "int getLatE6();", "public HorizontalCoords() {\n }", "public Point get3DCoordinate(int row, int col, int width, int height) {\n\t\tdouble x, y;\r\n\t\tx = scene_width * (col / ((double) (width - 1))) - scene_width / 2.0;\r\n\t\ty = scene_height / 2.0 - scene_height * row\t/ ((double) (height - 1));\r\n\t\treturn new Point(x, y, 0);\r\n\t}", "private void aretes_aO(){\n\t\tthis.cube[40] = this.cube[7]; \n\t\tthis.cube[7] = this.cube[25];\n\t\tthis.cube[25] = this.cube[46];\n\t\tthis.cube[46] = this.cube[34];\n\t\tthis.cube[34] = this.cube[40];\n\t}", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public static int transformCoordenate(int floor, byte axis) {\n switch (floor) {\n case 0:\n switch (axis) {\n case X_COORD:\n return 0;\n case Y_COORD:\n return -103;\n }\n break;\n case 1:\n return 0;\n case 2:\n switch (axis) {\n case X_COORD:\n return -321;\n case Y_COORD:\n return -23;\n }\n break;\n case 3:\n switch (axis) {\n case X_COORD:\n return -137;\n case Y_COORD:\n return -241;\n }\n break;\n case 4:\n switch (axis) {\n case X_COORD:\n return 0;\n case Y_COORD:\n return -13;\n }\n break;\n case 5:\n switch (axis) {\n case X_COORD:\n return 0;\n case Y_COORD:\n return -90;\n }\n break;\n case 6:\n switch (axis) {\n case X_COORD:\n return -116;\n case Y_COORD:\n return -223;\n }\n break;\n }\n return 0;\n }", "public char getGrid(int x ,int y){\n\t\treturn Grid[x][y] ;\n\t}", "private void aretes_aR(){\n\t\tthis.cube[13] = this.cube[52]; \n\t\tthis.cube[52] = this.cube[19];\n\t\tthis.cube[19] = this.cube[1];\n\t\tthis.cube[1] = this.cube[28];\n\t\tthis.cube[28] = this.cube[13];\n\t}", "public final AstValidator.cube_by_expr_return cube_by_expr() throws RecognitionException {\n AstValidator.cube_by_expr_return retval = new AstValidator.cube_by_expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree STAR146=null;\n AstValidator.col_range_return col_range144 =null;\n\n AstValidator.expr_return expr145 =null;\n\n\n CommonTree STAR146_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:2: ( col_range | expr | STAR )\n int alt39=3;\n switch ( input.LA(1) ) {\n case COL_RANGE:\n {\n alt39=1;\n }\n break;\n case BIGDECIMALNUMBER:\n case BIGINTEGERNUMBER:\n case CUBE:\n case DIV:\n case DOLLARVAR:\n case DOUBLENUMBER:\n case FALSE:\n case FLOATNUMBER:\n case GROUP:\n case IDENTIFIER:\n case INTEGER:\n case LONGINTEGER:\n case MINUS:\n case NULL:\n case PERCENT:\n case PLUS:\n case QUOTEDSTRING:\n case TRUE:\n case BAG_VAL:\n case BIN_EXPR:\n case CASE_COND:\n case CASE_EXPR:\n case CAST_EXPR:\n case EXPR_IN_PAREN:\n case FUNC_EVAL:\n case INVOKER_FUNC_EVAL:\n case MAP_VAL:\n case NEG:\n case TUPLE_VAL:\n {\n alt39=2;\n }\n break;\n case STAR:\n {\n int LA39_3 = input.LA(2);\n\n if ( (LA39_3==DOWN) ) {\n alt39=2;\n }\n else if ( (LA39_3==EOF||LA39_3==UP||LA39_3==BIGDECIMALNUMBER||LA39_3==BIGINTEGERNUMBER||LA39_3==CHUNKSIZE||LA39_3==CUBE||LA39_3==DIV||LA39_3==DOLLARVAR||LA39_3==DOUBLENUMBER||LA39_3==FALSE||LA39_3==FLOATNUMBER||LA39_3==GROUP||LA39_3==IDENTIFIER||LA39_3==INTEGER||LA39_3==LONGINTEGER||LA39_3==MINUS||LA39_3==NULL||LA39_3==PERCENT||(LA39_3 >= PIVOT && LA39_3 <= PLUS)||LA39_3==QUOTEDSTRING||LA39_3==STAR||LA39_3==TRUE||(LA39_3 >= BAG_VAL && LA39_3 <= BIN_EXPR)||(LA39_3 >= CASE_COND && LA39_3 <= CASE_EXPR)||(LA39_3 >= CAST_EXPR && LA39_3 <= EXPR_IN_PAREN)||LA39_3==FUNC_EVAL||LA39_3==INVOKER_FUNC_EVAL||(LA39_3 >= MAP_VAL && LA39_3 <= NEG)||LA39_3==TUPLE_VAL) ) {\n alt39=3;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 3, input);\n\n throw nvae;\n\n }\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt39) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:4: col_range\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_col_range_in_cube_by_expr1483);\n col_range144=col_range();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, col_range144.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:16: expr\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_cube_by_expr1487);\n expr145=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, expr145.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 3 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:340:23: STAR\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n STAR146=(CommonTree)match(input,STAR,FOLLOW_STAR_in_cube_by_expr1491); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR146_tree = (CommonTree)adaptor.dupNode(STAR146);\n\n\n adaptor.addChild(root_0, STAR146_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "@LargeTest\n public void testColorCube() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE);\n runTest(ta, TestName.COLOR_CUBE.name());\n }", "@Override\n public float getCube() {\n\n int wart = 0;\n if (!roomList.isEmpty()){\n for (Room room : roomList){\n if (room instanceof Localization){\n wart += room.getCube();\n }\n }\n }\n return wart;\n }", "int getHeatCode(int x, int y);", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "public void computeTextureUVCoordinates()\n\t{\n\t\tthis.faceTextureUCoordinates = new float[faceCount][];\n\t\tthis.faceTextureVCoordinates = new float[faceCount][];\n\n\t\tfor (int i = 0; i < faceCount; i++)\n\t\t{\n\t\t\tint textureCoordinate;\n\t\t\tif (textureCoordinates == null)\n\t\t\t{\n\t\t\t\ttextureCoordinate = -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttextureCoordinate = textureCoordinates[i];\n\t\t\t}\n\n\t\t\tint textureIdx;\n\t\t\tif (faceTextures == null)\n\t\t\t{\n\t\t\t\ttextureIdx = -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttextureIdx = faceTextures[i] & 0xFFFF;\n\t\t\t}\n\n\t\t\tif (textureIdx != -1)\n\t\t\t{\n\t\t\t\tfloat[] u = new float[3];\n\t\t\t\tfloat[] v = new float[3];\n\n\t\t\t\tif (textureCoordinate == -1)\n\t\t\t\t{\n\t\t\t\t\tu[0] = 0.0F;\n\t\t\t\t\tv[0] = 1.0F;\n\n\t\t\t\t\tu[1] = 1.0F;\n\t\t\t\t\tv[1] = 1.0F;\n\n\t\t\t\t\tu[2] = 0.0F;\n\t\t\t\t\tv[2] = 0.0F;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextureCoordinate &= 0xFF;\n\n\t\t\t\t\tbyte textureRenderType = 0;\n\t\t\t\t\tif (textureRenderTypes != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttextureRenderType = textureRenderTypes[textureCoordinate];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (textureRenderType == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint faceVertexIdx1 = faceVertexIndices1[i];\n\t\t\t\t\t\tint faceVertexIdx2 = faceVertexIndices2[i];\n\t\t\t\t\t\tint faceVertexIdx3 = faceVertexIndices3[i];\n\n\t\t\t\t\t\tshort triangleVertexIdx1 = textureTriangleVertexIndices1[textureCoordinate];\n\t\t\t\t\t\tshort triangleVertexIdx2 = textureTriangleVertexIndices2[textureCoordinate];\n\t\t\t\t\t\tshort triangleVertexIdx3 = textureTriangleVertexIndices3[textureCoordinate];\n\n\t\t\t\t\t\tfloat triangleX = (float) vertexPositionsX[triangleVertexIdx1];\n\t\t\t\t\t\tfloat triangleY = (float) vertexPositionsY[triangleVertexIdx1];\n\t\t\t\t\t\tfloat triangleZ = (float) vertexPositionsZ[triangleVertexIdx1];\n\n\t\t\t\t\t\tfloat f_882_ = (float) vertexPositionsX[triangleVertexIdx2] - triangleX;\n\t\t\t\t\t\tfloat f_883_ = (float) vertexPositionsY[triangleVertexIdx2] - triangleY;\n\t\t\t\t\t\tfloat f_884_ = (float) vertexPositionsZ[triangleVertexIdx2] - triangleZ;\n\t\t\t\t\t\tfloat f_885_ = (float) vertexPositionsX[triangleVertexIdx3] - triangleX;\n\t\t\t\t\t\tfloat f_886_ = (float) vertexPositionsY[triangleVertexIdx3] - triangleY;\n\t\t\t\t\t\tfloat f_887_ = (float) vertexPositionsZ[triangleVertexIdx3] - triangleZ;\n\t\t\t\t\t\tfloat f_888_ = (float) vertexPositionsX[faceVertexIdx1] - triangleX;\n\t\t\t\t\t\tfloat f_889_ = (float) vertexPositionsY[faceVertexIdx1] - triangleY;\n\t\t\t\t\t\tfloat f_890_ = (float) vertexPositionsZ[faceVertexIdx1] - triangleZ;\n\t\t\t\t\t\tfloat f_891_ = (float) vertexPositionsX[faceVertexIdx2] - triangleX;\n\t\t\t\t\t\tfloat f_892_ = (float) vertexPositionsY[faceVertexIdx2] - triangleY;\n\t\t\t\t\t\tfloat f_893_ = (float) vertexPositionsZ[faceVertexIdx2] - triangleZ;\n\t\t\t\t\t\tfloat f_894_ = (float) vertexPositionsX[faceVertexIdx3] - triangleX;\n\t\t\t\t\t\tfloat f_895_ = (float) vertexPositionsY[faceVertexIdx3] - triangleY;\n\t\t\t\t\t\tfloat f_896_ = (float) vertexPositionsZ[faceVertexIdx3] - triangleZ;\n\n\t\t\t\t\t\tfloat f_897_ = f_883_ * f_887_ - f_884_ * f_886_;\n\t\t\t\t\t\tfloat f_898_ = f_884_ * f_885_ - f_882_ * f_887_;\n\t\t\t\t\t\tfloat f_899_ = f_882_ * f_886_ - f_883_ * f_885_;\n\t\t\t\t\t\tfloat f_900_ = f_886_ * f_899_ - f_887_ * f_898_;\n\t\t\t\t\t\tfloat f_901_ = f_887_ * f_897_ - f_885_ * f_899_;\n\t\t\t\t\t\tfloat f_902_ = f_885_ * f_898_ - f_886_ * f_897_;\n\t\t\t\t\t\tfloat f_903_ = 1.0F / (f_900_ * f_882_ + f_901_ * f_883_ + f_902_ * f_884_);\n\n\t\t\t\t\t\tu[0] = (f_900_ * f_888_ + f_901_ * f_889_ + f_902_ * f_890_) * f_903_;\n\t\t\t\t\t\tu[1] = (f_900_ * f_891_ + f_901_ * f_892_ + f_902_ * f_893_) * f_903_;\n\t\t\t\t\t\tu[2] = (f_900_ * f_894_ + f_901_ * f_895_ + f_902_ * f_896_) * f_903_;\n\n\t\t\t\t\t\tf_900_ = f_883_ * f_899_ - f_884_ * f_898_;\n\t\t\t\t\t\tf_901_ = f_884_ * f_897_ - f_882_ * f_899_;\n\t\t\t\t\t\tf_902_ = f_882_ * f_898_ - f_883_ * f_897_;\n\t\t\t\t\t\tf_903_ = 1.0F / (f_900_ * f_885_ + f_901_ * f_886_ + f_902_ * f_887_);\n\n\t\t\t\t\t\tv[0] = (f_900_ * f_888_ + f_901_ * f_889_ + f_902_ * f_890_) * f_903_;\n\t\t\t\t\t\tv[1] = (f_900_ * f_891_ + f_901_ * f_892_ + f_902_ * f_893_) * f_903_;\n\t\t\t\t\t\tv[2] = (f_900_ * f_894_ + f_901_ * f_895_ + f_902_ * f_896_) * f_903_;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.faceTextureUCoordinates[i] = u;\n\t\t\t\tthis.faceTextureVCoordinates[i] = v;\n\t\t\t}\n\t\t}\n\t}", "public int loadCubeMap(int res[]) {\n int[] cubeMap = new int[1];\n\n GLES30.glGenTextures(1, cubeMap, 0);\n GLES30.glBindTexture(GLES30.GL_TEXTURE_CUBE_MAP, cubeMap[0]);\n\n if (cubeMap[0] != 0) {\n // decode the image file; openGL can't just take an image file\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inScaled = false; // No pre-scaling\n\n for (int i = 0; i < 6; i++) {\n // Read in the resource\n final Bitmap bitmap = BitmapFactory.decodeResource(surfaceView.getResources(), res[i], options);\n GLUtils.texImage2D(GLES30.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, bitmap, 0);\n }\n\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_CUBE_MAP, GLES30.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_CUBE_MAP, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_LINEAR);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_CUBE_MAP, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_CUBE_MAP, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);\n GLES30.glTexParameteri(GLES30.GL_TEXTURE_CUBE_MAP, GLES30.GL_TEXTURE_WRAP_R, GLES30.GL_CLAMP_TO_EDGE);\n }\n\n if (cubeMap[0] == 0) {\n throw new RuntimeException(\"Error loading texture\");\n }\n\n return cubeMap[0];\n }", "public static float[] createQuadTextureCoords() {\n float[] tex = new float[]{0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f};\n return tex;\n }", "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "Color3b colorAt(int xIndex, int yIndex);", "private void aretes_aB(){\n\t\tthis.cube[22] = this.cube[12]; \n\t\tthis.cube[12] = this.cube[48];\n\t\tthis.cube[48] = this.cube[39];\n\t\tthis.cube[39] = this.cube[3];\n\t\tthis.cube[3] = this.cube[22];\n\t}", "public RubiksCube(String[] c){\n\t\tif(c.length == 54){\n\t\t\tString[] tab = new String[c.length];\n\t\t\tfor(int i=0; i<c.length;i++){\n\t\t\t\ttab[i] = c[i];\n\t\t\t}\n\t\t\tthis.cube = tab;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Wrong input table size : \" + c.length);\n\t\t}\n\t}", "public GridCoord getCoord() {\n\t\treturn this.coord;\n\t}", "public static int getGridPosition(int x, int y, int width){\n\t\treturn (y*width)+x;\n\t}", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "void showFaithCube(FamilyColor familyColor, int cardOrdinal);", "public List<Square> getSquareGrid();", "public Vertix(int name, int x, int y) {\n this.name = name;\n this.x = x;\n this.y = y;\n }", "private static void blockCoordsToChunkCoords(Vector3i pos) {\n pos.x >>= 4;\n pos.y >>= 4;\n pos.z >>= 4;\n }", "public E3DVector2F getTextureCoordA(){\r\n return vertices[0].getTextureCoord();\r\n }", "public int x (int index) { return coords[index][0]; }", "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "public HexGrid(int minQ, int maxQ, int minR, int maxR) {\r\n\t\tthis.width = maxQ - minQ + 1;\r\n\t\tthis.height = maxR - minR + 1;\r\n\t\tthis.radius = (maxQ + maxR)/2; //future????\r\n\t\tthis.grid = new HexModel[width][height];\r\n\t\tsetAllFaceDown();\r\n\t}", "public Cube(Square square)\n {\n this.edge = square.getSide();\n this.volume = Math.pow(this.edge,3);\n }", "public void mygluLookAt(\n double eX, double eY, double eZ,\n double cX, double cY, double cZ,\n double upX, double upY, double upZ) {\n\n double[] F = new double[3];\n double[] UP = new double[3];\n double[] s = new double[3];\n double[] u = new double[3];\n\n F[0] = cX-eX;\n F[1] = cY-eY;\n F[2] = cZ-eZ;\n UP[0] = upX;\n UP[1] = upY;\n UP[2] = upZ;\n normalize(F);\n normalize(UP);\n crossProd(F, UP, s);\n crossProd(s, F, u);\n\n double[] M = new double[16];\n\n // Switching to row-major order\n M[0] = s[0];\n M[4] = u[0];\n M[8] = -F[0];\n M[12] = 0;\n M[1] = s[1];\n M[5] = u[1];\n M[9] = -F[1];\n M[13] = 0;\n M[2] = s[2];\n M[6] = u[2];\n M[10] = -F[2];\n M[14] = 0;\n M[3] = 0;\n M[7] = 0;\n M[11] = 0;\n M[15] = 1;\n\n projection.multiply(M);\n projection.translate((float)-eX, (float)-eY, (float)-eZ);\n }", "public float centimetresToGridUnits(float cm);", "private void coins_fY(){\n\t\tthis.cube[49] = this.cube[45]; \n\t\tthis.cube[45] = this.cube[51];\n\t\tthis.cube[51] = this.cube[53];\n\t\tthis.cube[53] = this.cube[47];\n\t\tthis.cube[47] = this.cube[49];\n\t}", "private void arretes_fG(){\n\t\tthis.cube[31] = this.cube[28]; \n\t\tthis.cube[28] = this.cube[30];\n\t\tthis.cube[30] = this.cube[34];\n\t\tthis.cube[34] = this.cube[32];\n\t\tthis.cube[32] = this.cube[31];\n\t}", "@LargeTest\n public void testColorCube3DIntrinsic() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE_3D_INTRINSIC);\n runTest(ta, TestName.COLOR_CUBE_3D_INTRINSIC.name());\n }", "public int I(double x, double y, double z){\n //gets typeGrid index from location\n return (int)Math.floor(x)*yDim*zDim+(int)Math.floor(y)*zDim+(int)Math.floor(z);\n }", "static Texture loadCubeMap(String name) {\n\n GL4 gl = (GL4) GLContext.getCurrentGL(); // this gl context not appropriate?\n GLProfile glp = gl.getGLProfile();\n Texture cubeMap = TextureIO.newTexture(GL4.GL_TEXTURE_CUBE_MAP);\n\n // System.out.println(\"estimated memory \" + cubeMap.getEstimatedMemorySize());\n\n try {\n TextureData top = TextureIO.newTextureData(glp, new File(name + \"/top.png\"), false, \"png\");\n TextureData bot = TextureIO.newTextureData(glp, new File(name + \"/bot.png\"), false, \"png\");\n TextureData left = TextureIO.newTextureData(glp, new File(name + \"/left.png\"), false, \"png\");\n TextureData right = TextureIO.newTextureData(glp, new File(name + \"/right.png\"), false, \"png\");\n TextureData front = TextureIO.newTextureData(glp, new File(name + \"/front.png\"), false, \"png\");\n TextureData back = TextureIO.newTextureData(glp, new File(name + \"/back.png\"), false, \"png\");\n\n // System.out.println(\"front is null \" + (top == null));\n\n cubeMap.updateImage(gl, right, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_X);\n cubeMap.updateImage(gl, left, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_X);\n cubeMap.updateImage(gl, top, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_Z);\n cubeMap.updateImage(gl, bot, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z);\n cubeMap.updateImage(gl, front, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_Y);\n cubeMap.updateImage(gl, back, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y);\n\n } catch (Exception e) {\n System.out.println(\"failed load \" + name + \" cubemap\");\n }\n\n // System.out.println(\"estimated memory \" + cubeMap.getEstimatedMemorySize());\n\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_S, GL4.GL_CLAMP_TO_EDGE);\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_T, GL4.GL_CLAMP_TO_EDGE);\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_R, GL4.GL_CLAMP_TO_EDGE);\n\n return cubeMap;\n }", "boolean ensureCCW( SquareGrid grid ) {\n\t\tif( grid.columns <= 2 && grid.rows <= 2 )\n\t\t\treturn true;\n\n\t\tPoint2D_F64 a,b,c;\n\n\t\ta = grid.get(0,0).center;\n\t\tif( grid.columns > 2)\n\t\t\tb = grid.get(0,2).center;\n\t\telse\n\t\t\tb = grid.get(1,1).center;\n\n\t\tif( grid.rows > 2)\n\t\t\tc = grid.get(2,0).center;\n\t\telse\n\t\t\tc = grid.get(1,1).center;\n\n\t\tdouble x0 = b.x-a.x;\n\t\tdouble y0 = b.y-a.y;\n\n\t\tdouble x1 = c.x-a.x;\n\t\tdouble y1 = c.y-a.y;\n\n\t\tdouble z = x0 * y1 - y0 * x1;\n\t\tif( z < 0 ) {\n\t\t\t// flip it along an axis which is symmetric\n\t\t\tif( grid.columns%2 == 1 )\n\t\t\t\ttools.flipColumns(grid);\n\t\t\telse if( grid.rows%2 == 1 )\n\t\t\t\ttools.flipRows(grid);\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n \tpublic void draw() {\n \n \t\tGL11.glPushMatrix();\n \t\t\n \t\tGL11.glTranslatef(super.getX(), super.getY(), 0);\n \t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\tMain.BLANK_TEXTURE.bind();\n \t\tGL11.glBegin(GL11.GL_QUADS);\n \t\t{\n \t\t\t\n \t\t\tGL11.glColor3f(1.0f, 0.0f, 0.0f);\n \t\t\tGL11.glVertex2f(0, 0); // top left\n \t\t\tGL11.glVertex2f(0, Main.gridSize); // bottom left\n \t\t\tGL11.glVertex2f(Main.gridSize, Main.gridSize); // bottom right\n \t\t\tGL11.glVertex2f(Main.gridSize, 0); // top right\n \t\t\t\n \t\t\t\n \t\t\tif (isRight()) {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 3);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 3);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(0, 0);\n \t\t\t\tGL11.glVertex2f(0, 12);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(0, 3);\n \t\t\t\tGL11.glVertex2f(0, 9);\n \t\t\t\tGL11.glVertex2f(4, 9);\n \t\t\t\tGL11.glVertex2f(4, 3);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tGL11.glEnd();\n \n \t\tGL11.glPopMatrix();\n \t\t\n \t}", "public CubeEarth() {\n this(1, null);\n }", "public void loadCubeAndNeighbors(int cubeX, int cubeY, int cubeZ) {\n\t\tloadCube(cubeX, cubeY, cubeZ);\n\t\t\n\t\t// load the neighbors\n\t\tloadCube(cubeX - 1, cubeY - 1, cubeZ - 1);\n\t\tloadCube(cubeX - 1, cubeY - 1, cubeZ + 0);\n\t\tloadCube(cubeX - 1, cubeY - 1, cubeZ + 1);\n\t\tloadCube(cubeX + 0, cubeY - 1, cubeZ - 1);\n\t\tloadCube(cubeX + 0, cubeY - 1, cubeZ + 0);\n\t\tloadCube(cubeX + 0, cubeY - 1, cubeZ + 1);\n\t\tloadCube(cubeX + 1, cubeY - 1, cubeZ - 1);\n\t\tloadCube(cubeX + 1, cubeY - 1, cubeZ + 0);\n\t\tloadCube(cubeX + 1, cubeY - 1, cubeZ + 1);\n\t\t\n\t\tloadCube(cubeX - 1, cubeY + 0, cubeZ - 1);\n\t\tloadCube(cubeX - 1, cubeY + 0, cubeZ + 0);\n\t\tloadCube(cubeX - 1, cubeY + 0, cubeZ + 1);\n\t\tloadCube(cubeX + 0, cubeY + 0, cubeZ - 1);\n\t\tloadCube(cubeX + 0, cubeY + 0, cubeZ + 1);\n\t\tloadCube(cubeX + 1, cubeY + 0, cubeZ - 1);\n\t\tloadCube(cubeX + 1, cubeY + 0, cubeZ + 0);\n\t\tloadCube(cubeX + 1, cubeY + 0, cubeZ + 1);\n\t\t\n\t\tloadCube(cubeX - 1, cubeY + 1, cubeZ - 1);\n\t\tloadCube(cubeX - 1, cubeY + 1, cubeZ + 0);\n\t\tloadCube(cubeX - 1, cubeY + 1, cubeZ + 1);\n\t\tloadCube(cubeX + 0, cubeY + 1, cubeZ - 1);\n\t\tloadCube(cubeX + 0, cubeY + 1, cubeZ + 0);\n\t\tloadCube(cubeX + 0, cubeY + 1, cubeZ + 1);\n\t\tloadCube(cubeX + 1, cubeY + 1, cubeZ - 1);\n\t\tloadCube(cubeX + 1, cubeY + 1, cubeZ + 0);\n\t\tloadCube(cubeX + 1, cubeY + 1, cubeZ + 1);\n\t}", "public CubeState(){\n ep = new PermutationGroup(12);\n cp = new PermutationGroup(8);\n eo = new EdgeOrientation();\n co = new CubieOrientation();\n }", "public final AstValidator.cube_clause_return cube_clause() throws RecognitionException {\n AstValidator.cube_clause_return retval = new AstValidator.cube_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree CUBE119=null;\n AstValidator.cube_item_return cube_item120 =null;\n\n\n CommonTree CUBE119_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:296:2: ( ^( CUBE cube_item ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:296:4: ^( CUBE cube_item )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n CUBE119=(CommonTree)match(input,CUBE,FOLLOW_CUBE_in_cube_clause1282); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CUBE119_tree = (CommonTree)adaptor.dupNode(CUBE119);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(CUBE119_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cube_item_in_cube_clause1284);\n cube_item120=cube_item();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cube_item120.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public void printCube(String title) {\n System.out.print(\"\\n\");\n System.out.println(\"[ \" + title + \" ]\");\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,1)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,2)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,3)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,1)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,2)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,3)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,1)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,2)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,3)));\n }", "public boolean isOpaqueCube(IBlockState state) {\n/* 75 */ return false;\n/* */ }", "public int[] convertRowcolsToPixelsCentered(int row, int col) {\n\t\tint[] px_position = convertRowcolsToPixels(row, col);\n\t\tpx_position[0] = px_position[0] + (config.getLevelBoxSize() / 2) ;\n\t\tpx_position[1] = px_position[1] + (config.getLevelBoxSize() / 2) ;\n\t\treturn px_position;\n\t}" ]
[ "0.6390304", "0.6087967", "0.59153724", "0.5846743", "0.5836352", "0.5822909", "0.57580674", "0.57541955", "0.5738112", "0.5730674", "0.57251215", "0.57248527", "0.57041574", "0.56967956", "0.5605517", "0.56044364", "0.55956817", "0.55910397", "0.5559604", "0.5545584", "0.5540573", "0.55177385", "0.5514527", "0.5507208", "0.5492501", "0.5479657", "0.54685044", "0.54657435", "0.54539895", "0.545237", "0.5447678", "0.5444185", "0.5437108", "0.5432118", "0.54181594", "0.5409845", "0.5392737", "0.5381475", "0.5381232", "0.5378227", "0.5359492", "0.5357281", "0.5350253", "0.53492236", "0.53284234", "0.5325527", "0.53158396", "0.53140193", "0.53083843", "0.5306436", "0.5305462", "0.5303582", "0.5303582", "0.5292804", "0.5292303", "0.52808493", "0.5280191", "0.5279454", "0.5270109", "0.5255787", "0.5244461", "0.52385783", "0.52342325", "0.5232747", "0.5224142", "0.5224124", "0.52219534", "0.5221866", "0.5215603", "0.52048516", "0.5195903", "0.51953346", "0.5192082", "0.518881", "0.5185741", "0.51544195", "0.5152625", "0.5143185", "0.51379627", "0.5134316", "0.51229185", "0.5119726", "0.51160055", "0.511475", "0.5111349", "0.5109779", "0.51018023", "0.5096625", "0.5087072", "0.5078507", "0.5071076", "0.5065961", "0.506471", "0.5064348", "0.50572735", "0.5054984", "0.50469613", "0.5045307", "0.5042195", "0.50391185" ]
0.55173874
22
Hexagonal distance (for 6 direction maps)
int distanceHexa(Coord other) { // Note: for hexa grid prefer using CubeCoord return toCubeCoord().distanceHexa(other.toCubeCoord()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double distance (double px, double py);", "public static void main(String[] args) {\n System.out.println(hammingDistance(1,4));\n }", "public int distance(Coord coord1, Coord coord2);", "private float distancePixels(int nX1, int nY1, int nX2, int nY2)\n {\n\t return FloatMath.sqrt((nX2-nX1)^2 + (nY2-nY1)^2);\n }", "public double distance(Coordinate other, Layout layout) {\n\t\tif (Layout.HEXAGONAL.equals(layout)) {//Odd numbered rows are right-shifted by .5\n\t\t\tdouble myX = y % 2 == 0 ? x : x + .5;\n\t\t\tdouble yourX = other.y % 2 == 0 ? other.x : other.x + .5;\n\t\t\t//squash tiles along y axis so neighboring tiles are always 1 unit away\n\t\t\treturn distance(myX - yourX, (y - other.y) * HEX_RATIO);\n\t\t}\n\t\treturn distance(x - other.x, y - other.y);\n\t}", "public static void main(String[] args) {\n\t\tchar[][] grid = {\r\n\t {'S', 'O', 'O', 'S', 'S'},\r\n\t {'D', 'O', 'D', 'O', 'D'},\r\n\t {'O', 'O', 'O', 'O', 'X'},\r\n\t {'X', 'D', 'D', 'O', 'O'},\r\n\t {'X', 'D', 'D', 'D', 'O'}};\r\n \tSystem.out.println(getDistance(grid));\r\n\t}", "int getMinimalPaletteDistance();", "public int manhattan() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n int value = _tiles[i][j];\n if (value != 0) {\n int yDim = (value - 1) % _N;\n int xDim = (value - 1) / _N;\n distance = distance + Math.abs(xDim - i) + Math.abs(yDim - j);\n }\n }\n }\n return distance;\n }", "@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }", "private static double dist(Data d, Centroid c)\r\n \t{\r\n \t\treturn Math.sqrt(Math.pow((c.Y() - d.Y()), 2) + Math.pow((c.X() - d.X()), 2));\r\n \t}", "double distanceSq (double px, double py);", "public static void main(String[] args) {\n\t\tint x = 1;\r\n\t\tint y = 4;\r\n\t\tSystem.out.println(hammingDistance2(x, y));\r\n\t}", "private static int distance(int x, int y, int centerX, int centerY)\n {\n // Pythagorian theorem\n return (int) Math.sqrt(Math.pow((double)(x - centerX), 2) + Math.pow((double)(y - centerY), 2));\n }", "double getDistance();", "public float getDistance();", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "@Test\n\tpublic void testDiagonalNeighbors() {\n\t\tPosition topLeft = new Position(0,0);\n\t\tPosition bottomRight = new Position(1,1);\n\n\t\tint distance = euclideanSquaredMetric.calculateCost(topLeft, bottomRight);\n\t\tassertEquals(2 * lateralDistanceWeight, distance);\n\n\t\tPosition topRight = new Position(0,1);\n\t\tPosition bottomLeft = new Position(1,0);\n\n\t\tdistance = euclideanSquaredMetric.calculateCost(topRight, bottomLeft);\n\t\tassertEquals(2*lateralDistanceWeight, distance);\n\n\t}", "double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}", "public int manhattan() {\n int dist = 0;\n for(int x = 0; x < n; x++) {\n for(int y = 0; y < n; y++) {\n if(tiles[x][y] != goal[x][y] && tiles[x][y] != 0) {\n int target = tiles[x][y] -1;\n int dest_row = target/n;\n int dest_col = target%n;\n dist += Math.abs((x-dest_col)) + Math.abs(y-dest_row);\n }\n }\n }\n return dist;\n }", "public int getHexesMoved() {\n if (getLastStep() == null) {\n return 0;\n }\n return getLastStep().getDistance();\n }", "private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}", "public int CalcDistance ( )\r\n\t{\r\n\t\tfor ( int i = 0; i<size; i++ )\r\n\t\t{\r\n\t\t\tfor ( int offR = 0; offR <= size/2; offR++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor ( int offR = size-1; offR >= size/2; offR-- )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\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\treturn maze [currentRow] [currentCol].getDistanceToExit();\r\n\t}", "private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}", "public double distance(double x, double y);", "private int getDist(int x, int y, int direction) {\n\t\tint Spaces = 0;\n\t\tif(direction == 0)\n\t\t{\n\t\t\t\n\t\t\tPoint nextPoint = new Point(x, y++);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x, y++);\n\t\t\t}\n\t\t}\n\t\tif(direction == 1)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x++, y);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x++, y);\n\t\t\t}\n\t\t}\n\t\tif(direction == 2)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x--, y);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x--, y);\n\t\t\t}\n\t\t}\n\t\tif(direction == 3)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x, y--);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x, y--);\n\t\t\t}\n\t\t}\n\t\treturn Spaces;\n\t}", "double getSquareDistance();", "public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}", "private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }", "public int hammingDistance(int x, int y) {\r\n\t int xor = x ^ y, count = 0;\r\n\t /*\r\n\t * xor = x ^ y 3 ^ 1\r\n\t * x | y | o | i\r\n\t * ---------------\r\n\t * 0 0 0 0\r\n\t * 0 0 0 1\r\n\t * 1 0 1 2\r\n\t * 1 0 1 3\r\n\t */\r\n\t for (int i=0;i<32;i++)\r\n\t /* xor / i & 1 will return the matching bits */\r\n\t count += (xor >> i) & 1;\r\n\t \r\n\t return count;\r\n\t}", "private float distanceTo(BasicEvent event) {\n final float dx = event.x - location.x;\n final float dy = event.y - location.y;\n// return Math.abs(dx)+Math.abs(dy);\n return distanceMetric(dx, dy);\n// dx*=dx;\n// dy*=dy;\n// float distance=(float)Math.sqrt(dx+dy);\n// return distance;\n }", "private int manhattanDistance(int i, int j) {\n int index = tiles[i][j] - 1;\n int row = Math.abs(index / dimension - i);\n int col = Math.abs(index % dimension - j);\n return row + col;\n }", "private static int diagonalDistance(int NODE1, int NODE2) {\n int dx = Math.abs((NODE1 >> 16) - (NODE2 >> 16));\n int dy = Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));\n if (dx > dy)\n return 2 * (dx - dy) + 2 * dy;\n else\n return 2 * (dy - dx) + 2 * dx;\n }", "double getDistance(int i, int j){\r\n\tdouble d = (coord[i][0]-coord[j][0])*(coord[i][0]-coord[j][0])+ (coord[i][1]-coord[j][1])*(coord[i][1]-coord[j][1]);\r\n\td = Math.sqrt(d);\r\n\treturn d;\r\n}", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "public int hammingDistance(int x, int y) {\n int count =0;\n while (x != 0 || y != 0) {\n count += (x & 1) ^ (y & 1);\n x = x >>> 1;\n y = y >>> 1;\n }\n return count;\n\t}", "private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}", "public abstract double distanceFrom(double x, double y);", "double getDistanceInMiles();", "public double calcDist(int [] colorList){\r\n\t\t\r\n\t\tdouble red = colorList[0] - 186;\r\n\t\tdouble green = colorList[1] - 149;\r\n\t\tdouble blue = colorList[2] - 107;\r\n\t\tdouble dist = Math.sqrt(red * red + green * green +\r\n\t\t\t\tblue * blue);\r\n\t\t\r\n\t\tdouble red1 = colorList[0] - 91.0;\r\n\t\tdouble green1 = colorList[1] - 70.0;\r\n\t\tdouble blue1 = colorList[2] - 45.0;\r\n\t\tdouble dist1 = Math.sqrt(red1 * red1 + green1 * green1 +\r\n\t\t\t\tblue1 * blue1);\r\n\t\treturn Math.min(dist, dist1) ;\r\n\t}", "public double getDistanceTo(CoordPair dest)\r\n\t{\n\t\tif(isAdjacent(dest))\r\n\t\t\treturn 1;\r\n\t\tint rowDiff = this.row - dest.getRow();\r\n\t\tint colDiff = this.col - dest.getCol();\r\n\t\tint sumSquares = (int) (Math.pow(rowDiff,2) + Math.pow(colDiff, 2));\r\n\t\tdouble distance = Math.sqrt(sumSquares);\r\n\t\t\r\n\t\treturn distance;\r\n\t}", "boolean hasDistance();", "public int hamming() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (_tiles[i][j] != _goal[i][j]) {\n distance++;\n }\n }\n }\n return distance;\n }", "public int distance(PuzzleState state) {\n int numOfTiles = 9;\n int rowLength = 3;\n int finalDistance = 0;\n for(int i = 1; i < numOfTiles; i++){\n if(goalState.posOf(i) != state.posOf(i)){\n int indexOfMissplacedTile = state.posOf(i);\n int indexOfGoalplacedTile = goalState.posOf(i);\n int indexDifference = Math.abs(indexOfGoalplacedTile - indexOfMissplacedTile);\n int finalDistanceOfThisTile = 0;\n if(indexDifference >= rowLength){\n finalDistanceOfThisTile += indexDifference / 3;// number of rows moved\n finalDistanceOfThisTile += indexDifference % 3;// number of columns moved\n }\n else if(indexDifference < rowLength && (indexDifference + 1)%rowLength == 0){//special case if the tile needs to travel ex(from index 3 to 4 or vice verca);\n finalDistanceOfThisTile += 3;\n }\n else{\n finalDistanceOfThisTile += indexDifference;\n }\n finalDistance += finalDistanceOfThisTile;\n }\n }\n return finalDistance;\n }", "double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }", "@Test\n\tpublic void checkDistanceRouteAEBCD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"E\", \"B\", \"C\", \"D\"), \"22\");\n\t}", "@Test\r\n\tpublic void testDistancia0() \r\n\t{\r\n\t\tAssert.assertEquals(1.41, new Ponto(3,3).dist(new Ponto(4,2)), EPSILON);\r\n\t\tAssert.assertEquals(26.20, new Ponto(-7,-4).dist(new Ponto(17,6.5)), EPSILON);\t\r\n\t\tAssert.assertEquals(0.00, new Ponto(0,0).dist(new Ponto(0,0)), EPSILON);\t\r\n\t}", "private float getDistance(SXRNode object)\n {\n float x = object.getTransform().getPositionX();\n float y = object.getTransform().getPositionY();\n float z = object.getTransform().getPositionZ();\n return (float) Math.sqrt(x * x + y * y + z * z);\n }", "public static int hammingDistance(int x, int y) {\n String xor = Integer.toBinaryString(x^y);\n System.out.println(\"XOR: \" + xor);\n\n // Count # of 1's in the xor\n int count = 0;\n for (int i=0; i < xor.length(); i++)\n if (xor.charAt(i) == '1')\n count++;\n\n return count;\n }", "double distance() {\r\n\t double dist_total = 0;\r\n\t for (int i = 0; i < index.length - 1; i++) {\r\n\t dist_total += city(i).distance(city(i + 1));\r\n\t }\r\n\t \r\n\t return dist_total;\r\n\t}", "public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}", "public void buildHexes(){\n\t\t// Normal hexes\n\t\tHexLocation loc1 = new HexLocation(0, -2);\n\t\tTerrainHex hex1 = new TerrainHex(loc1, HexType.WOOD, 11);\n\t\thexes.put(loc1, hex1);\n\n\t\tHexLocation loc2 = new HexLocation(1, -2);\n\t\tTerrainHex hex2 = new TerrainHex(loc2, HexType.SHEEP, 12);\n\t\thexes.put(loc2, hex2);\n\t\t\n\t\tHexLocation loc3 = new HexLocation(2, -2);\n\t\tTerrainHex hex3 = new TerrainHex(loc3, HexType.WHEAT, 9);\n\t\thexes.put(loc3, hex3);\n\t\t\n\t\tHexLocation loc4 = new HexLocation(-1, -1);\n\t\tTerrainHex hex4 = new TerrainHex(loc4, HexType.BRICK, 4);\n\t\thexes.put(loc4, hex4);\n\t\t\n\t\tHexLocation loc5 = new HexLocation(0, -1);\n\t\tTerrainHex hex5 = new TerrainHex(loc5, HexType.ORE, 6);\n\t\thexes.put(loc5, hex5);\n\t\t\n\t\tHexLocation loc6 = new HexLocation(1, -1);\n\t\tTerrainHex hex6 = new TerrainHex(loc6, HexType.BRICK, 5);\n\t\thexes.put(loc6, hex6);\n\t\t\n\t\tHexLocation loc7 = new HexLocation(2, -1);\n\t\tTerrainHex hex7 = new TerrainHex(loc7,HexType.SHEEP, 10);\n\t\thexes.put(loc7, hex7);\n\t\t\n\t\tHexLocation loc8 = new HexLocation(-2, 0);\n\t\tTerrainHex hex8 = new TerrainHex(loc8, HexType.DESERT, 0);\n\t\thexes.put(loc8, hex8);\n\t\t\n\t\tHexLocation loc9 = new HexLocation(-1, 0);\n\t\tTerrainHex hex9 = new TerrainHex(loc9, HexType.WOOD, 3);\n\t\thexes.put(loc9, hex9);\n\t\t\n\t\tHexLocation loc10 = new HexLocation(0, 0);\n\t\tTerrainHex hex10 = new TerrainHex(loc10, HexType.WHEAT, 11);\n\t\thexes.put(loc10, hex10);\n\t\t\n\t\tHexLocation loc11 = new HexLocation(1, 0);\n\t\tTerrainHex hex11 = new TerrainHex(loc11, HexType.WOOD, 4);\n\t\thexes.put(loc11, hex11);\n\t\t\n\t\tHexLocation loc12 = new HexLocation(2, 0);\n\t\tTerrainHex hex12 = new TerrainHex(loc12, HexType.WHEAT, 8);\n\t\thexes.put(loc12, hex12);\n\t\t\n\t\tHexLocation loc13 = new HexLocation(-2, 1);\n\t\tTerrainHex hex13 = new TerrainHex(loc13, HexType.BRICK, 8);\n\t\thexes.put(loc13, hex13);\n\t\t\n\t\tHexLocation loc14 = new HexLocation(-1, 1);\n\t\tTerrainHex hex14 = new TerrainHex(loc14, HexType.SHEEP, 10);\n\t\thexes.put(loc14, hex14);\n\t\t\n\t\tHexLocation loc15 = new HexLocation(0, 1);\n\t\tTerrainHex hex15 = new TerrainHex(loc15, HexType.SHEEP, 9);\n\t\thexes.put(loc15, hex15);\n\t\t\n\t\tHexLocation loc16 = new HexLocation(1, 1);\n\t\tTerrainHex hex16 = new TerrainHex(loc16, HexType.ORE, 3);\n\t\thexes.put(loc16, hex16);\n\t\t\n\t\tHexLocation loc17 = new HexLocation(-2, 2);\n\t\tTerrainHex hex17 = new TerrainHex(loc17, HexType.ORE, 5);\n\t\thexes.put(loc17, hex17);\n\t\t\n\t\tHexLocation loc18 = new HexLocation(-1, 2);\n\t\tTerrainHex hex18 = new TerrainHex(loc18, HexType.WHEAT, 2);\n\t\thexes.put(loc18, hex18);\n\t\t\n\t\tHexLocation loc19 = new HexLocation(0, 2);\n\t\tTerrainHex hex19 = new TerrainHex(loc19, HexType.WOOD, 6);\n\t\thexes.put(loc19, hex19);\n\n\n\t\t\n\t}", "public static void main (String [] args) {\n int x = 3, y = 1;\n\n System.out.println(\"Hamming Distance: \" + hammingDistance(x, y));\n }", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "Integer distance(PathFindingNode a, PathFindingNode b);", "public static int hamDistance( final int x, final int y ) {\n int z = (x ^ y);\n int d = 0 ;\n while ( z != 0 ) {\n d++;\n z &= z - 1;\n }\n return d;\n }", "public double calculateDistance(int index1, int index2) {\n //Initialize city hashmaps\n HashMap<String, Object> portland = new HashMap<String, Object>();\n portland.put(\"cityIndex\", 1);\n portland.put(\"x\", 50);\n portland.put(\"y\", 50);\n HashMap<String, Object> sedona = new HashMap<String, Object>();\n sedona.put(\"cityIndex\", 2);\n sedona.put(\"x\", 100);\n sedona.put(\"y\", 500);\n HashMap<String, Object> syracuse = new HashMap<String, Object>();\n syracuse.put(\"cityIndex\", 3);\n syracuse.put(\"x\", 800);\n syracuse.put(\"y\", 50);\n HashMap<String, Object> denver = new HashMap<String, Object>();\n denver.put(\"cityIndex\", 4);\n denver.put(\"x\", 300);\n denver.put(\"y\", 250);\n HashMap<String, Object> miami = new HashMap<String, Object>();\n miami.put(\"cityIndex\", 5);\n miami.put(\"x\", 800);\n miami.put(\"y\", 750);\n HashMap<String, Object> madison = new HashMap<String, Object>();\n madison.put(\"cityIndex\", 6);\n madison.put(\"x\", 550);\n madison.put(\"y\", 150);\n HashMap<String, Object> dallas = new HashMap<String, Object>();\n dallas.put(\"cityIndex\", 7);\n dallas.put(\"x\", 350);\n dallas.put(\"y\", 750);\n\n //put hashmaps into an array\n HashMap[] cityArray = {portland, sedona, syracuse, denver, miami, madison, dallas};\n int x1 = 0;\n int x2 = 0;\n int y1 = 0;\n int y2 = 0;\n\n //grab appropriate x and y values\n for(HashMap city: cityArray) {\n if(city.containsValue(index1)) {\n x1 = (int)city.get(\"x\");\n y1 = (int)city.get(\"y\");\n }\n if(city.containsValue(index2)) {\n x2 = (int)city.get(\"x\");\n y2 = (int)city.get(\"y\");\n }\n }\n\n //calculate and return distance\n double distance = Math.sqrt(Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2));\n return distance;\n }", "static double DistancePointPlane(double x, double y, double z, double a, double b, double c, double d) {\r\n\t\treturn Math.abs(a * x + b * y + c * z - d) / Math.sqrt(a * a + b * b + c * c);\r\n\t}", "public static Map<Cell, Map<Cell, Number>> getDistances() {\n\t\treturn distances;\n\t}", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }", "public double arcDistance(double lat1, double lon1, double lat2, double lon2) {\n return UmxSloppyMath.haversinMeters(lat1, lon1, lat2, lon2);\n }", "private double calcDistance(RenderedImage other) {\n\t\t// Calculate the signature for that image.\n\t\tColor[][] sigOther = calcSignature(other);\n\t\t// There are several ways to calculate distances between two vectors,\n\t\t// we will calculate the sum of the distances between the RGB values of\n\t\t// pixels in the same positions.\n\t\tdouble dist = 0;\n\t\tfor (int x = 0; x < 5; x++)\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tint r1 = signature[x][y].getRed();\n\t\t\t\tint g1 = signature[x][y].getGreen();\n\t\t\t\tint b1 = signature[x][y].getBlue();\n\t\t\t\tint r2 = sigOther[x][y].getRed();\n\t\t\t\tint g2 = sigOther[x][y].getGreen();\n\t\t\t\tint b2 = sigOther[x][y].getBlue();\n\t\t\t\tdouble tempDist = Math.sqrt((r1 - r2) * (r1 - r2) + (g1 - g2)\n\t\t\t\t\t\t* (g1 - g2) + (b1 - b2) * (b1 - b2));\n\t\t\t\tdist += tempDist;\n\t\t\t}\n\t\treturn dist;\n\t}", "private static int calculateEuclidianDistance(Node actualNode, Node targetNode)\n\t{\n\t\t\n\t\treturn (int)Math.sqrt(Math.pow((actualNode.getRow() - targetNode.getRow()), 2) +\n\t\t\t\t\tMath.pow((actualNode.getColumn() - targetNode.getColumn()), 2));//distance*(int)Math.sqrt(dx+dy);\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tfloat a= sc.nextFloat();\n\t\tfloat b = sc.nextFloat();\n\t\tSystem.out.println(\"he area of the hexagon is: \"+((b*a*a)/(4*Math.tan(Math.PI/b))));\n\t\t\n\t}", "public abstract double calculateDistance(double[] x1, double[] x2);", "private double calcSide(int x1,int y1, int x2, int y2){\n \n double distance1 = Math.sqrt(Math.pow(x2 - x1,2) + Math.pow(y2-y1,2));\n \n return distance1;\n \n \n \n }", "private double getDistance(Vector2i tile, Vector2i goal) {\n\t\t double dx = tile.getX() - goal.getX();\n\t\t double dy = tile.getY() - goal.getY();\n\t\t return Math.sqrt(dx * dx + dy *dy); //distance \n\t }", "static Number160 distance(final Number160 id1, final Number160 id2) {\n return id1.xor(id2);\n }", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public CalculateDistance(LevelSetApplet japp, LevelSetCanvas canvas1)\r\n\t{\r\n\tthis.canvas1 = canvas1;\r\n\tthis.japp = japp;\t\r\n\t\t//System.out.println(\"got here\");\r\n\tinitializations();\t\r\n\t\t//System.out.println(\"got here2\");\r\n\t\tSystem.out.println(\"Finding Boundary\");\r\n\tfindBoundary(useDestinations);\r\n\t\tSystem.out.println(\"Building Initial Band\");\r\n\tbuildInitialBand();\r\n\t\tSystem.out.println(\"Running Algorithm\");\r\n\t\r\n\twhile(active.size()>0)\r\n\t\t{\r\n\t\trunAlgorithmStep();\r\n\t\t}\r\n \r\n System.out.println(\"Distance function calculated\");\r\n\t\r\n\tmaxPhi = findMaxPhi();\r\n\t//if(useDestinations) maxPhi = 150;\r\n \r\n // Save phi in phiTemp\r\n for(int i=0; i<pixelsWide; i++) {\r\n for(int j=0; j<pixelsHigh; j++) {\r\n phiTemp[i][j] = phi[i][j];\r\n }\r\n }\r\n\t}", "public int calculateDistance(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2){\n double x1 = l1.data.getxCo();\n double y1 = l1.data.getyCo();\n double x2 = l2.data.getxCo();\n double y2 = l2.data.getyCo();\n double dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return (int) dist;\n }", "public double distanceH(Vect3 w) {\n\t\tVect2 v = new Vect2(x,y);\n\t\treturn v.Sub(w.vect2()).norm(); \n\t}", "int cellDistance(int cell) {\n int d = GUTTER_SIZE;\n d += cell * (CELL_SIZE + GUTTER_SIZE);\n return d;\n }", "public int determineDirection(Point p0, Point p1) {\n \tif (p0.y == p1.y && ((p0.x > p1.x && !(p0.x == map[0].length - 1 && p1.x == 0)) \n \t\t\t|| (p1.x == map[0].length - 1 && p0.x == 0))) { \n \t\treturn 4; }\n \tif (p0.y == p1.y ) { \n \t\treturn 6; }\n \tif (p0.x == p1.x && ((p0.y > p1.y && !(p0.y == map.length - 1 && p1.y == 0))\n \t\t\t|| (p1.y == map.length - 1 && p0.y == 0)) ) { \n \t\treturn 8; }\n \treturn 2;\n }", "public void evaluate_dist_1_DES_Ciphertext_Matrix() {\n // Initialisierung\n for (int row = 0; row < 8; row++)\n for (int col = 0; col < 8; col++) {\n DES_dist_1_Ciphertext_Matrix[row][col] = 0;\n DES_dist_1_Ciphertext_Vector[8 * row + col] = 0;\n }\n\n for (int row = 0; row < 8; row++)\n for (int col = 0; col < 8; col++) {\n for (int count = 0; count < 64; count++) {\n DES_dist_1_Ciphertext_Matrix[row][col] = DES_dist_1_Ciphertext_Matrix[row][col]\n + (DES_Ciphertext_Matrix[0][count] ^ DES_Ciphertext_Matrix[8 * row + col + 1][count]);\n DES_dist_1_Ciphertext_Vector[8 * row + col] = DES_dist_1_Ciphertext_Matrix[row][col];\n }\n }\n }", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "private void findEdges(){\n int pixel,x,y;\n int color;\n double gx,gy,magnitude;\n double magnitudes[][] = new double[size-2][size-2];\n double angles[][] = new double[size-2][size-2];\n int directions[][] = new int[size-2][size-2];\n //give numbers to the edge kernel\n int edgeKernelX[][] = new int[][]{{-1, 0, 1},\n {-2, 0, 2},\n {-1, 0, 1}};\n int edgeKernelY[][] = new int[][]{{-1, -2, -1},\n { 0, 0, 0},\n { 1, 2, 1}};\n //march the image\n for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n //reset color\n gx = gy = 0;\n //march pixels inside kernel\n for (int k = 0; k < 3; k++) {\n for (int l = 0; l < 3; l++) {\n //get gray color from pixel\n x = j + l - 1; \n y = i + k - 1;\n pixel = imageKerneled.getRGB(x,y);\n //multiply the rgb by the number in kernel\n color = ((pixel) & 0xff);\n gx += color * edgeKernelX[k][l];\n gy += color * edgeKernelY[k][l];\n }\n }\n //get magnitude for the edge ( Gxy = sqrt(x^2+y^2) )\n magnitude = (int)Math.round(Math.sqrt((gx*gx)+(gy*gy) ) );\n magnitudes[i-1][j-1] = magnitude;\n //get angle for the edge ( A = arctan Gy/Gx )\n angles[i-1][j-1] = Math.atan(gy/gx);\n }\n }\n //get bigger magnitud for rule of 3 because are magnitudes above 255\n double bigger = magnitudes[0][0]; int sizeMinus2 = size-2;\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n if(magnitudes[i][j] > bigger) bigger = magnitudes[i][j];\n }\n }\n //rule of 3 to make all magnitudes below 255\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n magnitudes[i][j] = magnitudes[i][j] * 255 / bigger;\n }\n }\n //set the borders black because there are no magnitudes there\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(0,i,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(size-1,i,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(i,0,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(i,size-1,Color.BLACK.getRGB());}\n //set the magnitudes in the image\n double degrees;\n double max=0,min=0;\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n //paint black the NaN and 0r angles\n magnitude = magnitudes[i][j];\n if(Double.isNaN(angles[i][j]) || angles[i][j]==0){\n imageKerneled2.setRGB(j+1,i+1,Color.BLACK.getRGB());\n }\n else{\n //convert radians to dregrees for HSB (Hue goes from 0 to 360)\n degrees = Math.toDegrees(angles[i][j]); \n //convert degrees in scale from -90,90 to 0,360 for HSBtoRGB with a rule of 3\n degrees = degrees * 360 / 90; \n //convert degrees in scale from 0,360 to 0,1 for HSBtoRGB with a rule of 3\n degrees /= 360;\n /*if want angles with colors: \n //convert magnitud in scale from 0,255 to 0,1 for HSBtoRGB with a rule of 3\n magnitude /= 255;\n Color c = new Color(Color.HSBtoRGB((float)degrees,1.0f,(float)magnitude));*/\n Color c = new Color((int)magnitude,(int)magnitude,(int)magnitude);\n imageKerneled2.setRGB(j+1,i+1,c.getRGB());\n /*set direction for pixel\n east-west: 0 = 0 - 22, 158-202, 338-360\n northeast-southwest: 1 = 23 - 67, 203-247 \n north-south: 2 = 68 -112, 248-292 \n northeast-southeast: 3 = 113-157, 293-337 */\n if((degrees>=0 && degrees<=22) || (degrees>=158 && degrees<=202) || (degrees>=338 && degrees<=360)){\n directions[i][j] = 0;\n }else if((degrees>=23 && degrees<=67) || (degrees>=203 && degrees<=247)){\n directions[i][j] = 1;\n }else if((degrees>=68 && degrees<=112) || (degrees>=248 && degrees<=292)){\n directions[i][j] = 2;\n }else if((degrees>=113 && degrees<=157) || (degrees>=293 && degrees<=337)){\n directions[i][j] = 3;\n }\n }\n }\n }\n copyKerneled2ToKerneled();\n System.out.println(\"Finished sobel edge detector\");\n //here starts the canny edge detector\n int comparedMagnitudes[] = new int [3];\n for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n //get magnitude of current pixel and neighbors from direction\n comparedMagnitudes[0] = (imageKerneled.getRGB(j,i)) & 0xff;\n switch(directions[i-1][j-1]){\n case 0: \n comparedMagnitudes[1] = (imageKerneled.getRGB(j-1,i)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j+1,i)) & 0xff;\n break;\n case 1:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j+1,i+1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j-1,i-1)) & 0xff;\n break;\n case 2:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j,i-1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j,i+1)) & 0xff;\n break;\n case 3:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j-1,i+1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j+1,i-1)) & 0xff;\n break;\n }\n if(comparedMagnitudes[0]<comparedMagnitudes[1] \n || comparedMagnitudes[0]<comparedMagnitudes[2]\n || comparedMagnitudes[0]<30){\n imageKerneled2.setRGB(j,i,Color.BLACK.getRGB());\n }\n }\n }\n /*for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n color = (imageKerneled2.getRGB(j,i)) & 0xff;\n if(color > 0){\n imageKerneled2.setRGB(j,i,Color.WHITE.getRGB());\n }\n }\n }*/\n copyKerneled2ToKerneled();\n System.out.println(\"Finished canny edge detector\");\n }", "private static int MHDistance(int NODE1, int NODE2) {\n return Math.abs((NODE1 >> 16) - (NODE2 >> 16)) + Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));\n }", "public int manhattanDistance(int x1, int y1, int x2, int y2, int z1, int z2) {\n return Math.abs(x2 - x1) + Math.abs(y2 - y1) + Math.abs(z1 - z2);\n }", "public double calculateDistance(LatLng other) {\n return Math.sqrt( (this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y) );\n }", "public double distance(int x, int y){\n double distanceSq= Math.pow(this.x-x,2.0) + Math.pow(this.y-y,2.0);\n //double distance= Math.sqrt(distanceSq);\n return Math.sqrt(distanceSq);\n }", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public double distancia(Ponto p){\n double dx = Math.pow((p.x - this.x), 2);\n double dy = Math.pow((p.y - this.y), 2);\n return Math.sqrt((dx+dy));\n }", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }", "public int getDistance(int row1, int col1, int row2, int col2) throws EnvironmentException\r\n\t{\r\n\t\tif(row1 < rows && row2 < rows && col1 < columns && col2 < columns &&\r\n\t\t\t\trow1 >= 0 && row2 >= 0 && col1 >= 0 && col2 >= 0)\r\n\t\t{\r\n\t\t\t//if same row, return the absolute value of column difference times 5\r\n\t\t\tif(row1 == row2)\r\n\t\t\t{\r\n\t\t\t\treturn Math.abs(col1-col2)*5;\r\n\t\t\t}\r\n\t\t\t//if same col, return the absolute value of row difference times 5\r\n\t\t\telse if(col1 == col2)\r\n\t\t\t{\r\n\t\t\t\treturn Math.abs(row1-row2)*5;\r\n\t\t\t}\r\n\t\t\t//if different rows and columns, use Pythagorean Theorem to compute distance\r\n\t\t\treturn (int)Math.sqrt(Math.pow((row1-row2)*5, 2)+Math.pow((col1-col2)*5, 2));\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new EnvironmentException();\r\n\t\t}\r\n\t}", "private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}", "public double calcDistance(Planet p){\n double sq_dis = (xxPos - p.xxPos) * (xxPos - p.xxPos) + (yyPos - p.yyPos) * (yyPos - p.yyPos);\n double distance = Math.sqrt(sq_dis);\n return distance;\n }", "public WalkingDistance(ApplicationMode appMode) {\n rowSize = PuzzleConstants.getRowSize();\n keySize = 55;\n patternSize = 24964;\n priorKey = new int[] {0, 0x0E00, 0x0FC0, 0x0FF8};\n afterKey = new int[] {0x01FF, 0x003F, 0x0007, 0};\n partialPattern = new int[] {0x00000FFF, 0x00FC0000, 0x0000003F, 0x00FFF000};\n loadData(appMode);\n }", "private List<Double> getDistanceFromCentreOfEachLayerToEdge(List<Integer> diameters, List<Integer> additionalDiameters, List<Integer> verticalSpacings, int nominalCover) {\n\n List<Integer> maxDiameters = getMaxDiametersForEachLayer(diameters, additionalDiameters);\n\n return IntStream\n .range(0, maxDiameters.size())\n .mapToObj(i -> nominalCover + 0.5 * maxDiameters.get(i)\n + verticalSpacings.stream().limit(i).reduce(0, Integer::sum)\n + maxDiameters.stream().limit(i).reduce(0, Integer::sum))\n .collect(Collectors.toList());\n }", "final public static int dist(float lat1, float lon1,\n \t\tfloat lat2, float lon2) {\n \tdouble latSin = Math.sin((lat2-lat1)/2d);\n \tdouble longSin = Math.sin((lon2-lon1)/2d);\n \tdouble a = (latSin * latSin) + (Math.cos(lat1)*Math.cos(lat2)*longSin*longSin);\n \tdouble c = 2d * atan2(Math.sqrt(a),Math.sqrt(1d-a));\n \treturn (int)(PLANET_RADIUS_D * (c + 0.5d));\n }", "Double getZLength();", "public int distance() {\n return distance;\n }", "@Override\r\n protected Double h(Point from, Point to) {\r\n /* Use the Manhattan distance heuristic. */\r\n return (double) Math.abs(finish.x - to.x) + Math.abs(finish.y - to.y);\r\n }", "public double distancia(Pixel pixel) {\r\n\t\tdouble distX = this.xDouble - pixel.xDouble;\r\n\t\tdouble distY = this.yDouble - pixel.yDouble;\r\n\t\tdouble val = distX * distX + distY * distY;\r\n\t\tif (val != 0)\r\n\t\t\treturn Math.sqrt(val);\r\n\t\treturn 0;\r\n\t}", "double getZLength();", "private Distance(){}", "protected Double h(Tile from, Tile to){\r\n return (double) map.getDistance(from, to);\r\n }", "int distanceCheb(Coord other) {\n\t\tint deltaX = abs(x - other.x);\n\t\tint deltaY = abs(y - other.y);\n\t\treturn max(deltaX, deltaY);\n\t}", "private static int dist(int x1, int y1, int x2, int y2) {\n\t\treturn (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1))));\n\t}" ]
[ "0.64389247", "0.6116585", "0.5921558", "0.5903646", "0.58890253", "0.5886532", "0.5885583", "0.5880373", "0.5857779", "0.58480865", "0.5829424", "0.5799577", "0.57818115", "0.5759244", "0.5725951", "0.56595564", "0.56507593", "0.56499165", "0.56451136", "0.5641651", "0.5639325", "0.5635998", "0.5629423", "0.5628991", "0.5616984", "0.5614428", "0.5586123", "0.5559523", "0.5545103", "0.55429095", "0.5540852", "0.55209076", "0.5484509", "0.54813117", "0.547312", "0.54603064", "0.5435764", "0.54111964", "0.5410448", "0.54082334", "0.5405251", "0.5394816", "0.5344045", "0.5338703", "0.53369206", "0.53333676", "0.53313345", "0.5329046", "0.53263265", "0.53158593", "0.5314978", "0.53121775", "0.52970856", "0.5287814", "0.5279385", "0.5267104", "0.5264968", "0.52588445", "0.52567995", "0.5245189", "0.52448046", "0.5235767", "0.52326214", "0.52306753", "0.52288425", "0.52099174", "0.5203033", "0.52027917", "0.5196719", "0.5192892", "0.5190247", "0.5185516", "0.51705337", "0.5169979", "0.51647973", "0.51618713", "0.51542103", "0.51523256", "0.51522756", "0.5145145", "0.5144094", "0.51421654", "0.5138181", "0.51344895", "0.51313394", "0.5123527", "0.51221436", "0.5121048", "0.51190627", "0.51135796", "0.5112703", "0.511269", "0.5107008", "0.5106515", "0.5104476", "0.51040757", "0.5103573", "0.5088621", "0.50845325", "0.5080501" ]
0.68571603
0
Chebyshev distance (for 8 directions maps) see:
int distanceCheb(Coord other) { int deltaX = abs(x - other.x); int deltaY = abs(y - other.y); return max(deltaX, deltaY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getSquareDistance();", "double getDistance();", "private static double dist(Data d, Centroid c)\r\n \t{\r\n \t\treturn Math.sqrt(Math.pow((c.Y() - d.Y()), 2) + Math.pow((c.X() - d.X()), 2));\r\n \t}", "double distance (double px, double py);", "public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}", "public float getDistance();", "double getDistance(int i, int j){\r\n\tdouble d = (coord[i][0]-coord[j][0])*(coord[i][0]-coord[j][0])+ (coord[i][1]-coord[j][1])*(coord[i][1]-coord[j][1]);\r\n\td = Math.sqrt(d);\r\n\treturn d;\r\n}", "double getDistanceInMiles();", "public static void main(String[] args) {\n System.out.println(hammingDistance(1,4));\n }", "double distanceSq (double px, double py);", "public double distance(double x, double y);", "public abstract double distanceFrom(double x, double y);", "public double getDistanceTo(CoordPair dest)\r\n\t{\n\t\tif(isAdjacent(dest))\r\n\t\t\treturn 1;\r\n\t\tint rowDiff = this.row - dest.getRow();\r\n\t\tint colDiff = this.col - dest.getCol();\r\n\t\tint sumSquares = (int) (Math.pow(rowDiff,2) + Math.pow(colDiff, 2));\r\n\t\tdouble distance = Math.sqrt(sumSquares);\r\n\t\t\r\n\t\treturn distance;\r\n\t}", "@Test\n\tpublic void testDiagonalNeighbors() {\n\t\tPosition topLeft = new Position(0,0);\n\t\tPosition bottomRight = new Position(1,1);\n\n\t\tint distance = euclideanSquaredMetric.calculateCost(topLeft, bottomRight);\n\t\tassertEquals(2 * lateralDistanceWeight, distance);\n\n\t\tPosition topRight = new Position(0,1);\n\t\tPosition bottomLeft = new Position(1,0);\n\n\t\tdistance = euclideanSquaredMetric.calculateCost(topRight, bottomLeft);\n\t\tassertEquals(2*lateralDistanceWeight, distance);\n\n\t}", "@Test\r\n\tpublic void testDistancia0() \r\n\t{\r\n\t\tAssert.assertEquals(1.41, new Ponto(3,3).dist(new Ponto(4,2)), EPSILON);\r\n\t\tAssert.assertEquals(26.20, new Ponto(-7,-4).dist(new Ponto(17,6.5)), EPSILON);\t\r\n\t\tAssert.assertEquals(0.00, new Ponto(0,0).dist(new Ponto(0,0)), EPSILON);\t\r\n\t}", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "Execution getClosestDistance();", "double getDistance(Point p);", "@Override\n\t\tpublic double heuristic() {\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tsum += Math.abs(xGoals[i] - state[i]);\n\t\t\t\tsum += Math.abs(yGoals[i] - state[k + i]);\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "public int distance(Coord coord1, Coord coord2);", "protected int DistanceWithHaltUnrolled(SiftDescriptorContainer point) {\n int dist = 0;\n int i = 0;\n\n for (; i < 128; ) {\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n dist += (((int) point.vector[i]) - ((int) queryPoint.vector[i])) *\n (((int) point.vector[i]) - ((int) queryPoint.vector[i++]));\n if (dist > maxDistance) {\n dist = Integer.MAX_VALUE;\n return dist;\n }\n }\n\n//*/\n/* Version 2 * /\n\t\tdist = 0;\n\t\tint a, b, c, d, e, f, g, h;\n\t\tint a2, b2, c2, d2, e2, f2, g2, h2;\n\t\tfor ( int i=0; i < point.vector.length; ++i ) {\n\t\t\ta = point.vector[i] - queryPoint.vector[i++];\n\t\t\tb = point.vector[i] - queryPoint.vector[i++];\n\t\t\tc = point.vector[i] - queryPoint.vector[i++];\n\t\t\td = point.vector[i] - queryPoint.vector[i++];\n\t\t\te = point.vector[i] - queryPoint.vector[i++];\n\t\t\tf = point.vector[i] - queryPoint.vector[i++];\n\t\t\tg = point.vector[i] - queryPoint.vector[i++];\n\t\t\th = point.vector[i] - queryPoint.vector[i++];\n\t\t\ta2= point.vector[i] - queryPoint.vector[i++];\n\t\t\tb2= point.vector[i] - queryPoint.vector[i++];\n\t\t\tc2= point.vector[i] - queryPoint.vector[i++];\n\t\t\td2= point.vector[i] - queryPoint.vector[i++];\n\t\t\te2= point.vector[i] - queryPoint.vector[i++];\n\t\t\tf2= point.vector[i] - queryPoint.vector[i++];\n\t\t\tg2= point.vector[i] - queryPoint.vector[i++];\n\t\t\th2 = point.vector[i] - queryPoint.vector[i];\n\t\t\tdist = dist + a*a + b*b + c*c + d*d + e*e + f*f + g*g + h*h + a2*a2 + b2*b2 + c2*c2 + d2*d2 + e2*e2 + f2*f2 + g2*g2 + h2*h2;\n\t\t\tdist = dist + a*a + b*b + c*c + d*d;\n\t\t\tif ( dist > maxDistance ) {\n\t\t\t\tdist = Integer.MAX_VALUE;\n\t\t\t\treturn dist;\n\t\t\t}\n\t\t}\n//*/\n/* Version 3 \tNo unwinding * /\t\n\t\tdist = 0;\n\t\tint a;\n\t\tfor (int i=0; i < point.vector.length; ++i) {\n\t\t\t//a = (point.vector[i] & 0xFF) - (queryPoint.vector[i] & 0xFF);\n\t\t\ta = point.vector[i] - queryPoint.vector[i];\n\t\t\tdist += a * a;\n\t\t\tif ( dist > maxDistance ) {\n\t\t\t\tdist = Integer.MAX_VALUE;\n\t\t\t\treturn dist;\n\t\t\t}\n\t\t}\n//*/\n/* Version 4 - 32 full, + 8 checks every 8 lines + 8 checks every 4 lines * /\n\t\tdist = 0;\n\t\tint i=0;\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\tfor (; i < 96; ) {\n\t\t\tif ( dist > maxDistance ) {\n\t\t\t\tdist = Integer.MAX_VALUE;\n\t\t\t\treturn dist;\n\t\t\t}\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t}\n\t\tfor (; i < 128; ) {\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tdist += (point.vector[i] - queryPoint.vector[i]) * (point.vector[i] - queryPoint.vector[i++]);\n\t\t\tif ( dist > maxDistance ) {\n\t\t\t\tdist = Integer.MAX_VALUE;\n\t\t\t\treturn dist;\n\t\t\t}\n\t\t}\n\t\t\n//*/\n return dist;\n }", "protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\n }\n }", "double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}", "public static double distanceFallen(double time){\n return square(time)*(9.8)*(.5);\n }", "public double calDistance()\n {\n double closest = poly[0].getD();\n\n for(int i = 1; i < sides; i++)\n {\n if(closest > poly[i].getD())\n {\n closest = poly[i].getD();\n }\n }\n this.distance = closest;\n\n return closest;\n }", "Execution getFarthestDistance();", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "public static void main(String[] args) {\n\t\tint x = 1;\r\n\t\tint y = 4;\r\n\t\tSystem.out.println(hammingDistance2(x, y));\r\n\t}", "public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}", "private double getDistance(Vector2i tile, Vector2i goal) {\n\t\t double dx = tile.getX() - goal.getX();\n\t\t double dy = tile.getY() - goal.getY();\n\t\t return Math.sqrt(dx * dx + dy *dy); //distance \n\t }", "public static void main(String[] args) {\n\t\tchar[][] grid = {\r\n\t {'S', 'O', 'O', 'S', 'S'},\r\n\t {'D', 'O', 'D', 'O', 'D'},\r\n\t {'O', 'O', 'O', 'O', 'X'},\r\n\t {'X', 'D', 'D', 'O', 'O'},\r\n\t {'X', 'D', 'D', 'D', 'O'}};\r\n \tSystem.out.println(getDistance(grid));\r\n\t}", "public int manhattan() {\n int distance = 0;\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n int value = _tiles[i][j];\n if (value != 0) {\n int yDim = (value - 1) % _N;\n int xDim = (value - 1) / _N;\n distance = distance + Math.abs(xDim - i) + Math.abs(yDim - j);\n }\n }\n }\n return distance;\n }", "public static int hamDistance( final int x, final int y ) {\n int z = (x ^ y);\n int d = 0 ;\n while ( z != 0 ) {\n d++;\n z &= z - 1;\n }\n return d;\n }", "int getMinimalPaletteDistance();", "@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }", "@Override\r\n protected Double h(Point from, Point to) {\r\n /* Use the Manhattan distance heuristic. */\r\n return (double) Math.abs(finish.x - to.x) + Math.abs(finish.y - to.y);\r\n }", "public double calcDistance(Planet p){\n double sq_dis = (xxPos - p.xxPos) * (xxPos - p.xxPos) + (yyPos - p.yyPos) * (yyPos - p.yyPos);\n double distance = Math.sqrt(sq_dis);\n return distance;\n }", "double squaredDistanceTo(IMovingObject m);", "protected Double h(Tile from, Tile to){\r\n return (double) map.getDistance(from, to);\r\n }", "boolean hasDistance();", "private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }", "private static double EuclideanDistance(Point p1, Point p2) {\n\t\tdouble dx = p2.X - p1.X;\n\t\tdouble dy = p2.Y - p1.Y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}", "private Double euclidean(LatitudeLongitude point1, LatitudeLongitude point2) {\n return Double.valueOf(Math.sqrt(Math.pow(point1.getLatitude() - point2.getLatitude(), 2)\n + Math.pow(point1.getLongitude() - point2.getLongitude(), 2)));\n }", "private double distantziaKalkulatu() {\r\n\t\tdouble lurrarenRadioa = 6371;// kilometrotan Lurraren radioa\r\n\t\tdouble dLat = Math.toRadians(terLat - latitudea); //\r\n\t\tdouble dLng = Math.toRadians(termLong - longitudea);\r\n\t\tdouble sindLat = Math.sin(dLat / 2);\r\n\t\tdouble sindLng = Math.sin(dLng / 2);\r\n\t\tdouble va1 = Math.pow(sindLat, 2)\r\n\t\t\t\t+ Math.pow(sindLng, 2) * Math.cos(Math.toRadians(terLat)) * Math.cos(Math.toRadians(latitudea));\r\n\t\tdouble va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\r\n\t\tdouble distancia = lurrarenRadioa * va2;\r\n\r\n\t\treturn distancia;\r\n\t}", "public int manhattan() {\n int dist = 0;\n for(int x = 0; x < n; x++) {\n for(int y = 0; y < n; y++) {\n if(tiles[x][y] != goal[x][y] && tiles[x][y] != 0) {\n int target = tiles[x][y] -1;\n int dest_row = target/n;\n int dest_col = target%n;\n dist += Math.abs((x-dest_col)) + Math.abs(y-dest_row);\n }\n }\n }\n return dist;\n }", "private double getDistance(Vector2i tile, Vector2i goal) {\r\n\t\tdouble dx = tile.getX() - goal.getX();\r\n\t\tdouble dy = tile.getY() - goal.getY();\r\n\t\treturn Math.sqrt((dx * dx) + (dy * dy));\r\n\t}", "private double calculeDistanceLinaire(int[] tableauDeIntRandom) {\n double resultat = 0;\n for (int i = 0; i < tableauDeIntRandom.length; i++) {\n resultat += Math.abs(tableauDeIntRandom[i] - tableauDeIntRandom[(i + 1) % tableauDeIntRandom.length]);\n }\n return resultat;\n }", "private static int distance(int x, int y, int centerX, int centerY)\n {\n // Pythagorian theorem\n return (int) Math.sqrt(Math.pow((double)(x - centerX), 2) + Math.pow((double)(y - centerY), 2));\n }", "public double calcDist(int [] colorList){\r\n\t\t\r\n\t\tdouble red = colorList[0] - 186;\r\n\t\tdouble green = colorList[1] - 149;\r\n\t\tdouble blue = colorList[2] - 107;\r\n\t\tdouble dist = Math.sqrt(red * red + green * green +\r\n\t\t\t\tblue * blue);\r\n\t\t\r\n\t\tdouble red1 = colorList[0] - 91.0;\r\n\t\tdouble green1 = colorList[1] - 70.0;\r\n\t\tdouble blue1 = colorList[2] - 45.0;\r\n\t\tdouble dist1 = Math.sqrt(red1 * red1 + green1 * green1 +\r\n\t\t\t\tblue1 * blue1);\r\n\t\treturn Math.min(dist, dist1) ;\r\n\t}", "private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}", "public static EuclidianDictionary[] computeDistance(DaubechyColorSplitter query, List<DaubechyColorSplitter> daubechyColorSplitters) {\n //compute descriptor of query\n EuclidianDictionary euclidianDictionary[] = StandardDeviation.computeAll(query, daubechyColorSplitters);\n\n //perform euclidian on query and each descriptor element\n Arrays.sort(euclidianDictionary, (o1, o2) -> {\n if(o1.euclidian < o2.euclidian) {\n return -1;\n }else if(o2.euclidian > o1.euclidian) {\n return 1;\n }else{\n return 0;\n }\n });\n return euclidianDictionary;\n }", "private int getDist(int x, int y, int direction) {\n\t\tint Spaces = 0;\n\t\tif(direction == 0)\n\t\t{\n\t\t\t\n\t\t\tPoint nextPoint = new Point(x, y++);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x, y++);\n\t\t\t}\n\t\t}\n\t\tif(direction == 1)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x++, y);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x++, y);\n\t\t\t}\n\t\t}\n\t\tif(direction == 2)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x--, y);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x--, y);\n\t\t\t}\n\t\t}\n\t\tif(direction == 3)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x, y--);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x, y--);\n\t\t\t}\n\t\t}\n\t\treturn Spaces;\n\t}", "public abstract double GetDistance();", "private void euclidean(Node node, int d){\n int row1 = this.row;\n int col1 = this.col;\n int row2 = node.getRow();\n int col2 = node.getCol();\n\n double aSquared = Math.pow((row1-row2), 2);\n double bSquared = Math.pow((col1-col2), 2);\n\n if(d == 0) //Euclidean normal\n this.hVal = (float)Math.sqrt(aSquared+bSquared);\n else //Euclidean squared\n this.hVal = (float)(aSquared+bSquared);\n\n }", "private void diagonal(Node node, int d){\n double cost;\n if(d == 2) { //Chebyshev distance\n cost = 1;\n }\n else { //Octile distance\n cost = Math.sqrt(2);\n }\n int row1 = this.row;\n int col1 = this.col;\n int row2 = node.getRow();\n int col2 = node.getCol();\n\n int x = Math.abs(row1-row2);\n int y = Math.abs(col1-col2);\n\n this.hVal = (float)((x+y) + ((cost - 2) * (Math.min(x,y))));\n }", "private float distanceTo(BasicEvent event) {\n final float dx = event.x - location.x;\n final float dy = event.y - location.y;\n// return Math.abs(dx)+Math.abs(dy);\n return distanceMetric(dx, dy);\n// dx*=dx;\n// dy*=dy;\n// float distance=(float)Math.sqrt(dx+dy);\n// return distance;\n }", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }", "public int hammingDistance2(int x, int y) {\n int temp = x ^ y;\n int res = 0;\n while(temp != 0){\n res++;\n temp &= (temp-1);\n }\n return res;\n }", "public int hammingDistance(int x, int y) {\r\n\t int xor = x ^ y, count = 0;\r\n\t /*\r\n\t * xor = x ^ y 3 ^ 1\r\n\t * x | y | o | i\r\n\t * ---------------\r\n\t * 0 0 0 0\r\n\t * 0 0 0 1\r\n\t * 1 0 1 2\r\n\t * 1 0 1 3\r\n\t */\r\n\t for (int i=0;i<32;i++)\r\n\t /* xor / i & 1 will return the matching bits */\r\n\t count += (xor >> i) & 1;\r\n\t \r\n\t return count;\r\n\t}", "private int calcDistance()\n\t{\n\t\tint distance = 0;\n\n\t\t// Generate a sum of all of the difference in locations of each list element\n\t\tfor(int i = 0; i < listSize; i++) \n\t\t{\n\t\t\tdistance += Math.abs(indexOf(unsortedList, sortedList[i]) - i);\n\t\t}\n\n\t\treturn distance;\n\t}", "public static Map<Cell, Map<Cell, Number>> getDistances() {\n\t\treturn distances;\n\t}", "public int hammingDistance(int x, int y) {\n int count =0;\n while (x != 0 || y != 0) {\n count += (x & 1) ^ (y & 1);\n x = x >>> 1;\n y = y >>> 1;\n }\n return count;\n\t}", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "private static int[][] distanceGrid(final int[][] board) {\n final int numRows = board.length;\n final int numCols = board[0].length;\n\n final int distance = 0;\n\n final int[][] distanceGrid = new int[numRows][numCols];\n for (final int[] row : distanceGrid) {\n Arrays.fill(row, INACCESSABLE_SPACE_DISTANCE);\n }\n // For each space on the board\n for (int r = 0; r < numRows; r++) {\n nextBoardSpace:\n for (int c = 0; c < numCols; c++) {\n ArrayList<int[]> explored = new ArrayList<>();\n Queue<int[]> toExplore = new LinkedList<>();\n Map<String,Integer> dists = new HashMap<>();\n\n // Add the space to the explore queue\n toExplore.add(new int[] {r, c, 0});\n \n // While there is more to explore\n while (!toExplore.isEmpty()) {\n int[] currExplor = toExplore.remove();\n explored.add(currExplor);\n int explRow = currExplor[0];\n int explCol = currExplor[1];\n int explDist = currExplor[2];\n\n String key = Arrays.toString(new int[] {explRow, explCol});\n dists.put(key, 1);\n \n // If the space contains a player's move, add the distance to the \n //distanceGrid, and continue on the next boardspace\n if (board[explRow][explCol] > 0) {\n distanceGrid[r][c] = explDist;\n continue nextBoardSpace;\n }\n \n // Otherwise, if the space is empty, add it's neighbours to the queue\n if (board[explRow][explCol] == 0) {\n ArrayList<int[]> neighbours = Utils.neighbours(explRow, explCol, numRows, numCols);\n for (int[] neighbour : neighbours) {\n int[] temp = new int[] {neighbour[0], neighbour[1], explDist+1};\n if (dists.containsKey(key)) continue;\n toExplore.add(temp);\n }\n }\n }\n\n // If a path to one of our spaces is not found, space is inaccessable\n if (board[r][c] != 0) {\n distanceGrid[r][c] = -1;\n }\n\n }\n }\n return distanceGrid;\n }", "private static double calculaDistancia(double[] param1, double[] param2){\n\t\tdouble res1= Math.pow((param1[0]-param2[0]), 2);\n\t\tdouble res2= Math.pow((param1[1]-param2[1]), 2);\n\t\tdouble res3= Math.pow((param1[2]-param2[2]), 2);\n\t\tdouble res4= res1 + res2 + res3;\n\t\tdouble res5= res4/3;\n\t\tdouble res6= Math.sqrt(res5);\n\t\treturn res6;\n\t}", "public static void main(String[] main) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint min = -12;\n\t\tint max = 12;\n\n\t\tint firstX = sc.nextInt();\n\t\tint firstY = sc.nextInt();\n\n\t\tHashMap<Point, Double> euclideanDistanceMap = new HashMap<>();\n\n\t\tfor(int i = min; i <= max; i++) {\n\t\t\tfor (int j = min; j <= max; j++) {\n\t\t\t\tif (getEuclideanDistance(j, i) != Math.floor(getEuclideanDistance(j, i))) {\n\n\t\t\t\t\tdouble temp = (getEuclideanDistance(j, i) - Math.floor(getEuclideanDistance(j, i))) * Math.pow(10, 12);\n\t\t\t\t\teuclideanDistanceMap.put(new Point(j, i), temp);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tfor(Point p: euclideanDistanceMap.keySet()) {\n\t\t\tSystem.out.println(euclideanDistanceMap.get(p));\n\t\t}\n\t\tsc.close();\n\t}", "public double distance(int x, int y){\n double distanceSq= Math.pow(this.x-x,2.0) + Math.pow(this.y-y,2.0);\n //double distance= Math.sqrt(distanceSq);\n return Math.sqrt(distanceSq);\n }", "public abstract double getDistance(int[] end);", "public double calcDistance(Planet p){\n\t\treturn(Math.sqrt((this.xxPos-p.xxPos)*(this.xxPos-p.xxPos)\n\t\t\t+(this.yyPos-p.yyPos)*(this.yyPos-p.yyPos)));\n\t}", "public double getMaxSourceDistance();", "@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}", "public double distance(InputDatum datum, InputDatum datum2) throws MetricException;", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}", "private double getHeuristic(MapLocation current, MapLocation goal) {\n\t\treturn Math.max(Math.abs(current.x - goal.x), Math.abs(current.y - goal.y));\n\t}", "public int CalcDistance ( )\r\n\t{\r\n\t\tfor ( int i = 0; i<size; i++ )\r\n\t\t{\r\n\t\t\tfor ( int offR = 0; offR <= size/2; offR++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor ( int offR = size-1; offR >= size/2; offR-- )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\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\treturn maze [currentRow] [currentCol].getDistanceToExit();\r\n\t}", "public double calcDistBetweenStops(){\n List<Location> locs = destinations.getLocationList();\r\n double totalDist = 0;\r\n for (int i = 0; i < (locs.size() - 1); i++){\r\n double distance = locs.get(i).DistanceTo(locs.get(i+1));\r\n totalDist += distance;\r\n }\r\n return totalDist;\r\n }", "static double DistancePointPlane(double x, double y, double z, double a, double b, double c, double d) {\r\n\t\treturn Math.abs(a * x + b * y + c * z - d) / Math.sqrt(a * a + b * b + c * c);\r\n\t}", "@Test\n\tpublic void checkDistanceRouteAEBCD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"E\", \"B\", \"C\", \"D\"), \"22\");\n\t}", "public int euclideanDistance(DataValue<T> value1, DataValue<T> value2)\r\n\t{\n\t\tint difference = value1.difference(value2);\r\n\t\tdifference = difference * difference;\t\r\n\t\treturn (int) Math.sqrt(difference);\r\n\t}", "public float getFallDistance ( ) {\n\t\treturn extract ( handle -> handle.getFallDistance ( ) );\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n mNodes = sc.nextInt();\n mEdges = sc.nextInt();\n \n mDistances = new int[mNodes+1][mNodes+1];\n \n for (int i =1; i <= mNodes; i++)\n {\n \n for (int j =1; j <=mNodes;j++)\n {\n mDistances[i][j] = Integer.MAX_VALUE;\n \n }\n }\n \n for (int i =1; i <= mNodes; i++)\n {\n mDistances[i][i] =0;\n }\n \n for (int i = 0 ; i < mEdges; i++)\n {\n int from = sc.nextInt();\n int to = sc.nextInt();\n \n mDistances[from][to] = sc.nextInt();\n \n \n }\n \n \n //FW\n \n for (int k = 1; k <= mNodes; k++)\n {\n \n for (int i = 1; i <= mNodes; i++)\n {\n \n for (int j = 1; j <= mNodes; j++)\n {\n \n if (mDistances[i][k]!= Integer.MAX_VALUE && mDistances[k][j] != Integer.MAX_VALUE )\n {\n if (mDistances[i][j] > mDistances[i][k] + mDistances[k][j])\n {\n \n mDistances[i][j] = mDistances[i][k] + mDistances[k][j];\n }\n \n }\n \n }\n }\n \n }\n \n mQueries = sc.nextInt();\n \n for (int i =0; i < mQueries; i++)\n {\n int dist = mDistances[sc.nextInt()][sc.nextInt()];\n \n if (dist == Integer.MAX_VALUE)\n {\n dist = -1;\n }\n \n System.out.println(dist);\n \n }\n \n \n \n \n \n \n \n \n \n }", "public static int QTDelHeuristic1 (Graph<Integer,String> h) {\n\t\tint count = 0;\r\n\t\tboolean isQT = false;\r\n\t\t//h = Copy(g);\r\n\t\t//boolean moreToDo = true;\r\n\t\t\r\n\t\tIterator<Integer> a;\r\n\t\tIterator<Integer> b;\r\n\t\tIterator<Integer> c;\r\n\t\tIterator<Integer> d;\r\n\r\n\t\twhile (isQT == false) {\r\n\t\t\tisQT = true;\r\n\t\t\ta= h.getVertices().iterator();\r\n\t\t\twhile(a.hasNext()){\r\n\t\t\t\tInteger A = a.next();\r\n\t\t\t\t//System.out.print(\"\"+A+\" \");\r\n\t\t\t\tb = h.getNeighbors(A).iterator();\r\n\t\t\t\twhile(b.hasNext()){\r\n\t\t\t\t\tInteger B = b.next();\r\n\t\t\t\t\tc = h.getNeighbors(B).iterator();\r\n\t\t\t\t\twhile (c.hasNext()){\r\n\t\t\t\t\t\tInteger C = c.next();\r\n\t\t\t\t\t\tif (h.isNeighbor(C, A) || C==A) continue;\r\n\t\t\t\t\t\td = h.getNeighbors(C).iterator();\r\n\t\t\t\t\t\twhile (d.hasNext()){\r\n\t\t\t\t\t\t\tInteger D = d.next();\r\n\t\t\t\t\t\t\tif (D==B) continue; \r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,B)) continue;\r\n\t\t\t\t\t\t\t//otherwise, we have a P4 or a C4\r\n\r\n\t\t\t\t\t\t\tisQT = false;\r\n\t\t\t\t\t\t\t//System.out.print(\"Found P4: \"+A+\"-\"+B+\"-\"+C+\"-\"+D+\"... not a cograph\\n\");\r\n\r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,A)) {\r\n\t\t\t\t\t\t\t\t// we have a C4 = a-b-c-d-a\r\n\t\t\t\t\t\t\t\t// requires 2 deletions\r\n\t\t\t\t\t\t\t\tcount += 2;\r\n\t\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\t\th.removeVertex(D);\r\n\t\t\t\t\t\t\t\treturn 2 + QTDelHeuristic1(h);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t// this case says:\r\n\t\t\t\t\t\t\t\t// else D is NOT adjacent to A. Then we have P4=abcd\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcount += 1;\r\n\t\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\t\th.removeVertex(D);\r\n\t\t\t\t\t\t\t\treturn 1 + QTDelHeuristic1(h);\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\t\r\n\t\t\t\t\t} // end d.hasNext()\r\n\t\t\t\t} // end c.hasNext()\r\n\t\t\t} // end b.hasNext() \r\n\t\t} // end a.hasNext()\r\n\t\t\r\n\t\treturn count;\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tint[][] grid = {{1,0,2,0,1},{0,0,0,0,0},{0,0,1,0,0}};\n\t\tSystem.out.println(shortestDistance(grid));\n\t}", "public abstract double calculateDistance(double[] x1, double[] x2);", "double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }", "public static double chebyshev(Rectangle2D rect, double px, double py) {\n if (rect.contains(px, py)) {\n return -1;\n }\n // determine the distance between the point and the point projected\n // onto the rectangle, or clamped into it, so to say\n return chebyshev(px, py, clamp(px, rect.getMinX(), rect.getMaxX()),\n clamp(py, rect.getMinY(), rect.getMaxY()));\n }", "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "public int distance(PuzzleState state) {\n int numOfTiles = 9;\n int rowLength = 3;\n int finalDistance = 0;\n for(int i = 1; i < numOfTiles; i++){\n if(goalState.posOf(i) != state.posOf(i)){\n int indexOfMissplacedTile = state.posOf(i);\n int indexOfGoalplacedTile = goalState.posOf(i);\n int indexDifference = Math.abs(indexOfGoalplacedTile - indexOfMissplacedTile);\n int finalDistanceOfThisTile = 0;\n if(indexDifference >= rowLength){\n finalDistanceOfThisTile += indexDifference / 3;// number of rows moved\n finalDistanceOfThisTile += indexDifference % 3;// number of columns moved\n }\n else if(indexDifference < rowLength && (indexDifference + 1)%rowLength == 0){//special case if the tile needs to travel ex(from index 3 to 4 or vice verca);\n finalDistanceOfThisTile += 3;\n }\n else{\n finalDistanceOfThisTile += indexDifference;\n }\n finalDistance += finalDistanceOfThisTile;\n }\n }\n return finalDistance;\n }", "public int getDistance(int row1, int col1, int row2, int col2) throws EnvironmentException\r\n\t{\r\n\t\tif(row1 < rows && row2 < rows && col1 < columns && col2 < columns &&\r\n\t\t\t\trow1 >= 0 && row2 >= 0 && col1 >= 0 && col2 >= 0)\r\n\t\t{\r\n\t\t\t//if same row, return the absolute value of column difference times 5\r\n\t\t\tif(row1 == row2)\r\n\t\t\t{\r\n\t\t\t\treturn Math.abs(col1-col2)*5;\r\n\t\t\t}\r\n\t\t\t//if same col, return the absolute value of row difference times 5\r\n\t\t\telse if(col1 == col2)\r\n\t\t\t{\r\n\t\t\t\treturn Math.abs(row1-row2)*5;\r\n\t\t\t}\r\n\t\t\t//if different rows and columns, use Pythagorean Theorem to compute distance\r\n\t\t\treturn (int)Math.sqrt(Math.pow((row1-row2)*5, 2)+Math.pow((col1-col2)*5, 2));\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new EnvironmentException();\r\n\t\t}\r\n\t}", "public double shortestPathDist(int src, int dest);", "public double distancia(Ponto p){\n double dx = Math.pow((p.x - this.x), 2);\n double dy = Math.pow((p.y - this.y), 2);\n return Math.sqrt((dx+dy));\n }", "@Deprecated\n private static int hamDistanceS( final int x, final int y ) {\n int z = (x ^ y);\n int d = 0 ;\n while ( z != 0 ) {\n d += ( z & 1 );\n z >>= 1;\n }\n return d;\n }", "public double getEuclideanDistanceTo(Position other) {\n\n double sum = 0;\n //POEY comment: values.length = the number of extraction functions\n //find different values of every object's values in each function (round-robin tournament event itself)\n for (int i = 0; i < values.length; i++) {\n double value = values[i];\n double otherValue = other.values[i];\n double diff = value - otherValue;\n sum += (diff * diff);\n }\n\n return Math.sqrt(sum);\n \n }", "public double calcDistance(Planet p){\n\t\tdouble dx=-(xxPos-p.xxPos);\n\t\tdouble dy=-(yyPos-p.yyPos);\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "public HashMap getClusterDiameter() {\n double maxEuclideanDistance = 0;\n double maxCorrelationDistance = 0;\n\n Set probeIDSet = points.keySet();\n Iterator probeIt = probeIDSet.iterator();\n \n int comparisonIndex = 0;\n \n while (probeIt.hasNext()) {\n int probeID = (Integer) probeIt.next();\n double[] pointA = (double[]) points.get(probeID);\n\n Set probeIDSet2 = points.keySet();\n Iterator probeIt2 = probeIDSet2.iterator();\n while (probeIt2.hasNext()) {\n int probeID2 = (Integer) probeIt2.next();\n double[] pointB = (double[]) points.get(probeID2);\n \n HashMap distances = KMeans.getDistances(pointA, pointB);\n double eucDist = (Double) distances.get(\"euclidean\");\n double correlDist = (Double) distances.get(\"correlation\");\n \n if (comparisonIndex == 0) { // First distance\n maxEuclideanDistance = eucDist;\n maxCorrelationDistance = correlDist;\n } else if (eucDist > maxEuclideanDistance) {\n maxEuclideanDistance = eucDist;\n } else if ( Math.abs(correlDist) < maxCorrelationDistance) {\n maxCorrelationDistance = correlDist;\n }\n comparisonIndex++;\n }\n }\n \n HashMap<String, Double> distances = new HashMap<String, Double>();\n distances.put(\"euclidean\", maxEuclideanDistance);\n distances.put(\"correlation\", maxCorrelationDistance);\n return distances;\n }", "private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}", "public WalkingDistance(ApplicationMode appMode) {\n rowSize = PuzzleConstants.getRowSize();\n keySize = 55;\n patternSize = 24964;\n priorKey = new int[] {0, 0x0E00, 0x0FC0, 0x0FF8};\n afterKey = new int[] {0x01FF, 0x003F, 0x0007, 0};\n partialPattern = new int[] {0x00000FFF, 0x00FC0000, 0x0000003F, 0x00FFF000};\n loadData(appMode);\n }", "private double calculateDis(double lata, double lona, double latb, double lonb){\n\t\tdouble lon2latRatio = Math.cos(lata * 3.14159 / 180.0);\n\t\tdouble milesperDegreeLat = 69.0;\n\t\tdouble milesperDegreeLon = milesperDegreeLat * lon2latRatio;\n\t\tdouble distance = 0.0;\n\t\tdistance = Math.sqrt((milesperDegreeLat * (latb - lata))\n\t\t\t\t* (milesperDegreeLat * (latb - lata))\n\t\t\t\t+ (milesperDegreeLon * (lonb - lona))\n\t\t\t\t* (milesperDegreeLon * (lonb - lona)));\n\t\treturn distance;\n\t}" ]
[ "0.6465314", "0.64502513", "0.62218916", "0.617159", "0.61476266", "0.61339915", "0.6133591", "0.6099337", "0.6078944", "0.6056536", "0.6051908", "0.6017921", "0.601531", "0.6013181", "0.593321", "0.59263957", "0.5921518", "0.589619", "0.58940244", "0.5890245", "0.58387995", "0.5830444", "0.57953227", "0.57901967", "0.5774593", "0.5765229", "0.57562387", "0.5750175", "0.5735844", "0.5730968", "0.5729302", "0.5711963", "0.56883186", "0.56816274", "0.56766045", "0.5659858", "0.5656953", "0.5656951", "0.5635676", "0.5632042", "0.56202155", "0.56143", "0.5613982", "0.5598425", "0.55893344", "0.55892235", "0.5584349", "0.55826324", "0.5566589", "0.5551336", "0.5547791", "0.55315834", "0.5529387", "0.5529025", "0.5526122", "0.5525862", "0.55213124", "0.5516161", "0.5514315", "0.55105376", "0.55067855", "0.55062747", "0.55035526", "0.5503408", "0.5500809", "0.54933953", "0.5491545", "0.54911834", "0.5483267", "0.5472933", "0.54727226", "0.5466741", "0.54632145", "0.54593664", "0.5458008", "0.54571027", "0.5454858", "0.54547703", "0.544762", "0.5445675", "0.54445255", "0.5443374", "0.5441904", "0.5441184", "0.5437813", "0.5431136", "0.5429943", "0.54297686", "0.542965", "0.54279435", "0.5427567", "0.5426173", "0.5425346", "0.54192567", "0.5416553", "0.5416533", "0.5409275", "0.54091775", "0.5405461", "0.5404555" ]
0.54694676
71
Euclidean distance (for physics engine)
double distanceEcl(Coord other) { int deltaX = x - other.x; int deltaY = y - other.y; return sqrt(((double)deltaX * deltaX) + ((double)deltaY * deltaY)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double distance(double x, double y);", "public static double euclideanDistance(Prototype one, Prototype two)\r\n {\r\n return d(one, two);\r\n }", "public int euclideanDistance(DataValue<T> value1, DataValue<T> value2)\r\n\t{\n\t\tint difference = value1.difference(value2);\r\n\t\tdifference = difference * difference;\t\r\n\t\treturn (int) Math.sqrt(difference);\r\n\t}", "double getDistance();", "double getSquareDistance();", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }", "public double mod() \n\t{\n if (x!=0 || y!=0) {\n return Math.sqrt(x*x+y*y); //distance formular\n } else {\n return 0.0D;\n }\n }", "private static double EuclideanDistance(Point p1, Point p2) {\n\t\tdouble dx = p2.X - p1.X;\n\t\tdouble dy = p2.Y - p1.Y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}", "public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}", "private Double euclidean(LatitudeLongitude point1, LatitudeLongitude point2) {\n return Double.valueOf(Math.sqrt(Math.pow(point1.getLatitude() - point2.getLatitude(), 2)\n + Math.pow(point1.getLongitude() - point2.getLongitude(), 2)));\n }", "public abstract double distanceFrom(double x, double y);", "private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}", "double distance (double px, double py);", "private static double dist(Data d, Centroid c)\r\n \t{\r\n \t\treturn Math.sqrt(Math.pow((c.Y() - d.Y()), 2) + Math.pow((c.X() - d.X()), 2));\r\n \t}", "private void euclidean(Node node, int d){\n int row1 = this.row;\n int col1 = this.col;\n int row2 = node.getRow();\n int col2 = node.getCol();\n\n double aSquared = Math.pow((row1-row2), 2);\n double bSquared = Math.pow((col1-col2), 2);\n\n if(d == 0) //Euclidean normal\n this.hVal = (float)Math.sqrt(aSquared+bSquared);\n else //Euclidean squared\n this.hVal = (float)(aSquared+bSquared);\n\n }", "public float getDistance();", "public static double getEuclideanDistance(VectorIntf x, VectorIntf y) {\r\n if (x==null || y==null) \r\n\t\t\tthrow new IllegalArgumentException(\"at least one arg null\");\r\n if (x.getNumCoords()!=y.getNumCoords()) \r\n\t\t\tthrow new IllegalArgumentException(\"args of different dimensions\");\r\n\t\tfinal int n = x.getNumCoords();\r\n double dist = 0.0;\r\n for (int i=0; i<n; i++) {\r\n double xi = x.getCoord(i);\r\n double yi = y.getCoord(i);\r\n dist += (xi-yi)*(xi-yi);\r\n }\r\n return Math.sqrt(dist);\r\n }", "public static double distancia(Entidade e1,Entidade e2){\r\n\t\tdouble dx = e1.getPosicaoX() - e2.getPosicaoX();\r\n\t\tdouble dy = e1.getPosicaoY() - e2.getPosicaoY();\r\n\t\tdouble d = Math.sqrt(dx*dx + dy*dy);\r\n\t\treturn d;\r\n\t}", "default double euclideanDistance(double[] a, double[] b) {\n checkLengthOfArrays(a, b);\n double sum = 0.0;\n for (int i = 0; i < a.length; i++) {\n final double d = a[i] - b[i];\n sum += d * d;\n }\n return Math.sqrt(sum);\n }", "public double getEuclideanDistanceTo(Position other) {\n\n double sum = 0;\n //POEY comment: values.length = the number of extraction functions\n //find different values of every object's values in each function (round-robin tournament event itself)\n for (int i = 0; i < values.length; i++) {\n double value = values[i];\n double otherValue = other.values[i];\n double diff = value - otherValue;\n sum += (diff * diff);\n }\n\n return Math.sqrt(sum);\n \n }", "public int distance(Coord coord1, Coord coord2);", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}", "public static double calculateEuclideanDistance(GridPoint point1, GridPoint point2) {\n\t\treturn Math.sqrt(Math.pow(point1.getX() - point2.getX(), 2) + Math.pow(point1.getY() - point2.getY(), 2));\n\t}", "public double euclidean(VectorA v)\n {\n return (Math.sqrt(this.mag() + v.mag()));\n }", "public double getEuclideanDistance( double[] x, double[] y )\n {\n double distance = 0;\n double t = 0;\n double s = 0;\n\n for( int i=0; i<x.length; i++ )\n {\n t = x[ i ] - y[ i ];\n s += (t * t);\n }\n\n distance = Math.sqrt( s );\n\n return distance;\n }", "double distanceSq (double px, double py);", "public double getEuclideanDistance( Double[] x, Double[] y )\n {\n double distance = 0;\n double t = 0;\n double s = 0;\n\n for( int i=0; i<x.length; i++ )\n {\n t = x[ i ] - y[ i ];\n s += (t * t);\n }\n\n distance = Math.sqrt( s );\n\n return distance;\n }", "public double distance(int x, int y){\n double distanceSq= Math.pow(this.x-x,2.0) + Math.pow(this.y-y,2.0);\n //double distance= Math.sqrt(distanceSq);\n return Math.sqrt(distanceSq);\n }", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }", "double getDistance(int i, int j){\r\n\tdouble d = (coord[i][0]-coord[j][0])*(coord[i][0]-coord[j][0])+ (coord[i][1]-coord[j][1])*(coord[i][1]-coord[j][1]);\r\n\td = Math.sqrt(d);\r\n\treturn d;\r\n}", "public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }", "public double getDistance()\n {\n return Math.abs(getDifference());\n }", "public static double dist (ECEF a, ECEF b)\r\n\t{\r\n\t\tdouble distsquared = square (a.x-b.x) + square (a.y-b.y) + square (a.z-b.z);\r\n\t\treturn Math.sqrt(distsquared);\r\n\t}", "public double euclideDistance(ArrayList<Double> vectorA, ArrayList<Double> vectorB) {\n double distance = 0.0;\n for (int i = 0; i < vectorA.size(); i++) {\n distance += Math.pow(vectorA.get(i) - vectorB.get(i), 2);\n }\n return Math.sqrt(distance);\n }", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }", "public double getEuclideanDistance2D( double x1, double x2, double y1, double y2 )\n {\n double distance;\n double t1 = x1 - y1;\n double t2 = t1 * t1;\n t1 = x2 - y2;\n t2 += ( t1 * t1 );\n distance = Math.sqrt( t2 );\n\n return distance;\n }", "public static float euclideanDistance(PointF firstPoint, PointF secondPoint) {\n return PointF.length(secondPoint.x - firstPoint.x, secondPoint.y - firstPoint.y);\n }", "private double distance(Double[] e1, Double[] e2) {\n if(e1.length != e2.length)\n throw new IllegalArgumentException(\"e1 and e2 lie in two different dimensional spaces.\");\n\n double sum = 0.0;\n for(int i = 0; i < e1.length; ++i)\n sum += Math.pow(e1[i] - e2[i], 2);\n return Math.sqrt(sum);\n }", "public final double calcDistance( Point a, Point b )\r\n {\r\n return( Math.sqrt( (Math.pow(a.y - b.y, 2)) +\r\n (Math.pow(a.x - b.x, 2)) ) );\r\n }", "double getDistanceInMiles();", "public double dist(Data d, Centroid c)\n {\n return Math.sqrt(Math.pow((c.Y() - d.Y()), 2) + Math.pow((c.X() - d.X()), 2));\n }", "public double distance() {\n return distance;\n }", "public double distance() {\n return distance;\n }", "protected double getSquaredEuclideanDistance(double[] v1, double[] v2) {\r\n \r\n double sum = 0;\r\n \r\n for(int i = 0; i < v1.length; i++) {\r\n sum += Math.pow((v1[i] - v2[i]), 2);\r\n }\r\n \r\n return sum;\r\n }", "public static double getEuclideanDistance(DblArray1SparseVector x, \r\n\t\t DblArray1SparseVector y) {\r\n if (x==null || y==null) \r\n\t\t\tthrow new IllegalArgumentException(\"at least one arg null\");\r\n if (x.getNumCoords()!=y.getNumCoords()) \r\n\t\t\tthrow new IllegalArgumentException(\"args of different dimensions\");\r\n\t\tfinal int n = x.getNumCoords();\r\n double dist = 0.0;\r\n\t\tif (Double.compare(x.getDefaultValue(),y.getDefaultValue())==0) {\r\n\t\t\tfinal int xs_nz = x.getNumNonZeros();\r\n\t\t\tfinal int ys_nz = y.getNumNonZeros();\r\n\t\t\tfinal double defVal = x.getDefaultValue();\r\n\t\t\tint x_ind = 0;\r\n\t\t\tint y_ind = 0;\r\n\t\t\twhile (x_ind<xs_nz || y_ind<ys_nz) {\r\n\t\t\t\tint x_pos = x_ind < xs_nz ? x.getIthNonZeroPos(x_ind) : \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInteger.MAX_VALUE;\r\n\t\t\t\tint y_pos = y_ind < ys_nz ? y.getIthNonZeroPos(y_ind) :\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInteger.MAX_VALUE;\r\n\t\t\t\tif (y_pos < x_pos) {\r\n\t\t\t\t\tdouble yi = y.getIthNonZeroVal(y_ind)-defVal;\r\n\t\t\t\t\tdist += yi*yi;\r\n\t\t\t\t\ty_ind++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (x_pos < y_pos) {\r\n\t\t\t\t\tdouble xi = x.getIthNonZeroVal(x_ind)-defVal;\r\n\t\t\t\t\tdist += xi*xi;\r\n\t\t\t\t\tx_ind++;\r\n\t\t\t\t}\r\n\t\t\t\telse { // x_pos==y_pos\r\n\t\t\t\t\tdouble xmyi = y.getIthNonZeroVal(y_ind)-x.getIthNonZeroVal(x_ind);\r\n\t\t\t\t\tdist += xmyi*xmyi;\r\n\t\t\t\t\tx_ind++;\r\n\t\t\t\t\ty_ind++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn Math.sqrt(dist);\r\n\t\t}\r\n for (int i=0; i<n; i++) {\r\n double xi = x.getCoord(i);\r\n double yi = y.getCoord(i);\r\n dist += (xi-yi)*(xi-yi);\r\n }\r\n return Math.sqrt(dist);\t\t\r\n\t}", "public static double d(Prototype one, Prototype two)\r\n {\r\n return Math.sqrt(squaredEuclideanDistance(one, two));\r\n }", "private float distanceTo(BasicEvent event) {\n final float dx = event.x - location.x;\n final float dy = event.y - location.y;\n// return Math.abs(dx)+Math.abs(dy);\n return distanceMetric(dx, dy);\n// dx*=dx;\n// dy*=dy;\n// float distance=(float)Math.sqrt(dx+dy);\n// return distance;\n }", "private double d(Point a, Point b){\n\t\treturn Math.sqrt(Math.pow(b.getX()-a.getX(),2) + Math.pow(a.getY() - b.getY(), 2));\r\n\t}", "double getDistance(Point p);", "public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}", "double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}", "public static double squaredEuclideanDistance(Prototype one, Prototype two)\r\n {\r\n final double[] oneInputs = one.getInputs();\r\n final double[] twoInputs = two.getInputs();\r\n //final int _size = one.numberOfInputs();\r\n double acc = 0.0;\r\n for (int i = 0; i < numberOfInputs; i++)\r\n {\r\n acc += (oneInputs[i] - twoInputs[i]) * (oneInputs[i] - twoInputs[i]);\r\n }\r\n return acc;\r\n }", "public double distance(double x1, double y1, double x2, double y2)\n {\n return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2));\n }", "public double distancia(Pixel pixel) {\r\n\t\tdouble distX = this.xDouble - pixel.xDouble;\r\n\t\tdouble distY = this.yDouble - pixel.yDouble;\r\n\t\tdouble val = distX * distX + distY * distY;\r\n\t\tif (val != 0)\r\n\t\t\treturn Math.sqrt(val);\r\n\t\treturn 0;\r\n\t}", "public abstract double GetDistance();", "private float getDistance(SXRNode object)\n {\n float x = object.getTransform().getPositionX();\n float y = object.getTransform().getPositionY();\n float z = object.getTransform().getPositionZ();\n return (float) Math.sqrt(x * x + y * y + z * z);\n }", "public double distance(){\n return DistanceTraveled;\n }", "private double calculateDistance(int sourceX, int sourceY, int targetX, int targetY){\n int xLength = targetX - sourceX;\n int yLength = targetY - sourceY;\n return Math.sqrt((xLength*xLength)+(yLength*yLength)); \n }", "public Vector3D getDistance()\n\t{\n\t\treturn distance;\n\t}", "public static EquationExpression dist(final EquationPoint a,\n\t\t\tfinal EquationPoint b) {\n\t\treturn sqrt(dist2(a, b));\n\t}", "public double getDist() {\n return distance;\n }", "public static EquationExpression dist(final EquationPoint a, final EquationPoint b) {\n return sqrt(dist2(a,b));\n }", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "public double norm() {\n if (dy == 0.0)\n return Math.abs(dx);\n return Math.hypot(dx, dy);\n }", "public double getSquaredEuclidianDistanceTo(final Coordinate c2){\n return Math.pow(c2.latitude - this.latitude,2) + Math.pow(c2.longitude - this.longitude, 2);\n }", "private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}", "public double calcDistance(Planet p){\n double sq_dis = (xxPos - p.xxPos) * (xxPos - p.xxPos) + (yyPos - p.yyPos) * (yyPos - p.yyPos);\n double distance = Math.sqrt(sq_dis);\n return distance;\n }", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public abstract double calculateDistance(double[] x1, double[] x2);", "public static double eucleidian(InputSpacePoint a, InputSpacePoint b) {\n double sum =0.0;\n for(String s : a.getKeysAsCollection()) {\n sum += Math.pow(a.getValue(s)-b.getValue(s), 2);\n }\n return Math.sqrt(sum);\n }", "private static int calculateEuclidianDistance(Node actualNode, Node targetNode)\n\t{\n\t\t\n\t\treturn (int)Math.sqrt(Math.pow((actualNode.getRow() - targetNode.getRow()), 2) +\n\t\t\t\t\tMath.pow((actualNode.getColumn() - targetNode.getColumn()), 2));//distance*(int)Math.sqrt(dx+dy);\n\t}", "public double getDistance(){\n\t\treturn this.distance;\n\t}", "public double calcDistance(Planet p){\n\t\tdouble dx=-(xxPos-p.xxPos);\n\t\tdouble dy=-(yyPos-p.yyPos);\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "static double distance(double x1, double y1, double x2, double y2)\n {\n double x_dist = x2 - x1;\n double y_dist = y2 - y1;\n double dist = Math.sqrt(Math.pow(x_dist, 2) + Math.pow(y_dist, 2));\n return dist;\n }", "public int distance() {\n return distance;\n }", "public double calcDistance(Planet p){\n\t\treturn(Math.sqrt((this.xxPos-p.xxPos)*(this.xxPos-p.xxPos)\n\t\t\t+(this.yyPos-p.yyPos)*(this.yyPos-p.yyPos)));\n\t}", "double distance() {\r\n\t double dist_total = 0;\r\n\t for (int i = 0; i < index.length - 1; i++) {\r\n\t dist_total += city(i).distance(city(i + 1));\r\n\t }\r\n\t \r\n\t return dist_total;\r\n\t}", "public static float distance(Vec2 start, Vec2 end) {\r\n\t\treturn (float) Math.sqrt((end.x - start.x) * (end.x - start.x) + (end.y - start.y)\r\n\t\t\t\t* (end.y - start.y));\r\n\t}", "public final double getDistanceSquared() {\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < position.length; i++)\n\t\t\tsum += position[i] * position[i] * calibration[i] * calibration[i];\n\t\treturn sum;\n\t}", "public static double dist (Vertex a, Vertex b){\n return Math.sqrt((b.y-a.y)*(b.y-a.y) + (b.x-a.x)*(b.x-a.x));\n }", "public double getDistance() {\n\t\tdouble sum = 0;\n\t\tfor(int i = 0; i < ordering.size() - 1; i++) {\n\t\t\tsum += cost[ordering.get(i) - 1][ordering.get(i+1) - 1];\n\t\t}\n\t\treturn sum;\n\t}", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "public static float getDistance(float x1, float y1, float x2, float y2)\r\n\t{\r\n\t\treturn (float) Math.sqrt(getSquareDistance(x1, y1, x2, y2));\r\n\t}", "public abstract double distance(AbstractPoisson o2);", "private static double calculaDistancia(double[] param1, double[] param2){\n\t\tdouble res1= Math.pow((param1[0]-param2[0]), 2);\n\t\tdouble res2= Math.pow((param1[1]-param2[1]), 2);\n\t\tdouble res3= Math.pow((param1[2]-param2[2]), 2);\n\t\tdouble res4= res1 + res2 + res3;\n\t\tdouble res5= res4/3;\n\t\tdouble res6= Math.sqrt(res5);\n\t\treturn res6;\n\t}", "public static double euclidDist(Point p1, Point p2) {\r\n\t\tvar p1Lat = p1.latitude();\r\n\t\tvar p1Lon = p1.longitude();\r\n\t\tvar p2Lat = p2.latitude();\r\n\t\tvar p2Lon = p2.longitude();\r\n\t\tvar dist = Math.sqrt( ((p1Lat-p2Lat)*(p1Lat-p2Lat)) + ((p1Lon-p2Lon)*(p1Lon-p2Lon)) );\r\n\t\treturn dist;\r\n\t}", "private static int distance(int x, int y, int centerX, int centerY)\n {\n // Pythagorian theorem\n return (int) Math.sqrt(Math.pow((double)(x - centerX), 2) + Math.pow((double)(y - centerY), 2));\n }", "private double dist(double [] v1, double [] v2){\n \t\tdouble sum=0;\n \t\tfor (int i=0; i<nDimensions; i++){\n \t\t\tdouble d = v1[i]-v2[i];\n \t\t\tsum += d*d;\n \t\t}\n \t\treturn Math.sqrt(sum);\n \t}", "public double getDistance(Node start, Node end) {\n\tstartX = start.getX();\n\tstartY = start.getY();\n\tendX = end.getX();\n\tendY = end.getY();\n\n int Xsquared = (startX - endX) * (startX - endX);\n\tint Ysquared = (startY - endY) * (startY - endY);\n\n\treturn Math.sqrt(Xsquared + Ysquared);\n\t\n }", "public double getDistance() {\n\t\treturn distance;\n\t}", "public double getDistance() {\n\t\treturn distance;\n\t}", "public double getEuclideanDistance( int[] x, int[] y )\n {\n double[] a = new double[ x.length ];\n double[] b = new double[ y.length ];\n\n for( int i=0; i<a.length; i++ )\n {\n a[ i ] = (double) x[ i ];\n }\n\n for( int j=0; j<b.length; j++ )\n {\n b[ j ] = (double) y[ j ];\n }\n\n return getEuclideanDistance( a, b );\n }", "public double calcDistance(GpsCoordinate other)\n\t{\n\t\tdouble lat1 = degToRadian(this.latitude);\n\t\tdouble lng1 = degToRadian(this.longitude);\n\t\tdouble lat2 = degToRadian(other.latitude);\n\t\tdouble lng2 = degToRadian(other.longitude);\n\t\t\n\t\t/*\n\t\t * use haversine Formula to calc the distance\n\t\t * @see: http://en.wikipedia.org/wiki/Haversine_formula\n\t\t */\n\t\tdouble inRootFormula = Math.sqrt(\n\t\t\t\tMath.sin((lat1 - lat2)/2)*Math.sin((lat1 - lat2)/2)+\n\t\t\t\tMath.cos(lat1)*Math.cos(lat2)*Math.sin((lng1-lng2)/2)*Math.sin((lng1-lng2)/2));\n\t\t\n\t\treturn 2* EARTH_RADIUS * Math.asin(inRootFormula);\n\n\t\n\t}", "double squaredDistanceTo(IMovingObject m);", "public double calcDistance(Planet p){\n\t\tdouble dx = p.xxPos - this.xxPos;\n\t\tdouble dy = p.yyPos - this.yyPos ;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\n\t}", "public double calcDistance(Planet p){\n\t\t\tdouble dx = this.xxPos - p.xxPos;\n\t\t\tdouble dy = this.yyPos - p.yyPos;\n\t\treturn Math.sqrt(dx*dx + dy*dy);\n\t}", "public double computeDistance(Object o){\n \n if (o!=null && o.getClass()==this.getClass()){\n NDimensionalPoint newPoint = (NDimensionalPoint) o;\n if (newPoint.values.size()==values.size()){\n double dist = 0.0;\n for (int i=0;i<values.size();i++){\n dist+=Math.pow(newPoint.getValues().get(i) -values.get(i),2);\n }\n return Math.sqrt(dist);\n }else\n {\n return MAX_DIST;\n }\n }else{\n return MAX_DIST;\n }\n }", "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }" ]
[ "0.7318042", "0.72224706", "0.71544355", "0.7150839", "0.71434695", "0.71346074", "0.7094994", "0.70382833", "0.7030333", "0.7017058", "0.6996778", "0.6982887", "0.6980083", "0.69615245", "0.69560826", "0.69448316", "0.68920815", "0.686285", "0.6842513", "0.683331", "0.6824114", "0.67649055", "0.6759628", "0.6746669", "0.67343104", "0.6721297", "0.6715935", "0.6703119", "0.6678583", "0.66694194", "0.6668741", "0.6657409", "0.6636229", "0.66316134", "0.6621111", "0.6619083", "0.6617612", "0.6617388", "0.661505", "0.6614578", "0.6570346", "0.65500665", "0.65455693", "0.65314776", "0.65314776", "0.65299153", "0.6515511", "0.65120894", "0.6511338", "0.65100014", "0.6488367", "0.64785737", "0.64778805", "0.6460045", "0.6426752", "0.6423075", "0.64116406", "0.640724", "0.6388844", "0.6385141", "0.6377018", "0.6374436", "0.6372969", "0.63606095", "0.6350162", "0.6349908", "0.6348115", "0.6342428", "0.6339879", "0.6332693", "0.631579", "0.6310094", "0.63059044", "0.63052976", "0.6298843", "0.62968856", "0.6296752", "0.62945974", "0.6288181", "0.62855995", "0.6284042", "0.628357", "0.62825567", "0.6281534", "0.6281054", "0.6273341", "0.6271422", "0.62496793", "0.62469274", "0.6244836", "0.6242723", "0.6241915", "0.6241915", "0.6225393", "0.6217034", "0.6216557", "0.62144613", "0.6210615", "0.620928", "0.6207301" ]
0.6595169
40
return x + " " + y; // TODO change if you use Coord in System.out
public String toString() { return "[" + x + ", " + y + "]"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String coords(int x, int y) {\n return String.format(\"%d,%d\", x, y);\n }", "public String toString() {\r\n \treturn new String(\"x: \" + x + \" y: \" + y);\r\n }", "public String toString(){\n return \"(\" + this.x + \",\" + this.y + \")\";\n }", "public String toString() {\n return \"(\"+this.x + \", \" + this.y+\")\";\n }", "public String toString()\n\t{\n\t\treturn getX()+\" \"+getY();\n\t}", "public String toString(){\n return \"{\"+this.x+\", \"+this.y+\"}\";\n }", "@Override\r\n\tpublic String toString() {\n\t\tString rtn=this.x+\".\"+this.y;\r\n\t\treturn rtn;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"(%d, %d)\", x, y);\n\t}", "@Override\n public String toString() {\n return String.format(\"(%d,%d)\", x, y);\n }", "public String toString() {\n\t return \"(\" + this.x + \",\" + this.y + \")\";\n\t }", "public String toString()\n {\n return (\"x,y\" + x + y);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"(\" + x + \", \" + y + \")\";\n\t}", "public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }", "public String getDetails()\n\t{\n\t return \"Point (\"+x+\",\"+y+\")\";\n\t}", "public String toString()\r\n {\r\n return \"(\" + this.x() + \", \" + this.y() + \")\";\r\n }", "public String toString() {\n\t\treturn \"(\" + x + \",\" + y + \")\";\n\t}", "public String toString() {\n\t\treturn \"(\" + x + \", \" + y + \")\";\n\t}", "public String toString() {\n\t\treturn (\"The value of \\\"x\\\" is: \" + x + \"\\n\"\n\t\t\t + \"The value of \\\"y\\\" is: \" + y);\n\t}", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Point x=\"+x+\" y=\"+y;\n\t}", "public String toString() {\n\t\treturn \"x1 = \" + x1 + \" y1 = \" + y1 + \" x2 = \" + x2 + \" y2 = \" + y2;\n\t}", "public String toString() {\r\n /* DO NOT MODIFY */\r\n return \"(\" + x + \", \" + y + \")\";\r\n }", "@Override\n public String toString() {\n return String.format(\"position X is='%s' ,position Y is='%s'\" , positionX , positionY);\n }", "@Override\n public String toString()\n {\n return TAG + \"[x:\" + x + \",y:\" + y + \"]\";\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Coord[\" + this.x0 + \",\" + this.y0 + \"]\";\n\t}", "public String toString() {\n /* DO NOT MODIFY */\n return \"(\" + x + \", \" + y + \")\";\n }", "public String toString() {\n /* DO NOT MODIFY */\n return \"(\" + x + \", \" + y + \")\";\n }", "public String toString() {\n /* DO NOT MODIFY */\n return \"(\" + x + \", \" + y + \")\";\n }", "@NonNull\n @Override\n public String toString() {\n return y + \",\" + x;\n }", "public String toString() {\n\t\t\n\t\treturn (\"(\" + getX() + \", \" + getY() + \")\");\t\t\t// Returns a string representing the Coordinate object\n\t}", "@Override\n public String toString() \n\t{\n\t\t// This is just for the output format\n\t\tString sg = \"\";\n\t\tsg = sg + \"(\";\n\t\tsg = sg + x;\n\t\tsg = sg + \", \";\n\t\tsg = sg + y;\n\t\tsg = sg + \") \";\n\t\t\n\t\treturn sg;\n\n\t}", "public String toString()\n {\n return \"I am the nice \" + NAME + \", I am now standing on square \" + x + \" , \" + y + \".\";\n }", "public String toString(){\n\t\treturn topleft.x + \",\"+topleft.y+\",\"+bottomright.x+\",\"+bottomright.y;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"(\" + X + \",\" + Y + \")\";\n\t}", "@Override\n public String toString() {\n String s = \"(\" + this.getY() + \",\" + this.getX() + \")\";\n return s;\n }", "public String toString()\n\t{\n\t\tString data = \"(\" + x + \", \" + y + \")\";\n\t\treturn data;\t\t\t\t\t\t\t\t\t\t\t// Return point's data \n\t}", "String dCoord(int coord) {\n if (coord < 0)\n return (minimap.conf.netherpoints ? \"n\" : \"\") + \"-\" + Math.abs(coord + 1);\n else\n return (minimap.conf.netherpoints ? \"n\" : \"\") + \"+\" + coord;\n }", "@Override\n public String toString() {\n return \"<\" + this.x + \",\" + this.y + \">\";\n }", "String getPosY();", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "@Override\r\n\tpublic String toString(){\r\n\t\treturn \"[\" + this.getX()+ \" \" + this.getY()+ \"]\";\r\n\t}", "public String toString(){\n return \"X = \" + xPosition + \", Y = \" + yPosition + \", width = \" + widthRadius + \", height = \" + \n heightRadius;\n }", "String getPosX();", "public String toString()\r\n\t{\r\n\t\tStringBuffer buffer = new StringBuffer(\"{X = \");\r\n\t\tbuffer.append(this.x);\r\n\t\tbuffer.append(\", Y = \");\r\n\t\tbuffer.append(this.y);\r\n\t\tbuffer.append('}');\r\n\t\treturn buffer.toString();\r\n\t}", "public int getXY(int x, int y);", "@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}", "protodef.b_math.coord getCoordInfo();", "int getX_coordinate(){\n return x_coordinate;\n }", "public String getCoordinatesAsString() {\r\n return String.format(\"%s, %s, %s, %s\\n\", p1, p2, p3, p4);\r\n }", "@Override\n public String toString() {\n return \"Ship X:\" + position.x\n + \"\\nShip Y:\" + position.y;\n }", "@Override\r\n\tpublic String getFormatedCoordinates() {\n\t\treturn \"Drone position: (\"+x+\",\"+y+\",\"+z+\")\";\r\n\t}", "public void suma(){\r\n\t\tSystem.out.println(this.getX() + this.getY());\r\n\t}", "public String toString() {\r\n\t\treturn getx() + \" \" + gety() + \" \" + getWidth() + \" \" + getHeight() + \" \" + getColor() + \" \" + getXSpeed()+ \" \" + getYSpeed();\r\n\t}", "private void printSquareAroundPoint(int x, int y)\n {\n // System.out.println();\n }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }", "public String toString()\n\t{\n\t\treturn \"[\" + mX + \", \" + mY + \"]\";\n\t}", "public String toString() {\n\t\treturn \"Piece \" + num + \" - x: \" + x + \" y: \" + y;\n\t}", "public String toString() {\n\t\treturn \"#Point {x: \" + this.getX() + \", y: \" + this.getY() + \"}\";\n\t}", "long getCoordinates();", "long getCoordinates();", "public String toString()\r\n {\r\n return \"Center = \" + \"[\" + x + \", \" + y + \"]\" +\r\n \"; Radius = \" + radius;\r\n }", "@Override\n public String toString() {\n return String.format(\"[%s,%s]\"\n , pawnOne.getPositionNr(), pawnTwo.getPositionNr());\n }", "public String toString()\n\t{\n\t\treturn \"x:\"+xPos+\" y:\"+yPos+\" width:\"+width+\" height:\"+height+\" color:\"+ color;\n\t}", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public String toString() {\n return row + \",\" + col;\n }", "@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}", "public String toString() {\n return (\"x = \" + (p1.getX() - p2.getX()) + \" + \" + p1.getX() + \n \", y = \" + (p1.getY() - p2.getY()) + \" + \" + p1.getY() + \n \", z = \" + (p1.getZ() - p2.getZ()) + \" + \" + p1.getZ());\n }", "public int getX(){ return xPosition; }", "public int getX()\r\n {\r\n return xCoord;\r\n }", "@Override\n public String toString() {\n return \"@(\"+x+\"|\"+y+\") mit Bewegung: \"+bewegung;\n }", "@Override\r\n public String toString() {\n return String.format(\"A(%3d,%3d); B(%3d,%3d)\", A.getX(), A.getY(), B.getX(), B.getY());\r\n }", "@Override\n public String toString()\n {\n return \"[\" + getLowerLeftX() + \",\" + getLowerLeftY() + \",\" +\n getUpperRightX() + \",\" + getUpperRightY() +\"]\";\n }", "@Override\n public String toString(){\n return x+\"\\n\"+y+\"\\n\"+z;\n }", "public static void printXY(int x, int y) {\n\t\tSystem.out.println(\"x = \" + x + \", y = \" + y);\n\t}", "public String toString() {\n return(\"[\"+point1+\",\"+point2+\"]\");\n }", "public String toString() {\n\t\tString blawk = \"X: \" + getLocation().getX() + \", Y: \" + getLocation().getY() + \", Id: \" + getId();\n\t\treturn blawk;\n\t}", "public String toString() {\n\t\treturn position\n\t\t\t+ \" between \"\n\t\t\t+ worldOrigin\n\t\t\t+ \" and \"\n\t\t\t+ worldEnd;\n\t}", "int getY_coordinate(){\n return y_coordinate;\n }", "static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}", "@Override\r\n public String toString() { return new String( \"(\" + row + \", \" + col + \")\" ); }", "public String getGVCoordsForPosition() {\n return \"\\\"\" + coords[0] + \",\" + coords[1] + \"!\\\"\";\n }", "public int getLocationX() {\r\n\t\treturn x;\r\n\t}", "public void draw(WorldLocation coord){\n \n }", "public Coords getCoord() {\r\n\t\treturn coord;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"(%f, %f, %f)\", x, y, z);\n\t}", "public int getX() {\n\treturn baseXCoord;\n}", "double getY() { return pos[1]; }", "public String toString() {\n\t\treturn \"(\" + roundToOneDecimal(x) + \", \" + roundToOneDecimal(y) + \")\";\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\treturn \"x=\" + x + \",y=\" + y + \",obj=\" + block;\n\t}", "public String toString() {\n return \"<VariablePoint2: (\"+getX()+\", \"+getY()+\")>\";\n }", "public Point getXY()\n\t{\n\t\tPoint newPoint = new Point(x,y);\t\t\t\t\t\t// Create new Point object \n\t\treturn newPoint; \t\t\t\t\t\t\t\t\t\t// Return point's x and y coordinates\n\t}", "public String getYx() {\n return yx;\n }", "posXY(int x, int y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public int x() {\r\n\t\treturn xCoord;\r\n\t}", "public void display (Graphics2D g, double x, double y);", "protected int getxCoord() {\n\t\treturn xCoord;\n\t}", "public int getLocY ()\n {\n return locY;\n }", "private static int CoordinateFilled(int y, int x) {\r\n\t\tint retVal = y*9+x;\r\n\t\treturn retVal;\r\n\t}", "public float getX() { return xCoordinate;}" ]
[ "0.76732016", "0.76731", "0.7603335", "0.75576115", "0.7533509", "0.7499615", "0.7497726", "0.7493918", "0.74843323", "0.7482346", "0.7455676", "0.74017805", "0.73892933", "0.73584515", "0.7346733", "0.73298466", "0.7264337", "0.7233506", "0.71989095", "0.71623963", "0.7138898", "0.71048814", "0.7097883", "0.7093346", "0.7081546", "0.70787317", "0.70787317", "0.70787317", "0.70221347", "0.70056057", "0.69996506", "0.6977517", "0.6925692", "0.6923096", "0.6889957", "0.68200296", "0.6817397", "0.6796449", "0.6795629", "0.6781807", "0.677093", "0.675087", "0.6693201", "0.6681258", "0.6678391", "0.6664225", "0.6626884", "0.66264063", "0.6570462", "0.6565955", "0.65521765", "0.6549182", "0.6524012", "0.6476849", "0.64564055", "0.64532316", "0.64335907", "0.64285785", "0.63888985", "0.63738775", "0.63738775", "0.6368594", "0.636347", "0.6354392", "0.6351162", "0.6341829", "0.63350344", "0.6334247", "0.6308401", "0.6298065", "0.6295534", "0.6292505", "0.6289871", "0.62824357", "0.6279594", "0.6250682", "0.62144756", "0.6212279", "0.6211101", "0.61932695", "0.6192655", "0.61844826", "0.6180065", "0.6175048", "0.6171257", "0.61555725", "0.61473465", "0.6146005", "0.6145399", "0.614171", "0.61312217", "0.61310196", "0.61129177", "0.61037314", "0.60908103", "0.6084967", "0.60822946", "0.6081322", "0.60772544", "0.6072091" ]
0.6747429
42
Check if a point is inside a bounding box
boolean inBoundingBox(Coord pos) { return min(from.x, to.x) <= pos.x && pos.x <= max(from.x, to.x) && min(from.y, to.y) <= pos.y && pos.y <= max(from.y, to.y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final boolean isInside(int x, int y, Rect box) {\n return (box.x < x && x < box.x + box.w && box.y < y && y < box.y + box.h);\n }", "public boolean isPointInBox(final Vec3 inP)\n {\n // Rotate the point into the box's coordinates\n Vec4 p = m.getInverseSimple().multiply(inP.toPoint());\n\n // Now just use an axis-aligned check\n if (abs(p.getX()) < extents.getX()\n && abs(p.getY()) < extents.getY()\n && abs(p.getZ()) < extents.getZ())\n {\n return true;\n }\n\n return false;\n }", "public boolean pointInside(Point2D p) {\n AffineTransform fullTransform = this.getFullTransform();\n AffineTransform inverseTransform = null;\n try {\n inverseTransform = fullTransform.createInverse();\n } catch (NoninvertibleTransformException e) {\n e.printStackTrace();\n }\n Point2D newPoint = (Point2D)p.clone();\n inverseTransform.transform(newPoint, newPoint);\n return rect.contains(newPoint); \n }", "boolean contains(double x, double y) {\r\n\t\t//cordinate of the left edge\r\n\t\tdouble xLeftEdge = this.getX() - this.width / 2;\r\n\t\t//cordinate of the right edge\r\n\t\tdouble xRightEdge = this.getX() + this.width / 2;\r\n\t\t////cordinate of the top edge\r\n\t\tdouble yTopEdge = this.getY() + this.height / 2;\r\n\t\t//cordinate of the bottom edge\r\n\t\tdouble yBottomEdge = this.getY() - this.height / 2;\r\n\r\n\t\t//if the point is between the edges it is inside the rectangle\r\n\t\treturn (x < xRightEdge) && (x > xLeftEdge) && (y < yTopEdge)\r\n\t\t\t\t&& (y > yBottomEdge) ? true : false;\r\n\t}", "private boolean isWithinBounds(Point3D point) {\n // Check if point is above min bounds\n if (point.getX() < minBounds.getX() || point.getY() < minBounds.getY() || point.getZ() < minBounds.getZ()) {\n return false;\n }\n // Check if point is below max bounds\n if (point.getX() > maxBounds.getX() || point.getY() > maxBounds.getY() || point.getZ() > maxBounds.getZ()) {\n return false;\n }\n return true;\n }", "public boolean isPointInside(int x, int y) {\r\n if (Integer.compare(x, _xLeft) <= 0) {\r\n return false;\r\n }\r\n \r\n if (Integer.compare(x, _xRight) >= 0) {\r\n return false;\r\n }\r\n \r\n if (Integer.compare(y, _yTop) <= 0) {\r\n return false;\r\n }\r\n \r\n if (Integer.compare(y, _yBottom) >= 0) {\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }", "public abstract boolean containsPoint(int x, int y);", "public boolean contains(final Coords point)\r\n {\r\n return toRectangle().contains(point.toPoint());\r\n }", "public boolean mouseWithinBox() {\n return (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h);\r\n }", "private boolean isInBounds(float x, float y) {\n\n if (x <= 0 || x >= this.getWidth() || y <= 0 || y >= this.getHeight()) {\n\n return false;\n }\n return new RectF(0, 0, this.getWidth(), this.getHeight())\n .contains(x, y);\n }", "public boolean isWithinObject(int x, int y)\n {\n if( x > coX-Xsize/2 &&\n x < coX+Xsize/2 &&\n y > coY-Ysize/2 &&\n y < coY+Ysize/2 )\n return true;\n else\n return false;\n }", "public abstract boolean intersect(BoundingBox bbox);", "public boolean isInside(Rectangle boundary) {\n\t\t\n\t\t// Use TLAP to see if it is or it is not\n\t\tif (x + diameter / 2 >= boundary.getX() - boundary.getWidth() && x + diameter / 2 <= boundary.getX() + boundary.getWidth()\n\t\t\t\t&& y + diameter / 2 >= boundary.getY() - boundary.getHeight() && y + diameter / 2 <= boundary.getY() + boundary.getHeight()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean detectBound(){\n if(posX < 0 || posX > width || posY < 0 || posY > height){\n return true;\n }\n else{\n return false;\n }\n }", "public static boolean pointInRectangle(int minX, int minY, int maxX, int maxY, int x, int y) {\n\t\treturn minX < x && maxX > x && minY < y && maxY > y;\n\t}", "public boolean situatedInside(double x, double y) {\n if(y>this.bottomleft.x && y<this.topright.x && x <this.topright.y && x > this.bottomleft.y)\n return true;\n else\n return false;\n }", "public boolean inside(Point p) {\n\t\tif (p.getX() < boundingRect.getX() || p.getY() < boundingRect.getY()) return false;\n\t\tif (p.getX() > boundingRect.getX() + boundingRect.getW() || \n\t\t p.getY() > boundingRect.getY() + boundingRect.getH()) return false;\n\n\t\t// Create a line from the point to the left\n\t\tLine l = new Line(p.getX(), p.getY(), p.getX() - boundingRect.getW(), p.getY());\n\n\t\t// Count intersections\n\t\tint count= 0;\t\t\n\t\tfor(int i=0; i<lines.size(); i++ ) {\n\t\t\tif (lines.get(i).intersectsAt(l) != null) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n // We are inside if the number of intersections is odd\n\t\treturn count%2 == 1;\n\t}", "public boolean contains(Point point) {\n\n\t\tif (Math.abs(center.getX() - point.getX()) <= (width / 2) && (Math.abs(center.getY() - point.getY()) <= height /2)) {\n\n\t\t\treturn true;\n\t\t\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "Boolean CheckIfInside(float xVal, float yVal) {\r\n double distance = Math.sqrt((this.x-xVal)*(this.x-xVal) + (this.y-yVal)*(this.y-yVal));\r\n return (distance <= this.radius);\r\n }", "private boolean isInBounds(int x, int y) {\r\n\t\treturn x >= 0 && y >= 0 && x < getWidth() && y < getHeight();\r\n\t}", "public boolean fits(Point p) {\n\t\treturn boundary.contains(p);\n\t}", "public boolean containsPoint(Point p) {\n \treturn\n \t\tp.x >= x &&\n \t\tp.x <= x + width &&\n \t\tp.y >= y &&\n \t\tp.y <= y + height;\n }", "public boolean containsPoint(Point p) {\n\t\treturn (p.x >= x && p.x <= (x + WIDTH)\n\t\t\t\t&& p.y >= y && p.y <= (y + HEIGHT));\n\t}", "public boolean whithinRectangle(Point point1, Point point2) {\n\t\treturn false;\n\t}", "boolean contains(Polygon p);", "private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}", "public boolean contains(Point p);", "public boolean isInside(int x, int y) {\r\n if (this.state == 0) {\r\n if ((x >= this.x && x <= (this.x +width)) &&\r\n y >= this.y && y <= (this.y +height)) {\r\n return true;\r\n }\r\n } else if (this.state == 1) {\r\n if ((x <= this.x && x >= (this.x - height)) &&\r\n y >= this.y && y <= (this.y + width)) {\r\n return true;\r\n }\r\n } else if (this.state == 2) {\r\n if ((x <= this.x && x >= (this.x - width)) &&\r\n y <= this.y && y >= (this.y - height)) {\r\n return true;\r\n }\r\n } else if (this.state == 3) {\r\n if ((x >= this.x && x <= (this.x + height)) &&\r\n y <= this.y && y >= (this.y - width)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Override\n public boolean inBounds(int x, int y) {\n return x >= 0 && y >= 0 && x < this.bounds.width\n && y < this.bounds.height;\n }", "public boolean contains(int x, int y)\n\t{\n\t\treturn (boundingBox.contains(x,y));\n\t}", "public boolean isInside(final Tuple3d point) {\n final double distance = this.distanceToPoint(point);\n\n return IntersectionUtils.isGreaterOrEqual(distance, 0.0);\n }", "public boolean inBounds(Rectangle bounds)\n\t{\n\t\treturn bounds.contains(mX, mY);\n\t}", "public boolean boundsContains(double[] pt){\n return bounds.contains(pt);\n }", "public boolean inside(final Point p)\n\t\t{\n\t\t\tif(obj.contains(p))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "boolean checkPointInsidePolygon(Point[] points, PVector input) {\n\t\tint i, j;\n\t\tboolean c = false;\n\t\tfor (i = 0, j = points.length - 1; i < points.length; j = i++) {\n\t\t\tif (((points[i].y > input.y) != (points[j].y > input.y))\n\t\t\t\t\t&& (input.x < (points[j].x - points[i].x) * (input.y - points[i].y) / (points[j].y - points[i].y)\n\t\t\t\t\t\t\t+ points[i].x))\n\t\t\t\tc = !c;\n\t\t}\n\t\treturn c;\n\t}", "public boolean detect_intersection_with_box(Box box)\n {\n if(_boundingbox == null)\n {\n this.generateBoundingBox();\n }\n\n // No intersection if the bounding box doesn't intersect the input box.\n if(!box.intersects_box(this._boundingbox))\n {\n return false;\n }\n\n // Filled polyline and contains entire box.\n if(this.isFilled() && this.containsPoint(box.min))\n {\n return true;\n }\n\n // Filled box that contains entire polyline.\n if(box.isFilled() && box.containsPoint(this._points.get(0)))\n {\n return true;\n }\n\n // No perform a polyline <---> polyline intersection test.\n Polyline polyline = box.toPolyline();\n\n return detect_intersection_with_polyline(polyline);\n }", "public boolean isInside(int x, int y){\n \tif( ( x >= xpos && x <= xpos + img.getWidth()) &&\n \t\t ( y >= ypos && y <= ypos + img.getHeight()) ){\n \t\treturn true;\n \t}else\n \t\treturn false;\n\t}", "public boolean containsPoint( Point p ) {\r\n return (( p.x > drawx-getWidth()/2) && ( p.x < drawx+getWidth()/2) \r\n && ( p.y > drawy-getHeight()/2) && ( p.y < drawy+getHeight()/2));\r\n }", "@Override\n public boolean containsPoint(Point x) {\n return x.getX() >= center.getX() - sideLength/2 && x.getX() <= center.getX() + sideLength/2\n && x.getY() >= center.getY() -sideLength/2 && x.getY() <= center.getY() +sideLength/2;\n }", "public boolean isWithinBounds(int x, int y) {\n\t\tif (x < 0 || x >= this.width)\n\t\t\treturn false;\n\n\t\tif (y < 0 || y >= this.height)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private boolean isVecInsideXYBounds(World world, BlockPos pos, Vec3 vec) {\n double[] bounds = getBlockBounds(world, pos);\n return bounds!=null && vec!=null && vec.xCoord>=bounds[0] && vec.xCoord<=bounds[3] && vec.yCoord>=bounds[1] && vec.yCoord<=bounds[4];\n }", "boolean hasRect();", "public boolean isAround(Ball ball)\n {\n int delta = 10;\n Rectangle2D rectangle = new Rectangle2D.Double(mPosition.getX() - delta, mPosition.getY() - delta, 2 * delta, 2 * delta);\n \n return rectangle.contains(ball.getPosition());\n }", "@Override\n\tpublic boolean isInside(float x, float y, float z) {\n\t\treturn false;\n\t}", "public boolean contains(Vector pt) {\r\n final double x = pt.getX();\r\n final double y = pt.getY();\r\n final double z = pt.getZ();\r\n return x >= this.getMinimumPoint().getBlockX() && x < this.getMaximumPoint().getBlockX() + 1\r\n && y >= this.getMinimumPoint().getBlockY() && y < this.getMaximumPoint().getBlockY() + 1\r\n && z >= this.getMinimumPoint().getBlockZ() && z < this.getMaximumPoint().getBlockZ() + 1;\r\n }", "public boolean contains(RMPoint aPoint)\n{\n // Get line width to be used in contain test\n float lineWidth = getStrokeWidth();\n \n // If polygon or line, make line width effectively at least 8, so users will have a better shot of selecting it\n if(this instanceof RMPolygonShape || this instanceof RMLineShape)\n lineWidth = Math.max(8, getStrokeWidth());\n \n // Get bounds, adjusted for line width\n RMRect bounds = getBoundsInside();\n bounds.inset(-lineWidth/2, -lineWidth/2);\n\n // If point isn't even in bounds rect, just return false\n if(!aPoint.inRect(bounds))\n return false;\n \n // Get shape path in bounds rect\n RMPath path = getPathInBounds();\n \n // Return whether path intersects point\n return path.intersects(aPoint, lineWidth);\n}", "public boolean isInRect(Point p) {\n\t\tLine AB = new Line(A1, B1);\n\t\tLine CD = new Line(C1, AB.getU());\n\t\tLine AD = new Line(A1, D1);\n\t\tLine BC = new Line(B1, AD.getU());\n\n\t\tif (Line.isBetween2Lines(AB, CD, p) && Line.isBetween2Lines(AD, BC, p)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean pointInside(World world, int x, int y, int z) {\n \t\tint coords[] = getCoords();\n \t\treturn ((coords[0] <= x && coords[3] >= x) &&\n\t\t\t\t(coords[1] <= y && coords[4] >= y) &&\n\t\t\t\t(coords[2] <= z && coords[5] >= z) &&\n \t\t\t\tgetWorld().getName().equals(world.getName()));\n \t}", "static boolean contains(RBox b1, RBox b2){\n\t\t\n\t\t\t\n\t\t\tboolean xContainment = false;\n\t\t\tboolean yContainment = false;\n\t\t\t\n\t\t\tif(b1.xmin<=b2.xmin && b1.xmax>=b2.xmax)\n\t\t\t\txContainment = true;\n\t\t\tif(b1.ymin<=b2.ymin && b1.ymax>=b2.ymax)\n\t\t\t\tyContainment = true;\n\t\t\t\n\t\t\tif(xContainment&&yContainment)\n\t\t\t\treturn true;\n\t\t\n\t\t\n\t return false;\n\t\t\t\n\t\t\t\n\t}", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isInSpriteBoundingBox(double x, double y) {\n\t\tfor (Sprite s:objects) {\n\t\t\tif (s.getBoundingBox().intersects(new Point(x, y)))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isInsideZone(int x, int y)\r\n\t{\r\n\t\tboolean inside = false;\r\n\t\tfor (Shape sh : _shapes)\r\n\t\t{\r\n\t\t\tif (sh.contains(x, y))\r\n\t\t\t{\r\n\t\t\t\tinside = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (_exShapes != null && inside)\r\n\t\t{\r\n\t\t\tfor (Shape sh : _exShapes)\r\n\t\t\t{\r\n\t\t\t\tif (sh.contains(x, y))\r\n\t\t\t\t{\r\n\t\t\t\t\tinside = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inside;\r\n\t}", "public static boolean isInside(int nX, int nY,\n\t int nT, int nR, int nB, int nL, int nTol)\n\t{\n\t\tif (nR < nL) // swap the left and right bounds as needed\n\t\t{\n\t\t\tnR ^= nL;\n\t\t\tnL ^= nR;\n\t\t\tnR ^= nL;\n\t\t}\n\n\t\tif (nT < nB) // swap the top and bottom bounds as needed\n\t\t{\n\t\t\tnT ^= nB;\n\t\t\tnB ^= nT;\n\t\t\tnT ^= nB;\n\t\t}\n\n\t\t// expand the bounds by the tolerance\n\t\treturn (nX >= nL - nTol && nX <= nR + nTol\n\t\t && nY >= nB - nTol && nY <= nT + nTol);\n\t}", "boolean isIncludeBounds();", "public boolean contains(double x, double y){\t\t\n\t\t\n\t\treturn x > xCoord - getWidth()/2 &&\n\t\t\t x < xCoord + getWidth()/2 &&\n\t\t\t y > yCoord - getHeight()/2 &&\n\t\t\t y < yCoord + getHeight()/2;\n\t}", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "private boolean isBetweenBounds(int x, int y, int[] bounds) {\n return x >= bounds[0] && x <= bounds[2] && y >= bounds[1] && y <= bounds[3];\n }", "static boolean isInside(int x, int y, int N) {\n if (x >= 1 && x <= N && y >= 1 && y <= N) {\n return true;\n }\n return false;\n }", "protected boolean isInside(int x, int y){\n if(x <= super.getLocationX())\n return false;\n\n if(x >= (super.getLocationX() + super.getWidth() - 1))\n return false;\n\n if(y <= super.getLocationY())\n return false;\n\n if(y >= (super.getLocationY() + super.getHeight() - 1))\n return false;\n\n //return true if inside\n return true;\n\n }", "static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }", "public boolean contains(Point mousePt) {\r\n\t\treturn (x <= mousePt.x && mousePt.x <= (x + width + 1)\t&&\ty <= mousePt.y && mousePt.y <= (y + height + 1));\r\n\t}", "public boolean contains(Point point) {\n\t\treturn (point.x >= getX1() && point.y >= getY1() && point.x < getX2() && point.y < getY2());\n\t}", "private boolean pInRect(Point2D p, RectHV rect) {\n if (p.x() >= rect.xmin() && p.x() <= rect.xmax() && p.y() >= rect.ymin() && p.y() <= rect.ymax()) return true;\n else return false;\n }", "boolean hasCoordinates();", "boolean hasCoordinates();", "boolean hasCoordinates();", "Rectangle getBoundingBox(Rectangle rect);", "public boolean isInShape(Point p) \n\t{\n\t\tPoint centre = new Point((int)posX + diam/2, (int)posY + diam/2);\n\t\t//If distance between two points if less than or equal to radius, true is\n\t\t//returned\n\t\treturn p.distance(centre) <= diam/2;\n\t}", "private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }", "public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}", "@Override\n\tpublic boolean contains(Vec2f pnt) {\n\t\tboolean isIn = false;\n\t\tif (_shape != null) {\n\t\t\tisIn = _shape.contains(pnt);\n\t\t}\n\t\treturn isIn;\n\t}", "public boolean containsPoint(Point pt)\n {\n\n // E[O(log(n))]\n if(_lineBVH != null)\n {\n throw new Error(\"Implement me Please!\");\n }\n else\n {\n // O(n).\n return _point_in_polygon_test(pt);\n }\n }", "public boolean contains(Point mousePt) {\r\n\t\treturn (p.x <= mousePt.x && mousePt.x <= (p.x + width + 1)\t&&\tp.y <= mousePt.y && mousePt.y <= (p.y + height + 1));\r\n\t}", "public boolean hitCheck(float x, float y) {\r\n if (boxX <= x && x <= boxX + boxSize &&\r\n boxY <= y && y <= frameHeight) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean contains(double x, double y) { \n\t\t\t\n\t\t\tif(type.get() == ShapeType.CIRCLE)\n\t\t\t\treturn (Math.pow(x - centerX.get(), 2) + Math.pow(y - centerY.get(), 2)) <= Math.pow(radius.get(), 2); \n\t\t\telse if (type.get() == ShapeType.RECTANGLE || type.get() == ShapeType.ROUNDRECT || type.get() == ShapeType.OVAL) {\n\t\t\t\treturn ((x >= getCenterX() - getWidth()/2) && (x <= getCenterX() + getWidth()/2) && (y >= getCenterY() - getHeight()/2) && (y <= getCenterY() + getHeight()/2));\n\t\t\t}\n\t\t\telse if (type.get() == ShapeType.TEXT) {\n\t\t\t\treturn ((x >= getCenterX() - getHeight()*.43*getText().length()/2) && (x <= getCenterX() + getHeight()*.43*getText().length()/2) && (y >= getCenterY() - getHeight()/2) && (y <= getCenterY() + getHeight()/2));\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t\t\n\t\t}", "public boolean pointIsIntersecting(PointF point, RectF other){//also checks if one contains the other\n return RectF.intersects(other,new RectF(point.x, point.y, point.x, point.y));//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }", "boolean contains(ShortPoint2D position);", "boolean hasRect2Value();", "void pointCheck(LatLng point, boolean valid);", "public boolean inBounds(Actor a)\n {\n boolean inX = Math.abs(a.getXPos()) < levelWidth/2;\n boolean inY = Math.abs(a.getYPos()) < levelHeight/2;\n return inX && inY;\n }", "public boolean contains(PointF point)\n {\n return contains(point.x, point.y);\n }", "@JsMethod(name = \"containsPoint\")\n public boolean contains(double p) {\n return p >= lo && p <= hi;\n }", "private boolean isBallInside(Ball ball) {\n Vect ballCenter = ball.getCircle().getCircle().getCenter();\n Double ballX = ballCenter.x();\n Double ballY = ballCenter.y();\n Double radius = ball.getCircle().getCircle().getRadius();\n Double centerX = this.location.x()+0.5;\n Double centerY = this.location.y()+0.5;\n assert(checkRep());\n return ((ballX-centerX)*(ballX-centerX)+(ballY-centerY)*(ballY-centerY)) < ((0.5+radius)*(0.5+radius));\n }", "public boolean isIn(Point p)\n {\n \n \treturn isIn(p.x, p.y);\n \t\n //\tboolean cond1 = false;\n // boolean cond2 = false; \n // cond1 = (p.x>=rettangoloX)&&(p.x<=(rettangoloX+larghezza));\n // cond2 = (p.y>=rettangoloY)&&(p.y<=(rettangoloY+altezza));\n // return (cond1&&cond2);\n }", "public boolean doesIntersect(Box box) {\n\n\n\t\tfor (Point point:box.getVerts()) {\n\n\t\t\tif (this.contains(point)) return true;\n\t\t}\n\n\t\tfor (Point point: this.verts) {\n\n\t\t\tif (box.contains(point)) return true;\n\t\t}\n\n\t\treturn false;\n\t}", "private boolean isOverRect(Point p) {\n Rectangle r = (Rectangle)component.rect.clone();\n r.grow(PROX_DIST, PROX_DIST);\n return r.contains(p);\n }", "private boolean contains(Ball ball) {\n checkRep();\n boolean contains =\n ball.getPosition().x() > this.boundingBoxPosition.x()\n && ball.getPosition().x() < this.boundingBoxPosition.x() + this.width\n && ball.getPosition().y() > this.boundingBoxPosition.y() \n && ball.getPosition().y() < this.boundingBoxPosition.y() + this.height;\n return contains;\n }", "public boolean pointWhithin(Point point) {\n\t\treturn false;\n\t}", "public boolean isIntersectingWithViewport(ObjectWithPosition obj){\n if(this.bounds.intersect(obj.getBounds()))\n return true;\n else return false;\n }", "@Override\n public boolean intersectsAt(Point point){\n if (planeImage.getBoundingBoxAt(currPos).intersects(point)){\n return true;\n }\n else\n return false;\n }", "public boolean contains(Point p) {\n\t\tif ((p.y > (super.getY() - super.height/2)) && (p.x > (super.getX() - width/2)) && (p.y < (super.getY() + super.height/2 + super.height)) && (p.x < (super.getX() - width/2 + super.width))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean inBound(int x, int y) {\n\n if (x < 0 || x >= boardSize.x || y < 0 || y >= boardSize.y) {\n return false;\n } else {\n return true;\n }\n }", "public boolean inBounds(Obstacle obj) {\n\t\tboolean horiz = (bounds.x <= obj.getX() && obj.getX() <= bounds.x+bounds.width);\n\t\tboolean vert = (bounds.y <= obj.getY() && obj.getY() <= bounds.y+bounds.height);\n\t\treturn horiz && vert;\n\t}", "public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }", "boolean insideSprite(Sprite s){\n if (s._hitbox.length == 1) {\n if (_hitbox.length == 1) {\n return PVector.dist(s._getCenter(),this._getCenter()) <\n s._hitbox[0].x - this._hitbox[0].x;\n }\n return _insideCirc(_getPoints(), s._getCenter(), s._hitbox[0].x);\n }\n if (s._hitbox.length == 1) {\n // TODO: check if center is in middle but NOT touching any side\n // (will want to adapt existing _circPoly to separate side-touching\n // code into individual method)\n return false;\n }\n return _insidePts(this._getPoints(), s._getPoints());\n }", "private static boolean withinArea(Point dronePos) {\r\n\t\tvar droneLat = dronePos.latitude();\r\n\t\tvar droneLon = dronePos.longitude();\r\n\t\treturn droneLat<latUB && droneLat>latLB && droneLon<lonUB && droneLon>lonLB;\r\n\t}", "boolean touchingPoint(float x, float y) {\n if (_hitbox.length == 1) return dist(x,y,_hitboxCenter.x, _hitboxCenter.y) < _hitbox[0].x;\n return _ptPoly(new PVector(x,y), _getPoints());\n }", "@Override\n public boolean isPointEnclosed(Point point) {\n Point bottomRightCorner = findBottomRightCornerPoint();\n Point topLeftCorner = findTopLeftCornerPoint();\n if (((point.getX() >= origin.getX()) && (point.getX() <= bottomRightCorner.getX())) &&\n ((point.getY() >= origin.getY()) && (point.getY() <= topLeftCorner.getY()))) {\n return true;\n }\n return false;\n }", "public boolean contains(Coord c) {\n\t\treturn getAWTRectangle().contains(c.getAWTPoint());\n\t}" ]
[ "0.72570986", "0.7205829", "0.7186656", "0.7131474", "0.7093997", "0.7088753", "0.70567375", "0.695294", "0.695248", "0.69458306", "0.6923467", "0.6919015", "0.6902988", "0.68999064", "0.6893348", "0.689108", "0.6780654", "0.67704487", "0.6765071", "0.67381465", "0.67368186", "0.6733425", "0.6727247", "0.6719672", "0.6718644", "0.67181015", "0.670913", "0.6707448", "0.6700144", "0.6696087", "0.6691577", "0.6623731", "0.6605228", "0.65994555", "0.65929526", "0.6592092", "0.65849847", "0.65807474", "0.6572852", "0.65685475", "0.65638477", "0.65538734", "0.6544564", "0.65443367", "0.654237", "0.65414107", "0.6536032", "0.6535068", "0.6519752", "0.65163684", "0.6508181", "0.64946306", "0.64840853", "0.6483899", "0.64752346", "0.6469616", "0.6462321", "0.64615977", "0.64577186", "0.6440894", "0.6436316", "0.64238346", "0.6420101", "0.6412326", "0.640894", "0.640894", "0.640894", "0.64026344", "0.63898236", "0.6387043", "0.63653857", "0.63618445", "0.6356787", "0.6351967", "0.63481766", "0.63462466", "0.63425016", "0.6318325", "0.62993044", "0.62957364", "0.6294885", "0.6286989", "0.62864286", "0.6285779", "0.62399477", "0.6239842", "0.6239317", "0.6222886", "0.6217261", "0.62140775", "0.62055945", "0.6203703", "0.62031907", "0.61952245", "0.61918235", "0.6190414", "0.6190069", "0.61851776", "0.6181267", "0.61671257" ]
0.7399504
0
Find the orientation of the triplet (from, to, pos) Returns 1 when clockwise, 0 when colinear, 1 when counterclockwise
int orientation(Coord pos) { int val = (to.y - from.y) * (pos.x - to.x) - (to.x - from.x) * (pos.y - to.y); return (val > 0) ? 1 : ((val < 0) ? -1 : 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int orientation(Coord p, Coord r, Coord q) \n { \n // See https://www.geeksforgeeks.org/orientation-3-ordered-points/ \n // for details of below formula. \n int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); \n \n if (val == 0) return 0; // colinear \n \n return (val > 0)? 1: 2; // clock or counterclock wise \n }", "static int orientation(Point p, Point q, Point r)\n {\n int val = (q.getY() - p.getY()) * (r.getX() - q.getX())\n - (q.getX() - p.getX()) * (r.getY() - q.getY());\n\n if (val == 0)\n {\n return 0; // colinear\n }\n return (val > 0) ? 1 : 2; // clock or counterclock wise\n }", "private int orientation(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\tdouble val = (w3y - w1y) * (w2x - w3x) - (w3x - w1x) * (w2y - w3y);\n\t\t\n\tif ( val == 0) //colinear\n\t\treturn 0;\n\t\n\treturn (val > 0) ? 1: 2; //clock or counterclock wise\n\t\n\t}", "static void determineOrientation(Triangulator triRef, int ind) {\n\tdouble area;\n\n\t// compute the polygon's signed area, i.e., its orientation.\n\tarea = polygonArea(triRef, ind);\n\n\t// adjust the orientation (i.e., make it CCW)\n\tif (area < 0.0) {\n\t triRef.swapLinks(ind);\n\t triRef.ccwLoop = false;\n\t}\n\n }", "public int orientation(Point p, Point q, Point r) {\n\t\tdouble val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t\tif (val == 0) {\n\t\t\treturn 0; // collinear\n\t\t}\n\t\treturn (val > 0) ? 1 : 2; // clock or counterclock wise\n\t}", "public int orientation(Location p, Location q, Location r) {\n\t\tdouble ret = (q.getY() - p.getY()) * (r.getX() - q.getX())\n\t\t\t\t- (q.getX() - p.getX()) * (r.getY() - q.getY());\n\t\tif (ret == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (ret > 0) {\n\t\t\t// clockwise\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t// counterclockwise\n\t\t\treturn 2;\n\t\t}\n\t}", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "private static double orientation(Point2d p, Point2d q, Point2d r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n }", "public static Vector2 getCornerOrientation(int[][] area, Corner corner) {\r\n\t\tVector2 cornerLocation = corner.getLocation();\r\n\t\tif ((cornerLocation.x < 1) || (cornerLocation.x > (area.length) - 2)\r\n\t\t\t\t|| (cornerLocation.y < 1)\r\n\t\t\t\t|| (cornerLocation.y > (area[0].length) - 2)) {\r\n\t\t\treturn new Vector2(0, 0);\r\n\t\t}\r\n\t\tfloat[][] around = {\r\n\t\t\t\t{\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x - 1][(int) cornerLocation.y - 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x][(int) cornerLocation.y - 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x + 1][(int) cornerLocation.y - 1] },\r\n\t\t\t\t{\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x - 1][(int) cornerLocation.y],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x][(int) cornerLocation.y],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x + 1][(int) cornerLocation.y] },\r\n\t\t\t\t{\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x - 1][(int) cornerLocation.y + 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x][(int) cornerLocation.y + 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x + 1][(int) cornerLocation.y + 1] } };\r\n\t\tVector2 orientation = new Vector2(0, 0);\r\n\t\tif (around[0][1] >= 1 && around[2][1] == 0) {\r\n\t\t\torientation.x = 1;\r\n\t\t} else {\r\n\t\t\tif (around[0][1] == 0 && around[2][1] >= 1) {\r\n\t\t\t\torientation.x = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (around[1][0] == 0 && around[1][2] >= 1) {\r\n\t\t\torientation.y = -1;\r\n\t\t} else {\r\n\t\t\tif (around[1][0] >= 1 && around[1][2] == 0) {\r\n\t\t\t\torientation.y = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn orientation;\r\n\t}", "private String getTileOriententation(int marker) { return (marker>CONCEALED && marker<CONCEALED_END)? \" concealed\" : \"\"; }", "public String orientation()\n {\n int height = cat.getWidth();\n int width = cat.getHeight();\n\n if (height >= width)\n {\n return \"landscape\";\n }\n else \n {\n return \"portrait\";\n\n }\n }", "public abstract double getOrientation();", "static void adjustOrientation(Triangulator triRef, int i1, int i2) {\n\n\tdouble area;\n\tint i, outer;\n\tint ind;\n\n\tif(i1 >= i2)\n\t System.out.println(\"Orientation:adjustOrientation Problem i1>=i2 !!!\");\n\n\tif (triRef.numLoops >= triRef.maxNumPolyArea) {\n\t // System.out.println(\"Orientation:adjustOrientation Expanding polyArea array .\");\n\t triRef.maxNumPolyArea = triRef.numLoops;\n\t double old[] = triRef.polyArea;\n\t triRef.polyArea = new double[triRef.maxNumPolyArea];\n\t if(old != null)\n\t\tSystem.arraycopy(old, 0, triRef.polyArea, 0, old.length);\n\t}\n\n\t// for each contour, compute its signed area, i.e., its orientation. the\n\t// contour with largest area is assumed to be the outer-most contour.\n\tfor (i = i1; i < i2; ++i) {\n\t ind = triRef.loops[i];\n\t triRef.polyArea[i] = polygonArea(triRef, ind);\n\t}\n\n\t// determine the outer-most contour\n\tarea = Math.abs(triRef.polyArea[i1]);\n\touter = i1;\n\tfor (i = i1 + 1; i < i2; ++i) {\n\t if (area < Math.abs(triRef.polyArea[i])) {\n\t\tarea = Math.abs(triRef.polyArea[i]);\n\t\touter = i;\n\t }\n\t}\n\n\t// default: the outer contour is referenced by loops[i1]\n\tif (outer != i1) {\n\t ind = triRef.loops[i1];\n\t triRef.loops[i1] = triRef.loops[outer];\n\t triRef.loops[outer] = ind;\n\n\t area = triRef.polyArea[i1];\n\t triRef.polyArea[i1] = triRef.polyArea[outer];\n\t triRef.polyArea[outer] = area;\n\t}\n\n\t// adjust the orientation\n\tif (triRef.polyArea[i1] < 0.0) triRef.swapLinks(triRef.loops[i1]);\n\tfor (i = i1 + 1; i < i2; ++i) {\n\t if (triRef.polyArea[i] > 0.0) triRef.swapLinks(triRef.loops[i]);\n\t}\n }", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public static double orientation(Line2D line,Point2D point) {\n return AlgoPoint2D.cross((AlgoPoint2D.subtract(point,line.getP1())),\r\n AlgoPoint2D.subtract((line.getP2()),line.getP1()));\r\n \r\n }", "public int determineDirection(Point p0, Point p1) {\n \tif (p0.y == p1.y && ((p0.x > p1.x && !(p0.x == map[0].length - 1 && p1.x == 0)) \n \t\t\t|| (p1.x == map[0].length - 1 && p0.x == 0))) { \n \t\treturn 4; }\n \tif (p0.y == p1.y ) { \n \t\treturn 6; }\n \tif (p0.x == p1.x && ((p0.y > p1.y && !(p0.y == map.length - 1 && p1.y == 0))\n \t\t\t|| (p1.y == map.length - 1 && p0.y == 0)) ) { \n \t\treturn 8; }\n \treturn 2;\n }", "void orientation(double xOrientation, double yOrientation, double zOrientation);", "private float findRotation()\r\n\t{\r\n\t\t//conditionals for all quadrants and axis\r\n\t\tif(tarX > 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 - Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 + Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 90 - Math.abs(rotation);\r\n\t\t\trotation = 270 + rotation;\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY == 0)\r\n\t\t\trotation = 0;\r\n\t\telse if(tarX == 0 && tarY > 0)\r\n\t\t\trotation = 90;\r\n\t\telse if(tarX < 0 && tarY == 0)\r\n\t\t\trotation = 180;\r\n\t\telse if(tarX == 0 && tarY < 0)\r\n\t\t\trotation = 270;\r\n\t\t\r\n\t\treturn (rotation - 90);\r\n\t}", "public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}", "public double getDirectionFace();", "public int inDegree(Position vp) throws InvalidPositionException;", "private boolean _clockwise(PVector A, PVector B, PVector C) {\n return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x);\n }", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "private DirectionTestResult getDirection() throws SimplexException {\r\n switch(pointCount) {\r\n case 1:\r\n return new DirectionTestResult(a.negate(new Vector2f()));\r\n case 2:\r\n Vector2f ab = b.sub(a);\r\n Vector2f perpAB = new Vector2f(-ab.y,ab.x);\r\n \r\n // check the perpendicular points opposite to vector A\r\n // i.e. towards the origin\r\n // if not, return the negated perpendicular and swap\r\n // points A and B to maintain clockwise rotation.\r\n if (perpAB.dot(a) < 0) {\r\n return new DirectionTestResult(perpAB);\r\n } else {\r\n Vector2f t = a;\r\n a = b;\r\n b = t;\r\n return new DirectionTestResult(perpAB.negate());\r\n }\r\n case 3:\r\n // first check line AC just like case 2\r\n Vector2f ac = c.sub(a);\r\n Vector2f perpAC = new Vector2f(-ac.y,ac.x);\r\n \r\n if (perpAC.dot(a) < 0) {\r\n b = c;\r\n c = null;\r\n pointCount = 2;\r\n return new DirectionTestResult(perpAC);\r\n }\r\n \r\n // now check line CB just like case 2\r\n Vector2f cb = b.sub(c);\r\n Vector2f perpCB = new Vector2f(-cb.y, cb.x);\r\n \r\n if (perpCB.dot(c) < 0) {\r\n a = c;\r\n c = null;\r\n pointCount = 2;\r\n return new DirectionTestResult(perpCB);\r\n }\r\n \r\n // if both checks failed the origin must be inside the\r\n // simplex which means there is a collision so return\r\n // a true directionTestResult\r\n \r\n return new DirectionTestResult();\r\n default:\r\n throw new SimplexException(\"pointCount outside acceptable range\");\r\n }\r\n }", "double direction (IPoint other);", "@Generated\n @Selector(\"orientation\")\n @NInt\n public native long orientation();", "private static double getRotation(Position previous, Position current, Position next) {\n \t\tboolean prevAbove = false;\n \t\tboolean prevUnder = false;\n \t\tboolean prevLeft = false;\n \t\tboolean prevRight = false;\n \t\t\n \t\tboolean nextRight = false;\n \t\tboolean nextUnder = false;\n \t\tboolean nextLeft = false;\n \t\tboolean nextAbove = false;\n \t\t\n \t\t/*\n \t\t * Only calculate values if there is a previous\n \t\t * respective next position in.\n \t\t */\n \t\tif (previous != null) {\n \t\t\tprevAbove = previous.getRow() < current.getRow();\n \t\t\tprevUnder = previous.getRow() > current.getRow();\n \t\t\tprevLeft = previous.getCol() < current.getCol();\n \t\t\tprevRight = previous.getCol() > current.getCol();\n \t\t}\n \t\tif (next != null) {\n \t\t\tnextRight = next.getCol() > current.getCol();\n \t\t\tnextUnder = next.getRow() > current.getRow();\n \t\t\tnextLeft = next.getCol() < current.getCol();\n \t\t\tnextAbove = next.getRow() < current.getRow();\n \t\t}\n \t\t/*\n \t\t * If previous is null then only determine rotation based on \n \t\t * next position.\n \t\t * >> Path is always of length 2 at least, therefore no point can\n \t\t * have neither previous or next location.\n \t\t */\n \t\tif (previous == null) {\n \t\t\tif (nextAbove) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t} else if (nextUnder) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextLeft) {\n \t\t\t\treturn Math.PI;\n \t\t\t} else if (nextRight) {\n \t\t\t\treturn 0;\n \t\t\t}\n \t\t}\n \t\t/*\n \t\t * If next is null then only determine rotation based on \n \t\t * previous position.\n \t\t */\n \t\tif (next == null) {\n \t\t\tif (prevAbove) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevUnder) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t} else if (prevLeft) {\n \t\t\t\treturn 0;\n \t\t\t} else if (prevRight) {\n \t\t\t\treturn Math.PI;\n \t\t\t}\n \t\t}\n \t\t/*\n \t\t * Return rotation based on where the previous and next locations are.\n \t\t */\n \t\tif (prevAbove) {\n \t\t\tif (nextUnder) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextLeft) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextRight) {\n \t\t\t\treturn Math.PI;\n \t\t\t}\n \t\t} else if (nextAbove) {\n \t\t\tif (prevUnder) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevLeft) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevRight) {\n \t\t\t\treturn Math.PI;\n \t\t\t}\n \t\t} else if (prevUnder) {\n \t\t\tif (nextAbove) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextLeft) {\n \t\t\t\treturn 0;\n \t\t\t} else if (nextRight) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t}\n \t\t} else if (nextUnder) {\n \t\t\tif (prevAbove) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevLeft) {\n \t\t\t\treturn 0;\n \t\t\t} else if (prevRight) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t}\n \t\t}\n \t\t/*\n \t\t * Return 0 to make the compiler happy, will never run\n \t\t * unless previous == current || current == next which\n \t\t * is wrong usage.\n \t\t */\n \t\treturn 0;\n \t}", "public static Direction direction(Point p1, Point p2, Point p3)\n {\n Direction result = Direction.COLLINEAR;\n double cp = crossProduct(p2, p3, p1);\n if (cp < 0.0) {\n result = Direction.RIGHT;\n } else if (cp > 0.0) {\n result = Direction.LEFT;\n }\n return result;\n }", "public IOrientation getOrientation();", "int getDirection();", "public static String findDirection(XYLocation initial, XYLocation goingTo) {\n\t\tfloat goingToX = goingTo.getX();\n\t\tfloat goingToY = goingTo.getY();\n\t\tfloat initialX = initial.getX();\n\t\tfloat inititalY = initial.getY();\n\t\tfloat theta = (float) Math.atan2(goingToY - inititalY, goingToX - initialX);\n\t\t\n\t\tif (Math.abs(theta) <= oneEighthPI && Math.abs(theta) >= negOneEighthPI) {\n\t\t\t\treturn \"East\";\n\t\t\t} else if (theta > oneEighthPI && theta < threeEighthsPI) {\n\t\t\t\treturn \"SouthEast\";\n\t\t\t} else if (theta > negThreeEighthsPI && theta < negOneEighthPI) {\n\t\t\t\treturn \"NorthEast\";\n\t\t\t} else if (theta > threeEighthsPI && theta < fiveEighthsPI) {\n\t\t\t\treturn \"South\";\n\t\t\t} else if (theta > negFiveEighthsPI && theta < negThreeEighthsPI){\n\t\t\t\treturn \"North\";\n\t\t\t} else if (theta > fiveEighthsPI && theta < sevenEighthsPI) {\n\t\t\t\treturn \"SouthWest\";\n\t\t\t} else if (theta > negSevenEighthsPI && theta < negFiveEighthsPI) {\n\t\t\t\treturn \"NorthWest\";\n\t\t\t} else {\n\t\t\t\treturn \"West\";\n\t\t\t}\n\t}", "public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }", "public int getDirection();", "double getRotation(Point2D target, boolean pursuit);", "public abstract Vector3 directionFrom(Point3 point);", "public ZeroSides calculateShouldZeroSides() {\r\n if (!(getContext() instanceof Activity)) {\r\n return ZeroSides.NONE;\r\n }\r\n Activity activity = (Activity) getContext();\r\n int i = activity.getResources().getConfiguration().orientation;\r\n int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\r\n if (i != 2) {\r\n return ZeroSides.NONE;\r\n }\r\n if (rotation == 1) {\r\n return ZeroSides.RIGHT;\r\n }\r\n if (rotation == 3) {\r\n return Build.VERSION.SDK_INT >= 23 ? ZeroSides.LEFT : ZeroSides.RIGHT;\r\n }\r\n if (rotation == 0 || rotation == 2) {\r\n return ZeroSides.BOTH;\r\n }\r\n return ZeroSides.NONE;\r\n }", "float getDir() {\n return degrees(_rotVector.heading());\n }", "public static double getOrient(Position p1, Position p2){\n\t\tdouble lat1 = p1.getLat();\n\t\tdouble lon1 = p1.getLon();\n\t\tdouble lat2 = p2.getLat();\n\t\tdouble lon2 = p2.getLon();\n\t\t\n\t\tdouble dLat = Math.toRadians(lat2-lat1);\n\t\tdouble dLon = Math.toRadians(lon2-lon1);\n\t\tlat1 = Math.toRadians(lat1);\n\t\tlat2 = Math.toRadians(lat2);\n\n\t\t// following code is from http://www.movable-type.co.uk/scripts/latlong.html\n\t\tdouble y = Math.sin(dLon) * Math.cos(lat2);\n\t\tdouble x = Math.cos(lat1)*Math.sin(lat2) - Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);\n\t\tdouble orient = Math.toDegrees(Math.atan2(y, x));\n\t\t//converting orient from a scale of -180 .. + 180 to 0-359 degrees\n\t\tdouble orient360 = (orient + 360) % 360;\n\t\treturn orient360;\n\t}", "default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }", "public double getDirectionView();", "boolean hasDirection();", "public void invertOrientation() {\n\t\tPoint3D temp = getPoint(2);\n\t\tsetPoint(2, getPoint(1));\n\t\tsetPoint(1, temp);\n\n\t\tTriangleElt3D temp2 = getNeighbour(2);\n\t\tsetNeighbour(2, getNeighbour(1));\n\t\tsetNeighbour(1, temp2);\n\t\tif (this.getNetComponent() != null)\n\t\t\tthis.getNetComponent().setOriented(false);\n\t}", "public int outDegree(Position vp) throws InvalidPositionException;", "AngleResource inclination();", "org.stu.projector.Orientation getOrientations(int index);", "int getStartRotationDegree();", "public static int getOrientation(File in) throws IOException {\r\n\r\n\t\tint orientation = 1;\r\n\r\n\t\tMetadata metadata;\r\n\r\n\t\tDirectory directory;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tmetadata = ImageMetadataReader.readMetadata(in);\r\n\r\n\t\t\tdirectory = metadata.getFirstDirectoryOfType(ExifIFD0Directory.class);\r\n\r\n\t\t\t\r\n\r\n\t\t\tif(directory != null){\r\n\r\n\t\t\t\torientation = directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (ImageProcessingException e) {\r\n\r\n\t\t\t//System.err.println(\"[ImgUtil] could not process image\");\r\n\r\n\t\t\t//e.printStackTrace();\r\n\r\n\t\t} catch (MetadataException e) {\r\n\r\n\t\t\t//System.err.println(\"[ImgUtil] could not get orientation from image\");\r\n\r\n\t\t\t//e.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\treturn getDegreeForOrientation(orientation);\r\n\r\n\t}", "public int[] angleMarker()\n {\n int[] coord = {(int)X(),(int)Y()};\n if (leftNeighbour == null || rightNeighbour == null) return coord;\n double middleAngle = getMiddleDirection();\n coord[0] = (int)(X() + Math.cos(middleAngle) * 32);\n coord[1] = (int)(Y() + Math.sin(middleAngle) * 32);\n return coord;\n }", "public Quaternion orientationAlongSegment(Point beg, Point end) {\n\n // Use Apache vectors and matrices to do the math.\n\n Vector3D b = new Vector3D(beg.getX(), beg.getY(), beg.getZ());\n Vector3D e = new Vector3D(end.getX(), end.getY(), end.getZ());\n\n Vector3D vfwd = e.subtract(b);\n\n double len = vfwd.getNorm();\n if (len > 0)\n vfwd = vfwd.normalize();\n else\n vfwd = new Vector3D(1.0, 0.0, 0.0);\n\n Vector3D vdown = new Vector3D(0.0, 0.0, 1.0);\n Vector3D vright = new Vector3D(0.0, 1.0, 0.0);\n\n // Check that the direction of motion is not along the Z axis. In this\n // case the approach of taking the cross product with the world Z will\n // fail and we need to choose a different axis.\n double epsilon = 1.0e-3;\n if (Math.abs(vdown.dotProduct(vfwd)) < 1.0 - epsilon) {\n vright = vdown.crossProduct(vfwd);\n vdown = vfwd.crossProduct(vright);\n if (vdown.getZ() < 0) {\n vright = vright.negate();\n vdown = vfwd.crossProduct(vright);\n }\n }\n else {\n vdown = vfwd.crossProduct(vright);\n vright = vdown.crossProduct(vfwd);\n if (vright.getY() < 0) {\n vdown = vdown.negate();\n vright = vdown.crossProduct(vfwd);\n }\n }\n\n // Make sure all vectors are normalized\n vfwd = vfwd.normalize();\n vright = vright.normalize();\n vdown = vdown.normalize();\n\n // Construct a rotation matrix\n double dcm[][] = new double[3][3];\n dcm[0][0] = vfwd.getX(); dcm[0][1] = vright.getX(); dcm[0][2] = vdown.getX();\n dcm[1][0] = vfwd.getY(); dcm[1][1] = vright.getY(); dcm[1][2] = vdown.getY();\n dcm[2][0] = vfwd.getZ(); dcm[2][1] = vright.getZ(); dcm[2][2] = vdown.getZ();\n Rotation R = new Rotation(dcm, 1e-8);\n\n //Print the rotation matrix\n //double d[][] = R.getMatrix();\n //for (int row = 0; row < 3; row++) {\n // logger.info(\"\\nMatrix is \" +\n //\t\tFloat.toString((float)d[row][0]) + \" \" +\n //\t\tFloat.toString((float)d[row][1]) + \" \" +\n //\t\tFloat.toString((float)d[row][2]));\n //}\n\n return new Quaternion(-(float)R.getQ1(), -(float)R.getQ2(),\n -(float)R.getQ3(), (float)R.getQ0());\n }", "@Override\r\n public Orientation getOrientation() {\r\n return this.route.getOrientation();\r\n }", "public AccOrientation calculateAngle(SensorEvent event) {\t\t\n\t final int _DATA_X = 0;\n\t final int _DATA_Y = 1;\n\t final int _DATA_Z = 2;\n\t // Angle around x-axis thats considered almost perfect vertical to hold\n\t // the device\n\t final int PIVOT = 20;\n\t // Angle around x-asis that's considered almost too vertical. Beyond\n\t // this angle will not result in any orientation changes. f phone faces uses,\n\t // the device is leaning backward.\n\t final int PIVOT_UPPER = 65;\n\t // Angle about x-axis that's considered negative vertical. Beyond this\n\t // angle will not result in any orientation changes. If phone faces uses,\n\t // the device is leaning forward.\n\t final int PIVOT_LOWER = -10;\n\t // Upper threshold limit for switching from portrait to landscape\n\t final int PL_UPPER = 295;\n\t // Lower threshold limit for switching from landscape to portrait\n\t final int LP_LOWER = 320;\n\t // Lower threshold limt for switching from portrait to landscape\n\t final int PL_LOWER = 270;\n\t // Upper threshold limit for switching from landscape to portrait\n\t final int LP_UPPER = 359;\n\t // Minimum angle which is considered landscape\n\t final int LANDSCAPE_LOWER = 235;\n\t // Minimum angle which is considered portrait\n\t final int PORTRAIT_LOWER = 60;\n\t \n\t // Internal value used for calculating linear variant\n\t final float PL_LF_UPPER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float PL_LF_LOWER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t // Internal value used for calculating linear variant\n\t final float LP_LF_UPPER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float LP_LF_LOWER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t \n\t int mSensorRotation = -1; \n\t \n\t\t\tfinal boolean VERBOSE = true;\n float[] values = event.values;\n float X = values[_DATA_X];\n float Y = values[_DATA_Y];\n float Z = values[_DATA_Z];\n float OneEightyOverPi = 57.29577957855f;\n float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);\n float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;\n int rotation = -1;\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n AccOrientation result = new AccOrientation();\n \n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n result.orientation = orientation;\n result.angle = zyangle; \n result.threshold = 0;\n if ((zyangle <= PIVOT_UPPER) && (zyangle >= PIVOT_LOWER)) {\n // Check orientation only if the phone is flat enough\n // Don't trust the angle if the magnitude is small compared to the y value\n \t/*\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n normalize to 0 - 359 range\n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n mOrientation.setText(String.format(\"Orientation: %d\", orientation));\n */ \n // Orientation values between LANDSCAPE_LOWER and PL_LOWER\n // are considered landscape.\n // Ignore orientation values between 0 and LANDSCAPE_LOWER\n // For orientation values between LP_UPPER and PL_LOWER,\n // the threshold gets set linearly around PIVOT.\n if ((orientation >= PL_LOWER) && (orientation <= LP_UPPER)) {\n float threshold;\n float delta = zyangle - PIVOT;\n if (mSensorRotation == ROTATION_090) {\n if (delta < 0) {\n // Delta is negative\n threshold = LP_LOWER - (LP_LF_LOWER * delta);\n } else {\n threshold = LP_LOWER + (LP_LF_UPPER * delta);\n }\n rotation = (orientation >= threshold) ? ROTATION_000 : ROTATION_090;\n if (mShowLog) \n \tLog.v(TAG, String.format(\"CASE1. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n } else {\n if (delta < 0) {\n // Delta is negative\n threshold = PL_UPPER+(PL_LF_LOWER * delta);\n } else {\n threshold = PL_UPPER-(PL_LF_UPPER * delta);\n }\n rotation = (orientation <= threshold) ? ROTATION_090: ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE2. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n }\n result.threshold = threshold;\n } else if ((orientation >= LANDSCAPE_LOWER) && (orientation < LP_LOWER)) {\n rotation = ROTATION_090;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE3. 90 (%d)\", orientation));\n } else if ((orientation >= PL_UPPER) || (orientation <= PORTRAIT_LOWER)) {\n rotation = ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE4. 00 (%d)\", orientation)); \n } else {\n \tif (mShowLog)\n \t\tLog.v(TAG, \"CASE5. \"+orientation);\n }\n if ((rotation != -1) && (rotation != mSensorRotation)) {\n mSensorRotation = rotation;\n if (mSensorRotation == ROTATION_000) {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 00\");\n }\n else if (mSensorRotation == ROTATION_090) \n {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 90\");\n } \n }\n result.rotation = rotation;\n } else {\n \t//Log.v(TAG, String.format(\"Invalid Z-Angle: %2.4f (%d %d)\", zyangle, PIVOT_LOWER, PIVOT_UPPER));\n }\t\n return result;\n\t\t}", "public int generateMode() {\n\t\tif(up && !down && !left && !right)\n\t\t\treturn UP;\n\t\telse if(!up && down && !left && !right)\n\t\t\treturn DOWN;\n\t\telse if(!up && !down && left && !right)\n\t\t\treturn LEFT;\n\t\telse if(!up && !down && !left && right)\n\t\t\treturn RIGHT;\n\t\telse return -1;\n\t}", "boolean checkDir(Directions dir);", "static int getExitAxis(S2Point n) {\n // assert (intersectsFace(n));\n if (intersectsOppositeEdges(n)) {\n // The line passes through opposite edges of the face.\n // It exits through the v=+1 or v=-1 edge if the u-component of N has a\n // larger absolute magnitude than the v-component.\n return (Math.abs(n.x) >= Math.abs(n.y)) ? 1 : 0;\n } else {\n // The line passes through two adjacent edges of the face.\n // It exits the v=+1 or v=-1 edge if an even number of the components of N\n // are negative. We test this using signbit() rather than multiplication\n // to avoid the possibility of underflow.\n // assert(n.x != 0 && n.y != 0 && n.z != 0);\n return ((n.x < 0) ^ (n.y < 0) ^ (n.z < 0)) ? 0 : 1;\n }\n }", "public interface Orientation {\n\n int LEFT = 0; //左\n int TOP = 1; //顶\n int RIGHT = 2; //右\n int BOTTOM = 4; //底\n int ALL = 8; //所有方向\n int NONE = 16; //无方向\n\n}", "public String orientation() {\n\t\tif (orientation == null)\n\t\t\tarea();\n\t\treturn orientation;\n\t}", "private boolean isFlipped(){\n switch(this.orientation){\n case \"0\": case\"1\": case\"2\": case\"3\": return false;\n case \"4\": case\"5\": case\"6\": case\"7\": return true;\n default: return false;\n }\n }", "public double getRotation();", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "private void determineOrientation(float[] rotationMatrix) {\n\t\t\t float[] orientationValues = new float[3];\n\t\t SensorManager.getOrientation(rotationMatrix, orientationValues);\n\t\t double azimuth = Math.toDegrees(orientationValues[0]);\n\t\t double pitch = Math.toDegrees(orientationValues[1]);\n\t\t double roll = Math.toDegrees(orientationValues[2]);\n\t\t if (pitch <= 10)\n\t\t { \n\t\t if (Math.abs(roll) >= 170)\n\t\t {\n\t\t onFaceDown();\n\t\t }\n\t\t else if (Math.abs(roll) <= 10)\n\t\t {\n\t\t onFaceUp();\n\t\t }\n\t\t }\n\t\t\t\n\t\t}", "public void orientation(Double ...coords);", "public Orientation trouver_orientation(float x_A, float y_A, float x_B, float y_B) {\n if (x_A - x_B > 0 && x_A - x_B > y_A - y_B)\n return Orientation.SUD;\n else if (x_A - x_B < 0 && x_A - x_B < y_A - y_B)\n return Orientation.NORD;\n else if (y_A - y_B > 0 && x_A - x_B < y_A - y_B)\n return Orientation.OUEST;\n else\n return Orientation.EST;\n }", "public final Vector2D getOrientation() {\n return orientation;\n }", "AxisOrientation getAxisOrientation();", "@Nullable\n private Direction getFrameDirection() {\n //Cache the chunks we are looking up to check the frames of\n // Note: We can use an array based map, because we check suck a small area, that if we do go across chunks\n // we will be in at most two in general due to the size of our teleporter. But given we need to check multiple\n // directions we might end up checking two different cross chunk directions which would end up at three\n Long2ObjectMap<ChunkAccess> chunkMap = new Long2ObjectArrayMap<>(3);\n Object2BooleanMap<BlockPos> cachedIsFrame = new Object2BooleanOpenHashMap<>();\n for (Direction direction : EnumUtils.DIRECTIONS) {\n if (hasFrame(chunkMap, cachedIsFrame, direction, false)) {\n frameRotated = false;\n return direction;\n } else if (hasFrame(chunkMap, cachedIsFrame, direction, true)) {\n frameRotated = true;\n return direction;\n }\n }\n return null;\n }", "public boolean connectedRotate(Path p1, Path p2){\n\t\tif((p1.getExit()==p2.getPos()&&p2.getExit()==p1.getPos())||(p1.getEntry()==p2.getPos()&&p2.getEntry()==p1.getPos()))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "private Boolean pulouPeca(String posicao, int eixo, Casa casa, Casa destino, Tabuleiro tabuleiro) {\n \n int x = destino.x;\n int y = destino.y;\n \n if(posicao == \"reta\") {\n switch(eixo) {\n case 1:\n if(y > casa.y){ \n for(int i = casa.y + 1; i < y; i++){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) { \n return true; }\n } \n } \n if(y < casa.y){ \n for(int i = casa.y - 1; i > y; i--){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) {\n return true; }\n }\n }\n return false;\n case 2:\n if(x > casa.x){\n for(int i = casa.x + 1; i < x; i++){\n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n if(x < casa.x){\n for(int i = casa.x - 1; i > x; i--){\n \n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n return false;\n } \n \n }\n \n if(posicao == \"diagonal\") {\n \n switch(eixo) {\n case 1:\n if(x > casa.x){\n //verifica se pulou peca\n for(int j = 1; j < x - casa.x; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.x > x){\n //verifica se pulou peca\n for(int j = 1; j < casa.x - x; j++){\n if(tabuleiro.getCasa(x + j, y + j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false; \n case 2:\n if(y > casa.y){\n //verifica se pulou peca\n for(int j = 1; j < y - casa.y; j++){\n if(tabuleiro.getCasa(casa.x - j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.y > y){\n //verifica se pulou peca\n for(int j = 1; j < casa.y - y; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y - j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false;\n }\n }\n \n return false;\n }", "public float getDirection();", "@NotNull\n @Override\n public OctilinearDirection toOctilinear() {\n Direction direction;\n double diff = angle % 45;\n if (diff < 45 / 2) {\n direction = fromAngle(angle - diff);\n }\n else {\n direction = fromAngle(angle + (45 - diff));\n }\n return direction.toOctilinear();\n }", "public static int turnDir(double initTrack, double goalTrack) {\n if (Util.clockwise(initTrack,goalTrack)) return 1;\n else return -1;\n }", "public final double getPatternOrientation()\r\n\t{\r\n\t\treturn _orientation;\r\n\t}", "String getDirection();", "private static void solution() {\n for (int i = 0; i < n; i++) {\n Coord here = coords[i]; // start, end, dir, gen\n for (int j = 0; j < here.gen; j++) {\n // Rotate degree of 90.\n List<Pair> changed = rotate(here.coord, here.endPoint);\n boolean first = true;\n for(Pair p: changed){\n if(first) {\n here.endPoint = new Pair(p.x, p.y);\n first = false;\n }\n here.coord.add(new Pair(p.x, p.y));\n }\n }\n }\n // count the number of squares enclosing all angles with dragon curve\n for (int i = 0; i < n; i++) {\n for(Pair p: coords[i].coord)\n board[p.y][p.x] = true;\n }\n int cnt = 0;\n for (int i = 0; i < 100; i++)\n for (int j = 0; j < 100; j++)\n if(board[i][j] && board[i + 1][j] && board[i][j + 1] && board[i + 1][j + 1])\n cnt += 1;\n System.out.println(cnt);\n }", "public abstract boolean isConnectedInDirection(N n1, N n2);", "public double getAngle(int[][] tab) {\n\t\tdouble[] res= new double[4];int resi=0;\n\t\tint cmpt=0;\n\t\tint angle=0;\n\t\tfor (int i=0;i<tab.length;i++) {\n\t\t\tif (!(tab[i][0]==0) || !(tab[i][1]==0))\n\t\t\t\tcmpt++;\n\t\t}\n\t\t\n\t\tif (cmpt<=1) {\n\t\t\t return 0; //RIP CODE\n\t\t}\n\t\t\n\t\tfor (int i=1;i<tab.length && (!(tab[i][0]==0) || !(tab[i][1]==0));i++) {\n\t\t\tfor(int c=1;i<tab.length && (tab[c][0]!=0 || tab[c][1]!=0);i++)\n\t\t\t{\n\t\t\t\tint diffx=tab[i-1][0]-tab[i][0];\n\t\t\t\tint diffy=tab[i-1][1]-tab[i][1];\n\t\t\t\t\n\t\t\t\tdouble yb=tab[i][1];\n\t\t\t\tdouble xb=tab[i][0];\n\t\t\t\tdouble ya=tab[i-1][1];\n\t\t\t\tdouble xa=tab[i-1][0];\n\t\t\t\t\n\t\t\t\tdouble pointy,pointx;\n\t\t\t\tpointy=yb; \t\t\t\t\t\t\t//pointy/x = coord du 3e point de triangle rectangle\n\t\t\t\tpointx=xa;\t\t\t\t\n\t\t\t\t\n\t\t\t\tdouble dhypo=Math.sqrt(Math.pow(xb-xa,2)+Math.pow(yb-ya,2));\t//(yb-ya)/(xb-xa)\n\t\t\t\tdouble dadj=Math.sqrt(Math.pow(xb-pointx, 2)+Math.pow(yb-pointy, 2));\t//adjacent / rapport a xb,yb\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (dhypo<img.getWidth() && dhypo!=0) {\t\t//deux points selectionnees sont des diagonales\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\n\t\t\t\t\tif (retour>90/2)\n\t\t\t\t\t\tretour=180-90-retour;\n\t\t\t\t\t\n\t\t\t\t\tif((xa<xb && ya<yb )||( xb<xa && yb<ya))\t\t\t\t//point de droite plus haut que celui de gauche\n\t\t\t\t\t\treturn -retour;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn retour;\n\t\t\t\t}\n\t\t\t\t/*else {\t\t\t//deux points sont en diagonnale\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\t\t// ne marche pas \n\t\t\t\t\treturn (Math.abs(45-retour)/2);\n\t\t\t\t\t\n\t\t\t\t}*/\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\t\n\t\treturn 0;\n\t}", "public int degree(Position vp) throws InvalidPositionException;", "public int[] direction(Node from, Node to) {\n int dx = to.getX() - from.getX();\n int dy = to.getY() - from.getY();\n int[] direction = {0, 0};\n \n if (dx != 0) {\n direction[0] = dx/Math.abs(dx);\n }\n \n if (dy != 0) {\n direction[1] = dy/Math.abs(dy);\n }\n \n return direction;\n }", "@Override\n public Vector getFacingVector() {\n double[] rotation = {Math.cos(this.rot), Math.sin(this.rot)};\n Vector v = new Vector(rotation);\n v = VectorUtil.direction(v);\n Vector w = VectorUtil.direction(this.getR());\n v.plus(w);\n return v;\n }", "public Direction directionVers(Lutin lutin) {\n return coord.directionsVers(lutin.coord).get(0);\n\n }", "private Integer alignWithZone(Point point) {\n Zone zone = Zone.Find(target);\n if (null == zone) {\n return 0;\n }\n Double oppositeLength = point.y() - zone.drawY();\n Double adjacentLength = point.x() - zone.drawX();\n Double angle = Math.atan2(oppositeLength, adjacentLength);\n angle = Math.toDegrees(angle);\n\n return angle.intValue() + 90;\n }", "@Generated\n @Selector(\"direction\")\n @ByValue\n public native CGVector direction();", "public static boolean isCornerPointingInDirectionOf(int[][] area, Corner corner, Vector2 direction) {\r\n\t\tVector2 orientation = getCornerOrientation(area, corner);\r\n\t\t/*boolean toReturn = ((direction.x==orientation.x) && (direction.y==orientation.y));\r\n\t\treturn (toReturn);*/\r\n\t\tboolean x = false;\r\n\t\tboolean y = false;\r\n\t\tif (orientation.x > 0) {\r\n\t\t\tif (corner.getLocation().x < direction.x) {\r\n\t\t\t\tx = true;\r\n\t\t\t} else {\r\n\t\t\t\tx = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (corner.getLocation().x > direction.x) {\r\n\t\t\t\tx = true;\r\n\t\t\t} else {\r\n\t\t\t\tx = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (orientation.y > 0) {\r\n\t\t\tif (corner.getLocation().y < direction.y) {\r\n\t\t\t\ty = true;\r\n\t\t\t} else {\r\n\t\t\t\ty = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (corner.getLocation().y > direction.y) {\r\n\t\t\t\ty = true;\r\n\t\t\t} else {\r\n\t\t\t\ty = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (x && y);\r\n\t}", "public int getOrientation(){ return mOrientation; }", "private static boolean isInDiagonal(int pos) {\n for (int i = 0; i < ColorFrames.BOARD_DIM; ++i) {\n if (1 + i * (ColorFrames.BOARD_DIM + 1) == pos || ColorFrames.BOARD_DIM + i * (ColorFrames.BOARD_DIM - 1) == pos)\n return true;\n }\n\n return false;\n }", "public int getRotations();", "float getWindingConnectionAngle();", "public int checkEdgeDirection(Object src, Object dest)\n\t{\t\t\n\t\tif(this.map.get(src).contains(dest) && !this.map.get(dest).contains(src))\n\t\t\treturn 1;\n\t\telse if(this.map.get(src).contains(dest) && this.map.get(dest).contains(src))\n\t\t\treturn 2;\n\t\treturn 0;\n\t}", "private String getDirectionsFor(int pos) {\n\t\tString direction = \"25,26,27,28\";\n\t\t\n\t\tswitch(pos){\n\t\t\tcase 0:\n\t\t\t\tdirection = \"1,4\";\n\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tdirection = \"0,5,2\";\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdirection = \"1,3,6\";\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdirection = \"2,7\";\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdirection = \"0,5,8\";\n\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tdirection = \"1,4,6,9\";\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tdirection = \"2,5,7,10\";\n\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tdirection = \"3,6,11\";\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tdirection = \"4,9,12\";\n\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tdirection = \"5,8,10,13\";\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tdirection = \"6,9,11,14\";\n\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tdirection = \"7,10,15\";\n\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tdirection = \"8,9,13,16\";\n\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\tdirection = \"9,12,14,16\";\n\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\tdirection = \"10,13,15\";\n\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\tdirection = \"11,14,15\";\n\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tdirection = \"12,24\";\n\t\t\tbreak;\n\t\t}\n\t\treturn direction;\n\t}", "private AntArea.Cell getCellInDirection(Pair<Integer, Integer> direction) {\n int newX = location.getKey() + direction.getKey();\n int newY = location.getValue() + direction.getValue();\n\n //Torus shape\n newX = newX < 0 ? antArea.getAreaWidth() - 1 : newX;\n newY = newY < 0 ? antArea.getAreaHeight() - 1 : newY;\n newX %= antArea.getAreaWidth();\n newY %= antArea.getAreaHeight();\n\n return antArea.getMap()[newX][newY];\n }", "public int inDegrees()\n {\n return dirInDegrees;\n }", "Direction invert() {\n switch (this) {\n case NORTH: return SOUTH;\n case SOUTH: return NORTH;\n case EAST: return WEST;\n case WEST: return EAST;\n case NORTH_EAST: return SOUTH_WEST;\n case NORTH_WEST: return SOUTH_EAST;\n case SOUTH_EAST: return NORTH_WEST;\n case SOUTH_WEST: return NORTH_EAST;\n default: return NULL;\n }\n }", "public int toTripIndexOfTrip() {\n \t ToDisplayTrips tt = ToDisplayTrips.INSTANCE;\n \t return tt.toTrips.indexOf(this);\n }", "public abstract int getDirection();", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "protected int mirrorDirection(int direction) {\n\t\tif (direction < 4) {\n\t\t\treturn (direction + 2)%4;\n\t\t} else {\n\t\t\treturn (direction + 2)%4 + 4;\n\t\t}\n\t}", "Enumerator getDirection();", "int getOrientationsCount();", "public int getTouchDirection(double normalizeX, double normalizeY)\n {\n \t//cos alpha = normalizeX\n \t//sin alpha = normalizeY\n \tdouble alpha = Math.acos(normalizeX);\n \tif (normalizeY < 0) alpha = - alpha;\n \t\n \tdouble validRange = Math.PI/6;\n \t\n \tdouble alpha_abs = Math.abs(alpha);\n \tif (alpha_abs < validRange) return 2;\n \tif (alpha_abs > Math.PI - validRange) return 4;\n \tif (alpha_abs > Math.PI/2 - validRange && alpha_abs < Math.PI/2 + validRange)\n \t{\n \t\tif (alpha > 0) return 3;\n \t\telse return 1;\n \t\t\t\t\n \t}\n \treturn 5;\n \t\n }", "private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}", "public double getInteriorAngle() {\n\t\tdouble angle = 180 * (numberOfSides - 2) / numberOfSides;\n\t\treturn angle;\n\t}" ]
[ "0.71960765", "0.6773472", "0.6529044", "0.6507864", "0.6488069", "0.6444184", "0.6108681", "0.5841433", "0.5784352", "0.5614299", "0.5525704", "0.5509987", "0.54630375", "0.54291344", "0.5404273", "0.5400754", "0.5383165", "0.5369978", "0.53589505", "0.5347077", "0.53208524", "0.53063625", "0.53044516", "0.528253", "0.5270715", "0.5249976", "0.52395654", "0.5227995", "0.52276486", "0.52124274", "0.5205022", "0.52046627", "0.5178272", "0.51703763", "0.5133671", "0.51328707", "0.51112247", "0.510163", "0.5088631", "0.5086132", "0.50850856", "0.50773925", "0.50716144", "0.50647664", "0.5006272", "0.50001645", "0.49875554", "0.4975621", "0.49724242", "0.49643022", "0.49572074", "0.49561307", "0.49353716", "0.49337006", "0.49334022", "0.4928743", "0.49090806", "0.49083436", "0.49000815", "0.48939016", "0.48922947", "0.48904568", "0.48887712", "0.4879679", "0.4878907", "0.48651418", "0.48610556", "0.4859412", "0.48534262", "0.48456523", "0.48227543", "0.48221162", "0.48171705", "0.48163456", "0.481299", "0.48070514", "0.4806449", "0.47910535", "0.47889665", "0.47852334", "0.47817093", "0.47663417", "0.47509903", "0.47468308", "0.47426584", "0.4740111", "0.47380558", "0.47363898", "0.4736097", "0.47319943", "0.4731119", "0.4727894", "0.47218162", "0.4713507", "0.47101617", "0.47100982", "0.47055417", "0.47020885", "0.4700255", "0.46961054" ]
0.76388884
0
Test if 2 segments intersects
boolean intersect(Segment other) { int o1 = orientation(other.from); int o2 = orientation(other.to); int o3 = other.orientation(from); int o4 = other.orientation(to); return (o1 != o2 && o3 != o4) // <- General case, special case below || (o1 == 0 && inBoundingBox(other.from)) || (o2 == 0 && inBoundingBox(other.to)) || (o3 == 0 && other.inBoundingBox(from)) || (o4 == 0 && other.inBoundingBox(to)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\t\tpublic void testIntersectAtEndPoints2(){\n\t\t\tGenericLineSegmentsIntersect v=new GenericLineSegmentsIntersect();\n\t\t\tint[][] lines={\n\t\t\t\t\t{1,5,5,1},\n\t\t\t\t\t{1,4,5,0},\n\t\t\t\t\t{2,2,6,10}\n\t\t\t};\n\n\t\t\tassertTrue(v.intersects(lines));\n\t\t}", "private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}", "public boolean intersects(Segment2D segment2) {\n if (segment2 == null) {\n throw new IllegalArgumentException(\"can't pass null parameter\");\n }\n\n double det = this.a * segment2.b - this.b * segment2.a;\n if (Math.abs(det) < EPS) {\n if (this.isOnSegment(segment2.point1)) {\n return true;\n }\n if (this.isOnSegment(segment2.point2)) {\n return true;\n }\n if (segment2.isOnSegment(this.point1)) {\n return true;\n }\n if (segment2.isOnSegment(this.point2)) {\n return true;\n }\n return false;\n }\n\n double x = -(segment2.b * this.c - this.b * segment2.c) / det;\n double y = -(-segment2.a * this.c + this.a * segment2.c) / det;\n\n Point2D p = new Point2D.Double(x, y);\n if (!this.isOnSegment(p)) {\n return false;\n }\n if (!segment2.isOnSegment(p)) {\n return false;\n }\n return true;\n }", "public boolean intersectsSegment(Vector a, Vector b, double R){\r\n\t\tif(floor && !obstructed())\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tVector[] p = getCardinalPoints();\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++){\r\n\t\t\tVector c = p[i];\r\n\t\t\tVector d = p[(i+1)%4];\r\n\t\t\tif(Geometry.segmentIntersect(a, b, c, d) || Geometry.plsDist(a, b, p[i]) <= R)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean intersects( Geometry gmo );", "static boolean SegmentsIntersect(PT a, PT b, PT c, PT d) {\r\n\t\tif (LinesCollinear(a, b, c, d)) {\r\n\t\t\tif (dist2(a, c) < EPS || dist2(a, d) < EPS || dist2(b, c) < EPS || dist2(b, d) < EPS)\r\n\t\t\t\treturn true;\r\n\t\t\tif (dot(c.subtract(a), c.subtract(b)) > 0 && dot(d.subtract(a), d.subtract(b)) > 0\r\n\t\t\t\t\t&& dot(c.subtract(b), d.subtract(b)) > 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (cross(d.subtract(a), b.subtract(a)) * cross(c.subtract(a), b.subtract(a)) > 0)\r\n\t\t\treturn false;\r\n\t\tif (cross(a.subtract(c), d.subtract(c)) * cross(b.subtract(c), d.subtract(c)) > 0)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public boolean intersects(GLineSegment lineSegment) {\n if(this.equals(lineSegment)) return(true);\n else if(this.slope()==lineSegment.slope()) return(false);\n else {\n //complicated stuff here.\n return(false);\n }\n }", "public boolean intersects(VectorXZ segmentP1, VectorXZ segmentP2) {\n // TODO: (performance): passing \"vector TO second point\", rather than\n // point2, would avoid having to calc it here - and that information\n // could be reused for all comparisons involving the segment\n return getIntersection(segmentP1, segmentP2) != null;\n }", "public boolean intersects (UCSCGeneLine first, int start, int end){\n\t\tif (end < first.getTxStart() || start > first.getTxEnd()) return false;\n\t\treturn true;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIntersection();", "private double intersect(double start0, double end0, double start1, double end1)\n {\n double length = Double.min(end0, end1) - Double.max(start0, start1);\n return Double.min(Double.max(0, length), 1.0);\n }", "public static boolean checkIfLineSegementsIntersects( Point2D a, Point2D b, Point2D c, Point2D d, Point2D r )\n {\n double distAB, theCos, theSin, newX, ABpos;\n\n // Fail if either line is undefined.\n if( a.x == b.x && a.y == b.y || c.x == d.x && c.y == d.y )\n return false;\n\n // Fail if the segments share an end-point.\n if( a.x == c.x && a.y == c.y || b.x == c.x && b.y == c.y || a.x == d.x && a.y == d.y || b.x == d.x && b.y == d.y )\n return false;\n\n // (1) Translate the system so that point A is on the origin.\n double Bx = b.x - a.x;\n double By = b.y - a.y;\n double Cx = c.x - a.x;\n double Cy = c.y - a.y;\n double Dx = d.x - a.x;\n double Dy = d.y - a.y;\n\n // Discover the length of segment A-B.\n distAB = Math.sqrt( Bx * Bx + By * By );\n\n // (2) Rotate the system so that point B is on the positive X axis.\n theCos = Bx / distAB;\n theSin = By / distAB;\n newX = Cx * theCos + Cy * theSin;\n Cy = (int) (Cy * theCos - Cx * theSin);\n Cx = newX;\n newX = Dx * theCos + Dy * theSin;\n Dy = (int) (Dy * theCos - Dx * theSin);\n Dx = newX;\n\n // Fail if segment C-D doesn't cross line A-B.\n if( Cy < 0. && Dy < 0. || Cy >= 0. && Dy >= 0. )\n return false;\n\n // (3) Discover the position of the intersection point along line A-B.\n ABpos = Dx + (Cx - Dx) * Dy / (Dy - Cy);\n\n // Fail if segment C-D crosses line A-B outside of segment A-B.\n if( ABpos < 0. || ABpos > distAB )\n return false;\n\n // (4) Apply the discovered position to line A-B in the original coordinate system.\n if( r != null )\n {\n r.x = (int) (a.x + ABpos * theCos);\n r.y = (int) (a.y + ABpos * theSin);\n }\n\n // Success.\n return true;\n }", "public void intersect(Shape s);", "public boolean rayCrossesSegment(LatLng point, LatLng a, LatLng b) {\n double px = point.longitude,\n py = point.latitude,\n ax = a.longitude,\n ay = a.latitude,\n bx = b.longitude,\n by = b.latitude;\n if (ay > by) {\n ax = b.longitude;\n ay = b.latitude;\n bx = a.longitude;\n by = a.latitude;\n }\n // alter longitude to cater for 180 degree crossings\n if (px < 0 || ax < 0 || bx < 0) {\n px += 360;\n ax += 360;\n bx += 360;\n }\n // if the point has the same latitude as a or b, increase slightly py\n if (py == ay || py == by) py += 0.00000001;\n\n\n // if the point is above, below or to the right of the segment, it returns false\n if ((py > by || py < ay) || (px > Math.max(ax, bx))) {\n return false;\n }\n // if the point is not above, below or to the right and is to the left, return true\n else if (px < Math.min(ax, bx)) {\n return true;\n }\n // if the two above conditions are not met, you have to compare the slope of segment [a,b] (the red one here) and segment [a,p] (the blue one here) to see if your point is to the left of segment [a,b] or not\n else {\n double red = (ax != bx) ? ((by - ay) / (bx - ax)) : Double.POSITIVE_INFINITY;\n double blue = (ax != px) ? ((py - ay) / (px - ax)) : Double.POSITIVE_INFINITY;\n return (blue >= red);\n }\n\n }", "private Type establishIntersectionType() {\n\r\n\t\tdouble Pq0 = AngleUtil.getTurn(p0, p1, q0);\r\n\t\tdouble Pq1 = AngleUtil.getTurn(p0, p1, q1);\r\n\r\n\t\tdouble Qp0 = AngleUtil.getTurn(q0, q1, p0);\r\n\t\tdouble Qp1 = AngleUtil.getTurn(q0, q1, p1);\r\n\r\n\t\t// check if all turn have none angle. In this case, lines are collinear.\r\n\t\tif (Pq0 == AngleUtil.NONE && Pq1 == AngleUtil.NONE || Qp0 == AngleUtil.NONE && Qp1 == AngleUtil.NONE) {\r\n\t\t\t// at this point, we know that lines are collinear.\r\n\t\t\t// we must check if they overlap for segments intersection\r\n\t\t\tif (q0.getDistance(p0) <= p0.getDistance(p1) && q0.getDistance(p1) <= p0.getDistance(p1)) {\r\n\t\t\t\t// then q0 is in P limits and p0 or p1 is in Q limits\r\n\t\t\t\t// TODO this check is no sufficient\r\n\t\t\t\tinPLimits = true;\r\n\t\t\t\tinQLimits = true;\r\n\t\t\t}\r\n\t\t\treturn Type.COLLINEAR;\r\n\t\t}\r\n\t\t// check if q0 and q1 lie around P AND p0 and p1 lie around Q.\r\n\t\t// in this case, the two segments intersect\r\n\t\telse if (Pq0 * Pq1 <= 0 && Qp0 * Qp1 <= 0) {\r\n\t\t\t// else if(Pq0 <= 0 && Pq1 >= 0 && Qp0 <= 0 && Qp1 >= 0 ||\r\n\t\t\t// Pq0 >= 0 && Pq1 <= 0 && Qp0 >= 0 && Qp1 <= 0){\r\n\r\n\t\t\tinPLimits = true;\r\n\t\t\tinQLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t}\r\n\r\n\t\t// At this point, we know that segments are not crossing\r\n\t\t// check if q0 and q1 lie around P or p0 and p1 lie around Q.\r\n\t\t// in this case, a segment cross a line\r\n\t\telse if (Pq0 * Pq1 <= 0) {\r\n\t\t\tinQLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t} else if (Qp0 * Qp1 <= 0) {\r\n\t\t\tinPLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t}\r\n\r\n\t\t// At this point, we know that each segment lie on one side of the other\r\n\t\t// We now check the slope to know if lines are Type.PARALLEL\r\n\t\tdouble pSlope = p0.getSlope(p1);\r\n\t\tdouble qSlope = q0.getSlope(q1);\r\n\t\tif (PrecisionUtil.areEquals(pSlope, qSlope))\r\n\t\t\t// TODO check the infinity case\r\n\t\t\t// this test works even if the slopes are \"Double.infinity\" due to the verticality of the lines and division\r\n\t\t\t// by 0\r\n\t\t\treturn Type.PARALLEL;\r\n\t\telse\r\n\t\t\treturn Type.INTERSECT;\r\n\t}", "public static boolean isIntersecting(Coord p1, Coord q1, Coord p2, Coord q2) \n { \n // Find the four orientations needed for general and \n // special cases \n int o1 = orientation(p1, q1, p2); \n int o2 = orientation(p1, q1, q2); \n int o3 = orientation(p2, q2, p1); \n int o4 = orientation(p2, q2, q1); \n \n // General case \n if(o1 != o2 && o3 != o4) \n return true; \n \n // Special Cases \n // p1, q1 and p2 are colinear and p2 lies on segment p1q1 \n if (o1 == 0 && isOnSegment(p1, q1, p2)) return true; \n \n // p1, q1 and q2 are colinear and q2 lies on segment p1q1 \n if (o2 == 0 && isOnSegment(p1, q1, q2)) return true; \n \n // p2, q2 and p1 are colinear and p1 lies on segment p2q2 \n if (o3 == 0 && isOnSegment(p2, q2, p1)) return true; \n \n // p2, q2 and q1 are colinear and q1 lies on segment p2q2 \n if (o4 == 0 && isOnSegment(p2, q2, q1)) return true; \n \n return false; // Doesn't fall in any of the above cases \n }", "public static boolean intersects(Geometry a, Geometry b) {\r\n GeometryFactory factory = new GeometryFactory(a.getPrecisionModel(),\r\n a.getSRID());\r\n List aComponents = components(a);\r\n List bComponents = components(b);\r\n\r\n for (Iterator i = aComponents.iterator(); i.hasNext();) {\r\n Geometry aComponent = (Geometry) i.next();\r\n Assert.isTrue(!(aComponent instanceof GeometryCollection));\r\n\r\n //Collapse to point as workaround for JTS defect: #contains doesn't work for\r\n //polygons and zero-length vectors. [Jon Aquino]\r\n aComponent = collapseToPointIfPossible(aComponent, factory);\r\n\r\n for (Iterator j = bComponents.iterator(); j.hasNext();) {\r\n Geometry bComponent = (Geometry) j.next();\r\n Assert.isTrue(!(bComponent instanceof GeometryCollection));\r\n bComponent = collapseToPointIfPossible(bComponent, factory);\r\n\r\n if (aComponent.intersects(bComponent)) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }", "private static boolean intersect(\n\t\tDateTime start1, DateTime end1,\n\t\tDateTime start2, DateTime end2)\n\t{\n\t\tif (DateTime.op_LessThanOrEqual(end2, start1) || DateTime.op_LessThanOrEqual(end1, start2))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean isPointInSegment(Coordinates point, Coordinates segmExtremityA, Coordinates segmExtremityB);", "@Override\n\tpublic boolean intersectsRectangle(final int ax1, final int ax2, final int ay1, final int ay2)\n\t{\n\t\tif (isInsideZone(ax1, ay1, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isInsideZone(ax1, ay2, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isInsideZone(ax2, ay1, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isInsideZone(ax2, ay2, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Check if any point from this rectangle is inside the other one\n\t\tif (zoneX1 > ax1 && zoneX1 < ax2 && zoneY1 > ay1 && zoneY1 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (zoneX1 > ax1 && zoneX1 < ax2 && zoneY2 > ay1 && zoneY2 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (zoneX2 > ax1 && zoneX2 < ax2 && zoneY1 > ay1 && zoneY1 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (zoneX2 > ax1 && zoneX2 < ax2 && zoneY2 > ay1 && zoneY2 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Horizontal lines may intersect vertical lines\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX2, zoneY1, ax1, ay1, ax1, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX2, zoneY1, ax2, ay1, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY2, zoneX2, zoneY2, ax1, ay1, ax1, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY2, zoneX2, zoneY2, ax2, ay1, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Vertical lines may intersect horizontal lines\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX1, zoneY2, ax1, ay1, ax2, ay1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX1, zoneY2, ax1, ay2, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX2, zoneY1, zoneX2, zoneY2, ax1, ay1, ax2, ay1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX2, zoneY1, zoneX2, zoneY2, ax1, ay2, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static boolean lineSegmentIntersectsRect(float x1, float y1, float x2, float y2, float xmin, float ymin, float xmax, float ymax) {\n\t\tshort code1 = Code(x1, y1, xmin, ymin, xmax, ymax);\n\t\tshort code2 = Code(x2, y2, xmin, ymin, xmax, ymax);\n\n\t\t//both are TOP, or both are BOTTOM , etc.\n\t\tif((code1 & code2) != 0) return false;\n\n\t\t//both are in the middle vertically or horizontally : | shape or - shape\n\t\tif( ((code1 | code2) & (RIGHT | LEFT)) == 0) return true;\n\t\tif( ((code1 | code2) & (TOP | BOTTOM)) == 0) return true;\n\n\t\t//any of them is inside\n\t\tif(code1 == 0 || code2 == 0) return true;\n\n\t\t//calculate intersections and check if they are in the middle\n\t\t//y = y1 + (x - x1) * slope\n\n\t\tfloat x, y;\n\t\ty = y1 + (xmax - x1) * (y2 - y1) /(x2 - x1);\n\t\tif(ymin <= y && y <= ymax) return true;\n\t\ty = y1 + (xmin - x1) * (y2 - y1) /(x2 - x1);\n\t\tif(ymin <= y && y <= ymax) return true;\n\t\tx = x1 + (ymax - y1) * (x2 - x1) / (y2 - y1);\n\t\tif(xmin <= x && x <= ymax) return true;\n\t\tx = x1 + (ymin - y1) * (x2 - x1) / (y2 - y1);\n\t\tif(xmin <= x && x <= ymax) return true;\n\t\treturn false;\n\t}", "static boolean doIntersect(Point p1, Point q1,\n Point p2, Point q2)\n {\n // Find the four orientations needed for\n // general and special cases\n int o1 = orientation(p1, q1, p2);\n int o2 = orientation(p1, q1, q2);\n int o3 = orientation(p2, q2, p1);\n int o4 = orientation(p2, q2, q1);\n\n // General case\n if (o1 != o2 && o3 != o4)\n {\n return true;\n }\n\n // Special Cases\n // p1, q1 and p2 are colinear and\n // p2 lies on segment p1q1\n if (o1 == 0 && onSegment(p1, p2, q1))\n {\n return true;\n }\n\n // p1, q1 and p2 are colinear and\n // q2 lies on segment p1q1\n if (o2 == 0 && onSegment(p1, q2, q1))\n {\n return true;\n }\n\n // p2, q2 and p1 are colinear and\n // p1 lies on segment p2q2\n if (o3 == 0 && onSegment(p2, p1, q2))\n {\n return true;\n }\n\n // p2, q2 and q1 are colinear and\n // q1 lies on segment p2q2\n if (o4 == 0 && onSegment(p2, q1, q2))\n {\n return true;\n }\n\n // Doesn't fall in any of the above cases\n return false;\n }", "private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}", "protected boolean isOverlapping(ArrayList<Rectangle> first, ArrayList<Rectangle> second) {\n\t\tfor (Rectangle f : first) {\n\t\t\tfor (Rectangle s : second) {\n\t\t\t\tif (f.overlaps(s)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkSharedVertex(Segment s1, Segment s2){\n\t\tdouble wp1x = s1.w1.getX();\n\t\tdouble wp1y = s1.w1.getY();\n\t\tdouble wp2x = s1.w2.getX();\n\t\tdouble wp2y = s1.w2.getY();\n\t\tdouble wp3x = s2.w1.getX();\n\t\tdouble wp3y = s2.w1.getY();\n\t\tdouble wp4x = s2.w2.getX();\n\t\tdouble wp4y = s2.w2.getY();\n\n\t\tif (((wp1x == wp3x && wp1y == wp3y) || (wp1x == wp4x && wp1y == wp4y)) \n\t\t|| ((wp2x == wp3x && wp2y == wp3y) || (wp2x == wp4x && wp2y == wp4y)))\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "private boolean pointOnSegment(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\t\n\t\tif (w3x <= Math.max(w1x, w2x) && w3x >= Math.min(w1x, w2x) && \n\t\t\tw3y <= Math.max(w1y, w2y) && w3y >= Math.min(w1y, w2y))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "Multimap<String, String> intersects(Circle bounds);", "public boolean isIntersectLine(Point p1, Point p2) {\n\t\t// Find the four orientations needed for general and special cases\n\t\tint o1 = orientation(firstPoint, secondPoint, p1);\n\t\tint o2 = orientation(firstPoint, secondPoint, p2);\n\t\tint o3 = orientation(p1, p2, firstPoint);\n\t\tint o4 = orientation(p1, p2, secondPoint);\n\n\t\t// General case\n\t\tif (o1 != o2 && o3 != o4) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Special Cases\n\t\t// p1, q1 and p2 are collinear and p2 lies on segment p1q1\n\t\tif (o1 == 0 && p1.onSegment(firstPoint, secondPoint)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// p1, q1 and p2 are collinear and q2 lies on segment p1q1\n\t\tif (o2 == 0 && p2.onSegment(firstPoint, secondPoint)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// p2, q2 and p1 are collinear and p1 lies on segment p2q2\n\t\tif (o3 == 0 && firstPoint.onSegment(p1, p2)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// p2, q2 and q1 are collinear and q1 lies on segment p2q2\n\t\tif (o4 == 0 && secondPoint.onSegment(p1, p2)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Or else\n\t\treturn false;\n\t}", "private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }", "static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r2.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n\n // Check if any points in rectangle 2 fall in 1\n //List<int[]> pointsOfInterest = new ArrayList<int[]>();\n pointsOfInterest.clear();\n for (int[] i : r2.getPoints())\n for (int[] j : r1.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r1.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n \n return false;\n }", "private boolean isOverlapped(BpmnShape s1, BpmnShape s2){\n\t\t\n\t\ttry{\n\t\t\t//Two tasks\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Task)\n\t\t\t\treturn this.overlappingTasks(s1,s2);\n\t\t\t\n\t\t\t//Two Events\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Event) {\n\t\t\t\treturn this.overlappingEvents(s1,s2);\n\t\t\t}\n\t\t\t\n\t\t\t//Two Gateways\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingGateways(s1,s2);\n\t\t\t\n\t\t\t//One Task and one Event\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingTaskAndEvent(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndEvent(s2, s1);\n\t\t\t\n\t\t\t//One Task and one Gateway \n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingTaskAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndGateway(s2, s1);\t\t\n\t\t\t\n\t\t\t//One Event and one Gateway\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingEventAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingEventAndGateway(s2, s1);\n\t\t}catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t}", "private boolean isIntersected(Waypoint w1, Waypoint w2, Waypoint w3, Waypoint w4){\n\t\tint o1 = this.orientation(w1, w2, w3);\n\t\tint o2 = this.orientation(w1, w2, w4);\n\t\tint o3 = this.orientation(w3, w4, w1);\n\t\tint o4 = this.orientation(w3, w4, w2);\n\t\tboolean intersected = false;\n\t\t\n\t\tif (o1 != o2 && o3 != o4){\n\t\t\tintersected = true;\n\t\t}\n//\t\tCheck if the two segmenets are colinear and they intersect\n//\t\tif (o1 == 0 && this.pointOnSegment(w1, w2, w3)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\n//\t\t}\n//\n//\t\t\n//\t\tif (o2 == 0 && this.pointOnSegment(w1, w2, w4)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\t\t\t\n//\t\t}\n//\t\t\n//\t\tif (o3 == 0 && this.pointOnSegment(w3, w4, w1)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\t\n//\t\t}\n//\t\t\n//\t\tif (o4 == 0 && this.pointOnSegment(w3, w4, w2)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\n//\t}\n\t\treturn intersected;\n\t}", "public static boolean intervalIntersect(float start1, float end1, float start2, float end2) {\n\t\treturn (start1 <= end2 && start2 <= end1);\n\t}", "public static boolean checkIfLinesIntersects( Point2D a, Point2D b, Point2D c, Point2D d, Point2D r )\n {\n double distAB, theCos, theSin, newX, ABpos;\n\n // Fail if either line is undefined.\n if( a.x == b.x && a.y == b.y || c.x == d.x && c.y == d.y )\n return false;\n\n // (1) Translate the system so that point A is on the origin.\n double Bx = b.x - a.x;\n double By = b.y - a.y;\n double Cx = c.x - a.x;\n double Cy = c.y - a.y;\n double Dx = d.x - a.x;\n double Dy = d.y - a.y;\n\n // Discover the length of segment A-B.\n distAB = Math.sqrt( Bx * Bx + By * By );\n\n // (2) Rotate the system so that point B is on the positive X axis.\n theCos = Bx / distAB;\n theSin = By / distAB;\n newX = Cx * theCos + Cy * theSin;\n Cy = (int) (Cy * theCos - Cx * theSin);\n Cx = newX;\n newX = Dx * theCos + Dy * theSin;\n Dy = (int) (Dy * theCos - Dx * theSin);\n Dx = newX;\n\n // Fail if the lines are parallel.\n if( Cy == Dy )\n return false;\n\n // (3) Discover the position of the intersection point along line A-B.\n ABpos = Dx + (Cx - Dx) * Dy / (Dy - Cy);\n\n // (4) Apply the discovered position to line A-B in the original coordinate system.\n if( r != null )\n {\n r.x = (int) (a.x + ABpos * theCos);\n r.y = (int) (a.y + ABpos * theSin);\n }\n\n // Success.\n return true;\n }", "boolean isPartiallyOverlapped(int[] x, int[] y) {\n return y[0] <= x[1]; //정렬이 이미 되어 있어서 simplify 할 수 있음\n }", "public abstract boolean intersect(BoundingBox bbox);", "public static boolean\nraysIntersectInPlane(Point2D tail0Pt, Point2D head0Pt, Point2D tail1Pt, Point2D head1Pt,\n\tPoint2D intersect, double[] uArray)\n{\n\tdouble tmp = ((head1Pt.getY() - tail1Pt.getY())*(head0Pt.getX() - tail0Pt.getX()) - (head1Pt.getX() - tail1Pt.getX())*(head0Pt.getY() - tail0Pt.getY()));\n\tif(tmp == 0.0)\n\t\treturn(false);\n\tdouble tmpv = ((tail1Pt.getX() - tail0Pt.getX())*(head0Pt.getY() - tail0Pt.getY()) - (tail1Pt.getY() - tail0Pt.getY())*(head0Pt.getX() - tail0Pt.getX())) / tmp;\n\ttmp = (head0Pt.getX() - tail0Pt.getX())*(head1Pt.getY() - tail1Pt.getY()) - (head1Pt.getX() - tail1Pt.getX())*(head0Pt.getY() - tail0Pt.getY());\n\tif(tmp == 0.0)\n\t\treturn(false);\n\tdouble tmpu = ((tail1Pt.getX() - tail0Pt.getX())*(head1Pt.getY() - tail1Pt.getY()) + (head1Pt.getX() - tail1Pt.getX())*(tail0Pt.getY() - tail1Pt.getY()))/tmp;\n\n\tintersect.setLocation(\n\t\ttail1Pt.getX() + tmpv*(head1Pt.getX() - tail1Pt.getX()),\n\t\ttail1Pt.getY() + tmpv*(head1Pt.getY() - tail1Pt.getY()));\n\n\t// intersect[ZCoor] = tail1Pt[ZCoor] + tmpv*(head1Pt[ZCoor] - tail1Pt[ZCoor]);\n\n\tuArray[0] = tmpu; // u of first ray\n\tuArray[1] = tmpv; // u of second ray\n\n\treturn (true);\n}", "private static boolean isOnSegment(Coord p, Coord q, Coord r) \n {\n if(r.x <= Math.max(p.x, q.x) && r.x >= Math.min(p.x, q.x) && \n r.y <= Math.max(p.y, q.y) && r.y >= Math.min(p.y, q.y)) \n return true; \n return false; \n }", "private int checkIntersections(ArrayList<Segment> segments){\n\t\tint numberOfIntersections = 0;\n\t\tfor (Segment s: segments){\n\t\t\tSegment firstSegment = s;\n\t\t\tfor (Segment t: segments){\n\t\t\t\tSegment secondSegment = t;\n\t\t\t\tif (!(firstSegment.equals(secondSegment))){\n\t\t\t\t\tif (!this.checkSharedVertex(firstSegment, secondSegment)){\n\t\t\t\t\t\tif(this.isIntersected(firstSegment.w1, firstSegment.w2, secondSegment.w1, secondSegment.w2))\n\t\t\t\t\t\t\tnumberOfIntersections ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn numberOfIntersections;\n\t}", "boolean overlap(Reservation other);", "private boolean overlappingTaskAndEvent(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isIntersectLineInMiddle(Line line) {\n\t\tdouble a = subFloat(firstPoint.y, secondPoint.y); // a = firstPoint.y - secondPoint.y\n\t\tdouble b = subFloat(secondPoint.x, firstPoint.x); // b = secondPoint.x - firstPoint.x\n\t\tdouble c = subFloat(multiFloat(-a, firstPoint.x), multiFloat(b, firstPoint.y));\n\t\t// c = -a * firstPoint.x - b * firstPoint.y\n\n\t\tdouble aLine = subFloat(line.firstPoint.y, line.secondPoint.y); // aLine = line.firstPoint.y -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// line.secondPoint.y\n\t\tdouble bLine = subFloat(line.secondPoint.x, line.firstPoint.x); // bLine = line.secondPoint.x -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// line.firstPoint.x\n\t\tdouble cLine = subFloat(multiFloat(-aLine, line.firstPoint.x), multiFloat(bLine, line.firstPoint.y));\n\t\t// cLine = -aLine * line.firstPoint.x - bLine * line.firstPoint.y\n\n\t\t// 4 points on same line\n\t\t// (a * line.firstPoint.x + b * line.firstPoint.y + c == 0) &&\n\t\t// (a * line.secondPoint.x + b * line.secondPoint.y + c == 0)\n\t\tif ((addFloat(multiFloat(a, line.firstPoint.x), multiFloat(b, line.firstPoint.y), c) == 0)\n\t\t\t\t&& (addFloat(multiFloat(a, line.secondPoint.x), multiFloat(b, line.secondPoint.y), c) == 0)) {\n\t\t\tif ((firstPoint.distanceFrom(line.firstPoint) >= getLength()\n\t\t\t\t\t&& firstPoint.distanceFrom(line.secondPoint) >= this.getLength())\n\t\t\t\t\t|| (secondPoint.distanceFrom(line.firstPoint) >= this.getLength()\n\t\t\t\t\t\t\t&& secondPoint.distanceFrom(line.secondPoint) >= this.getLength()))\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}\n\n\t\t// ((a * line.firstPoint.x + b * line.firstPoint.y + c) * (a *\n\t\t// line.secondPoint.x + b * line.secondPoint.y + c) < 0) &&\n\t\t// ((aLine * firstPoint.x + bLine * firstPoint.y + cLine) * (aLine *\n\t\t// secondPoint.x + bLine * secondPoint.y + cLine) < 0)\n\t\tif ((multiFloat(addFloat(multiFloat(a, line.firstPoint.x), multiFloat(b, line.firstPoint.y), c),\n\t\t\t\taddFloat(multiFloat(a, line.secondPoint.x), multiFloat(b, line.secondPoint.y), c)) < 0)\n\t\t\t\t&& (multiFloat(addFloat(multiFloat(aLine, firstPoint.x), multiFloat(bLine, firstPoint.y), cLine),\n\t\t\t\t\t\taddFloat(multiFloat(aLine, secondPoint.x), multiFloat(bLine, secondPoint.y), cLine)) < 0))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public CFWRect intersectsLine( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//1.rejust rect\r\n\t\t//correct: (m_poiLT.m_fX < m_poiRB.m_fX && m_poiLT.m_fY < m_poiRB.m_fY)\r\n\t\tif(m_poiLT.m_fX > m_poiRB.m_fX && m_poiLT.m_fY > m_poiRB.m_fY)\t{\r\n\t\t\t//exchange all\r\n\t\t\tCFWPoint poiTmp = m_poiLT;\r\n\t\t\tm_poiLT = m_poiRB;\r\n\t\t\tm_poiRB = poiTmp;\r\n\t\t}\r\n\t\telse if(m_poiLT.m_fX > m_poiRB.m_fX && m_poiLT.m_fY < m_poiRB.m_fY)\t{\r\n\t\t\t//exchange X\r\n\t\t\tfloat fXTmp = m_poiLT.m_fX;\r\n\t\t\tm_poiLT.m_fX = m_poiRB.m_fX;\r\n\t\t\tm_poiRB.m_fX = fXTmp;\r\n\t\t}\r\n\t\telse if(m_poiLT.m_fX < m_poiRB.m_fX && m_poiLT.m_fY > m_poiRB.m_fY)\t{\r\n\t\t\t//exchange Y\r\n\t\t\tfloat fYTmp = m_poiLT.m_fY;\r\n\t\t\tm_poiLT.m_fY = m_poiRB.m_fY;\r\n\t\t\tm_poiRB.m_fY = fYTmp;\r\n\t\t}\r\n\t\t//2.intersect test\r\n\t\tCFWPoint poiOutOfRect = new CFWPoint();\r\n\t\tboolean bPoiInsideRect = false;\r\n\t\tCFWRect rectRet = new CFWRect();\r\n\t\tif(!checkPoiInside( poiBegI, poiEndI))\t{\r\n\t\t\t//System.out.println(\"the line has no cross point with the rectangle!\");\r\n\t\t\treturn(rectRet);\r\n\t\t}\r\n\t\telse if(!checkPoiInside( poiEndI, poiBegI))\t{\r\n\t\t\t//System.out.println(\"the line has no cross point with the rectangle!\");\r\n\t\t\treturn(rectRet);\r\n\t\t}\r\n\t\telse\t{\r\n\t\t\tif(isInsideArea( 9, poiBegI))\t{\r\n\t\t\t\tif(isInsideArea( 9, poiEndI))\t{\r\n\t\t\t\t\t//System.out.println(\"the line has no cross point with the rectangle!\");\r\n\t\t\t\t\treturn(rectRet);\r\n\t\t\t\t}\r\n\t\t\t\trectRet.m_poiLT = poiBegI;\r\n\t\t\t\tpoiOutOfRect = poiEndI;\r\n\t\t\t\tbPoiInsideRect = true;\r\n\t\t\t}\r\n\t\t\tif(isInsideArea( 9, poiEndI))\t{\r\n\t\t\t\tif(isInsideArea( 9, poiBegI))\r\n\t\t\t\t\treturn(rectRet);\r\n\t\t\t\trectRet.m_poiLT = poiEndI;\r\n\t\t\t\tpoiOutOfRect = poiBegI;\r\n\t\t\t\tbPoiInsideRect = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//3.intersect\r\n\t\t//if the line is vertical to X/Y, return the line segment\r\n\t\tif(poiEndI.m_fX == poiBegI.m_fX)\t{\r\n\t\t\tif(!bPoiInsideRect)\t{\r\n\t\t\t\trectRet.m_poiLT.m_fX = poiEndI.m_fX;\r\n\t\t\t\t//less than the m_poiLT'Y, use the m_poiLT'Y\r\n\t\t\t\trectRet.m_poiLT.m_fY = Math.max( Math.min(poiBegI.m_fY, poiEndI.m_fY), m_poiLT.m_fY);\r\n\t\t\t\t//larger than m_poiRB's Y, use the m_poiRB's Y\r\n\t\t\t\trectRet.m_poiRB.m_fY = Math.min( Math.max(poiBegI.m_fY, poiEndI.m_fY), m_poiRB.m_fY);\r\n\t\t\t}\r\n\t\t\telse\t{\r\n\t\t\t\tif(poiOutOfRect.m_fY < m_poiLT.m_fY)\r\n\t\t\t\t\trectRet.m_poiRB.m_fY = m_poiLT.m_fY;\r\n\t\t\t\telse if(poiOutOfRect.m_fY > m_poiRB.m_fY)\r\n\t\t\t\t\trectRet.m_poiRB.m_fY = m_poiRB.m_fY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trectRet.m_poiRB.m_fX = poiEndI.m_fX;\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(poiEndI.m_fY == poiBegI.m_fY)\t{\r\n\t\t\tif(!bPoiInsideRect)\t{\r\n\t\t\t\trectRet.m_poiLT.m_fX = Math.max( Math.min( poiBegI.m_fX, poiEndI.m_fX), m_poiLT.m_fX);\r\n\t\t\t\trectRet.m_poiLT.m_fY = poiEndI.m_fY;\r\n\t\t\t\trectRet.m_poiRB.m_fX = Math.min( Math.max( poiBegI.m_fX, poiEndI.m_fX), m_poiRB.m_fX);\r\n\t\t\t}\r\n\t\t\telse\t{\r\n\t\t\t\tif(poiOutOfRect.m_fX < m_poiLT.m_fX)\r\n\t\t\t\t\trectRet.m_poiRB.m_fX = m_poiLT.m_fX;\r\n\t\t\t\telse if(poiOutOfRect.m_fX > m_poiRB.m_fX)\r\n\t\t\t\t\trectRet.m_poiRB.m_fX = m_poiRB.m_fX;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trectRet.m_poiRB.m_fY = poiEndI.m_fY;\r\n\t\t}\r\n\t\telse\t{\r\n\t\t\t//build line function\r\n\t\t\tdouble dK = (poiEndI.m_fY - poiBegI.m_fY)/(poiEndI.m_fX - poiBegI.m_fX);\r\n\t\t\tdouble dB = poiBegI.m_fY - dK*poiBegI.m_fX;\r\n\t\t\t//find intersect points\r\n\t\t\tCFWPoint poiIntersA = new CFWPoint( m_poiLT.m_fX - 1.0f, m_poiLT.m_fY - 1.0f, 0.0f);\r\n\t\t\tCFWPoint poiIntersB = new CFWPoint( m_poiLT.m_fX - 1.0f, m_poiLT.m_fY - 1.0f, 0.0f);\r\n\t\t\tfloat fXTmpA = (float)((m_poiLT.m_fY - dB)/dK);\r\n\t\t\tfloat fXTmpB = (float)((m_poiRB.m_fY - dB)/dK);\r\n\t\t\tfloat fYTmpA = (float)(dK*m_poiLT.m_fX + dB);\r\n\t\t\tfloat fYTmpB = (float)(dK*m_poiRB.m_fX + dB);\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fXTmpA, m_poiLT.m_fX, m_poiRB.m_fX, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = fXTmpA;\r\n\t\t\t\t\tpoiIntersA.m_fY = m_poiLT.m_fY;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = fXTmpA;\r\n\t\t\t\t\tpoiIntersB.m_fY = m_poiLT.m_fY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fXTmpB, m_poiLT.m_fX, m_poiRB.m_fX, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = fXTmpB;\r\n\t\t\t\t\tpoiIntersA.m_fY = m_poiRB.m_fY;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = fXTmpB;\r\n\t\t\t\t\tpoiIntersB.m_fY = m_poiRB.m_fY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fYTmpA, m_poiLT.m_fY, m_poiRB.m_fY, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = m_poiLT.m_fX;\r\n\t\t\t\t\tpoiIntersA.m_fY = fYTmpA;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = m_poiLT.m_fX;\r\n\t\t\t\t\tpoiIntersB.m_fY = fYTmpA;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fYTmpB, m_poiLT.m_fY, m_poiRB.m_fY, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = m_poiRB.m_fX;\r\n\t\t\t\t\tpoiIntersA.m_fY = fYTmpB;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = m_poiRB.m_fX;\r\n\t\t\t\t\tpoiIntersB.m_fY = fYTmpB;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(bPoiInsideRect)\t{\r\n\t\t\t\tCFWVector vecBE = new CFWVector(poiOutOfRect.sub(rectRet.m_poiLT));\r\n\t\t\t\tCFWVector vecBA = new CFWVector(poiIntersA.sub(rectRet.m_poiLT));\r\n\t\t\t\tCFWVector vecBB = new CFWVector(poiIntersB.sub(rectRet.m_poiLT));\r\n\t\t\t\tif(vecBE.isSameDir_VerticalIn(vecBA))\t{\r\n\t\t\t\t\trectRet.m_poiRB = poiIntersA;\r\n\t\t\t\t}\r\n\t\t\t\telse if(vecBE.isSameDir_VerticalIn(vecBB))\t{\r\n\t\t\t\t\trectRet.m_poiRB = poiIntersB;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\t{\r\n\t\t\t\trectRet.m_poiLT = poiIntersA;\r\n\t\t\t\trectRet.m_poiRB = poiIntersB;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//last check : intersected line segment whether inside rectangle\r\n\t\tif(!isInsideArea( 9, rectRet.m_poiLT) || !isInsideArea( 9, rectRet.m_poiRB))\t{\r\n\t\t\tSystem.out.println(\"generated line segment isn't inside rectangle!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn(rectRet);\r\n\t}", "public boolean overlap(float[] a, float[] b) {\r\n return ( (b[0] <= a[0] && a[0] <= b[3]) || (b[0] <= a[3] && a[3] <= b[3]) ) &&\r\n ( (b[1] <= a[1] && a[1] <= b[4]) || (b[1] <= a[4] && a[4] <= b[4]) ) &&\r\n ( (b[2] <= a[2] && a[2] <= b[5]) || (b[2] <= a[5] && a[5] <= b[5]) );\r\n }", "public boolean areIntersecting() {\n return intersection != null;\n }", "public boolean overlaps(Triangle2D t) {\n\t\treturn true;\n\t}", "public static boolean lines_intersect(Line2D a, Line2D b)\n {\n return cross(subtract(a.getP2(), a.getP1()), subtract(b.getP1(), a.getP1())) *\n cross(subtract(a.getP2(), a.getP1()), subtract(b.getP2(), a.getP1())) < 0 && \n cross(subtract(b.getP2(), b.getP1()), subtract(a.getP1(), b.getP1())) *\n cross(subtract(b.getP2(), b.getP1()), subtract(a.getP2(), b.getP1())) < 0;\n }", "public boolean intersects(S2Point v1) {\n boolean result = true;\n\n if ((v1.x < xmin && lastVertex.x < xmin) || (v1.x > xmax && lastVertex.x > xmax)) {\n result = false;\n } else if ((v1.y < ymin && lastVertex.y < ymin) || (v1.y > ymax && lastVertex.y > ymax)) {\n result = false;\n } else if ((v1.z < zmin && lastVertex.z < zmin) || (v1.z > zmax && lastVertex.z > zmax)) {\n result = false;\n }\n\n lastVertex = v1;\n return result;\n }", "static boolean intersectsRect(R2Vector a, R2Vector b, R2Rect rect) {\n // First check whether the bound of AB intersects \"rect\".\n R2Rect bound = R2Rect.fromPointPair(a, b);\n if (!rect.intersects(bound)) {\n return false;\n }\n\n // Otherwise AB intersects \"rect\" if and only if all four vertices of \"rect\"\n // do not lie on the same side of the extended line AB. We test this by\n // finding the two vertices of \"rect\" with minimum and maximum projections\n // onto the normal of AB, and computing their dot products with the edge\n // normal.\n R2Vector n = R2Vector.sub(b, a).ortho();\n int i = (n.x >= 0) ? 1 : 0;\n int j = (n.y >= 0) ? 1 : 0;\n double max = n.dotProd(R2Vector.sub(rect.getVertex(i, j), a));\n double min = n.dotProd(R2Vector.sub(rect.getVertex(1 - i, 1 - j), a));\n return (max >= 0) && (min <= 0);\n }", "public final boolean contact(Organism org) {\n\t\tint i,j;\n\t\tExLine2DDouble line = new ExLine2DDouble();\n\t\tExLine2DDouble bline = new ExLine2DDouble();\n\t\t// Check collisions for all segments\n\t\tfor (i = _segments-1; i >= 0; i--) {\n\t\t\t// Consider only segments with modulus greater than 1\n\t\t\tif (_m[i]>=1) { \n\t\t\t\tline.setLine(x1[i]+_centerX, y1[i]+_centerY, x2[i]+_centerX, y2[i]+_centerY);\n\t\t\t\t// First check if the line intersects the bounding box of the other organism\n\t\t\t\tif (org.intersectsLine(line)) {\n\t\t\t\t\t// Do the same for the other organism's segments.\n\t\t\t\t\tfor (j = org._segments-1; j >= 0; j--) {\n\t\t\t\t\t\tif (org._m[j]>=1) {\n\t\t\t\t\t\t\tbline.setLine(org.x1[j] + org._centerX, org.y1[j] + org._centerY,\n\t\t\t\t\t\t\t\t\torg.x2[j] + org._centerX, org.y2[j] + org._centerY);\n\t\t\t\t\t\t\tif (intersectsLine(bline) && line.intersectsLine(bline)) {\n\t\t\t\t\t\t\t\t// If we found two intersecting segments, apply effects\n\t\t\t\t\t\t\t\ttouchEffects(org,i,j,true);\n\t\t\t\t\t\t\t\t// Intersection point\n\t\t\t\t\t\t\t\tPoint2D.Double intersec= line.getIntersection(bline);\n\t\t\t\t\t\t\t\t/* touchMove needs to know which is the line that collides from the middle (not\n\t\t\t\t\t\t\t\t * from a vertex). Try to guess it by finding the vertex nearest to the\n\t\t\t\t\t\t\t\t * intersection point.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tdouble dl1, dl2, dbl1, dbl2;\n\t\t\t\t\t\t\t\tdl1 = intersec.distanceSq(line.getP1());\n\t\t\t\t\t\t\t\tdl2 = intersec.distanceSq(line.getP2());\n\t\t\t\t\t\t\t\tdbl1 = intersec.distanceSq(bline.getP1());\n\t\t\t\t\t\t\t\tdbl2 = intersec.distanceSq(bline.getP2());\n\t\t\t\t\t\t\t\t// Use this to send the best choice to touchMove\n\t\t\t\t\t\t\t\tif (Math.min(dl1, dl2) < Math.min(dbl1, dbl2))\n\t\t\t\t\t\t\t\t\ttouchMove(org,intersec,bline,false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\ttouchMove(org,intersec,line,true);\n\t\t\t\t\t\t\t\t// Find only one collision to speed up.\n\t\t\t\t\t\t\t\treturn true;\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}\n\t\t}\n\t\treturn false;\n\t}", "boolean between(tPoint p2)\n {\n if (! this.collinear(p2))\n return false;\n \n //check to see if line is vertical\n if (this.p0.x != this.p1.x)\n {\n //if not vertical, check to see if point overlaps in x\n return (((this.p0.x < p2.x) && (p2.x < this.p1.x)) |\n ((this.p0.x > p2.x) && (p2.x > this.p1.x)));\n }\n else\n {\n //if vertical, check to see if point overlaps in y\n return (((this.p0.y < p2.y) && (p2.y < this.p1.y)) |\n ((this.p0.y > p2.y) && (p2.y > this.p1.y)));\n }\n }", "public boolean isIntersecting(Line other) {\r\n if (this.intersectionWith(other) != null) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {\n \t\tint end= offset2 + length2;\n \t\tint thisEnd= offset1 + length1;\n \n \t\tif (length2 > 0) {\n \t\t\tif (length1 > 0)\n \t\t\t\treturn offset1 < end && offset2 < thisEnd;\n \t\t\treturn offset2 <= offset1 && offset1 < end;\n \t\t}\n \n \t\tif (length1 > 0)\n \t\t\treturn offset1 <= offset2 && offset2 < thisEnd;\n \t\treturn offset1 == offset2;\n \t}", "private static Point2D getIntersectionFromParallel(LineSegment A, LineSegment B)\r\n\t{\r\n\t\t// Assume two lines are parallel at this point, return the highest end point (relative) of the two lines\r\n\t\tPoint2D Alow = Utilities.isBelow(A.startPoint, A.endPoint) ? A.startPoint : A.endPoint;\r\n\t\tPoint2D Blow = Utilities.isBelow(B.startPoint, B.endPoint) ? B.startPoint : B.endPoint;\r\n\t\treturn Utilities.isBelow(Alow, Blow) ? Blow : Alow;\r\n\t\t\r\n\t}", "private static boolean isPointOnLine(LineSegment a, Point2D b) {\r\n\t // Move the image, so that a.first is on (0|0)\r\n\t LineSegment aTmp = new LineSegment(new PointDouble(0, 0), new PointDouble(\r\n\t a.endPoint.getX() - a.startPoint.getX(), a.endPoint.getY() - a.startPoint.getY()));\r\n\t PointDouble bTmp = new PointDouble(b.getX() - a.startPoint.getX(), b.getY() - a.startPoint.getY());\r\n\t double r = crossProduct(aTmp.endPoint, bTmp);\r\n\t return Math.abs(r) < 0.000001;\r\n\t}", "Multimap<String, String> intersects(RectangleLatLng bounds);", "boolean hasSegments();", "public LineIntersect intersect(Line2D other, Vector2f intersectionPoint) {\r\n float denom = (other.pointB.y - other.pointA.y) * (this.pointB.x - this.pointA.x)\r\n - (other.pointB.x - other.pointA.x) * (this.pointB.y - this.pointA.y);\r\n float u0 = (other.pointB.x - other.pointA.x) * (this.pointA.y - other.pointA.y)\r\n - (other.pointB.y - other.pointA.y) * (this.pointA.x - other.pointA.x);\r\n float u1 = (other.pointA.x - this.pointA.x) * (this.pointB.y - this.pointA.y)\r\n - (other.pointA.y - this.pointA.y) * (this.pointB.x - this.pointA.x);\r\n\r\n //if parallel\r\n if (denom == 0.0f) {\r\n //if collinear\r\n if (u0 == 0.0f && u1 == 0.0f) {\r\n return LineIntersect.CoLinear;\r\n } else {\r\n return LineIntersect.Parallel;\r\n }\r\n } else {\r\n //check if they intersect\r\n u0 = u0 / denom;\r\n u1 = u1 / denom;\r\n\r\n float x = this.pointA.x + u0 * (this.pointB.x - this.pointA.x);\r\n float y = this.pointA.y + u0 * (this.pointB.y - this.pointA.y);\r\n\r\n if (intersectionPoint != null) {\r\n intersectionPoint.x = x; //(m_PointA.x + (FactorAB * Bx_minus_Ax));\r\n intersectionPoint.y = y; //(m_PointA.y + (FactorAB * By_minus_Ay));\r\n }\r\n\r\n // now determine the type of intersection\r\n if ((u0 >= 0.0f) && (u0 <= 1.0f) && (u1 >= 0.0f) && (u1 <= 1.0f)) {\r\n return LineIntersect.SegmentsIntersect;\r\n } else if ((u1 >= 0.0f) && (u1 <= 1.0f)) {\r\n return (LineIntersect.ABisectsB);\r\n } else if ((u0 >= 0.0f) && (u0 <= 1.0f)) {\r\n return (LineIntersect.BBisectsA);\r\n }\r\n\r\n return LineIntersect.LinesIntersect;\r\n }\r\n }", "public E3DVector3F checkSegmentCollision(E3DVector3F startPos, E3DVector3F endPos)\r\n {\r\n if(doesSegmentCrossPlane(startPos, endPos))\r\n {\r\n E3DVector3F intersectionPoint = getPlaneIntersectionPoint(startPos, endPos);\r\n if(isPointInTriangle(intersectionPoint))// || triangle.pointInTriangle(intersectionPoint2))\r\n return intersectionPoint;\r\n }\r\n return null;\r\n }", "@Override\n public int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2) {\n // This is similar to WedgeContainsOrCrosses, except that we want to\n // distinguish cases (1) [A contains B], (3) [A and B are disjoint],\n // and (2,4,5,6) [A intersects but does not contain B].\n\n if (orderedCCW(a0, a2, b2, ab1)) {\n // We are in case 1, 5, or 6, or case 2 if a2 == b2.\n return orderedCCW(b2, b0, a0, ab1) ? 1 : -1; // Case 1 vs. 2,5,6.\n }\n // We are in cases 2, 3, or 4.\n if (!orderedCCW(a2, b0, b2, ab1)) {\n return 0; // Case 3.\n }\n\n // We are in case 2 or 4, or case 3 if a2 == b0.\n return (a2.equalsPoint(b0)) ? 0 : -1; // Case 3 vs. 2,4.\n }", "static boolean doTheseOverlap(RBox b1, RBox b2){\n\t\t\n\t\tif(contains(b1,b2))\n\t\t\treturn true;\n\t\t\n\t\tif(contains(b2,b1))\n\t\t\treturn true;\n\t\t\n\t\tboolean xOverlap=false ;\n\t\tboolean yOverlap=false ;\n\t\t\n\t\tif(b1.xmax==b2.xmin && b2.xmax > b1.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif(b2.xmax==b1.xmin && b1.xmax > b2.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif((b1.xmin<=b2.xmin&&b1.xmax>=b2.xmax)||(b2.xmin<=b1.xmin&&b2.xmax>=b1.xmax))\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\tif(b1.xmin >= b2.xmin && b1.xmin <= b2.xmax)\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\t if(b1.xmax >= b2.xmin && b1.xmax <= b2.xmax)\n\t\t \txOverlap = true;\n\t\t else{//System.out.println(\"X overlap\");\n\t\t \treturn false;}\n\t\t\n\t\t\n\t\tif((b1.ymin<=b2.ymin&&b1.ymax>=b2.ymax)||(b2.ymin<=b1.ymin&&b2.ymax>=b1.ymax))\n\t\t yOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\tif(b1.ymin>=b2.ymin && b1.ymin<=b2.ymax)\n\t\t\tyOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\t\tif(b1.ymax>=b2.ymin && b1.ymax<=b2.ymax)\n\t\t\t\tyOverlap=true;\n\t\t\telse{\n\t\t\t\t//System.out.println(\"Y overlap\");\n\t\t\t\treturn false;}\n\t\t\n\t\tif(xOverlap&&yOverlap)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "private boolean overlaps(Point2D p0, Point2D p1)\n {\n return Math.abs(p0.getX() - p1.getX()) < 0.001 && Math.abs(p0.getY() - p1.getY()) < 0.001;\n }", "public boolean intersects(Range other) {\n if ((length() == 0) || (other.length() == 0)) {\n return false;\n }\n if (this == VLEN || other == VLEN) {\n return true;\n }\n\n int first = Math.max(this.first(), other.first());\n int last = Math.min(this.last(), other.last());\n\n return (first <= last);\n }", "@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "public boolean adjoins(Rectangle rectangle) {\n int startX = Math.max(start.getX(), rectangle.start.getX());\n int startY = Math.max(start.getY(), rectangle.start.getY());\n\n int endX = Math.min(end.getX(), rectangle.end.getX());\n int endY = Math.min(end.getY(), rectangle.end.getY());\n\n return startX <= endX && startY <= endY;\n }", "@Override\n\tpublic boolean intersects(Rectangle2D arg0) {\n\t\treturn false;\n\t}", "private boolean overlappingGateways(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\tdouble firstApothem = (s1.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble secondApothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstApothem > secondX - secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean intersects(S2Point v1) {\n double lng1 = S2LatLng.longitude(v1).radians();\n boolean result = interval.intersects(S1Interval.fromPointPair(lng0, lng1));\n lng0 = lng1;\n return result;\n }", "private boolean overlaps(int x1, int z1, int x2, int z2, int radius)\r\n {\r\n int var6 = x1 - x2;\r\n int var7 = z1 - z2;\r\n return var6 >= -radius && var6 <= radius ? var7 >= -radius && var7 <= radius : false;\r\n }", "Multimap<String, String> intersects(Polygon bounds);", "private boolean overlappingTasks(BpmnShape s1, BpmnShape s2) {\n\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\t//The coordinates refer to the upper-left corner of the task, adding Width and Height \n\t\t//cause the coordinates to reflect the position of the center of the shape\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondX = s2.getBounds().getX() + secondWidth;\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\t//Second shape is on the upper-left\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\t//Second shape is on the lower-left\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\t//Second shape is on the upper-right\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\t//Second shape is on the lower-shape\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t//completely overlapped shapes\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\t//second shape is on top of the first one\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\t//second shape is on the right\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\t//second shape is on bottom of the first one\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\t//second shape is on the left\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }", "boolean hasSegment();", "private boolean intersects(Circle range) {\n\t\treturn range.intersects(boundary);\n\t}", "String isIntersect(pair pair1){\n\t\tString s;\n\t\tif(pair1.z==true){\n\t\t\tif(pair1.x>=xRange.x && pair1.x<=xRange.y){ s=\"mid\";\n\t\t\treturn s;\n\t\t\t}\n\t\t\telse if(pair1.x<xRange.x){s=\"right\";\n\t\t\treturn s;\n\t\t\t}\n\t\t\telse{s=\"left\";\n\t\t\treturn s;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t}\n\t\telse{\n\t\t\tif(pair1.y>=yRange.x && pair1.y<=yRange.y){ s=\"mid\";\n\t\t\treturn s;}\n\t\t\telse if(pair1.y<yRange.x){s=\"right\";\n\t\t\treturn s;\n\t\t\t} \n\t\t\telse{s=\"left\";\n\t\t\treturn s;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t}\t\t\t\t \n\t}", "private Range<Token> intersect(Range<Token> serverRange, AbstractBounds<Token> requestedRange)\n {\n if (serverRange.contains(requestedRange.left) && serverRange.contains(requestedRange.right)) {\n //case 1: serverRange fully encompasses requestedRange\n return new Range<Token>(requestedRange.left, requestedRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && requestedRange.contains(serverRange.right)) {\n //case 2: serverRange is fully encompasses by requestedRange\n //serverRange is already the intersection\n return new Range<Token>(serverRange.left, serverRange.right);\n } else if (serverRange.contains(requestedRange.left) && requestedRange.contains(serverRange.right)) {\n //case 3: serverRange overlaps on the left: sR.left < rR.left < sR.right < rR.right\n return new Range<Token>(requestedRange.left, serverRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && serverRange.contains(requestedRange.right)) {\n //case 4: serverRange overlaps on the right rR.left < sR.left < rR.right < sR.right\n return new Range<Token>(serverRange.left, requestedRange.right, partitioner);\n } else if (!serverRange.contains(requestedRange.left) && !serverRange.contains(requestedRange.right) &&\n !requestedRange.contains(serverRange.left) && !requestedRange.contains(serverRange.right)) {\n //case 5: totally disjoint\n return null;\n } else {\n assert false : \"Failed intersecting serverRange = (\" + serverRange.left + \", \" + serverRange.right + \") and requestedRange = (\" + requestedRange.left + \", \" + requestedRange.right + \")\";\n return null;\n }\n }", "static boolean onSegment(Point p, Point q, Point r)\n {\n if (\n q.getX() <= Math.max(p.getX(), r.getX()) &&\n q.getX() >= Math.min(p.getX(), r.getX()) &&\n q.getY() <= Math.max(p.getY(), r.getY()) &&\n q.getY() >= Math.min(p.getY(), r.getY()))\n {\n return true;\n }\n return false;\n }", "private boolean overlappingEventAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "@Test\n public void isOverlap_interval1ContainWithinInterval2_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "private boolean intersects(int x, int y, int size){\n count++;\n return(!(\n x > this.x + this.width ||\n x + size < this.x ||\n y > this.y + this.height ||\n y + size < this.y\n ));\n }", "public boolean intersects(GraphicalFigure fig) {\n\n\t\t// Get the distance between the 2 figures on the x axis\n\t\tint xDist = pos.xCoord() - fig.getOffset().xCoord();\n\n\t\t// Get the distance on the y axis\n\t\tint yDist = pos.yCoord() - fig.getOffset().xCoord();\n\n\t\t// All if's allow for if the x's are the same\n\t\t// Check to see if the figure is on the right and overlaps\n\t\tif (xDist >= 0 && xDist < fig.getWidth()) {\n\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = pos.xCoord(); i < pos.xCoord() + fig.getWidth() - xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\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\n\t\t// All if's allow for if the x's are the same\n\t\t// Check if the figure is on the left and overlaps\n\t\telse if (xDist >= 0 && xDist < width) {\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = fig.getOffset().xCoord(); i < fig.getOffset().xCoord() + width + xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\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\n\t\t// If no intersection found, return false\n\t\treturn false;\n\t}", "private void checkOverlaps() {\r\n final ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);\r\n final int count = getOutlineNumber();\r\n boolean firstpass = true;\r\n do {\r\n for (int cc = 0; cc < count; cc++) {\r\n final Outline outline = getOutline(cc);\r\n int vertexCount = outline.getVertexCount();\r\n for(int i=0; i < outline.getVertexCount(); i++) {\r\n final Vertex currentVertex = outline.getVertex(i);\r\n if ( !currentVertex.isOnCurve()) {\r\n final Vertex nextV = outline.getVertex((i+1)%vertexCount);\r\n final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);\r\n final Vertex overlap;\r\n\r\n // check for overlap even if already set for subdivision\r\n // ensuring both triangular overlaps get divided\r\n // for pref. only check in first pass\r\n // second pass to clear the overlaps array(reduces precision errors)\r\n if( firstpass ) {\r\n overlap = checkTriOverlaps0(prevV, currentVertex, nextV);\r\n } else {\r\n overlap = null;\r\n }\r\n if( overlaps.contains(currentVertex) || overlap != null ) {\r\n overlaps.remove(currentVertex);\r\n\r\n subdivideTriangle(outline, prevV, currentVertex, nextV, i);\r\n i+=3;\r\n vertexCount+=2;\r\n addedVerticeCount+=2;\r\n\r\n if(overlap != null && !overlap.isOnCurve()) {\r\n if(!overlaps.contains(overlap)) {\r\n overlaps.add(overlap);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n firstpass = false;\r\n } while( !overlaps.isEmpty() );\r\n }", "private boolean overlappingTaskAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean intersects(GISArea other) {\n if (this.isPoint() && other.isPoint()) {\n return this.latitudes.equals(other.latitudes) && this.longitudes.equals(other.longitudes);\n }\n // 2. We're a point, they're not.\n else if (this.isPoint() && other.isRegion()) {\n Area them = new Area(other.path);\n return them.contains(this.latitudes.get(0), this.longitudes.get(0));\n }\n // 3. We're a region, they're a point.\n else if (this.isRegion() && other.isPoint()) {\n Area us = new Area(this.path);\n return us.contains(other.latitudes.get(0), other.longitudes.get(0));\n }\n // 4. We're both regions.\n else {\n // Make the shapes for both areas.\n // Take the intersect\n // If an empty shape, no intersection.\n Area us = new Area(path);\n Area them = new Area(other.path);\n us.intersect(them);\n return !us.isEmpty();\n }\n }", "@Override\n\tpublic boolean intersects(double arg0, double arg1, double arg2, double arg3) {\n\t\treturn false;\n\t}", "private static boolean intersectAxis(Vector2f[] points0, Vector2f[] points1, Vector2f normal) {\n\t\tfloat proj_dot_00 = getProjectionDot(points0[0], normal);\n\t\tfloat proj_dot_01 = getProjectionDot(points0[1], normal);\n\t\tfloat proj_dot_02 = getProjectionDot(points0[2], normal);\n\t\tfloat proj_dot_03 = getProjectionDot(points0[3], normal);\n\t\tfloat proj_dot_10 = getProjectionDot(points1[0], normal);\n\t\tfloat proj_dot_11 = getProjectionDot(points1[1], normal);\n\t\tfloat proj_dot_12 = getProjectionDot(points1[2], normal);\n\t\tfloat proj_dot_13 = getProjectionDot(points1[3], normal);\n\t\t\n\t\tfloat min_0 = Math.min(Math.min(proj_dot_00, proj_dot_01), Math.min(proj_dot_02, proj_dot_03));\n\t\tfloat max_0 = Math.max(Math.max(proj_dot_00, proj_dot_01), Math.max(proj_dot_02, proj_dot_03));\n\t\tfloat min_1 = Math.min(Math.min(proj_dot_10, proj_dot_11), Math.min(proj_dot_12, proj_dot_13));\n\t\tfloat max_1 = Math.max(Math.max(proj_dot_10, proj_dot_11), Math.max(proj_dot_12, proj_dot_13));\n\t\t\n\t\treturn max_0 >= min_1 && min_0 <= max_1;\n\t}", "public boolean intersects(final ConstRect other)\r\n {\r\n final Rectangle rect = toRectangle();\r\n if(width == 0 && height == 0 && other.width == 0 && other.height == 0)\r\n {\r\n return new Point(x, y).equals(new Point(other.x, other.y));\r\n }\r\n else if(width == 0 && height == 0)\r\n {\r\n return other.toRectangle().contains(new Point(x, y));\r\n }\r\n else if(other.width == 0 && other.height == 0)\r\n {\r\n return rect.contains(new Point(other.x, other.y));\r\n }\r\n else if(other.width == 0 || other.height == 0)\r\n {\r\n return rect.intersectsLine(new Line2D.Double(other.x, other.y, other.x + other.width,\r\n other.y + other.height));\r\n }\r\n else if(width == 0 || height == 0)\r\n {\r\n return other.toRectangle().intersectsLine(\r\n new Line2D.Double(x, y, x + width, y + height));\r\n }\r\n else\r\n {\r\n return rect.intersects(other.toRectangle());\r\n }\r\n }", "public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }", "protected boolean intersects(Circle2D other) {\n\t\treturn intersects(other.x, other.y, other.diameter);\n\t}", "public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}", "private boolean overlapsWith(IRegion range1, IRegion range2) {\n \t\treturn overlapsWith(range1.getOffset(), range1.getLength(), range2.getOffset(), range2.getLength());\n \t}", "public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }", "private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }", "public boolean isLineHit(TessSeg s1)\r\n {\r\n int side00 = \r\n Math2DUtil.getLineSide(s1.c0.x, s1.c0.y, s1.getDx(), s1.getDy(),\r\n c0.x, c0.y);\r\n int side01 = \r\n Math2DUtil.getLineSide(s1.c0.x, s1.c0.y, s1.getDx(), s1.getDy(), \r\n c1.x, c1.y);\r\n\r\n if (side00 == 0 && side01 == 0)\r\n {\r\n //Lines lie along same ray\r\n double t0 = pointOnLineT(s1.c0);\r\n double t1 = pointOnLineT(s1.c1);\r\n return ((t0 < 0 && t1 < 0) || (t0 > 1 && t1 > 1)) ? false : true;\r\n }\r\n \r\n if ((side00 < 0 && side01 < 0) || (side00 > 0 && side01 > 0))\r\n {\r\n return false;\r\n }\r\n \r\n int side10 = \r\n Math2DUtil.getLineSide(c0.x, c0.y, getDx(), getDy(),\r\n s1.c0.x, s1.c0.y);\r\n int side11 = \r\n Math2DUtil.getLineSide(c0.x, c0.y, getDx(), getDy(), \r\n s1.c1.x, s1.c1.y);\r\n\r\n if ((side10 < 0 && side11 < 0) || (side10 > 0 && side11 > 0))\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n \r\n /*\r\n if (!isBoundingBoxOverlap(s1))\r\n {\r\n return false;\r\n }\r\n \r\n if (isParallelTo(s1))\r\n {\r\n if (!isPointOnLine(s1.c0))\r\n {\r\n return false;\r\n }\r\n \r\n double t0 = pointOnLineT(s1.c0);\r\n double t1 = pointOnLineT(s1.c1);\r\n \r\n if ((t0 <= 0 && t1 <= 0) || (t0 >= 1 && t1 >= 1))\r\n {\r\n return false;\r\n }\r\n return true;\r\n }\r\n \r\n if (isPointOnLine(s1.c0))\r\n {\r\n double t = pointOnLineT(s1.c0);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n if (isPointOnLine(s1.c1))\r\n {\r\n double t = pointOnLineT(s1.c1);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n if (s1.isPointOnLine(c0))\r\n {\r\n double t = s1.pointOnLineT(c0);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n if (s1.isPointOnLine(c1))\r\n {\r\n double t = s1.pointOnLineT(c1);\r\n if (t > 0 && t < 1)\r\n {\r\n return true;\r\n }\r\n }\r\n \r\n //Solve system of linear eqns\r\n double s0x0 = c0.x;\r\n double s0y0 = c0.y;\r\n double s0x1 = c1.x;\r\n double s0y1 = c1.y;\r\n double s1x0 = s1.c0.x;\r\n double s1y0 = s1.c0.y;\r\n double s1x1 = s1.c1.x;\r\n double s1y1 = s1.c1.y;\r\n\r\n double[] t = Math2DUtil.lineIsectFractions(\r\n s0x0, s0y0, s0x1 - s0x0, s0y1 - s0y0,\r\n s1x0, s1y0, s1x1 - s1x0, s1y1 - s1y0,\r\n null);\r\n\r\n if (t[0] > 0 && t[0] < 1 && t[1] > 0 && t[1] < 1)\r\n {\r\n return true;\r\n }\r\n \r\n return false;\r\n */\r\n }", "public static <T extends Comparable<T>> boolean intersect(Range<T> a, Range<T> b) {\n\t\t// Because we're working with a discrete domain, we have to be careful to never use open\n\t\t// lower bounds. Otherwise, the following two inputs would cause a true return value when,\n\t\t// in fact, the intersection contains no elements: (0, 1], [0, 1).\n\t\treturn a.isConnected(b) && !a.intersection(b).isEmpty();\n\t}", "public boolean intersects(HitBox h){\n\t\treturn rect.intersects(h.getRectangle());\n\t}", "public boolean intersects(Shape other) {\n boolean result = false;\n ArrayList<Vector3D> points = getPoints();\n for (Vector3D point : points) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n points = other.getPoints();\n for (Vector3D point : points) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n return result;\n }", "public boolean isInRect2(Point p) {\n\t\tLine AB = new Line(A1, B1);\n\t\tLine CD = new Line(C1, AB.getU());\n\t\tLine AD = new Line(A1, D1);\n\t\tLine BC = new Line(B1, AD.getU());\n\n\t\t// if(Line.isBetween2Lines2(AB, CD, p))\n\t\t// System.out.println(1);\n\t\t// if(Line.isBetween2Lines2(AD, BC, p))\n\t\t// System.out.println(2);\n\n\t\tif (Line.isBetween2Lines2(AB, CD, p) && Line.isBetween2Lines2(AD, BC, p)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}" ]
[ "0.7133007", "0.70936215", "0.7082795", "0.70824206", "0.70311755", "0.70230675", "0.69435", "0.68594253", "0.67476434", "0.67262477", "0.66925406", "0.66780716", "0.66257995", "0.6615827", "0.6552815", "0.65456676", "0.6532896", "0.6496274", "0.6490898", "0.6474299", "0.64492047", "0.6399054", "0.6380908", "0.637986", "0.6342463", "0.6334729", "0.6326207", "0.6293841", "0.6281355", "0.6280701", "0.62674296", "0.6259708", "0.6249455", "0.62438536", "0.62431324", "0.6242825", "0.62249124", "0.62046957", "0.6195545", "0.61833894", "0.6182639", "0.6180392", "0.61797935", "0.61792976", "0.6176463", "0.61593544", "0.6156086", "0.61544013", "0.6153889", "0.61519504", "0.6135802", "0.61337477", "0.61314", "0.6131011", "0.6126902", "0.6115872", "0.6111682", "0.6094346", "0.60893184", "0.60783917", "0.6075014", "0.60728276", "0.6071923", "0.60645884", "0.606306", "0.6058249", "0.60556537", "0.6048709", "0.6045481", "0.6043679", "0.6035867", "0.6034288", "0.6019201", "0.6003079", "0.60022956", "0.5997039", "0.5995961", "0.59930503", "0.5989509", "0.5983006", "0.59814507", "0.5978142", "0.59755003", "0.5964587", "0.5959445", "0.5959393", "0.5957111", "0.5936078", "0.5910555", "0.5907387", "0.5902973", "0.58950937", "0.5885758", "0.5874911", "0.58658487", "0.586368", "0.5859976", "0.5852985", "0.58525693", "0.5850953" ]
0.74374413
0
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public EntranceGuardUserInfoExample() { oredCriteria = new ArrayList<Criteria>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "UserInfo getUserInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "public User search_userinfo(String user_name);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6172911", "0.6069693", "0.60679036", "0.6000832", "0.59550804", "0.5951446", "0.59347814", "0.59060615", "0.58843535", "0.5882353", "0.58751446", "0.58408374", "0.5809752", "0.5751213", "0.57458687", "0.57420397", "0.5731582", "0.56887525", "0.56650054", "0.5659467", "0.5657138", "0.5656175", "0.5643286", "0.56412953", "0.5638218", "0.5627624", "0.56184304", "0.5609678", "0.56011546", "0.559836", "0.55747354", "0.55494374", "0.554375", "0.5497768", "0.5493792", "0.5466921", "0.54662263", "0.5440594", "0.5425837", "0.5421697", "0.5418561", "0.5409263", "0.5409126", "0.5405442", "0.5400869", "0.5392495", "0.5389207", "0.5388099", "0.5383188", "0.5381501", "0.53789556", "0.5370127", "0.5366025", "0.5354473", "0.5349916", "0.5347893", "0.53464174", "0.53421515", "0.53387296", "0.53331655", "0.53292495", "0.53248227", "0.5317942", "0.5309693", "0.53093195", "0.5300961", "0.5294027", "0.52916056", "0.52842766", "0.52797437", "0.527821", "0.52594054", "0.52563137", "0.5256223", "0.5250721", "0.52429485", "0.523305", "0.5231442", "0.52312887", "0.52310205", "0.5230972", "0.5229922", "0.5227818", "0.5227083", "0.52259594", "0.5219471", "0.52182436", "0.52071714", "0.5205909", "0.5204785", "0.52026325", "0.5198973", "0.5196136", "0.51956785", "0.5194462", "0.51891935", "0.5188829", "0.5186851", "0.51844734", "0.517768", "0.51759654" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "UserInfo getUserInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "public User search_userinfo(String user_name);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6172911", "0.6069693", "0.60679036", "0.6000832", "0.59550804", "0.5951446", "0.59347814", "0.59060615", "0.58843535", "0.5882353", "0.58751446", "0.58408374", "0.5809752", "0.5751213", "0.57458687", "0.57420397", "0.5731582", "0.56887525", "0.56650054", "0.5659467", "0.5657138", "0.5656175", "0.5643286", "0.56412953", "0.5638218", "0.5627624", "0.56184304", "0.5609678", "0.56011546", "0.559836", "0.55747354", "0.55494374", "0.554375", "0.5497768", "0.5493792", "0.5466921", "0.54662263", "0.5440594", "0.5425837", "0.5421697", "0.5418561", "0.5409263", "0.5409126", "0.5405442", "0.5400869", "0.5392495", "0.5389207", "0.5388099", "0.5383188", "0.5381501", "0.53789556", "0.5370127", "0.5366025", "0.5354473", "0.5349916", "0.5347893", "0.53464174", "0.53421515", "0.53387296", "0.53331655", "0.53292495", "0.53248227", "0.5317942", "0.5309693", "0.53093195", "0.5300961", "0.5294027", "0.52916056", "0.52842766", "0.52797437", "0.527821", "0.52594054", "0.52563137", "0.5256223", "0.5250721", "0.52429485", "0.523305", "0.5231442", "0.52312887", "0.52310205", "0.5230972", "0.5229922", "0.5227818", "0.5227083", "0.52259594", "0.5219471", "0.52182436", "0.52071714", "0.5205909", "0.5204785", "0.52026325", "0.5198973", "0.5196136", "0.51956785", "0.5194462", "0.51891935", "0.5188829", "0.5186851", "0.51844734", "0.517768", "0.51759654" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public String getOrderByClause() { return orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "UserInfoDao getUserInfoDao();", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "public User search_userinfo(String user_name);", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6173405", "0.6069453", "0.60693234", "0.6001729", "0.59549326", "0.5951435", "0.5935307", "0.59068507", "0.5886133", "0.5882975", "0.58757824", "0.58403635", "0.58110064", "0.57537323", "0.57463974", "0.57431906", "0.57330006", "0.56895775", "0.56658363", "0.566134", "0.5658166", "0.56560475", "0.56434613", "0.56429935", "0.56373614", "0.5628069", "0.56195134", "0.56109905", "0.5601806", "0.5598807", "0.55754155", "0.5550935", "0.5544419", "0.54991156", "0.54944557", "0.54671156", "0.54669785", "0.5440846", "0.54263943", "0.5421345", "0.54200864", "0.5408825", "0.5408538", "0.54049957", "0.540188", "0.53926027", "0.5389243", "0.5388207", "0.53840643", "0.5381064", "0.5378811", "0.53718805", "0.5365476", "0.535474", "0.5349372", "0.5347738", "0.53459716", "0.5343252", "0.5338428", "0.53335655", "0.5327415", "0.5327338", "0.5318493", "0.53116816", "0.53091717", "0.5303177", "0.52944595", "0.5293416", "0.5284805", "0.5279494", "0.5278707", "0.5259159", "0.5256515", "0.5255383", "0.52502036", "0.52429235", "0.5234701", "0.5232044", "0.5231642", "0.5231312", "0.52312213", "0.52287304", "0.52281636", "0.5227419", "0.52267766", "0.5219108", "0.52189296", "0.5206285", "0.5205211", "0.5205056", "0.5202926", "0.5200333", "0.5195951", "0.51954395", "0.51949286", "0.5191193", "0.51899695", "0.51852185", "0.5184088", "0.5177846", "0.5176088" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public void setDistinct(boolean distinct) { this.distinct = distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "UserDetails getDetails();", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "public User search_userinfo(String user_name);", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6173084", "0.60701936", "0.60694224", "0.6002439", "0.59556735", "0.59521073", "0.59360486", "0.59065175", "0.58841795", "0.5883097", "0.58748585", "0.58405423", "0.58102", "0.57517236", "0.5746697", "0.5742332", "0.5732223", "0.5690278", "0.5665257", "0.56604236", "0.56575936", "0.56556964", "0.5644224", "0.5641489", "0.56389976", "0.5629029", "0.5618466", "0.5610269", "0.56008404", "0.55992615", "0.5574751", "0.5549868", "0.554422", "0.5498006", "0.549362", "0.54671633", "0.54669654", "0.5440432", "0.5426667", "0.54209656", "0.54187965", "0.54099053", "0.5409385", "0.54066193", "0.5401111", "0.53924257", "0.5389991", "0.5388554", "0.5384589", "0.5381841", "0.5380321", "0.5370615", "0.53665924", "0.53551155", "0.5351226", "0.5348769", "0.53473896", "0.5342544", "0.53397274", "0.53328717", "0.5328914", "0.5326365", "0.53193027", "0.5311243", "0.5309882", "0.5302077", "0.52952933", "0.52920747", "0.528516", "0.52805", "0.5278949", "0.52585316", "0.5255403", "0.5255283", "0.5250805", "0.52436745", "0.52341086", "0.5232736", "0.52318186", "0.523127", "0.52312654", "0.52310467", "0.52272946", "0.52264667", "0.5226429", "0.52198505", "0.5219512", "0.5207686", "0.52060133", "0.52049553", "0.5202912", "0.5198609", "0.51955605", "0.519493", "0.5193604", "0.5190178", "0.5188892", "0.5186957", "0.51843214", "0.5178416", "0.51767117" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public boolean isDistinct() { return distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "UserInfo getUserInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "public User search_userinfo(String user_name);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6172911", "0.6069693", "0.60679036", "0.6000832", "0.59550804", "0.5951446", "0.59347814", "0.59060615", "0.58843535", "0.5882353", "0.58751446", "0.58408374", "0.5809752", "0.5751213", "0.57458687", "0.57420397", "0.5731582", "0.56887525", "0.56650054", "0.5659467", "0.5657138", "0.5656175", "0.5643286", "0.56412953", "0.5638218", "0.5627624", "0.56184304", "0.5609678", "0.56011546", "0.559836", "0.55747354", "0.55494374", "0.554375", "0.5497768", "0.5493792", "0.5466921", "0.54662263", "0.5440594", "0.5425837", "0.5421697", "0.5418561", "0.5409263", "0.5409126", "0.5405442", "0.5400869", "0.5392495", "0.5389207", "0.5388099", "0.5383188", "0.5381501", "0.53789556", "0.5370127", "0.5366025", "0.5354473", "0.5349916", "0.5347893", "0.53464174", "0.53421515", "0.53387296", "0.53331655", "0.53292495", "0.53248227", "0.5317942", "0.5309693", "0.53093195", "0.5300961", "0.5294027", "0.52916056", "0.52842766", "0.52797437", "0.527821", "0.52594054", "0.52563137", "0.5256223", "0.5250721", "0.52429485", "0.523305", "0.5231442", "0.52312887", "0.52310205", "0.5230972", "0.5229922", "0.5227818", "0.5227083", "0.52259594", "0.5219471", "0.52182436", "0.52071714", "0.5205909", "0.5204785", "0.52026325", "0.5198973", "0.5196136", "0.51956785", "0.5194462", "0.51891935", "0.5188829", "0.5186851", "0.51844734", "0.517768", "0.51759654" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public List<Criteria> getOredCriteria() { return oredCriteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "UserInfo getUserInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "public User search_userinfo(String user_name);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6172911", "0.6069693", "0.60679036", "0.6000832", "0.59550804", "0.5951446", "0.59347814", "0.59060615", "0.58843535", "0.5882353", "0.58751446", "0.58408374", "0.5809752", "0.5751213", "0.57458687", "0.57420397", "0.5731582", "0.56887525", "0.56650054", "0.5659467", "0.5657138", "0.5656175", "0.5643286", "0.56412953", "0.5638218", "0.5627624", "0.56184304", "0.5609678", "0.56011546", "0.559836", "0.55747354", "0.55494374", "0.554375", "0.5497768", "0.5493792", "0.5466921", "0.54662263", "0.5440594", "0.5425837", "0.5421697", "0.5418561", "0.5409263", "0.5409126", "0.5405442", "0.5400869", "0.5392495", "0.5389207", "0.5388099", "0.5383188", "0.5381501", "0.53789556", "0.5370127", "0.5366025", "0.5354473", "0.5349916", "0.5347893", "0.53464174", "0.53421515", "0.53387296", "0.53331655", "0.53292495", "0.53248227", "0.5317942", "0.5309693", "0.53093195", "0.5300961", "0.5294027", "0.52916056", "0.52842766", "0.52797437", "0.527821", "0.52594054", "0.52563137", "0.5256223", "0.5250721", "0.52429485", "0.523305", "0.5231442", "0.52312887", "0.52310205", "0.5230972", "0.5229922", "0.5227818", "0.5227083", "0.52259594", "0.5219471", "0.52182436", "0.52071714", "0.5205909", "0.5204785", "0.52026325", "0.5198973", "0.5196136", "0.51956785", "0.5194462", "0.51891935", "0.5188829", "0.5186851", "0.51844734", "0.517768", "0.51759654" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public void or(Criteria criteria) { oredCriteria.add(criteria); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "UserInfoDao getUserInfoDao();", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "public User search_userinfo(String user_name);", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6173405", "0.6069453", "0.60693234", "0.6001729", "0.59549326", "0.5951435", "0.5935307", "0.59068507", "0.5886133", "0.5882975", "0.58757824", "0.58403635", "0.58110064", "0.57537323", "0.57463974", "0.57431906", "0.57330006", "0.56895775", "0.56658363", "0.566134", "0.5658166", "0.56560475", "0.56434613", "0.56429935", "0.56373614", "0.5628069", "0.56195134", "0.56109905", "0.5601806", "0.5598807", "0.55754155", "0.5550935", "0.5544419", "0.54991156", "0.54944557", "0.54671156", "0.54669785", "0.5440846", "0.54263943", "0.5421345", "0.54200864", "0.5408825", "0.5408538", "0.54049957", "0.540188", "0.53926027", "0.5389243", "0.5388207", "0.53840643", "0.5381064", "0.5378811", "0.53718805", "0.5365476", "0.535474", "0.5349372", "0.5347738", "0.53459716", "0.5343252", "0.5338428", "0.53335655", "0.5327415", "0.5327338", "0.5318493", "0.53116816", "0.53091717", "0.5303177", "0.52944595", "0.5293416", "0.5284805", "0.5279494", "0.5278707", "0.5259159", "0.5256515", "0.5255383", "0.52502036", "0.52429235", "0.5234701", "0.5232044", "0.5231642", "0.5231312", "0.52312213", "0.52287304", "0.52281636", "0.5227419", "0.52267766", "0.5219108", "0.52189296", "0.5206285", "0.5205211", "0.5205056", "0.5202926", "0.5200333", "0.5195951", "0.51954395", "0.51949286", "0.5191193", "0.51899695", "0.51852185", "0.5184088", "0.5177846", "0.5176088" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "UserDetails getDetails();", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "public User search_userinfo(String user_name);", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6173084", "0.60701936", "0.60694224", "0.6002439", "0.59556735", "0.59521073", "0.59360486", "0.59065175", "0.58841795", "0.5883097", "0.58748585", "0.58405423", "0.58102", "0.57517236", "0.5746697", "0.5742332", "0.5732223", "0.5690278", "0.5665257", "0.56604236", "0.56575936", "0.56556964", "0.5644224", "0.5641489", "0.56389976", "0.5629029", "0.5618466", "0.5610269", "0.56008404", "0.55992615", "0.5574751", "0.5549868", "0.554422", "0.5498006", "0.549362", "0.54671633", "0.54669654", "0.5440432", "0.5426667", "0.54209656", "0.54187965", "0.54099053", "0.5409385", "0.54066193", "0.5401111", "0.53924257", "0.5389991", "0.5388554", "0.5384589", "0.5381841", "0.5380321", "0.5370615", "0.53665924", "0.53551155", "0.5351226", "0.5348769", "0.53473896", "0.5342544", "0.53397274", "0.53328717", "0.5328914", "0.5326365", "0.53193027", "0.5311243", "0.5309882", "0.5302077", "0.52952933", "0.52920747", "0.528516", "0.52805", "0.5278949", "0.52585316", "0.5255403", "0.5255283", "0.5250805", "0.52436745", "0.52341086", "0.5232736", "0.52318186", "0.523127", "0.52312654", "0.52310467", "0.52272946", "0.52264667", "0.5226429", "0.52198505", "0.5219512", "0.5207686", "0.52060133", "0.52049553", "0.5202912", "0.5198609", "0.51955605", "0.519493", "0.5193604", "0.5190178", "0.5188892", "0.5186957", "0.51843214", "0.5178416", "0.51767117" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "UserInfo getUserInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "public User search_userinfo(String user_name);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6172911", "0.6069693", "0.60679036", "0.6000832", "0.59550804", "0.5951446", "0.59347814", "0.59060615", "0.58843535", "0.5882353", "0.58751446", "0.58408374", "0.5809752", "0.5751213", "0.57458687", "0.57420397", "0.5731582", "0.56887525", "0.56650054", "0.5659467", "0.5657138", "0.5656175", "0.5643286", "0.56412953", "0.5638218", "0.5627624", "0.56184304", "0.5609678", "0.56011546", "0.559836", "0.55747354", "0.55494374", "0.554375", "0.5497768", "0.5493792", "0.5466921", "0.54662263", "0.5440594", "0.5425837", "0.5421697", "0.5418561", "0.5409263", "0.5409126", "0.5405442", "0.5400869", "0.5392495", "0.5389207", "0.5388099", "0.5383188", "0.5381501", "0.53789556", "0.5370127", "0.5366025", "0.5354473", "0.5349916", "0.5347893", "0.53464174", "0.53421515", "0.53387296", "0.53331655", "0.53292495", "0.53248227", "0.5317942", "0.5309693", "0.53093195", "0.5300961", "0.5294027", "0.52916056", "0.52842766", "0.52797437", "0.527821", "0.52594054", "0.52563137", "0.5256223", "0.5250721", "0.52429485", "0.523305", "0.5231442", "0.52312887", "0.52310205", "0.5230972", "0.5229922", "0.5227818", "0.5227083", "0.52259594", "0.5219471", "0.52182436", "0.52071714", "0.5205909", "0.5204785", "0.52026325", "0.5198973", "0.5196136", "0.51956785", "0.5194462", "0.51891935", "0.5188829", "0.5186851", "0.51844734", "0.517768", "0.51759654" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "UserInfoDao getUserInfoDao();", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "UserInfo getUserInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "public User search_userinfo(String user_name);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6172911", "0.6069693", "0.60679036", "0.6000832", "0.59550804", "0.5951446", "0.59347814", "0.59060615", "0.58843535", "0.5882353", "0.58751446", "0.58408374", "0.5809752", "0.5751213", "0.57458687", "0.57420397", "0.5731582", "0.56887525", "0.56650054", "0.5659467", "0.5657138", "0.5656175", "0.5643286", "0.56412953", "0.5638218", "0.5627624", "0.56184304", "0.5609678", "0.56011546", "0.559836", "0.55747354", "0.55494374", "0.554375", "0.5497768", "0.5493792", "0.5466921", "0.54662263", "0.5440594", "0.5425837", "0.5421697", "0.5418561", "0.5409263", "0.5409126", "0.5405442", "0.5400869", "0.5392495", "0.5389207", "0.5388099", "0.5383188", "0.5381501", "0.53789556", "0.5370127", "0.5366025", "0.5354473", "0.5349916", "0.5347893", "0.53464174", "0.53421515", "0.53387296", "0.53331655", "0.53292495", "0.53248227", "0.5317942", "0.5309693", "0.53093195", "0.5300961", "0.5294027", "0.52916056", "0.52842766", "0.52797437", "0.527821", "0.52594054", "0.52563137", "0.5256223", "0.5250721", "0.52429485", "0.523305", "0.5231442", "0.52312887", "0.52310205", "0.5230972", "0.5229922", "0.5227818", "0.5227083", "0.52259594", "0.5219471", "0.52182436", "0.52071714", "0.5205909", "0.5204785", "0.52026325", "0.5198973", "0.5196136", "0.51956785", "0.5194462", "0.51891935", "0.5188829", "0.5186851", "0.51844734", "0.517768", "0.51759654" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table entrance_guard_user_info
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic Map<String, Object> getUserInfoDetail(Map<String, Object> reqs) {\n\t\treturn joaSimpleDao.retrieve(\"tp_users\", reqs);\n\t}", "UserInfoDao getUserInfoDao();", "public UserInfoEntity toUserInfoEntity(){\n UserInfoEntity userInfoEntity = new UserInfoEntity();\n userInfoEntity.setUserId(IdGen.getNewUserID());\n userInfoEntity.setCreateBy(name);\n userInfoEntity.setCreateOn(DateUtils.getDate());\n return toUserInfoEntity(userInfoEntity);\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Mover a la primera de fila\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n }\n cursor.close();\n db.close();\n // Devolver el usuario\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n String selectQuery = \"SELECT * FROM \" + TABLE_USER;\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n // Move to first row\n cursor.moveToFirst();\n if (cursor.getCount() > 0) {\n user.put(\"name\", cursor.getString(1));\n user.put(\"email\", cursor.getString(2));\n user.put(\"uid\", cursor.getString(3));\n user.put(\"created_at\", cursor.getString(4));\n user.put(\"address\", cursor.getString(5));\n user.put(\"number\", cursor.getString(6));\n\n }\n cursor.close();\n db.close();\n // return user\n Log.d(TAG, \"Fetching user from Sqlite: \" + user.toString());\n\n return user;\n }", "User getUserInformation(Long user_id);", "@Mapper\npublic interface UserInfoDao {\n\n void create(UserInfo userInfo);\n //正常注册用户查询\n UserInfo findByLoginName(@Param(\"loginName\") String loginName);\n //扒取用户信息查询\n UserInfo findByLoginNameCrawler(@Param(\"loginName\") String loginName);\n\n void updateState(UserInfo userInfo);\n\n void updateCreateTime(UserInfo userInfo);\n\n void changePassword(UserInfo userInfo);\n\n UserInfo findByUserId(@Param(\"userId\") String userId);\n\n UserInfo findByUserIdAll(@Param(\"userId\") String userId);\n\n int friend(@Param(\"userId\")String userId,@Param(\"friendId\") String friendId);\n\n List<UserInfo> findByUserName(@Param(\"userName\") String userName);\n\n List<String> allLoginNames();\n}", "@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);", "public HashMap<String, String> GET_USER_INFO() {\r\n\t\tHashMap<String, String> user = new HashMap<String, String>();\r\n\t\tString selectQuery = \"SELECT * FROM \" + TABLE_USERS;\r\n\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\r\n\t\t// Move to first row\r\n\t\tcursor.moveToFirst();\r\n\t\tif (cursor.getCount() > 0) {\r\n\t\t\tuser.put(KEY_UID, cursor.getString(cursor.getColumnIndex(KEY_UID)));\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tdb.close();\r\n\r\n\t\treturn user;\r\n\t}", "@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic Map<String, Object> getUserAccountInfo(String userId) {\n\t\tString sql = \"select userId,userName,realName where userId=:userId\";\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userId\", userId);\n\t\treturn joaSimpleDao.queryForList(sql, params).get(0);\n\t}", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "UserInfoUserinfo selectByPrimaryKey(Integer userid);", "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 UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}", "public interface UserInfoMapper {\n /**\n * 添加用户信息\n * @param user 用户信息\n * @return 返回影响行数\n */\n public int addUser(UserInfo user);\n\n /**\n * 获得所有用户信息\n * @return 返回用户信息列表\n */\n public List<UserInfo> getAllUserInfo();\n\n /**\n * 根据用户ID,获得用户信息\n * @param userId 用户ID\n * @return 返回用户信息\n */\n public UserInfo getByUserId(Integer userId);\n\n public List<UserInfo> queryByUserAttr(UserInfo user);\n\n /**\n * 根据用户ID,删除用户信息\n * @param userId 用户ID\n * @return 返回影响行数\n */\n public int delUser(Integer userId);\n\n /**\n * 更新用户信息\n * @param user 更新内容\n * @return 返回影响行数\n */\n public int updateUser(UserInfo user);\n\n\n\n}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}", "public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}", "public interface UserInfoDAO {\n void addUserInfo(int id, String name, String surname, int positionId, Date bday, String magazine, String photo);\n List<UserInfo> getTable();\n UserInfo getUserInfoById(int id);\n void updateUserInfo(String newName, String newSurname, Date bday, int newPositionId, String newMagazine, int id);\n List<UserInfo> getForHead(String magazine);\n List<UserInfo> getForJournalist(String magazine);\n List<UserInfo> getForOwner();\n void updateUserPhoto(String photo, int id);\n}", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "@Transactional\n\tpublic Userinfo getUserInfo(Userinfo userInfo)\n\t{ String i = (userInfoDAO.findUserByUsername(userInfo.getUsername())).getIdentificationid();\n\tif(i.equalsIgnoreCase(userInfo.getIdentificationid()))\n\t{\n\t\tUserinfo ui = userInfoDAO.findUserByUsername(userInfo.getUsername()); \n\t\treturn ui;\n\t}\n\treturn null;\n\t}", "UserInfo getUserById(Integer user_id);", "@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}", "@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}", "public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}", "@Repository\npublic interface UserMapper extends Serializable{\n\n /**\n * get the user info by the user id\n * @param user_id\n * @return\n */\n UserInfo getUserById(Integer user_id);\n\n /**\n * you want to get the user id list by the user nick name\n * @param nick_name the nick name\n * @return the user id list\n */\n List<Integer> getUsersByNickName(String nick_name);\n\n /**\n * you want to get the user info list by the id list\n * @param idList the id list\n * @return the user info list\n */\n List<UserInfo> getUserListByIdLists(List<Integer> idList);\n\n /**\n * you want to get the user info by the user nickname and the sex\n * @param map keys = {'nickname','sex'}\n * @return the result list\n */\n List<UserInfo> getUserByNickNameAndSex(Map<String,String> map);\n\n /**\n * you want to get your friends by your user id\n * @param user_id the user id\n * @return a list contains the friends of you\n */\n List<UserInfo> getFriendsOfMine(Integer user_id);\n\n /**\n * get the user's friends details\n * @param user_id the user id\n * @return the friends list\n */\n UserFriendsEntry getUserFriendsList(Integer user_id);\n\n /**\n * get the friends' friends\n * @param user_id the user id\n * @return the object of com.hujian.mvc.model.UserFriendsFriends\n */\n UserFriendsFriendsEntry getFriendsFriends(Integer user_id);\n\n /**\n * insert an user\n * @param userEntry\n * @return\n */\n Integer insertUser(InsertUserEntry userEntry);\n\n /**\n * remove an user from database\n * @param user_id\n * @return\n */\n Integer removeUserByUserId(Integer user_id);\n\n /**\n * update the user info\n * @param updateEntry the new user info\n * @return -1 means update error\n */\n Integer updateUserInfo(UpdateEntry updateEntry);\n\n\n}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();", "@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}", "@Override\n public String getUserPersonalInfo(String user_id)\n {\n String returnVal = null; \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"SELECT information from user_personal_information where user_id = '\" + user_id + \"'\";\n \n ResultSet rs = stmt.executeQuery(sql);\n \n \n while(rs.next())\n {\n returnVal = rs.getString(\"information\");\n }\n \n stmt.close();\n conn.close();\n \n } \n catch (SQLException ex) { ex.printStackTrace(); return null;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return null;} \n return returnVal;\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "BankUserInfo selectByPrimaryKey(String userId);", "Userinfo selectByPrimaryKey(String userId);", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "java.lang.String getXUsersInfo();", "@Dao\npublic interface UserDao {\n @Query(\"SELECT * FROM userInfo\")\n List<UserInfo> getAllUser();\n\n @Query(\"SELECT * FROM userInfo where emp_first_name LIKE :firstName AND emp_last_name LIKE :lastName\")\n UserInfo getUserByName(String firstName,String lastName);\n\n @Query(\"SELECT COUNT(*) from userInfo\")\n int getUserCount();\n\n @Insert(onConflict = REPLACE)\n void insertUser(UserInfo... userInfos);\n\n @Delete\n void delete(UserInfo userInfo);\n\n\n}", "UserInfo getUserInfo();", "@Override\n\tpublic int updateUserInfo(UserManageEntity info) {\n\t\treturn userManageDao.updateUserInfo(info);\n\t}", "@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);", "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\t\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()) {\r\n\t\t\tlist.add(rs.getString(\"id\"));\r\n\t\t\tlist.add(rs.getString(\"pw\"));\r\n\t\t\tlist.add(rs.getInt(\"time\"));\r\n\t\t\tlist.add(rs.getString(\"name\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint a = ps.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\npublic UserDto getLoggedInUserDetails(String uid, Connection con) throws SQLException, InvalidUserDetailsException {\n\tPreparedStatement ps = null;\n\tUserDto user = null;\n\tps = con.prepareStatement(SQLQueryConstants.GET_LOGGED_USER);\n\n\tps.setInt(1, Integer.parseInt(uid));\nResultSet rs=\tps.executeQuery();\n\tif (rs.next()) {\n\t\tUserDto uDto = new UserDto();\n\t\tRoleDto rDto = null;\n\t\tStatusDto sDto = null;\n\t\tAddressDto aDto = null;\n\t\t\n\t\tuDto.setUserId(rs.getInt(1));\n\t\tuDto.setFirstName(rs.getString(2));\n\t\tuDto.setLastName(rs.getString(3));\n\t\tuDto.setEmail(rs.getString(4));\n\t\tuDto.setMobileNo(rs.getString(5));\n\t\tuDto.setPassword(rs.getString(6));\n\t\tuDto.setGender(rs.getString(7));\n\t\tuDto.setImage(rs.getBlob(8));\n\t\t// getting roleId\n\t\trDto = new RoleDto();\n\t\trDto.setRoleId(rs.getInt(9));\n\t\tuDto.setRoleId(rDto);\n\t\t// getting statusid\n\t\tsDto = new StatusDto();\n\t\tsDto.setStatusId(rs.getInt(10));\n\t\tuDto.setStatusId(sDto);\n\n\t\t// get superior id\n\t\tUserDto sid = new UserDto();\n\t\tsid.setUserId(rs.getInt(11));\n\t\tuDto.setSuperiorId(sid);\n\n\t\t// get address id\n\t\taDto = new AddressDto();\n\t\taDto.setAddressId(rs.getInt(12));\n\t\tuDto.setAddressId(aDto);\n\t\t\n\t\t//list.add(uDto);\n\t\tSystem.out.println(uDto);\n\t\tlogger.info(\"Valid loign details\");\n\t\treturn uDto;\n\t\n\t} else {\n\t\tlogger.error(\"Invalid login details\");\n\t\t\t\t\n\tthrow new InvalidUserDetailsException(MessageConstants.INVALID_USER_CREDIENTIALS);\t\n\t\t\n\t}\n\t\n}", "AliUserInfoDO selectByPrimaryKey(Long id);", "@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n\n user.put(KEY_USER_ID, pref.getString(KEY_USER_ID, null));\n user.put(KEY_AUTH_TOKEN, pref.getString(KEY_AUTH_TOKEN, null));\n user.put(KEY_USER_NAME, pref.getString(KEY_USER_NAME, \"\"));\n user.put(KEY_USER_EMAIL, pref.getString(KEY_USER_EMAIL, null));\n user.put(KEY_USER_MOBILE, pref.getString(KEY_USER_MOBILE, null));\n user.put(KEY_USER_ADDRESS, pref.getString(KEY_USER_ADDRESS, null));\n user.put(KEY_USER_IMAGE, pref.getString(KEY_USER_IMAGE, null));\n user.put(KEY_USER_STRIPE_ID, pref.getString(KEY_USER_STRIPE_ID, null));\n user.put(KEY_REFFERAL_CODE, pref.getString(KEY_REFFERAL_CODE, \"\"));\n user.put(KEY_REFFERAL_LINK, pref.getString(KEY_REFFERAL_LINK, \"\"));\n user.put(KEY_USER_PASSWORD, pref.getString(KEY_USER_PASSWORD, \"\"));\n // return user\n return user;\n }", "@Override\n\tpublic List<UserInfo> getUserInfos(int userright, String sex, int id) {\n\t\treturn null;\n\t}", "User getUserDetails(int userId);", "@Override\n\tpublic int countuserinfo(Employee bi, String name, String mobile) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select count(u.id) from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql = conditionuserinfo(hql, bi,name,mobile);\n\t\t\n\t\tList lst = databaseHelper.getResultListByHql(hql.toString());\n\t\treturn Integer.parseInt(lst.get(0).toString());\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}", "public List<UserParam> findUesrDetailInfo(UserEntity userEntity);", "private void getUserInfo() {\n\t}", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();", "public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}", "@Override\r\n\tpublic Account getInfoByUser(User user) {\n\t\tString hql = \"from Account as account where account.user = :user\";\r\n\t\t\r\n\t\treturn (Account) getSession().createQuery(hql).setParameter(\"user\", user).uniqueResult();\r\n\t}", "UserDisplayDto getUserInfo(String login);", "public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}", "@Override\n\tpublic User getUserInfoByName(String name) {\n\t\treturn userRepository.getUserInfoByName(name);\n\t}", "public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public EmployeeLoginDTO fetchUserDetailsByUserName(final String username)\r\n throws AppException {\r\n EmployeeLoginDTO empDTO = new EmployeeLoginDTO();\r\n try {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"SELECT a.pk_emp_id,a.emp_name,a.password,a.locked_flag,a.login_attempts,a.password_flag,a.session_salt,\");\r\n sb.append(\"b.ic_number,b.first_name,b.middle_name,b.last_name,b.email,b.gender,b.fk_employee_type_id,b.phone, \");\r\n sb.append(\"b.fk_section_id,c.employee_type_name,d.section_name, \");\r\n sb.append(\"b.fk_designation_id,e.designation_name,e.is_signing_authority,e.is_approving_authority \");\r\n sb.append(\" FROM employee_login a \");\r\n sb.append(\" JOIN employee_profile b on a.pk_emp_id = b.fk_employee_id \");\r\n sb.append(\" JOIN employee_type_master c on c.pk_employee_type_id = b.fk_employee_type_id \");\r\n sb.append(\" LEFT JOIN section_master d on d.pk_section_id = b.fk_section_id \");\r\n sb.append(\" LEFT JOIN designation_master e on e.pk_designation_id = b.fk_designation_id \");\r\n sb.append(\" WHERE b.status_id=3 AND a.emp_name=?\");\r\n\r\n List<Map<String, Object>> resultList = getJdbcTemplate().queryForList(sb.toString(),\r\n new Object[]{username.trim()});\r\n\r\n if (!resultList.isEmpty()) {\r\n for (Map<String, Object> resultMap : resultList) {\r\n empDTO.setEmployeeID((Long) (resultMap.get(\"pk_emp_id\")));\r\n empDTO.setUsername((String) (resultMap.get(\"emp_name\")));\r\n empDTO.setPassword((String) (resultMap.get(\"password\")));\r\n empDTO.setCurrentPassword(encryptDecrypt.decrypt(empDTO.getPassword()));\r\n empDTO.setLockedFlag((Integer) (resultMap.get(\"locked_flag\")));\r\n empDTO.setLoginAttempts((Integer) (resultMap.get(\"login_attempts\")));\r\n empDTO.setPasswordFlag((Integer) (resultMap.get(\"password_flag\")));\r\n empDTO.setSessionKey((String) (resultMap.get(\"session_salt\")));\r\n empDTO.getEmployeeProfileDTO().setIcNumber((String) (resultMap.get(\"ic_number\")));\r\n empDTO.getEmployeeProfileDTO().setFirstName((String) (resultMap.get(\"first_name\")));\r\n empDTO.getEmployeeProfileDTO().setMiddleName((String) (resultMap.get(\"middle_name\")));\r\n empDTO.getEmployeeProfileDTO().setLastName((String) (resultMap.get(\"last_name\")));\r\n empDTO.getEmployeeProfileDTO().setEmployeeEmail((String) (resultMap.get(\"email\")));\r\n empDTO.getEmployeeProfileDTO().setGender((String) (resultMap.get(\"gender\")));\r\n if(resultMap.get(\"phone\") != null)\r\n {\r\n empDTO.getEmployeeProfileDTO().setPhone((String) (resultMap.get(\"phone\")));\r\n }\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeID((Long) (resultMap.get(\"fk_employee_type_id\")));\r\n empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().\r\n setEmployeeTypeName((String) (resultMap.get(\"employee_type_name\")));\r\n\r\n if (empDTO.getEmployeeProfileDTO().getEmployeeTypeDTO().getEmployeeTypeID() > 0) {\r\n empDTO.getSectionDTO().\r\n setSectionID((Long) (resultMap.get(\"fk_section_id\")));\r\n empDTO.getSectionDTO().\r\n setSectionName((String) (resultMap.get(\"section_name\")));\r\n\r\n empDTO.getDesignationDTO().\r\n setDesignationID((Long) (resultMap.get(\"fk_designation_id\")));\r\n empDTO.getDesignationDTO().\r\n setDesignationName((String) (resultMap.get(\"designation_name\")));\r\n if (resultMap.get(\"is_approving_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsApprovingAuthority((Long) (resultMap.get(\"is_approving_authority\")));\r\n }\r\n if (resultMap.get(\"is_signing_authority\") != null) {\r\n empDTO.getDesignationDTO().\r\n setIsSigningAuthority((Long) (resultMap.get(\"is_signing_authority\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n throw new AppException(\"Exception Occurred in fetchUserDetailsByUserName:\", e);\r\n }\r\n return empDTO;\r\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\n\tpublic void addDrvUserinfo(String sqlId, DrvUserinfo DrvUserinfo) throws Exception {\n\t\tbaseDaoSupport.save(sqlId, DrvUserinfo);\n\t}", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);", "public void setUser(LoginUser loginUser)\n {\n try (Connection connection = DatabaseAccess.getInstance().getConnection())\n {\n Statement statement = connection.createStatement();\n\n String query =\n \"SELECT * FROM \" + loginUser.getAccessType() + \" WHERE email = '\"\n + loginUser.getUsername() + \"' AND password = '\" + loginUser\n .getPassword() + \"'\";\n\n ResultSet r = statement.executeQuery(query);\n r.next();\n\n if (loginUser.getAccessType() == AccessType.DOCTOR)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Doctor(r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getLong(\"ssn\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"specialization\"),\n new Ward(r.getString(\"ward_name\"), r.getInt(\"room_number\")),\n r.getString(\"email\"), r.getString(\"password\"));\n doctorsAppointments = r.getInt(\"nr_appointments\");\n }\n\n else if (loginUser.getAccessType() == AccessType.NURSE)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Nurse(r.getLong(\"ssn\"), r.getLong(\"doctor_ssn\"),\n r.getString(\"f_name\"), r.getString(\"mid_name\"),\n r.getString(\"l_name\"), r.getDate(\"dob\"), address,\n r.getString(\"contact_f_name\"), r.getString(\"contact_mid_name\"),\n r.getString(\"contact_l_name\"), r.getString(\"contact_phone\"),\n r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"experience\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n\n else if (loginUser.getAccessType() == AccessType.MANAGER)\n {\n Address address = new Address(r.getString(\"add_street\"),\n r.getString(\"add_no\"), r.getString(\"add_zip_code\"),\n r.getString(\"add_city\"));\n\n user = new Manager(r.getLong(\"ssn\"), r.getString(\"f_name\"),\n r.getString(\"mid_name\"), r.getString(\"l_name\"), r.getDate(\"dob\"),\n address, r.getString(\"contact_f_name\"),r.getString(\"contact_mid_name\"), r.getString(\"contact_l_name\"),\n r.getString(\"contact_phone\"), r.getDate(\"start_date\"), r.getString(\"education\"),\n r.getString(\"position\"), r.getString(\"email\"),\n r.getString(\"password\"));\n }\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n }", "UserInfo selectByPrimaryKey(Integer id);", "public Map<Long, User> showUsers() throws UserException {\n\t\treturn null;\r\n\t}", "@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "UserDetails getDetails();", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "@Insert({\n \"insert into xxd_user (uid, username, \",\n \"password, sex, \",\n \"phonenumber, id_card, \",\n \"bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name, leader_level)\",\n \"values (#{uid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{sex,jdbcType=SMALLINT}, \",\n \"#{phonenumber,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, \",\n \"#{bankCard,jdbcType=VARCHAR}, #{bankLocation,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=SMALLINT}, #{salt,jdbcType=VARCHAR}, \",\n \"#{is_able,jdbcType=SMALLINT}, #{create_time,jdbcType=VARCHAR}, \",\n \"#{parent_id,jdbcType=INTEGER}, #{name,jdbcType=SMALLINT}, #{leader_level,jdbcType=SMALLINT})\",\n })\n @Options(useGeneratedKeys=true, keyProperty=\"uid\", keyColumn=\"uid\")\n int insert(XxdUser record);", "public User getUserDetailsById(Long userId) {\n\t\tString sql = \"select * from HealthUsers where id = ?\";\n\t\treturn jdbcTemplate.queryForObject(sql, new UserRowMapper(), userId);\n\t}", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "@Override\r\n\tpublic MemberDto myInfo(String email) {\n\t\treturn jdbcTemplate.query(\"select * from s_member where email=?\", extractor,email);\r\n\t}", "public User search_userinfo(String user_name);", "@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);", "@Override\n\tpublic String getUser(String uname) {\n\t\tReadSQLUtil.sqlSource = config.getProperty(\"SQLDirectory\");\n\t\tMap<String, String> aPs = new HashMap<String, String>();\n\t\taPs.put(\"u_name\", uname);\n\t\tString fileName = \"user/Users.txt\";\n\t\tString aSql = ReadSQLUtil.ReadSqlFile(fileName);\n\t\tString sql = dbUtils.getSQL(aSql, aPs);\n\t\tJSONArray aJson = dbDao.getTable(sql);\n\t\tString res = JSON.toJSONString(aJson);\n\t\treturn res;\n\t}", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}", "@Override\r\n\tpublic List<User_Data> userDetailsByShopID(UpdateRequest updateRequest) {\r\n\r\n\t\ttry{\r\n\t\t\t\r\n\t\t log.debug(\"Entering userDAOImpl class - in userDetailsByShopID()\");\r\n\t //int count = 0;\r\n\t //getting shopID from user\r\n\t\t String Shop_ID = updateRequest.getShop_ID();\t\t\r\n\t\t\tUser_Data userData = new User_Data();\r\n\t\t\t\r\n\t\t\t// User_Data list of array content all userList\r\n\t\t\tList<User_Data> userList = new ArrayList<>();\r\n\r\n\t\t\t\r\n\t\t\t// select the list of a user data using shopID in user table\r\n\t\t\t\t\t\tString selectUserDetailsByShopId = \"FROM User_Data WHERE Shop_ID = :Shop_ID AND is_active =:is_active\";\r\n\t\t\t\t\t\tList<User_Data> list = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t\t.createQuery(selectUserDetailsByShopId, User_Data.class)\r\n\t\t\t\t\t\t\t\t.setParameter(\"Shop_ID\", Shop_ID)\r\n\t\t\t\t\t\t\t\t.setParameter(\"is_active\", true)\r\n\t\t\t\t\t\t\t\t.getResultList();\r\n\t\t\r\n\t\t\t// checking the null value of the user table list\r\n\t\t\tif ((list != null) && (list.size() > 0)) {\r\n\t\t\t\tlog.debug(\"get successful,User details ShopID is found\");\r\n\t\t\t\t\r\n\t\t\t\t//counting for one by one userList\r\n\t\t\t//\tfor (User_Data entity : list) {\r\n\t\t\t\tfor( int count= 0; count<list.size();count++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(list.get(count).getUser_ID() != null) {\r\n\t\t\t\t\tuserData = list.get(count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tString User_ID = userData.getUser_ID();\r\n\t\t\t\t\tAddress address = new Address();\r\n\t\t\t\t\tString selectAddressByuserId = \"FROM Address WHERE User_ID = :User_ID\";\r\n\t\t\t\t\tList<Address> addressList = sessionFactory.getCurrentSession()\r\n\t\t\t\t\t\t\t.createQuery(selectAddressByuserId, Address.class).setParameter(\"User_ID\", User_ID)\r\n\t\t\t\t\t\t\t.getResultList();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Checking the addressList Empty or not\r\n\t\t\t\t\tif ((addressList != null) && (addressList.size() > 0)) {\r\n\t\t\t\t\t\tlog.debug(\"get successful,Adress details is found\");\r\n\r\n\t\t\t\t\t\taddress = addressList.get(0);\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taddress = null;\r\n\t\t\t\t\t\t//Set the particular address in their user\r\n\t\t\t\t\t\tuserData.setUserAddress(address);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Add the all object to array list\r\n\t\t\t\t\t\tuserList.add(userData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn userList;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn userList;\r\n\t\t}catch (RuntimeException re)\r\n\t\t{\r\n\t\t\tlog.error(\"All UserList failed\", re);\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\t/*if (sessionFactory != null)\r\n\t\t\t{\r\n\t\t\t\tsessionFactory.close();\r\n\t\t\t}*/\r\n\t\t\r\n\t }\r\n\t}", "public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }", "private void getUserInformation() {\n userReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if(dataSnapshot.hasChild(\"fullName\")){\n name = dataSnapshot.child(\"fullName\").getValue().toString();\n }\n if(dataSnapshot.hasChild(\"phoneNumber\")){\n num = dataSnapshot.child(\"phoneNumber\").getValue().toString();\n }\n\n emailAddress = mAuth.getCurrentUser().getEmail();\n\n } else {\n Toast.makeText(OrderProductActivity.this, \"Profile details not completed\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "public User getUserData();", "@Override\n\tpublic List<Map<String, Object>> queryuseinfo(Employee bi, String name, String mobile, Integer start,\n\t\t\tInteger limit) throws Exception {\n\t\tStringBuffer hql = new StringBuffer(\"select u from UserInfo u where u.role = 0 and u.state = 0\");\n\t\thql=conditionuserinfo(hql,bi, name,mobile);\n\t\thql.append(\" order by u.createtime desc\");\n\t\tList<Object> lst = databaseHelper.getResultListByHql(hql.toString(),start,limit);\n\t\tList<Map<String,Object>> lstMap = new ArrayList<Map<String,Object>>();\n\t\t\n\t\tfor (Object obj : lst) {\n\t\t\tUserInfo u = (UserInfo) obj;\n\t\t\t\n\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\tmap.put(\"id\", u.getId());\n\t\t\tmap.put(\"name\", u.getNickname());\n\t\t\tmap.put(\"mobile\", u.getMobile());\n\t\t\tmap.put(\"time\", u.getCreatetime().toString());\n\t\t\tmap.put(\"balance\", u.getBalance());\n\t\t\tmap.put(\"level\", u.getLevel());\n\t\t\t\n\t\t\t//查询游戏次数\n\t\t\tStringBuffer querytotalgame = new StringBuffer(\"select count(mu.id) from MachineUserMark mu where mu.fuserinfoid = \")\n\t\t\t\t\t.append(u.getId()).append(\" and mu.type = 2\");\n\t\t\tList muList = databaseHelper.getResultListByHql(querytotalgame.toString());\n\t\t\tif(muList.size()>0){\n\t\t\tmap.put(\"totalgame\", Integer.parseInt(muList.get(0).toString()));\n\t\t\t}else{\n\t\t\t\tmap.put(\"totalgame\", \"0\");\n\t\t\t}\n\t\t\tlstMap.add(map);\n\t\t}\n\t\t\n\t\treturn lstMap;\n\t}" ]
[ "0.6173405", "0.6069453", "0.60693234", "0.6001729", "0.59549326", "0.5951435", "0.5935307", "0.59068507", "0.5886133", "0.5882975", "0.58757824", "0.58403635", "0.58110064", "0.57537323", "0.57463974", "0.57431906", "0.57330006", "0.56895775", "0.56658363", "0.566134", "0.5658166", "0.56560475", "0.56434613", "0.56429935", "0.56373614", "0.5628069", "0.56195134", "0.56109905", "0.5601806", "0.5598807", "0.55754155", "0.5550935", "0.5544419", "0.54991156", "0.54944557", "0.54671156", "0.54669785", "0.5440846", "0.54263943", "0.5421345", "0.54200864", "0.5408825", "0.5408538", "0.54049957", "0.540188", "0.53926027", "0.5389243", "0.5388207", "0.53840643", "0.5381064", "0.5378811", "0.53718805", "0.5365476", "0.535474", "0.5349372", "0.5347738", "0.53459716", "0.5343252", "0.5338428", "0.53335655", "0.5327415", "0.5327338", "0.5318493", "0.53116816", "0.53091717", "0.5303177", "0.52944595", "0.5293416", "0.5284805", "0.5279494", "0.5278707", "0.5259159", "0.5256515", "0.5255383", "0.52502036", "0.52429235", "0.5234701", "0.5232044", "0.5231642", "0.5231312", "0.52312213", "0.52287304", "0.52281636", "0.5227419", "0.52267766", "0.5219108", "0.52189296", "0.5206285", "0.5205211", "0.5205056", "0.5202926", "0.5200333", "0.5195951", "0.51954395", "0.51949286", "0.5191193", "0.51899695", "0.51852185", "0.5184088", "0.5177846", "0.5176088" ]
0.0
-1
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static EtudeProfil createEntity(EntityManager em) { EtudeProfil etudeProfil = new EtudeProfil() .anneeEtudeDebut(DEFAULT_ANNEE_ETUDE_DEBUT) .anneEtudeFin(DEFAULT_ANNE_ETUDE_FIN) .comment(DEFAULT_COMMENT); return etudeProfil; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "protected abstract EntityBase createEntity() throws Exception;", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }", "public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }", "void create(T entity) throws Exception;", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "protected T createSimulatedExistingEntity() {\n final T entity = createNewEntity();\n entity.setId(IDUtil.randomPositiveLong());\n\n when(getDAO().findOne(entity.getId())).thenReturn(entity);\n return entity;\n }", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public static TranshipTube createEntity(EntityManager em) {\n TranshipTube transhipTube = new TranshipTube()\n .status(DEFAULT_STATUS)\n .memo(DEFAULT_MEMO)\n .columnsInTube(DEFAULT_COLUMNS_IN_TUBE)\n .rowsInTube(DEFAULT_ROWS_IN_TUBE);\n // Add required entity\n TranshipBox transhipBox = TranshipBoxResourceIntTest.createEntity(em);\n em.persist(transhipBox);\n em.flush();\n transhipTube.setTranshipBox(transhipBox);\n // Add required entity\n FrozenTube frozenTube = FrozenTubeResourceIntTest.createEntity(em);\n em.persist(frozenTube);\n em.flush();\n transhipTube.setFrozenTube(frozenTube);\n return transhipTube;\n }", "public static Student createEntity(EntityManager em) {\n Student student = new Student()\n .firstName(DEFAULT_FIRST_NAME)\n .middleName(DEFAULT_MIDDLE_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .studentRegNumber(DEFAULT_STUDENT_REG_NUMBER)\n .dateOfBirth(DEFAULT_DATE_OF_BIRTH)\n .regDocType(DEFAULT_REG_DOC_TYPE)\n .registrationDocumentNumber(DEFAULT_REGISTRATION_DOCUMENT_NUMBER)\n .gender(DEFAULT_GENDER)\n .nationality(DEFAULT_NATIONALITY)\n .dateJoined(DEFAULT_DATE_JOINED)\n .deleted(DEFAULT_DELETED)\n .wxtJwtPq55wd(DEFAULT_WXT_JWT_PQ_55_WD);\n // Add required entity\n NextOfKin nextOfKin;\n if (TestUtil.findAll(em, NextOfKin.class).isEmpty()) {\n nextOfKin = NextOfKinResourceIT.createEntity(em);\n em.persist(nextOfKin);\n em.flush();\n } else {\n nextOfKin = TestUtil.findAll(em, NextOfKin.class).get(0);\n }\n student.getRelatives().add(nextOfKin);\n return student;\n }", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT)\n .dateRetour(DEFAULT_DATE_RETOUR);\n // Add required entity\n Usager usager = UsagerResourceIntTest.createEntity(em);\n em.persist(usager);\n em.flush();\n emprunt.setUsager(usager);\n // Add required entity\n Exemplaire exemplaire = ExemplaireResourceIntTest.createEntity(em);\n em.persist(exemplaire);\n em.flush();\n emprunt.setExemplaire(exemplaire);\n return emprunt;\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntity entity) {\n return super.createEntity(entitySetName, entity);\n }", "public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }", "ID create(T entity);", "public static MotherBed createEntity(EntityManager em) {\n MotherBed motherBed = new MotherBed()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n // Add required entity\n Nursery nursery = NurseryResourceIntTest.createEntity(em);\n em.persist(nursery);\n em.flush();\n motherBed.setNursery(nursery);\n return motherBed;\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity) {\n return super.createEntity(entitySetName, entityKey, navProp, entity);\n }", "public <T extends Entity> T createEntity(EntitySpec<T> spec) {\n Map<String,Entity> entitiesByEntityId = MutableMap.of();\n Map<String,EntitySpec<?>> specsByEntityId = MutableMap.of();\n \n T entity = createEntityAndDescendantsUninitialized(spec, entitiesByEntityId, specsByEntityId);\n initEntityAndDescendants(entity.getId(), entitiesByEntityId, specsByEntityId);\n return entity;\n }", "public static Prestamo createEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(DEFAULT_OBSERVACIONES).fechaFin(DEFAULT_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }", "default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }", "public static Rentee createEntity(EntityManager em) {\n Rentee rentee = new Rentee();\n rentee = new Rentee()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .email(DEFAULT_EMAIL)\n .phoneNumber(DEFAULT_PHONE_NUMBER)\n .password(DEFAULT_PASSWORD);\n return rentee;\n }", "public static Pocket createEntity(EntityManager em) {\n Pocket pocket = new Pocket()\n .key(DEFAULT_KEY)\n .label(DEFAULT_LABEL)\n .startDateTime(DEFAULT_START_DATE_TIME)\n .endDateTime(DEFAULT_END_DATE_TIME)\n .amount(DEFAULT_AMOUNT)\n .reserved(DEFAULT_RESERVED);\n // Add required entity\n Balance balance = BalanceResourceIntTest.createEntity(em);\n em.persist(balance);\n em.flush();\n pocket.setBalance(balance);\n return pocket;\n }", "public static ItemSubstitution createEntity(EntityManager em) {\n ItemSubstitution itemSubstitution = new ItemSubstitution()\n .timestamp(DEFAULT_TIMESTAMP)\n .type(DEFAULT_TYPE)\n .substituteType(DEFAULT_SUBSTITUTE_TYPE)\n .substituteNo(DEFAULT_SUBSTITUTE_NO)\n .description(DEFAULT_DESCRIPTION)\n .isInterchangeable(DEFAULT_IS_INTERCHANGEABLE)\n .relationsLevel(DEFAULT_RELATIONS_LEVEL)\n .isCheckedToOriginal(DEFAULT_IS_CHECKED_TO_ORIGINAL)\n .origCheckDate(DEFAULT_ORIG_CHECK_DATE);\n // Add required entity\n Item item;\n if (TestUtil.findAll(em, Item.class).isEmpty()) {\n item = ItemResourceIT.createEntity(em);\n em.persist(item);\n em.flush();\n } else {\n item = TestUtil.findAll(em, Item.class).get(0);\n }\n itemSubstitution.getItems().add(item);\n return itemSubstitution;\n }", "E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;", "public static A createEntity(EntityManager em) {\n A a = new A();\n return a;\n }", "public static Edge createEntity(EntityManager em) {\n Edge edge = new Edge()\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Stone from = StoneResourceIntTest.createEntity(em);\n em.persist(from);\n em.flush();\n edge.setFrom(from);\n // Add required entity\n Stone to = StoneResourceIntTest.createEntity(em);\n em.persist(to);\n em.flush();\n edge.setTo(to);\n return edge;\n }", "public static QuizQuestion createEntity(EntityManager em) {\n QuizQuestion quizQuestion = new QuizQuestion()\n .text(DEFAULT_TEXT)\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Quiz quiz;\n if (TestUtil.findAll(em, Quiz.class).isEmpty()) {\n quiz = QuizResourceIT.createEntity(em);\n em.persist(quiz);\n em.flush();\n } else {\n quiz = TestUtil.findAll(em, Quiz.class).get(0);\n }\n quizQuestion.setQuiz(quiz);\n return quizQuestion;\n }", "public static Partida createEntity(EntityManager em) {\n Partida partida = new Partida()\n .dataPartida(DEFAULT_DATA_PARTIDA);\n return partida;\n }", "public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }", "public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT);\n return emprunt;\n }", "public static SitAndGo createEntity(EntityManager em) {\n SitAndGo sitAndGo = new SitAndGo()\n .format(DEFAULT_FORMAT)\n .buyIn(DEFAULT_BUY_IN)\n .ranking(DEFAULT_RANKING)\n .profit(DEFAULT_PROFIT)\n .bounty(DEFAULT_BOUNTY);\n return sitAndGo;\n }", "public static Exercise createEntity(EntityManager em) {\n Exercise exercise = new Exercise()\n .minutes(DEFAULT_MINUTES);\n return exercise;\n }", "@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}", "public static House createEntity(EntityManager em) {\n House house = new House()\n .houseName(DEFAULT_HOUSE_NAME)\n .houseNo(DEFAULT_HOUSE_NO)\n .address(DEFAULT_ADDRESS)\n .houseToFloorNo(DEFAULT_HOUSE_TO_FLOOR_NO)\n .ownToFloorNo(DEFAULT_OWN_TO_FLOOR_NO)\n .lat(DEFAULT_LAT)\n .lon(DEFAULT_LON)\n .createdate(DEFAULT_CREATEDATE)\n .createBy(DEFAULT_CREATE_BY)\n .updateDate(DEFAULT_UPDATE_DATE)\n .updateBy(DEFAULT_UPDATE_BY)\n .image(DEFAULT_IMAGE)\n .imageContentType(DEFAULT_IMAGE_CONTENT_TYPE);\n // Add required entity\n Country country = CountryResourceIntTest.createEntity(em);\n em.persist(country);\n em.flush();\n house.setCountry(country);\n // Add required entity\n State state = StateResourceIntTest.createEntity(em);\n em.persist(state);\n em.flush();\n house.setState(state);\n // Add required entity\n City city = CityResourceIntTest.createEntity(em);\n em.persist(city);\n em.flush();\n house.setCity(city);\n // Add required entity\n Profile profile = ProfileResourceIntTest.createEntity(em);\n em.persist(profile);\n em.flush();\n house.setProfile(profile);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n house.setUser(user);\n return house;\n }", "public static CourtType createEntity(EntityManager em) {\n CourtType courtType = new CourtType()\n .type(DEFAULT_TYPE);\n return courtType;\n }", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public static Ailment createEntity(EntityManager em) {\n Ailment ailment = new Ailment()\n .name(DEFAULT_NAME)\n .symptoms(DEFAULT_SYMPTOMS)\n .treatments(DEFAULT_TREATMENTS);\n return ailment;\n }", "public static Articulo createEntity(EntityManager em) {\n Articulo articulo = new Articulo()\n .titulo(DEFAULT_TITULO)\n .contenido(DEFAULT_CONTENIDO)\n .fechaCreacion(DEFAULT_FECHA_CREACION);\n return articulo;\n }", "void create(Student entity);", "public static TipoLocal createEntity(EntityManager em) {\n TipoLocal tipoLocal = new TipoLocal()\n .tipo(DEFAULT_TIPO);\n return tipoLocal;\n }", "public static Testtable2 createEntity(EntityManager em) {\n Testtable2 testtable2 = new Testtable2();\n testtable2.setColumn2(DEFAULT_COLUMN_2);\n return testtable2;\n }", "@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}", "public static OrderItem createEntity(EntityManager em) {\n OrderItem orderItem = new OrderItem().quantity(DEFAULT_QUANTITY).totalPrice(DEFAULT_TOTAL_PRICE).status(DEFAULT_STATUS);\n return orderItem;\n }", "public static Arrete createEntity(EntityManager em) {\n Arrete arrete = new Arrete()\n .intituleArrete(DEFAULT_INTITULE_ARRETE)\n .numeroArrete(DEFAULT_NUMERO_ARRETE)\n .dateSignature(DEFAULT_DATE_SIGNATURE)\n .nombreAgrement(DEFAULT_NOMBRE_AGREMENT);\n return arrete;\n }", "public static Tenant createEntity() {\n return new Tenant();\n }", "public static MyOrders createEntity(EntityManager em) {\n MyOrders myOrders = new MyOrders();\n return myOrders;\n }", "public static Enseigner createEntity(EntityManager em) {\n Enseigner enseigner = new Enseigner().dateDebut(DEFAULT_DATE_DEBUT).dateFin(DEFAULT_DATE_FIN);\n return enseigner;\n }", "@Test\n public void eventEntityConstructionTest() {\n\n Event event = new EventEntity();\n\n assertThat(event).isNotNull();\n\n }", "public static EnteteVente createEntity(EntityManager em) {\n EnteteVente enteteVente = new EnteteVente()\n .enteteVenteType(DEFAULT_ENTETE_VENTE_TYPE)\n .enteteVenteTotalHT(DEFAULT_ENTETE_VENTE_TOTAL_HT)\n .enteteVenteTotalTTC(DEFAULT_ENTETE_VENTE_TOTAL_TTC)\n .enteteVenteDateCreation(DEFAULT_ENTETE_VENTE_DATE_CREATION);\n return enteteVente;\n }", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "public static Organizer createEntity(EntityManager em) {\n Organizer organizer = new Organizer()\n .name(DEFAULT_NAME)\n .description(DEFAULT_DESCRIPTION)\n .facebook(DEFAULT_FACEBOOK)\n .twitter(DEFAULT_TWITTER);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n organizer.setUser(user);\n return organizer;\n }", "public static Note createEntity(EntityManager em) {\n Note note = new Note().content(DEFAULT_CONTENT).title(DEFAULT_TITLE).xpos(DEFAULT_XPOS).ypos(DEFAULT_YPOS);\n return note;\n }", "public static FillingGapsTestItem createEntity(EntityManager em) {\n FillingGapsTestItem fillingGapsTestItem = new FillingGapsTestItem()\n .question(DEFAULT_QUESTION);\n return fillingGapsTestItem;\n }", "public Entity build();", "@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}", "public abstract boolean create(T entity) throws ServiceException;", "public static Acheteur createEntity(EntityManager em) {\n Acheteur acheteur = new Acheteur()\n .typeClient(DEFAULT_TYPE_CLIENT)\n .nom(DEFAULT_NOM)\n .prenom(DEFAULT_PRENOM)\n .tel(DEFAULT_TEL)\n .cnib(DEFAULT_CNIB)\n .email(DEFAULT_EMAIL)\n .adresse(DEFAULT_ADRESSE)\n .numroBanquaire(DEFAULT_NUMRO_BANQUAIRE)\n .deleted(DEFAULT_DELETED);\n return acheteur;\n }", "public static RoomGenericProduct createEntity(EntityManager em) {\n RoomGenericProduct roomGenericProduct = new RoomGenericProduct()\n .quantity(DEFAULT_QUANTITY)\n .quantityUnit(DEFAULT_QUANTITY_UNIT);\n return roomGenericProduct;\n }", "public static TypeOeuvre createEntity(EntityManager em) {\n TypeOeuvre typeOeuvre = new TypeOeuvre()\n .intitule(DEFAULT_INTITULE);\n return typeOeuvre;\n }", "public static Reservation createEntity(EntityManager em) {\n Reservation reservation = ReservationTest.buildReservationTest(1L);\n //reservation.setUser(User.builder().email(\"adfad\").name(\"\").build());\n return reservation;\n }", "@Test\n public void testNewEntity() throws Exception {\n\n }", "public static Model createEntity(EntityManager em) {\n\t\tModel model = new Model().name(DEFAULT_NAME).type(DEFAULT_TYPE).algorithm(DEFAULT_ALGORITHM)\n\t\t\t\t.status(DEFAULT_STATUS).owner(DEFAULT_OWNER).performanceMetrics(DEFAULT_PERFORMANCE_METRICS)\n\t\t\t\t.modelLocation(DEFAULT_MODEL_LOCATION).featureSignificance(DEFAULT_FEATURE_SIGNIFICANCE)\n\t\t\t\t.builderConfig(DEFAULT_BUILDER_CONFIG).createdDate(DEFAULT_CREATED_DATE)\n\t\t\t\t.deployedDate(DEFAULT_DEPLOYED_DATE).trainingDataset(DEFAULT_TRAINING_DATASET)\n .library(DEFAULT_LIBRARY).project(DEFAULT_PROJECT).version(DEFAULT_VERSION);\n\t\treturn model;\n\t}", "public static ProcessExecution createEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(DEFAULT_EXECUTION);\n return processExecution;\n }", "public static Paiement createEntity(EntityManager em) {\n Paiement paiement = new Paiement()\n .dateTransation(DEFAULT_DATE_TRANSATION)\n .montantTTC(DEFAULT_MONTANT_TTC);\n return paiement;\n }", "public static Article createEntity(EntityManager em) {\n Article article = new Article()\n .name(DEFAULT_NAME)\n .content(DEFAULT_CONTENT)\n .creationDate(DEFAULT_CREATION_DATE)\n .modificationDate(DEFAULT_MODIFICATION_DATE);\n return article;\n }", "T makePersistent(T entity);", "void buildFromEntity(E entity);", "public static XepLoai createEntity(EntityManager em) {\n XepLoai xepLoai = new XepLoai()\n .tenXepLoai(DEFAULT_TEN_XEP_LOAI);\n return xepLoai;\n }", "public static Lot createEntity(EntityManager em) {\n Lot lot = new Lot()\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT)\n .qte(DEFAULT_QTE)\n .qtUg(DEFAULT_QT_UG)\n .num(DEFAULT_NUM)\n .dateFabrication(DEFAULT_DATE_FABRICATION)\n .peremption(DEFAULT_PEREMPTION)\n .peremptionstatus(DEFAULT_PEREMPTIONSTATUS);\n return lot;\n }", "private MetaEntityImpl createMetaEntity(Class<?> entityType) {\n String className = entityType.getSimpleName();\n MetaEntityImpl managedEntity = new MetaEntityImpl();\n managedEntity.setEntityType(entityType);\n managedEntity.setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setKeySpace(environment.getConfiguration().getKeySpace());\n return managedEntity;\n }", "public static EmployeeCars createEntity(EntityManager em) {\n EmployeeCars employeeCars = new EmployeeCars()\n .previousReading(DEFAULT_PREVIOUS_READING)\n .currentReading(DEFAULT_CURRENT_READING)\n .workingDays(DEFAULT_WORKING_DAYS)\n .updateDate(DEFAULT_UPDATE_DATE);\n // Add required entity\n Employee employee = EmployeeResourceIT.createEntity(em);\n em.persist(employee);\n em.flush();\n employeeCars.setEmployee(employee);\n // Add required entity\n Car car = CarResourceIT.createEntity(em);\n em.persist(car);\n em.flush();\n employeeCars.setCar(car);\n return employeeCars;\n }", "public TransporteTerrestreEntity createTransporte(TransporteTerrestreEntity transporteEntity) throws BusinessLogicException {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación del transporte\");\n super.createTransporte(transporteEntity);\n\n \n persistence.create(transporteEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación del transporte\");\n return transporteEntity;\n }", "public static TaskComment createEntity(EntityManager em) {\n TaskComment taskComment = new TaskComment()\n .value(DEFAULT_VALUE);\n // Add required entity\n Task newTask = TaskResourceIT.createEntity(em);\n Task task = TestUtil.findAll(em, Task.class).stream()\n .filter(x -> x.getId().equals(newTask.getId()))\n .findAny().orElse(null);\n if (task == null) {\n task = newTask;\n em.persist(task);\n em.flush();\n }\n taskComment.setTask(task);\n return taskComment;\n }", "public static Personel createEntity(EntityManager em) {\n Personel personel = new Personel()\n .fistname(DEFAULT_FISTNAME)\n .lastname(DEFAULT_LASTNAME)\n .sexe(DEFAULT_SEXE);\n return personel;\n }", "public static Ordre createEntity(EntityManager em) {\n Ordre ordre = new Ordre()\n .name(DEFAULT_NAME)\n .status(DEFAULT_STATUS)\n .price(DEFAULT_PRICE)\n .creationDate(DEFAULT_CREATION_DATE);\n return ordre;\n }", "public static Territorio createEntity(EntityManager em) {\n Territorio territorio = new Territorio().nome(DEFAULT_NOME);\n return territorio;\n }", "@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }", "public static Poen createEntity(EntityManager em) {\n Poen poen = new Poen()\n .tip(DEFAULT_TIP);\n return poen;\n }", "public static Expediente createEntity(EntityManager em) {\n Expediente expediente = new Expediente()\n .horarioEntrada(DEFAULT_HORARIO_ENTRADA)\n .horarioSaida(DEFAULT_HORARIO_SAIDA)\n .diaSemana(DEFAULT_DIA_SEMANA);\n return expediente;\n }", "public static Unidade createEntity(EntityManager em) {\n Unidade unidade = new Unidade()\n .descricao(DEFAULT_DESCRICAO)\n .sigla(DEFAULT_SIGLA)\n .situacao(DEFAULT_SITUACAO)\n .controleDeEstoque(DEFAULT_CONTROLE_DE_ESTOQUE)\n .idAlmoxarifado(DEFAULT_ID_ALMOXARIFADO)\n .andar(DEFAULT_ANDAR)\n .capacidade(DEFAULT_CAPACIDADE)\n .horarioInicio(DEFAULT_HORARIO_INICIO)\n .horarioFim(DEFAULT_HORARIO_FIM)\n .localExame(DEFAULT_LOCAL_EXAME)\n .rotinaDeFuncionamento(DEFAULT_ROTINA_DE_FUNCIONAMENTO)\n .anexoDocumento(DEFAULT_ANEXO_DOCUMENTO)\n .setor(DEFAULT_SETOR)\n .idCentroDeAtividade(DEFAULT_ID_CENTRO_DE_ATIVIDADE)\n .idChefia(DEFAULT_ID_CHEFIA);\n // Add required entity\n TipoUnidade tipoUnidade;\n if (TestUtil.findAll(em, TipoUnidade.class).isEmpty()) {\n tipoUnidade = TipoUnidadeResourceIT.createEntity(em);\n em.persist(tipoUnidade);\n em.flush();\n } else {\n tipoUnidade = TestUtil.findAll(em, TipoUnidade.class).get(0);\n }\n unidade.setTipoUnidade(tipoUnidade);\n return unidade;\n }", "public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "private void createTestData() {\n StoreEntity store = new StoreEntity();\n store.setStoreName(DEFAULT_STORE_NAME);\n store.setPecEmail(DEFAULT_PEC);\n store.setPhone(DEFAULT_PHONE);\n store.setImagePath(DEFAULT_IMAGE_PATH);\n store.setDefaultPassCode(STORE_DEFAULT_PASS_CODE);\n store.setStoreCap(DEFAULT_STORE_CAP);\n store.setCustomersInside(DEFAULT_CUSTOMERS_INSIDE);\n store.setAddress(new AddressEntity());\n\n // Create users for store.\n UserEntity manager = new UserEntity();\n manager.setUsercode(USER_CODE_MANAGER);\n manager.setRole(UserRole.MANAGER);\n\n UserEntity employee = new UserEntity();\n employee.setUsercode(USER_CODE_EMPLOYEE);\n employee.setRole(UserRole.EMPLOYEE);\n\n store.addUser(manager);\n store.addUser(employee);\n\n // Create a new ticket.\n TicketEntity ticket = new TicketEntity();\n ticket.setPassCode(INIT_PASS_CODE);\n ticket.setCustomerId(INIT_CUSTOMER_ID);\n ticket.setDate(new Date(new java.util.Date().getTime()));\n\n ticket.setArrivalTime(new Time(new java.util.Date().getTime()));\n ticket.setPassStatus(PassStatus.VALID);\n ticket.setQueueNumber(INIT_TICKET_QUEUE_NUMBER);\n store.addTicket(ticket);\n\n // Persist data.\n em.getTransaction().begin();\n\n em.persist(store);\n em.flush();\n\n // Saving ID generated from SQL after the persist.\n LAST_TICKET_ID = ticket.getTicketId();\n LAST_STORE_ID = store.getStoreId();\n LAST_MANAGER_ID = manager.getUserId();\n LAST_EMPLOYEE_ID = employee.getUserId();\n\n em.getTransaction().commit();\n }", "@Test\n public void testNewEntity_0args() {\n // newEntity() is not implemented!\n }", "public static NoteMaster createEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(DEFAULT_SEMESTRE)\n .noteCC1(DEFAULT_NOTE_CC_1)\n .noteCC2(DEFAULT_NOTE_CC_2)\n .noteFinal(DEFAULT_NOTE_FINAL)\n .date(DEFAULT_DATE);\n return noteMaster;\n }", "public Camp newEntity() { return new Camp(); }", "T create() throws PersistException;", "private EntityDef createEntityDef(Class<?> entityClass)\n {\n\t\tif (entityClass.isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass.SingleTableSuperclass(entityClass);\n } else if (entityClass.getSuperclass().isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass(entityClass);\n } else {\n return new EntityDef(entityClass);\n }\n\t}", "public static Restaurant createEntity(EntityManager em) {\n Restaurant restaurant = new Restaurant()\n .restaurantName(DEFAULT_RESTAURANT_NAME)\n .deliveryPrice(DEFAULT_DELIVERY_PRICE)\n .restaurantAddress(DEFAULT_RESTAURANT_ADDRESS)\n .restaurantCity(DEFAULT_RESTAURANT_CITY);\n return restaurant;\n }", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }", "public static Produit createEntity(EntityManager em) {\n Produit produit = new Produit()\n .designation(DEFAULT_DESIGNATION)\n .soldeInit(DEFAULT_SOLDE_INIT)\n .prixAchat(DEFAULT_PRIX_ACHAT)\n .prixVente(DEFAULT_PRIX_VENTE)\n .quantiteDispo(DEFAULT_QUANTITE_DISPO)\n .quantiteInit(DEFAULT_QUANTITE_INIT)\n .seuilReaprov(DEFAULT_SEUIL_REAPROV)\n .reference(DEFAULT_REFERENCE);\n return produit;\n }", "public void constructEntity (EntityBuilder entityBuilder, Position position){\n entityBuilder.createEntity();\n entityBuilder.buildPosition(position);\n entityBuilder.buildName();\n entityBuilder.buildPosition();\n entityBuilder.buildContComp();\n entityBuilder.buildPhysComp(length, width);\n entityBuilder.buildGraphComp(length, width);\n }" ]
[ "0.77237517", "0.75055355", "0.7489123", "0.7362241", "0.73148507", "0.71567076", "0.71567076", "0.7151556", "0.71502143", "0.7078192", "0.70171237", "0.6803645", "0.6753588", "0.67406213", "0.67406213", "0.67118007", "0.6682163", "0.66666734", "0.6640775", "0.6625193", "0.66251683", "0.6607209", "0.658823", "0.6574365", "0.65743065", "0.65674484", "0.6552699", "0.65314966", "0.65300333", "0.6481495", "0.6420882", "0.6387648", "0.6376284", "0.63684416", "0.6314284", "0.6298274", "0.62940586", "0.6258953", "0.6246527", "0.62431926", "0.6240403", "0.62189454", "0.62096685", "0.6182707", "0.618222", "0.617546", "0.6170277", "0.6164808", "0.61613065", "0.6160183", "0.6155747", "0.61510926", "0.61426896", "0.6137169", "0.6135308", "0.61302215", "0.61250234", "0.61216235", "0.6107285", "0.61070937", "0.6102848", "0.60928065", "0.60917217", "0.60813266", "0.6074433", "0.6070256", "0.60680836", "0.60664845", "0.60636806", "0.6059457", "0.6052344", "0.6041539", "0.6038793", "0.6032986", "0.60278314", "0.6022797", "0.6021493", "0.60212386", "0.601514", "0.60149497", "0.60139275", "0.6003491", "0.60026515", "0.60025096", "0.60009116", "0.59956735", "0.59947765", "0.5983057", "0.5977805", "0.5975077", "0.5972932", "0.59673995", "0.5963701", "0.59632677", "0.59537095", "0.5946613", "0.59445035", "0.5942444", "0.59381074", "0.59310436", "0.593047" ]
0.0
-1
draw the box in the background
private void paintBox(Graphics g, TextInBox textInBox) { g.setColor(BOX_COLOR); Rectangle2D.Double box = getBoundsOfNode(textInBox); g.fillRoundRect((int) box.x, (int) box.y, (int) box.width - 1, (int) box.height - 1, ARC_SIZE, ARC_SIZE); g.setColor(BORDER_COLOR); g.drawRoundRect((int) box.x, (int) box.y, (int) box.width - 1, (int) box.height - 1, ARC_SIZE, ARC_SIZE); // draw the text on top of the box (possibly multiple lines) g.setColor(TEXT_COLOR); String[] lines = textInBox.text.split("\n"); FontMetrics m = getFontMetrics(getFont()); int x = (int) box.x + ARC_SIZE / 2; int y = (int) box.y + m.getAscent() + m.getLeading() + 1; for (int i = 0; i < lines.length; i++) { g.drawString(lines[i], x, y); y += m.getHeight(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "public void drawBox( Graphics window, Color i, int x, int y )\n\t{\n\t\twindow.setColor(i);\n\t\twindow.fillRect(x,y,100,100);\n\t\t// this code \"erases\" the center of the box by painting over it in white\n\t\twindow.setColor(Color.WHITE);\n\t\twindow.fillRect(x+10,y+10,80,80);\n\t}", "private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }", "protected void setBoxBackground() { Console.setBackground(Console.RED); }", "private void drawBackground() {\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(0,0,512, 512);\n\t\t\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(128, 0, 256, 512);\n\t}", "protected void drawGUI() {\n batch.draw(background, 0, 0);\n }", "public void printBackground() {\n\t\tthis.gc.setFill(Color.BLACK);\n\t\tthis.gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\t}", "public DrawGraphics() {\r\n box = new BouncingBox(200, 50, Color.RED);\r\n\tbox.setMovementVector(1,1);\r\n\r\n\tboxes = new ArrayList<BouncingBox>();\r\n\tboxes.add(new BouncingBox(35,40, Color.BLUE));\r\n\tboxes.get(0).setMovementVector(2,-1);\r\n\tboxes.add(new BouncingBox(120,80, Color.GREEN));\r\n\tboxes.get(1).setMovementVector(-1,2);\r\n\tboxes.add(new BouncingBox(500,80, Color.PINK));\r\n\tboxes.get(2).setMovementVector(-2,-2);\r\n }", "@Override\n\tprotected void drawBackground(Graphics2D g2) {\n\t\tg2.setColor(BACKGROUND_FILL_COLOR);\n\t\tg2.fillRect(0, 0, this.getWidth(), this.getHeight());\n\t}", "private void drawBackground() {\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(BACKGROUND_RESOURCE);\r\n\t\tString text = \"Nitro Teleport Waypoints\";\r\n\t\tint posX = (width - SIZE_X) / 2;\r\n\t\tint posY = (height - SIZE_Y) / 2;\r\n\t\tint strWidth = this.fontRendererObj.getStringWidth(text);\r\n\r\n\t\tthis.drawTexturedModalRect(posX, posY, 0, 0, SIZE_X, SIZE_Y);\r\n\t\tthis.drawCenteredString(this.fontRendererObj, text, width / 2, posY - 17, 0xFFFFFF);\r\n\t}", "private void drawBox(Graphics2D g2d, int y, int wid, int hei) {\n g2d.setColor(Dark_Gray);\n Triangle triangle1 = new Triangle(new Point(wid / 3, y), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle1.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle2 = new Triangle(new Point(2 * wid / 3, y + hei / 10), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid / 3, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10 - 8));\n triangle3.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle4 = new Triangle(new Point(2 * wid / 3, y), new Point(2 * wid / 3 - 8, y), new Point(2 * wid / 3 - 8, y + 8));\n triangle4.fill(g2d);\n g2d.setColor(Color.BLACK);\n g2d.fillRect(wid / 3 + 4, y + 4, wid / 3 - 8, hei / 10 - 8);\n }", "public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "private void drawBox() {\n GLES20.glEnable(GLES20.GL_SCISSOR_TEST);\n GLES20.glScissor(0, 0, 100, 100);\n GLES20.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);\n GLES20.glDisable(GLES20.GL_SCISSOR_TEST);\n }", "private void drawBackground(Graphics g){\r\n g.setColor(Colors.ColorAlpha(Colors.blacks,a1));\r\n g.fillRect(0,0,w,h);\r\n if(moving){\r\n g.drawImage(Assets.burst.get((int)((game.counter%8)*0.625)),(int)(w*0.472),(int)(h*0.455),null);\r\n g.drawImage(Assets.sparks.get(((game.counter%20)/2)),(int)(w*0.465),(int)(h*0.345),null);\r\n }\r\n drawWires(g);\r\n }", "private void drawBox(Graphics2D g)\n\t{\n\t\t// Resize values with magic numbers\n\t\tLine2D.Double line = new Line2D.Double();\n\t\tStroke drawingStroke = new BasicStroke(3, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);\t\t\n\t\tg.setStroke(drawingStroke);\n\t\tmidBoxWidth = super.getWidth() - 234;\n\t\tmidBoxHeight = super.getHeight() - 55;\n\t\tORIGIN_X = MID_BOX_X + AXIS_X_GAP;\n\t\tORIGIN_Y = MID_BOX_Y + midBoxHeight - AXIS_X_GAP;\n\n\t\t/**\n\t\t * Super hard coded for now \n\t\t */\n\n\t\t// White background\n\t\tRectangle2D middle = new Rectangle2D.Double(MID_BOX_X, MID_BOX_Y, midBoxWidth, midBoxHeight);\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fill(middle);\n\t\t// Drawing borders\n\t\tg.setColor(Color.black);\n\t\t// Top\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y, MID_BOX_X + midBoxWidth, MID_BOX_Y);\n\t\tg.draw(line);\n\t\t// Left\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y, MID_BOX_X, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\t\t// Bottom\n\t\tline.setLine(MID_BOX_X, MID_BOX_Y + midBoxHeight, MID_BOX_X + midBoxWidth, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\t\t// Right\n\t\tline.setLine(MID_BOX_X + midBoxWidth, MID_BOX_Y, MID_BOX_X + midBoxWidth, MID_BOX_Y + midBoxHeight);\n\t\tg.draw(line);\n\n\t\t// Drawing Axes\n\t\tdrawingStroke = new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);\n\t\tg.setStroke(drawingStroke);\n\t\t// Y-axis\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + midBoxHeight - AXIS_Y_GAP/2);\n\t\tg.draw(line);\t\n\n\t\t// Arrow Tip\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP + 10, MID_BOX_Y + AXIS_Y_GAP/2 + 15);\n\t\tg.draw(line);\t\t\t\n\t\tline.setLine(MID_BOX_X + AXIS_X_GAP, MID_BOX_Y + AXIS_Y_GAP/2, MID_BOX_X + AXIS_X_GAP - 10, MID_BOX_Y + AXIS_Y_GAP/2 + 15);\n\t\tg.draw(line);\t\n\n\t\t// X-axis\n\t\tline.setLine(MID_BOX_X + AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP);\n\t\tg.draw(line);\n\t\t// Arrow tip\n\t\tline.setLine(MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2 - 15, MID_BOX_Y + midBoxHeight - AXIS_X_GAP + 10);\n\t\tg.draw(line);\t\t\t\n\t\tline.setLine(MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2, MID_BOX_Y + midBoxHeight - AXIS_X_GAP, MID_BOX_X + midBoxWidth - AXIS_Y_GAP/2 - 15, MID_BOX_Y + midBoxHeight - AXIS_X_GAP - 10);\n\t\tg.draw(line);\t\n\n\t\tnew BasicStroke(2, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);\n\t\tg.setStroke(drawingStroke);\n\n\t\t// Axis labels\n\t\tg.setColor(Color.black);\n\t\tg.rotate(Math.toRadians(-90));\n\n\t\t// Magic numbers - even I don't know what they are but they somehow centres the text\n\t\tswitch (graph) {\n\t\tcase ARRIVAL: {\n\t\t\tg.drawString(\"Total arrivals per interval (cars)\", -midBoxHeight/2 - 80, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tcase MAX_QUEUE_TIME: {\n\t\t\tg.drawString(\"Max Queue Time (seconds)\", -midBoxHeight/2 - 70, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tcase AVG_QUEUE_TIME: {\n\t\t\tg.drawString(\"Average Queue Time (seconds)\", -midBoxHeight/2 - 80, MID_BOX_X + 16);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tg.rotate(Math.toRadians(90));\n\t\tg.drawString(\"Time Interval (minutes)\", MID_BOX_X + midBoxWidth/2 - 50, MID_BOX_Y + midBoxHeight - AXIS_Y_GAP/2 + 18);\n\t}", "@Override\n protected void drawGuiContainerBackgroundLayer(final float opacity, final int x, final int y)\n {\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n ResourceHandler.bindGUI(mc, EnumModeled.machineGrinder.name());\n final int xStart = (width - xSize) / 2;\n final int yStart = (height - ySize) / 2;\n drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);\n int scale;\n if (grinderL.canRun())\n {\n scale = grinderL.getProgressScaled(24);\n drawTexturedModalRect(xStart + 79, yStart + 31, 176, 0, 20, scale);\n }\n }", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "private void drawPlayerDetailBox(Graphics g, int x, int y) throws IOException{\n\t\t ImageIcon bg;\n\t\t bg = new ImageIcon(ImageIO.read(new File(relativePath + \"playerDetailBox.png\")));\n\t\t bg.paintIcon(this, g, x, y);\n\t }", "@Override\n\tvoid draw(Graphics g) {\n\t\tg.setColor(needsHighlight() ? selectColor : Color.GRAY);\n\t\tsetBbox(x, y, x2, y2);\n\t\tif (x < x2 && y < y2)\n\t\t\tg.fillRect(x, y, x2 - x, y2 - y);\n\t\telse if (x > x2 && y < y2)\n\t\t\tg.fillRect(x2, y, x - x2, y2 - y);\n\t\telse if (x < x2 && y > y2)\n\t\t\tg.fillRect(x, y2, x2 - x, y - y2);\n\t\telse\n\t\t\tg.fillRect(x2, y2, x - x2, y - y2);\n\t}", "private void drawBackground(Graphics2D g2d, int wid, int hei) {\n g2d.setColor(Light_Gray);\n Triangle triangle1 = new Triangle(new Point(0, 0), new Point(0, hei), new Point(wid, 0));\n triangle1.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle2 = new Triangle(new Point(wid, hei), new Point(0, hei), new Point(wid, 0));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid, 0), new Point(wid, 15), new Point(wid - 15, 15));\n triangle3.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle4 = new Triangle(new Point(0, hei), new Point(0, hei - 15), new Point(15, hei - 15));\n triangle4.fill(g2d);\n g2d.setColor(Gray);\n g2d.fillRect(6, 6, wid - 12, hei - 12);\n }", "public void draw() {\n background(0);\n}", "@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }", "@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background\r\n g.drawImage (background, 0, 0, null);\r\n }", "public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }", "private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }", "public void drawBox(Graphics g, int x, int y) \n\t{\n\t\tbox.setX(x);\n\t\tbox.setY(y);\n\t\tg.setColor(null);\n\t\tg.draw(box);\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}", "@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}", "@Override\r\n protected void paintComponent(Graphics g) {\r\n\r\n Graphics2D g2d = (Graphics2D) g;\r\n\r\n g2d.setColor(new Color(52, 73, 94));\r\n g2d.fillRect(0, 0, getWidth(), getHeight());\r\n }", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.PINK);\r\n\t\tg.fillRect(getX(), getY(), getWidth(), getHeight());\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(getForeground());\r\n\t\tg.fillOval(0,0, this.getWidth(),this.getHeight());\r\n }", "public void paint(Graphics pane) {\r\n\t\tfinal int DELTA = 2; // The offset within the box/frame\r\n\r\n\t\tpane.setColor(Color.black); // Drawing the box/frame of the element\r\n\t\tpane.drawRect(x, y, WIDTH, HEIGHT);\r\n\r\n\t\tpane.setColor(color); // and the inside of the element\r\n\t\tpane.fill3DRect(x + DELTA, y + DELTA, WIDTH - 2 * DELTA + 1, HEIGHT - 2\r\n\t\t\t\t* DELTA + 1, hilite);\r\n\t}", "private static void drawUniverse(String background) {\n StdDraw.picture(0.0, 0.0, background);\n }", "@Override\n public void paintComponent (Graphics g)\n {\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g.setColor(BACKGROUND_COLOR);\n g.fillRect(0, 0, getHeight(), getHeight());\n g.setColor(color);\n g.fillOval(0, 0, 30, 30);\n }", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "public void paint() {\n BufferStrategy bs;\n bs = this.getBufferStrategy();\n\n Graphics g = bs.getDrawGraphics();\n g.drawImage(background, 0, 0, this.getWidth(), this.getHeight(), null);\n if (this.blackHoles != null) {\n for (BlackHole blackHole : this.blackHoles) {\n blackHole.paint(g);\n }\n }\n if (this.balls != null) {\n for (int i = 0; i <this.balls.size() ; i++) {\n this.balls.get(i).paint(g);\n }\n\n }\n\n bs.show();\n g.dispose();\n\n }", "private void drawBackGround() {\r\n\t\tdouble diff = getWidth() / NDECADES;\r\n\t\tdouble xcrd = 0;\r\n\t\tint year = START_DECADE;\r\n\t\tfor (int i = 0; i < NDECADES; i++) {\r\n\t\t\tString yearStr = year + \"\";\r\n\t\t\tadd(new GLine(xcrd, 0, xcrd, getHeight()));\r\n\t\t\tadd(new GLabel(yearStr, xcrd, getHeight()));\r\n\t\t\txcrd = xcrd + diff;\r\n\t\t\tyear = year + 10;\r\n\t\t}\r\n\t\tdouble ycrd = GRAPH_MARGIN_SIZE;\r\n\t\tadd(new GLine(0, ycrd, getWidth(), ycrd));\r\n\t\tadd(new GLine(0, getHeight() - ycrd, getWidth(), getHeight() - ycrd));\r\n\r\n\t}", "private void drawBackground(Graphics2D g2) {\n\t\t\tg2.fillRect(0, 0, WIDTHBG, HEIGHTBG);\n\t\t}", "public BoxBackground()\n {\n this(null);\n }", "protected void drawBackground(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final Trait.Background back,\n final BorderProps bpsTop, final BorderProps bpsBottom,\n final BorderProps bpsLeft, final BorderProps bpsRight) {\n if (back != null) {\n endTextObject();\n\n // Calculate padding rectangle\n float sx = startx;\n float sy = starty;\n float paddRectWidth = width;\n float paddRectHeight = height;\n if (bpsLeft != null) {\n sx += bpsLeft.width / 1000f;\n paddRectWidth -= bpsLeft.width / 1000f;\n }\n if (bpsTop != null) {\n sy += bpsTop.width / 1000f;\n paddRectHeight -= bpsTop.width / 1000f;\n }\n if (bpsRight != null) {\n paddRectWidth -= bpsRight.width / 1000f;\n }\n if (bpsBottom != null) {\n paddRectHeight -= bpsBottom.width / 1000f;\n }\n\n if (back.getColor() != null) {\n updateColor(back.getColor(), true);\n fillRect(sx, sy, paddRectWidth, paddRectHeight);\n }\n if (back.getImageInfo() != null) {\n final ImageSize imageSize = back.getImageInfo().getSize();\n saveGraphicsState();\n clipRect(sx, sy, paddRectWidth, paddRectHeight);\n int horzCount = (int) (paddRectWidth * 1000\n / imageSize.getWidthMpt() + 1.0f);\n int vertCount = (int) (paddRectHeight * 1000\n / imageSize.getHeightMpt() + 1.0f);\n if (back.getRepeat() == EN_NOREPEAT) {\n horzCount = 1;\n vertCount = 1;\n } else if (back.getRepeat() == EN_REPEATX) {\n vertCount = 1;\n } else if (back.getRepeat() == EN_REPEATY) {\n horzCount = 1;\n }\n // change from points to millipoints\n sx *= 1000;\n sy *= 1000;\n if (horzCount == 1) {\n sx += back.getHoriz();\n }\n if (vertCount == 1) {\n sy += back.getVertical();\n }\n for (int x = 0; x < horzCount; x++) {\n for (int y = 0; y < vertCount; y++) {\n // place once\n Rectangle2D pos;\n // Image positions are relative to the currentIP/BP\n pos = new Rectangle2D.Float(sx - this.currentIPPosition\n + x * imageSize.getWidthMpt(), sy\n - this.currentBPPosition + y\n * imageSize.getHeightMpt(),\n imageSize.getWidthMpt(),\n imageSize.getHeightMpt());\n drawImage(back.getURL(), pos);\n }\n }\n\n restoreGraphicsState();\n }\n }\n }", "private void drawSquarePlayerZoneBackground(Canvas canvas) {\n\t\t\n\t\tint left = PLAY_AREA_LEFT_PADDING; \n\t\tint top = PLAY_AREA_UP_PADDING;\n\t\tint right = left + PLAY_AREA_WIDTH_BLOCK*BLOCK_CUBE_SIZE;\n\t\tint bottom = top + PLAY_AREA_HEIGHT_BLOCK*BLOCK_CUBE_SIZE;\n\t\tint bcolor = 0;\n\t\t\n\t\tbcolor = getResources().getColor(R.color.BG);\n\t\t\n\t\tfillpaint.setColor(bcolor);\n\t\tstrokepaint.setColor(getResources().getColor(R.color.PLAYZONESTROKE));\n\t\tstrokepaint.setStrokeWidth(1);\n\t\t\n\t\tcanvas.drawRect(left, top, right, bottom, fillpaint);\n\t\tcanvas.drawRect(left, top, right, bottom, strokepaint);\n\t}", "protected void paintBackground(Graphics g){\n Dimension size = getSize();\n\n g.setColor(properties.backgroundColor);\n g.fillRect(0,0,size.width,size.height);\n\n }", "public BoxDrawingView(Context context, AttributeSet attrs) {\n super(context, attrs);\n boxPaint = new Paint();\n boxPaint.setColor(0x22ff0000);\n\n backgroundPaint = new Paint();\n backgroundPaint.setColor(0xfff8efe0);\n }", "public void paintComponent(Graphics page)\n {\n super.paintComponent(page);\n\n //set color, then draw a rectangle\n page.setColor(currentColor);\n\n page.drawRect(x1, y1, currentWidth, currentHeight);\n }", "public void draw() {\n drawBox();\n if (root == null) {\n return;\n }\n\n draw(root, ORIENTATION_VERTICAL);\n }", "@Override\r\n\tpublic void paintComponent (Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawImage(background, 0, 0, 800, 660, null);\r\n\t}", "public void begin() {\n\t\tg.setColor(bgColor);\n\t\tg.fillRect(0, 0, width, height);\n\t\tg.setColor(Color.black);\n\t}", "@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }", "public void drawRect(int x, int y, int width, int height, int color);", "@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.PINK);\n\t\tg.fillRect(getx(), gety(), getwidth(), getheight());\n\t}", "@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)\n {\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(CHEST_GUI_TEXTURE);\n int i = (this.width - this.xSize) / 2;\n int j = (this.height - this.ySize) / 2;\n this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.inventoryRows * 18 + 17);\n this.drawTexturedModalRect(i, j + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96);\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n paintBackground(g);\n }", "private void clearBackground() {\r\n\t\tg.setColor(Color.WHITE);\r\n\t\tg.fillRect(0,0, TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH);\r\n\t}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.ORANGE);\n\t\tg.fillRect(x, y, WIDTH, HEIGHT);\n\t}", "public void paintComponent(Graphics g) {\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n Color bg = new Color(237,237,237,0);//getBackground();\n g2.setColor(new Color(bg.getRed(),bg.getGreen(),bg.getBlue()));\n g2.fillRoundRect(0,0, getWidth()-1, getHeight()-1, radius, radius);\n g2.setColor(new Color(164,164,164));\n g2.drawRoundRect(0,0, getWidth()-1, getHeight()-1, radius, radius);\n }", "private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }", "public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}", "@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }", "protected void drawStartGame(){\n startBorder = new Rectangle(355, 525, 90, 50);\n startBorder.setFillColor(pink);\n startBorder.setFilled(true);\n\n startBox = new Rectangle(360, 530, 80, 40);\n startBox.setFillColor(Color.black);\n startBox.setFilled(true);\n\n startText = new GraphicsText(\"START\", 365, 555);\n startText.setFont(font);\n startText.setStrokeColor(new Color(88, 30, 220));\n\n canvas.add(startBorder);\n canvas.add(startBox);\n canvas.add(startText);\n }", "@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {\n }", "private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }", "public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }", "private void drawButtonBackground(int x, int y)\n {\n this.drawSprite(x, y, 0, 0);\n }", "@Override\r\n\tpublic void render(Graphics g) {\n\t\tg.setColor(Color.yellow);\r\n\t\tg.fillRect((int) getX(), (int) getY(), 5, 10);\r\n\t}", "private PImage createBG() {\n\t\tPImage image = new PImage(64, 64);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tl\"), 0, 0, 16, 16, 0, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 16, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 32, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tr\"), 0, 0, 16, 16, 48, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bl\"), 0, 0, 16, 16, 0, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 16, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 32, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_br\"), 0, 0, 16, 16, 48, 48, 16, 16);\n\t\treturn image;\t\t\n\t}", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t \n\t\t GradientPaint gp = new GradientPaint(0, 0,\n\t\t Const.BACKGROUND_COLOR.brighter(), 0, getHeight(),\n\t\t Color.BLUE);\n\t\t \n\t\t g2d.setPaint(gp);\n\t\t g2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.orange);\n\t\tg.fillRect(getX(), getY(), getW(), getH());\n\t}", "protected void paintBackground(Graphics g) {\n g.setColor(editor.getBackground());\n g.fillRect(0, 0, editor.getWidth(), editor.getHeight());\n }", "public void draw() {\n\tbackground(bg_count); // set background to something\n\tbg_count = bg_count + bg_dir;\n\tif (bg_count >= 255) {\n\t bg_dir = -1;\n\t} else if (bg_count <= 0) {\n\t bg_count = 0;\n\t bg_dir = 1;\n\t}\n\tellipse_x = ellipse_x + ellipse_x_dir;\n\tellipse_y = ellipse_y - ellipse_y_dir;\n\n\tif (ellipse_x > width) {\n\t ellipse_x_dir = -1;\n\t ellipse_x = width - 1;\n\t} else if (ellipse_x < 0) {\n\t ellipse_x_dir = 1;\n\t ellipse_x = 0;\n\t}\n\tif (ellipse_y > height) {\n\t ellipse_y_dir = -1;\n\t ellipse_y = height - 1;\n\t} else if (ellipse_y < 0) {\n\t ellipse_y_dir = 1;\n\t ellipse_y = 0;\n\t}\n\n\tfill(0, 64, 0);\n\t// x y w h\n\trect(400, 300, 200, 100);\n\n\tfill(212, 111, 249);\n\t\n\tstrokeWeight(4.0f);\n\n\t// x y r1 r2 // can set to mouseX, mouseY\n\tellipse(ellipse_x, ellipse_y, 30, 30);\n\n\t// some draw methods associated with PApplet:\n\t// background(int)\n\t// stroke(int, int, int)\n\t// fill(int)\n\t// ellipse(x, y, radius_1, radius_2)\n\t// noFill()\n\n\t// text(str, x, y)\n }", "protected void drawGuiContainerBackgroundLayer(float f, int x, int y)\n {\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n super.mc.getTextureManager().bindTexture(background);\n int j = (super.width - super.xSize) / 2;\n int k = (super.height - super.ySize) / 2;\n this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize);\n int i1;\n\n if (this.container.tileEntity.energy > 0)\n {\n i1 = this.container.tileEntity.energy * 14 / 200;\n\n if (i1 > 14)\n {\n i1 = 14;\n }\n\n this.drawTexturedModalRect(j + 62, k + 36 + 14 - i1, 176, 14 - i1, 14, i1);\n }\n\n i1 = this.container.tileEntity.pumpCharge * 41 / 200;\n\n if (i1 > 41)\n {\n i1 = 41;\n }\n\n this.drawTexturedModalRect(j + 99, k + 61 - i1, 176, 55, 12, 5);\n\n if (i1 > 0)\n {\n this.drawTexturedModalRect(j + 99, k + 25 + 41 - i1, 176, 14, 12, i1);\n }\n\n this.drawTexturedModalRect(j + 98, k + 19, 188, 14, 13, 47);\n }", "public void paint (Graphics g) {\n super.paint(g);\n // g.setColor(Color.BLUE);\n // g.drawRect(0, 0, 100, 100);\n }", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "@Override\n protected void paintComponent(Graphics g) {\n\n Graphics2D g2d = (Graphics2D) g.create();\n g2d.setRenderingHint(\n RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setComposite(AlphaComposite.getInstance(\n AlphaComposite.SRC_OVER, opa));\n g2d.setColor(color);\n if (!round) {\n g2d.fillRect(0, 0, getWidth(), getHeight());\n } else {\n g2d.fillRoundRect(0, 0, getWidth(), getHeight(), corner, corner);\n }\n }", "protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)\n\t{\n\t\tint var4 = this.mc.renderEngine.getTexture(\"/luxcraft/gui/luxRitualTable.png\");\n\t\tGL11.glColor4f(1.0F, 1F, 1F, 1.0F);\n\t\tthis.mc.renderEngine.bindTexture(var4);\n\t\tint var5 = (this.width - this.xSize) / 2;\n\t\tint var6 = (this.height - this.ySize) / 2;\n\t\tthis.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);\n\n\t\tif(this.ritualtableInventory.schemaMaxAnalyseTime != 0){\n\t\t\tint w = 2+(this.ritualtableInventory.schemaAnalyseTime * 41)/this.ritualtableInventory.schemaMaxAnalyseTime;\n\t\t\tthis.drawTexturedModalRect(var5 + 30, var6 + 37, 176, 14, w, 16);\n\t\t\tthis.drawTexturedModalRect(var5 + 103+43-w, var6 + 37, 176+43-w, 31, w, 16);\n\t\t}\n\n\n\t}", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "private void drawRectangle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc2 = myCanvas.getGraphicsContext2D();\r\n gc2.setFill(randomColor());\r\n gc2.fillRect(x - 20, y - 20, 40, 40);\r\n }", "@Override\n\tpublic void draw(Batch batch, float parentAlpha) {\n\t\tbatch.draw(leftBorder, getX(), getY());\n\t\t// Save variables to restore their state after drawing\n\t\tfloat prevX = getX();\n\t\tfloat prevWidth = getWidth();\n\t\t// Set the variables which are used to draw the background\n\t\tsetX(prevX + leftBorder.getRegionWidth());\n\t\tsetWidth(prevWidth - leftBorder.getRegionWidth() - rightBorder.getRegionWidth());\n\t\t// Draw the progress bar as it would be without borders\n\t\tsuper.draw(batch, parentAlpha);\n\t\t// Set the variables to draw the right border\n\t\tsetX(getX() + getWidth());\n\t\t// Draw the right border\n\t\tbatch.draw(rightBorder, getX(), getY());\n\t\t// Reset the state of the variables so next cycle the drawing is done at correct position\n\t\tsetX(prevX);\n\t\tsetWidth(prevWidth);\n\t}", "protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)\n {\n int var4 = this.mc.renderEngine.getTexture(\"/shadow/lavafurnace.png\");\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.renderEngine.bindTexture(var4);\n int var5 = (this.width - this.xSize) / 2;\n int var6 = (this.height - this.ySize) / 2;\n this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);\n int var8 = this.furnaceInventory.getFuelScaled(63);\n this.drawTexturedModalRect(var5 + 144, var6 + 11 + 63 - var8, 176, 94 - var8, 17, 31 + var8);\n int var7 = this.furnaceInventory.getCookProgressScaled(24);\n this.drawTexturedModalRect(var5 + 59, var6 + 33, 176, 14, var7 + 1, 16);\n }", "public void draw(Graphics surface) {\r\n surface.drawLine(50, 50, 250, 250);\r\n\tsurface.drawOval(20,20,40,40);\r\n box.draw(surface);\r\n\tfor (BouncingBox b : boxes) {\r\n\t b.draw(surface);\r\n\t}\r\n }", "@Override\n\tpublic void drawForeground(Canvas canvas, int width, int height) {\n\t\t\n\t}", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}", "@Override\n public void draw(ModernComponent c, Graphics2D g2, IntRect rect, Props props) {\n\n g2.setColor(FILL);\n\n fill(c, g2, rect, props);\n\n g2.setColor(BORDER);\n outline(c, g2, rect, props);\n }", "public void drawModifyingBox(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tint x = -1;\r\n\t\tint y = -1;\r\n\t\tint width = -1;\r\n\t\tint height = -1;\r\n\r\n\t\tint highlightboxwidth = 0;\r\n\t\tint highlightboxheight = 0;\r\n\r\n\t\t/** getting the needed informations of the real pixel size of this row */\r\n\t\tLayoutCell current = tableLayoutUtil.getCurrentLayoutCell();\r\n\t\tif (current != null) {\r\n\t\t\tx = 0;\r\n\t\t\ty = current.getCellDimensions().y;\r\n\t\t\theight = current.getCellDimensions().height;\r\n\t\t\twidth = InterfaceGuidelines.MARGIN_LEFT;\r\n\r\n\t\t\thighlightboxheight = height;\r\n\t\t\thighlightboxwidth = tableLayoutUtil.getCalculatedLayoutWidth();\r\n\r\n\t\t}\r\n\r\n\t\t/** drawing a filled box on the left side as \"active indicator\" */\r\n\t\tg2d.setColor(Color.GRAY);\r\n\t\tg2d.fillRect(x, y, width, height);\r\n\r\n\t\t/** highlight the row */\r\n\t\tg2d.setColor(Color.GRAY);\r\n\t\tBasicStroke stroke = new BasicStroke(1.0f);\r\n\t\tg2d.setStroke(stroke);\r\n\t\tg2d.drawRect(x, y, highlightboxwidth, highlightboxheight);\r\n\t\tschraffiertesRechteckZeichnen(g2d, x, y, highlightboxwidth, highlightboxheight);\r\n\r\n\t\t/** drawing the row number on the gray box */\r\n\t\tg2d.setColor(Color.WHITE);\r\n\t\tg2d.setFont(new Font(\"SansSerif\", Font.BOLD, 10));\r\n\t\tString info = current.getCellY() + \"\";\r\n\t\tFontMetrics metrics = g2d.getFontMetrics();\r\n\t\tint fontHeight = metrics.getHeight();\r\n\t\tg2d.drawString(info, 1, ((height) / 2) + y + (fontHeight / 2));\r\n\t}", "@Override\n protected void paintComponent(Graphics g)\n {\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n Rectangle r = getBounds();\n g2.setColor(theme.getPitColor());\n // Paint different shapes depending on the shape type\n switch(theme.getPitShape())\n {\n case CIRCLE:\n g2.fillOval(0, 0, r.width, r.height);\n break;\n case SQUARE:\n g2.fillRect(0, 0, r.width, r.height);\n break;\n }\n\n paintStoneCount(g2);\n }", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.green);\r\n\t\tg.fillRect(getX(), getY(), getWidth(), getHeight());\r\n\t}", "@Override\n\tpublic void paint(Graphics2D g) {\n\t\tg.setColor(Color.PINK);\n\t\tg.fillRect(x, y, width*GameBoard.PixelsPerL, height*GameBoard.PixelsPerL);\n\t}", "@Override\n\t\t\tpublic void paintControl(PaintEvent arg0) {\n\t\t\t\tgc.drawImage(background,0,0);\n\t\t\t}", "@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }", "public void paint (Graphics g) {\n Rectangle bbox = getBounds (); // find the window size\n paintBox (g, 0, 0, bbox.width, bbox.height); // draw something!\n }", "@Override\r\n\tprotected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {\n\t\tResourceLocation texture = new ResourceLocation(\"textures/gui/container/hopper.png\");\r\n\t\tthis.mc.renderEngine.bindTexture(texture);\r\n\t\tint x = (width - xSize) / 2;\r\n\t\tint y = (height - ySize) / 2;\r\n\t\tthis.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);\r\n\t\t\r\n\t\t/*int progress = Math.round(24 * (40 - te.getTime()) / 40.0f);\r\n\t\tif(te.getTime() == 0) {\r\n\t\t\tprogress = 0;\r\n\t\t}\r\n\t\tthis.drawTexturedModalRect(x+79, y+29, 176, 0, 17, progress);*/\r\n\t}", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void flush(){\r\n\t\tColor tempcol = screengraphics.getColor();\r\n\t\tscreengraphics.setColor(backgroundcolor);\r\n\t\tscreengraphics.fillRect(0, 0, sizex, sizey);\r\n\t\tscreengraphics.dispose();\r\n\t\tstrategy.show();\r\n\t\tscreengraphics =(Graphics2D) strategy.getDrawGraphics();\r\n\t\tscreengraphics.setColor(backgroundcolor);\r\n\t\tscreengraphics.fillRect(0, 0, sizex, sizey);\r\n\t\tscreengraphics.dispose();\r\n\t\tstrategy.show();\r\n\t\tscreengraphics =(Graphics2D) strategy.getDrawGraphics();\r\n\t\tscreengraphics.setColor(tempcol);\r\n\t\t\r\n\t}", "protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {\n\t\tsuper.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);\n\n\t\tGlStateManager.color(1, 1, 1,1 );\n\t\tthis.mc.getTextureManager().bindTexture(getTexture());\n\t\tthis.drawTexturedModalRect(xBase, yBase, 0, 0, xSize, container.inventoryRows * 18 + 17);\n\t\tthis.drawTexturedModalRect(xBase, yBase + container.inventoryRows * 18 + 17, 0, 126, xSize, 96);\n\t}", "public void paintValue(Graphics pGraphics, Rectangle pBox) {\n\t\n\t}", "public void drawRect(int x, int y, int width, int height);", "protected void drawBackground(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final Trait.Background back,\n final BorderProps bpsBefore, final BorderProps bpsAfter,\n final BorderProps bpsStart, final BorderProps bpsEnd,\n final int level) {\n final BorderProps bpsTop = bpsBefore;\n final BorderProps bpsBottom = bpsAfter;\n BorderProps bpsLeft;\n BorderProps bpsRight;\n if (level == -1 || (level & 1) == 0) {\n bpsLeft = bpsStart;\n bpsRight = bpsEnd;\n } else {\n bpsLeft = bpsEnd;\n bpsRight = bpsStart;\n }\n drawBackground(startx, starty, width, height, back, bpsTop, bpsBottom,\n bpsLeft, bpsRight);\n }", "public void paintbox(Graphics page, Rectangle box)\n\t\t{\n\t\t\tpage.drawImage(rock, box.x, box.y, box.width, box.height, this); //Places the rock image over the column \n\t\t}", "public void paintComponent(Graphics g){\n \t\t\t g.setColor(Color.white);\n \t\t\t g.fillRect(0,0,getWidth(),getHeight());\n for(Block z : blocks){\n z.draw(g);\n }\n \t\t }" ]
[ "0.74850035", "0.7285651", "0.7251675", "0.7041756", "0.70142865", "0.7004185", "0.6985285", "0.69806176", "0.6939", "0.69019943", "0.69012815", "0.6889491", "0.6865201", "0.68299454", "0.68016887", "0.67974496", "0.67840844", "0.675985", "0.67551357", "0.6710688", "0.67102885", "0.67096853", "0.666068", "0.66567576", "0.6654443", "0.6631881", "0.66242045", "0.6608684", "0.66072494", "0.6586714", "0.65776205", "0.6548176", "0.65456754", "0.654514", "0.65423673", "0.65385157", "0.65350026", "0.6530919", "0.64892256", "0.6484582", "0.64787644", "0.64744157", "0.64742506", "0.6472708", "0.64450425", "0.6441275", "0.64346164", "0.64266735", "0.6423528", "0.64224935", "0.6421491", "0.6418465", "0.6386468", "0.63650864", "0.6353408", "0.6347743", "0.6342072", "0.6339031", "0.63379407", "0.6330698", "0.6329921", "0.63167185", "0.63027406", "0.629402", "0.62916934", "0.6270495", "0.6265463", "0.6262963", "0.6261267", "0.6255924", "0.6245413", "0.62399673", "0.62352765", "0.62322456", "0.621519", "0.6214001", "0.62050873", "0.62032235", "0.6200597", "0.6192134", "0.6190421", "0.61863774", "0.6155877", "0.615294", "0.61459404", "0.6143778", "0.6130617", "0.6122717", "0.6120346", "0.61164254", "0.610879", "0.6104901", "0.60982066", "0.60944766", "0.6079228", "0.60770595", "0.60763675", "0.6073125", "0.60708386", "0.6064248" ]
0.6668541
22
On back button pressed, show lock screen
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { Intent returnIntent = new Intent(); setResult(RESULT_OK, returnIntent); Utility.fromAdd = true; finish(); return true; } return super.onKeyDown(keyCode, event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, SplashActivity.class);\n startActivity(intent);\n }", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "private void backToMain() {\n // https://stackoverflow.com/questions/5446565\n // Checks to see if they are still on this activity\n if (getWindow().getDecorView().getRootView().isShown()) {\n onBackPressed();\n }\n }", "private void onBack() {\n\t\tIntent startMain = new Intent(Intent.ACTION_MAIN);\r\n\t\tstartMain.addCategory(Intent.CATEGORY_HOME);\r\n\t\tstartMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // //FLAG_ACTIVITY_NEW_TASK\r\n\t\tstartActivity(startMain);\r\n\t}", "@Override\n\t public void onBackPressed() {\n\t\t Intent intent = new Intent(this,MainActivity.class);\n\t //intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\t\t intent.putExtra(\"overlayVisible\", \"noOverlay\");// als vanuit donatiescherm weer terug wil niet opnieuw de uitleg overlay\n\t\t startActivity(intent);\n\n\t }", "@Override\n protected void onPause() {\n if (LockscreenReceiver.wasScreenOn){\n finish();\n }\n\n super.onPause();\n }", "public void onBackPressed()\n {\n hideSystemUI(activity);\n }", "public void GoBack(){\n if (prev_hostgui != null){\n this.setVisible(false);\n prev_hostgui.setVisible(true);\n } else{\n this.setVisible(false);\n prev_guestgui.setVisible(true);\n }\n }", "public void back() {\n Views.goBack();\n }", "@Override\n protected void onResume() {\n\tsuper.onResume();\n\tif(CmucApplication.sNeedShowLock){\n\t\tCommonActions.showLockScreen(this);\n\t}\n}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(true);\r\n\t\tsuper.onBackPressed();\r\n\t}", "private void goBackToWelcome(){\n\t\tsetResult(RESULT_OK);\n\t\tfinish();\n\t}", "public void onBackPressed() {\n // do nothing. We want to force user to stay in this activity and not drop out.\n }", "@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n // Let the system handle the back button\n\n super.onBackPressed();\n\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n LessonService.disableToRestoreState();\n }", "public void onBackPressed() {\n backbutton();\n }", "@Override\n public void onBackPressed() {\n this.moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n finishAffinity();\n }", "private void configureBackButton(){\n Button backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view){\n //TODO add the code that erases saved login key\n\n //opens login page and closes home page stack\n startActivity(new Intent(homePage.this, MainActivity.class));\n finish();\n\n }\n });\n }", "public void goBack() {\n goBackBtn();\n }", "@Override\n\t\tpublic boolean handleBackPressed() {\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic void onBackPressed() {\n \t//Reference: http://stackoverflow.com/questions/11495188/how-to-put-application-to-background\n \t//; last accessed: 14 April 2015, answer by: JavaCoderEx\n \tIntent i = new Intent(Intent.ACTION_MAIN);\n i.addCategory(Intent.CATEGORY_HOME);\n startActivity(i); \n }", "@Override\n public void onBackPressed() {\n Intent i = new Intent(StockAdjustmentList.this, ActivityHomeScreen.class);\n startActivity(i);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n finish();\n }", "@Override\n public void onBackPressed()\n {\n mIsBackButtonPressed = true;\n super.onBackPressed();\n \n }", "@Override\n public void run() \n {\n \n finish();\n \n if (!mIsBackButtonPressed) \n {\n // start the home screen if the back button wasn't pressed already \n Intent startApp = new Intent(SplashActivity.this, LandingActivity.class);\n SplashActivity.this.startActivity(startApp);\n }\n \n }", "@Override\r\n public void onBackPressed() {\n moveTaskToBack(true);\r\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tstartActivity(new Intent(getApplicationContext(),\tLauncher.class));\n\t}", "private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}", "@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\r\n\t\t//handle click on back button\r\n\t if (keyCode == KeyEvent.KEYCODE_BACK) {\r\n\t \t//return to previous screen\r\n\t \treturnToPriviousActivityWithoutDevice();\r\n\t }\r\n\t return super.onKeyDown(keyCode, event);\r\n\t}", "@Override\n public void onBackPressed()\n {\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n startActivity(intent);\n finish();\n }", "public void onBackPressed(){\n super.onBackPressed();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n finishAffinity();\n\n }else {\n finish();\n }\n }", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tstartActivity(new Intent(SignActivity.this,MainActivity.class));\r\n\t\tfinish();\r\n\t}", "@Override\n public void onBackPressed() {\n if (backClickOnce) {\n finishAffinity();\n } else {\n backClickOnce = true;\n Toast.makeText(this, R.string.click_back_again_to_exit, Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n backClickOnce = false;\n }\n }, 2000);\n }\n }", "private void checkForBack() {\n if (Gdx.input.isKeyJustPressed(Input.Keys.BACK) || Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE) ||\n BackButton.isPressed()) {\n Gdx.input.vibrate(50);\n dispose();\n game.setScreen(new MainMenuView(game));\n }\n }", "@Override\n\tpublic void onBackPressed()\n\t{\n\t\tUtilidades.Aplicativo.minizarAplicativo(this);\n\t\t\n\t\t\n\t\t\n//\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n//\t\tintent.addCategory(Intent.CATEGORY_HOME);\n//\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n//\t\tstartActivity(intent);\n//\t\tgetApplicationContext().startActivity(intent);\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tIntro.gubunView = 0;\n\t\tIntent i = new Intent(getApplicationContext(), Tab.class);\n\t\tstartActivity(i);\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(false);\n\t}", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n finishAffinity();\n\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tif (isLstVisible) { lst.setVisibility(View.INVISIBLE); isLstVisible = false; }\n\t\telse finish();\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tHomeView.home_pressed=\"disable\";\r\n\t\r\n\t}", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tif (isMenuShowing) {\r\n\t\t\thideMenu();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed(){\r\n\t\tLog.d(TAG, \"Back Button Pushed\");\r\n\t\tIntent goHomeIntent = new Intent(Intent.ACTION_MAIN);\r\n\t\tgoHomeIntent.addCategory(Intent.CATEGORY_HOME);\r\n\t\tgoHomeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\tstartActivity(goHomeIntent);\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\r\n\t\tsuper.onBackPressed();\r\n\t\tlogout();\r\n\t}", "protected void goBack() {\r\n\t\tfinish();\r\n\t}", "public void onBackPressed() {\n moveTaskToBack(true);\n }", "private void navBack() {\n Intent intent = new Intent(this, standard_home.class);\n startActivity(intent);\n }", "@Override\n public void onBackPressed() {\n changeForm(R.id.btnSignInForm);\n }", "public void onBackButton() {\n WindowLoader wl = new WindowLoader(backButton);\n wl.load(\"MenuScreen\", getInitData());\n RETURN_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "@Override\n public void onBackPressed()\n {\n if(backButtonCount >= 1)\n {\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n else\n {\n Toast.makeText(this, \"Press the back button once again to close the application.\", Toast.LENGTH_SHORT).show();\n backButtonCount++;\n }\n }", "public void backToMenu() {\n\t\tcurrentGameGraphics.setVisible(false);\n\t\tcurrentGameGraphics = null;\n\t\tgameScreen.setVisible(true);\n\t}", "@FXML\r\n\t\tpublic void back(ActionEvent event) {\r\n\t\t\tGuiBasedApp.launchHomeScreenScene();\r\n\t\t}", "public abstract boolean onBackPressed(boolean isSystemBackKey);", "@Override\n public void onBackPressed() {\n backToHome();\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "private void backActionPerformed(ActionEvent e) {\r\n ctr_pres.principal();\r\n setVisible(false);\r\n }", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "public void onBackPressed() {\r\n \t\r\n \tScreen screen = this.getCurrentScreen();\r\n \tString screenName = screen.getClass().getName();\r\n \t\r\n \t// if we are \"inGame\"\r\n \tif (screenName.endsWith(\"GameScreen\")) {\r\n \t\t\r\n \t\tGameScreen gameScreen = (GameScreen)screen;\r\n \t\t\r\n \t\tif (gameScreen.demoParser != null) {\r\n \t\t\t\r\n \t\t\tthis.finish();\r\n \t \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\t\r\n \t\t// restart the race\r\n \t\telse if (gameScreen.map.inRace() || gameScreen.map.raceFinished()) {\r\n \t\t\r\n \t\t\tif (!gameScreen.map.inFinishSequence) {\r\n \t\t\t\t\r\n \t\t\t\tgameScreen.state = GameState.Running;\r\n \t\t\t\tgameScreen.map.restartRace(gameScreen.player);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t// return to maps menu\r\n \t\t} else {\r\n \t\t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n }\r\n });\r\n \t\t}\r\n \t\r\n \t// return to main menu\r\n \t} else if (screenName.endsWith(\"MapsScreen\")) {\r\n \t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(Racesow.this.getStartScreen());\r\n }\r\n });\r\n \t\r\n \t\t// quit the application\r\n \t} else if (screenName.endsWith(\"LoadingScreen\")) {\r\n \t\t\r\n \t\t// if no demo is loading we come from the mapsScreen\r\n \t\tif (((LoadingScreen)screen).demoFile == null) {\r\n \t\t\t\r\n \t\t\t\tthis.glView.queueEvent(new Runnable() {\r\n \t\r\n \t public void run() {\r\n \t \r\n \t \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n \t }\r\n \t });\r\n \t\t\t\r\n \t\t\t// if a demoFile is loading, quit the activity\r\n \t\t\t// as it was started additionally to the main instance.\r\n \t\t\t// will return to the previous activity = DemoList\r\n \t\t} else {\r\n \t\t\t\t\t\r\n \t\t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\r\n \t\t// quit the application\r\n \t} else {\r\n \t\t\r\n \t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\r\n \tAudio.getInstance().stopThread();\r\n \t\r\n \t// If I decide to not kill the process anymore, don't\r\n \t// forget to restart the SoundThread and set this flag\r\n \t// LOOPER_PREPARED = false;\r\n \tProcess.killProcess(Process.myPid());\r\n \t}\r\n }", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}", "@Override\n protected void handleImput() {\n buttonBack.getButton().addListener(new ChangeListener() {\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n if(!buttonLocker) {\n gsm.pop();\n gsm.push(new MenuState(gsm));\n buttonLocker = true;\n }\n }\n });\n if (Gdx.input.isKeyJustPressed(Input.Keys.BACK)){\n gsm.pop();\n gsm.push(new MenuState(gsm));\n }\n }", "void onGoBackButtonClick();", "@Override\n \tpublic void onBackKeyPressed() \n \t{\n \t\tSceneManager.getInstance().setScene(SceneManager.SceneType.SCENE_GAME);\n \t\t\n \t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tIntent homeIntent = new Intent(Intent.ACTION_MAIN);\n\t\thomeIntent.addCategory(Intent.CATEGORY_HOME);\n\t\thomeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tstartActivity(homeIntent);\n\t}", "@Override\n public void backButton() {\n\n\n }", "@Override\n public void onBackPressed(){\n System.out.println(\"---------------- No debe hacer nada -------------------------------\");\n }", "boolean onBackPressed();", "boolean onBackPressed();", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tIntent intent = new Intent(GameModeActivity.this, MenuActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\texitApplication().onClick(null);\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tif(relativeLayoutregist.getVisibility()==View.INVISIBLE)\n\t\t{\n\t\t\trelativeLayoutregist.setVisibility(View.VISIBLE);\n\t\t\trelativeLayouttijiao.setVisibility(View.INVISIBLE);\n\t\t}\n\t\telse {\n\t\t\tsuper.onBackPressed();\n\t\t}\n\n\t}", "private void backToMenu()\n {\n Intent i = new Intent(this, HomeScreen.class);\n startActivity(i);\n }", "public void lockBack()\n {\n m_bBackLock = true;\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n confirmExit();\n }" ]
[ "0.7190382", "0.69980603", "0.6996514", "0.6945652", "0.6934372", "0.69167066", "0.69116193", "0.69103605", "0.68489367", "0.68434864", "0.6831391", "0.6775181", "0.6773316", "0.6773", "0.6727573", "0.6721714", "0.6719637", "0.67139554", "0.67111325", "0.6710928", "0.67093265", "0.6700159", "0.66987246", "0.66980183", "0.6681014", "0.6678827", "0.66752106", "0.6674903", "0.6669138", "0.66660374", "0.66647404", "0.6663022", "0.6658754", "0.6658754", "0.6636495", "0.6632456", "0.6624351", "0.66240454", "0.66239035", "0.6617033", "0.6614383", "0.66142666", "0.6610916", "0.66089493", "0.66089493", "0.6606851", "0.66062045", "0.66029763", "0.6599346", "0.65982", "0.6597588", "0.6591763", "0.65906405", "0.6583707", "0.6582996", "0.65828985", "0.65787345", "0.6576005", "0.6574328", "0.65695494", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.6567045", "0.65632415", "0.6561864", "0.65590435", "0.65462434", "0.6540406", "0.6540406", "0.6538127", "0.652895", "0.65270233", "0.6525495", "0.65239215", "0.652316", "0.65225065", "0.6516352", "0.6516352", "0.65127057", "0.65127057", "0.65127057", "0.6508202", "0.6502447", "0.6501397", "0.6493156", "0.6492305", "0.64906436", "0.64906436", "0.6490212" ]
0.0
-1
On return from background
@Override protected void onRestart() { super.onRestart(); Intent returnIntent = new Intent(); setResult(RESULT_CANCELED, returnIntent); onRestart = true; finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enterBackground();", "public void afterBackground(OUT out) {\n\n }", "public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tif (SystemCheckTools.isApplicationSentToBackground(AppStartToMainActivity.this) == true) {\r\n\t\t\tExitApp.getInstance().exit();\r\n\t\t}\r\n\t\tsuper.onPause();\r\n\t}", "@Override\n\tprotected void onResume() {\n\t\tisbackground=0;\n\t\tsuper.onResume();\n\t\t\n\t}", "@Override\n protected void onStop() {\n super.onStop();\n if (!isAppInForeground()) {\n //app 进入后台\n isAppInBackground = true ;//记录当前已经进入后台\n }\n }", "@OnLifecycleEvent(Lifecycle.Event.ON_STOP)\n public void onMoveToBackground() {\n Log.i(\"AppLifecycleListener\", \"Background\");\n\n }", "@Override\n protected Void doInBackground(String... args) {\n String usrnmed=args[0];\n back(usrnmed);\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n Log.d(\"MAIN\",\"in background!\");\n return null;\n }", "@Override\n\tpublic void onExit() {\n\t\t\n\t}", "protected void onExit() {\r\n\t\tnew DelayAsyncTask(this, 500).execute();\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n if (!isAppInBackground) {\n // app 从后台唤醒,进入前台\n isAppInBackground = false;\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n MobclickAgent.onPause(this);\n // JPushInterface.onPause(this);\n isForeground = false;\n\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n myoBackgroundService = new Intent(this, MyoBackgroundService.class);\n stopService(myoBackgroundService);\n backgroundIntentService = new Intent(this, BackgroundIntentService.class);\n stopService(backgroundIntentService);\n isTextRcvData = false;\n moveTaskToBack(true);\n android.os.Process.killProcess(android.os.Process.myPid());\n }", "public void enterForeground();", "@Override\n protected void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n // JPushInterface.onResume(this);\n isForeground = true;\n\n }", "void onExit();", "@Override\n\t public void onExit() {\n\t\t super.onExit();\n\t }", "public void appMovedToBackground(final AppForegroundEvent e);", "@Override\n protected void onDestroy() {\n\tsuper.onDestroy ();\n\tstartService ( new Intent ( getBaseContext (), BackgroundService.class ) );\n }", "protected void onBSStop() {\n isFinishing = true;\n mCalled = true;\n }", "@Override\n protected void onStop() {\n super.onStop();\n saveData();\n }", "void enableBackgroundData();", "void backgroundRefresh();", "public void onExit();", "@Override\n public void onLowMemory() {\n \tsuper.onLowMemory();\n \tif(isApplicationBroughtToBackground(getApplicationContext()))\n\t\t{\n\t\t\tfinishAllActivity(); \n finishProgram(); \n\t\t}\n }", "@Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }", "@Override\n public void onBackPressed() {\n if (exit) {\n System.exit(0);\n } else {\n Toast.makeText(this, \"Press Back again to Exit.\",\n Toast.LENGTH_SHORT).show();\n exit = true;\n new Handler().postDelayed(new Runnable() { //3 sn içinde iki defa basıldı mı kontrolu için\n @Override\n public void run() {\n exit = false;\n }\n }, 3 * 1000);\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (isBounded) {\n backgroundService.refresh();\n }\n }", "@Override\r\n\tpublic void onTerminate() {\n\t\tsuper.onTerminate();\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\t isbackground=1;\n\t\tsuper.onPause();\n\t\tLog.e(\"AudioDoubt\",\"OnPause called\");\n\t\t\n\t\t\n\t\t////// Code remove////\n\t\t\n\t\t///////Remove this\n\t\t\n\t\n\t\t\n\t\t\n\t}", "@Override\n public void onExitAmbient() {\n\n Toast.makeText(getApplicationContext(), \"Exit\", Toast.LENGTH_LONG).show();\n }", "protected void onPreExecute() {\n\t\t\t//Log..d(TAG, \"OnPreExecute'd\");\n\t\t\tif (IS_PAUSING == YES) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\tFRAMEBUFFER_IS = BUSY;\n\t\t}", "@Override\n protected void onPause() {\n isRunning = false;\n super.onPause();\n }", "private void handleGoLauncher() {\n Trace.traceBegin(8, \"goLauncher:closeZswapd\");\n removeMessagesToStart();\n curState = 1;\n Message msg = handler.obtainMessage();\n msg.what = 5;\n Slog.i(TAG, \"handle launcher start, close zswapd\");\n closeZswapd();\n handler.sendMessageDelayed(msg, (long) (appStartDelay * 1000));\n Trace.traceEnd(8);\n }", "public void onContinue() {\n }", "private void exit() {\n this.isRunning = false;\n }", "@Override\n\tpublic void onTerminate(Args args) {\n\t\t\n\t}", "@Override\n protected void onPause() {\n Log.i(\"G53MDP\", \"Main onPause\");\n super.onPause();\n }", "@Override\n public void onStop()\n {\n }", "@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }", "@Override\r\n public void stateHasChanged(org.cef.CefApp.CefAppState state) {\n if (state == CefAppState.TERMINATED) System.exit(0);\r\n }", "@Override\n public void onFinished() {\n\n }", "@Override\n public void onKill() {\n }", "@Override\n public void onFinished() {\n\n }", "@Override\n public void resume() {\n Gdx.app.log(TAG, \"Resumed\");\n }", "@Override\n public void onFinished() {\n }", "@Override\n public void onFinished() {\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\ttry {\n\t\t\tboolean foregroud = new ForegroundCheckTask().execute(\n\t\t\t\t\tBaseActivity.this).get();\n\t\t\tLog.i(\"onPause\", String.valueOf(foregroud));\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void onEnd() {}", "@Override\n public void onBeforeExit() {\n dumpMyData();\n }", "@DebugLog\n public int goBackground() {\n if(mLocked) return mScanManager.getMode();\n mScanManager.setMode(SCAN_BACKGROUND);\n return mScanManager.getMode();\n }", "void onKeepAlive() {}", "@Override\n public void Resume() {\n\n }", "@Override\n public void Resume() {\n\n }", "@Override\n protected void onPostResume() {\n super.onPostResume();\n }", "@Override\r\n\tprotected void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}", "@Override\n public void run() {\n \tfinish();\n }", "@Override // from GLKViewControllerDelegate\n public void willPause(GLKViewController self, boolean paused) {\n if (paused) platform.didEnterBackground();\n else platform.willEnterForeground();\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n public void onTerminate() {\n \tsuper.onTerminate();\n \t\n \tLog.e(\"LIFECYCLE = \", this.getClass().toString() + \".onTerminate\");\n \treturn;\n }", "@Override\r\n\tprotected void onStop() {\n\t\t\r\n\t}", "public void onPause() {\n MainTask.GetInstance().SetUserCallBack((UserCallBack) null);\n super.onPause();\n Log.d(TAG, \"-----onPause-----\");\n }", "void backgroundProcess();", "@Override\r\n protected void onStop() {\n }", "@Override\n public void onBackPressed() {\n /*startAppAd.onBackPressed();\n super.onBackPressed();*/\n\n if(blnExit)\n {\n super.onBackPressed();\n return;\n }\n this.blnExit = true;\n // startAppAd.onBackPressed();\n\n\n Toast.makeText(ActHome.this,\"Please click BACK again to EXIT.\",Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n blnExit = false;\n }\n },2000);\n }", "@Override\n public void resume() {\n \n }", "@Override\n public void onBackPressed() {\n exit++;\n System.out.println(\"###############exit\" + exit);\n if (exit == 1) {\n start = System.currentTimeMillis();\n Toast.makeText(this, \"再点击退出\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n end = System.currentTimeMillis();\n if (end - start < 3000) {\n//\t\t\t\tSystem.exit(0);\n//\t\t\t\tAppActivityManager.getAppManager().finishAllActivity();\n finish();\n } else {\n Toast.makeText(this, \"再点击退出\", Toast.LENGTH_SHORT).show();\n start = System.currentTimeMillis();\n return;\n }\n }\n }", "public void onFinished();", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tLog.e(\"Ganxiayong\", \"-----------onPause()---------\");\n\t\tfinish();\n\t}", "@Override\n public void onDisconnected() {\n }", "@Override\n public void resume() {\n \n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tfinish();\r\n\t}", "public void backgroundProcess();", "@Override\n public void run() {\n exit_int=0;\n }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n updatePICstatus2();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click Back again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 3000);\n }", "@Override\n public void onForeground(String packageName) {\n if(packageName!=null) {\n if (flag && packageName.equals(\"com.whatsapp\")) {\n flag = false;\n Intent screenShotActivity = new Intent(getApplicationContext(), ScreenCaptureImageActivity.class);\n screenShotActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getApplicationContext().startActivity(screenShotActivity);\n new Timer().schedule(new TimerTask() {\n @Override\n public void run() {\n flag = true;\n }\n }, 121000);\n }\n }\n\n //setProgressAsync(new Data.Builder().putString(\"package\", packageName).build());\n\n previousPackageName = packageName;\n ForegroundWorker.this.packageName = packageName;\n try {\n ForegroundWorker.this.outputStreamWriter.write(packageName + '\\n');\n } catch (Exception e) {\n Log.e(\"APP\", \"run: \", e);\n }\n }", "@Override\n public void run() {\n\n Intent home = new Intent(MainActivity.this, HomeActivity.class);\n\n startActivity(home);\n finish();\n }", "@Override\n\tpublic void onMessageBackgroundThread(Object arg0) {\n\t\t\n\t}", "@Override\n public void onPause() {\n writeJSONData();\n super.onPause();\n }", "@Override\n\tpublic void onBackPressed() {\n \t//Reference: http://stackoverflow.com/questions/11495188/how-to-put-application-to-background\n \t//; last accessed: 14 April 2015, answer by: JavaCoderEx\n \tIntent i = new Intent(Intent.ACTION_MAIN);\n i.addCategory(Intent.CATEGORY_HOME);\n startActivity(i); \n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tisExit=false;\n\t\t\t\t}", "@Override\n\tpublic void comeBackToWork() {\n\t\t\n\t}", "@Override\n\tprotected void onPause() {\n\t\tSystem.out.println(\"onPause\");\n\t}", "public void end(){\r\n\t\tsetResult( true ); \r\n\t}", "protected abstract void postResume();", "private void onOK() {\n OKDisposalProcess();\n }", "@Override\n public void onFinish() {\n\t\t\t\n }", "@Override\n protected void onStop() {\n Log.i(\"G53MDP\", \"Main onStop\");\n super.onStop();\n }", "public void onPause () {\n\t\t\n\t}", "@Override\n\tpublic void onPause() {\n\n\t}", "@Override\n public void onFinish() {\n }", "public void enterBackground() {\n if (mRenderView != null && !(mRenderView instanceof SurfaceRenderView)) {\n removeView(mRenderView.getView());\n }\n }", "@Override\n public void Resume() {\n }", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void run() {\n MainActivity.this.finish();\n }", "@Override\n\t public void onPause(){\n\t\t super.onPause();\n\t\t finish();\n\t }" ]
[ "0.696375", "0.6932412", "0.6923684", "0.6767689", "0.67092973", "0.65600187", "0.6534845", "0.65208536", "0.64858836", "0.64247876", "0.6405329", "0.6224718", "0.61877656", "0.6162294", "0.6158664", "0.6150315", "0.61444515", "0.61294705", "0.6097706", "0.6096031", "0.60911876", "0.6086563", "0.60816795", "0.6079333", "0.60754263", "0.60723233", "0.6063411", "0.6035588", "0.6029763", "0.602318", "0.60172004", "0.60138345", "0.6011855", "0.60054606", "0.60045475", "0.59984463", "0.5976992", "0.59765536", "0.59753746", "0.5973432", "0.5970446", "0.5963155", "0.5949861", "0.59487015", "0.5947767", "0.59466195", "0.59466195", "0.59427345", "0.59334004", "0.5924931", "0.59161085", "0.59124875", "0.590582", "0.590582", "0.5897319", "0.5883256", "0.5878921", "0.5878921", "0.5878921", "0.5878921", "0.5871065", "0.58705634", "0.58566046", "0.58566046", "0.5854599", "0.5850362", "0.5845406", "0.58396447", "0.58372414", "0.58330894", "0.58280617", "0.58261216", "0.58247745", "0.5818982", "0.5818165", "0.58157164", "0.5810848", "0.5810437", "0.58093774", "0.5809374", "0.58046985", "0.58042425", "0.57987785", "0.5793524", "0.5791223", "0.5791085", "0.57876635", "0.5783771", "0.5782442", "0.5780203", "0.5777968", "0.5776042", "0.5774199", "0.5773164", "0.5772687", "0.5769736", "0.57692665", "0.57670325", "0.5766998", "0.5766253", "0.57625955" ]
0.0
-1
Set the listener to watch for value changes.
private static void bindPreferenceSummaryToValue(Preference preference) { preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener); // Trigger the listener immediately with the preference's // current value. sBindPreferenceSummaryToValueListener.onPreferenceChange(preference, PreferenceManager .getDefaultSharedPreferences(preference.getContext()) .getString(preference.getKey(), "")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onValueChange(final ChangeListener listener) {\n\t\tchangeListener = listener;\n\t\treturn;\n\t}", "public void addListener(ValueChangedListener listener) {\n\t\t_listenerManager.addListener(listener);\n\t}", "public void setChangeListener();", "public void setOnKnobValuesChangedListener (KnobValuesChangedListener l) {\r\n\t\tknobValuesChangedListener = l;\r\n\t}", "@Override\n\tpublic void addValueChangeListener(final ValueChangeListener<T> listener) {\n\t\t\n\t}", "public void setChangeListener(ChangeListener listener) {\n this.listener = listener;\n qs.addChangeListener(listener);\n }", "@Override\n public void addChangeListener(ChangeListener l) {}", "void addChangeListener(ChangeListener listener);", "public synchronized void addValueChangedListener(ValueChangedListener listener) {\n\t\tif (listener == null) {\n\t\t\tthrow new NullPointerException(\"Listener must not be null\"); \n\t\t}\n\t\tif (listeners == null) {\n\t\t\tlisteners = new ValueChangedListener[] { listener };\n\t\t} else {\n\t\t\tValueChangedListener[] tmp = new ValueChangedListener[listeners.length + 1];\n\t\t\tSystem.arraycopy(listeners, 0, tmp, 0, listeners.length);\n\t\t\ttmp[listeners.length] = listener;\n\t\t\tlisteners = tmp;\n\t\t}\n\t}", "public void observe(int val) {\n observe(val, 1);\n }", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "public void addListener(@NotNull ValueListener<V> listener) {\n\t\tif (valueListeners.contains(listener)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.valueListeners.add(listener);\n\t}", "public void setOnPropertyChangedListener(OnPropertyChangedListener l){\n _onPropertyChange = l;\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "void addCalcValueListener(CalcValueListener l);", "void addChangeListener(ChangeListener cl);", "void valueChanged(T oldValue, T newValue);", "private void setListener() {\n\t}", "public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }", "private static void usePropertyChangeListener() {\n SimpleStringProperty stringProperty = new SimpleStringProperty(\"xyz\");\n // Prints property's value\n System.out.println(stringProperty.getValue());\n // Adds a listener - action that will be run if property's value changes.\n stringProperty.addListener((observable, oldValue, newValue) -> {\n System.out.println(\"New value is set: \" + newValue);\n });\n // Sets new value\n stringProperty.setValue(\"Some new value\");\n }", "public void registerListener(SettingChangeListener<T> listener) {\n\t\tif (this.listeners == null) {\n\t\t\tthis.listeners = new ArrayList<>();\n\t\t}\n\t\tthis.listeners.add(listener);\n\t}", "void addListener(ChangeListener<? super T> listener);", "private void updateAndAlertListener() {\n\n\t\teditText.setText(getRoundedValue(value));\n\n\t\tif (changeListener != null) {\n\t\t\tchangeListener.onValueChange(this, value);\n\t\t}\n\t}", "void addChangeListener( RegistryListener listener );", "public void bind(ChangeListener listener) {\n mChangeObserver.add(listener);\n }", "public String listen(String key, PropertyChangedCallback callback);", "@SuppressWarnings(\"unused\")\n public void setOnRangeSeekBarChangeListener(OnRangeSeekBarChangeListener<T> listener) {\n this.listener = listener;\n }", "void setListener(Listener listener);", "@Override\n\tpublic void setListener() {\n\n\t}", "public interface ChangeListener {\n\t\tpublic void onValueChange(FloatPicker fpw, float value);\n\t}", "protected void valueChanged() {\r\n \t\tint newValue = slider.getSelection();\r\n \t\tint oldValue = this.intValue;\r\n \t\tintValue = newValue;\r\n \t\tjava.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(\r\n \t\t\t\tthis, IPropertyEditor.VALUE, oldValue, newValue);\r\n \t\tvalueChangeListener.valueChange(event);\r\n \t}", "private void AttachSetterListener(String setterId, ValueEventListener setterListener)\n {\n DatabaseReference userRef = FirebaseDatabase.getInstance().getReference().child(\"ascentusers\").child(setterId);\n userRef.child(\"DisplayName\").addListenerForSingleValueEvent(setterListener);\n }", "void addChangeListener(PropertyChangeListener<? super R> listener);", "@Override\r\n\tpublic void addListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.addListener(notifyChangedListener);\r\n\t}", "@Override\n public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n }", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "public void valueChanged(ConfigurationIdentifier configurationIdentifier, Serializable value);", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "@Override\n\tpublic void addListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.addListener(notifyChangedListener);\n\t}", "@Override\n\tpublic void addListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.addListener(notifyChangedListener);\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n if (changes == null)\n {\n changes = new PropertyChangeSupport(this);\n }\n changes.addPropertyChangeListener(listener);\n }", "public void addPropertyChangeListener(PropertyChangeListener listener);", "public interface OnValueChangeListener {\n void onChanged(String fieldName, Object oldValue, Object newValue);\n}", "@Override\n public void addListener(ChangeListener<? super String> listener) {\n }", "public void setValue(String value) {\n if(!watchedValue.equals(value)) {\n System.out.println(\"Value changed to new value: \"+value);\n watchedValue = value;\n\n // mark as value changed\n setChanged();\n // trigger notification with arguments\n notifyObservers(value);\n }\n }", "protected void giveValueToListeners(String value, MinMaxEvent evt) {\n for(int i = 0; i < listeners.size(); i++) {\n listeners.get(i).setValueOfNode(value, evt);\n }\n }", "public void addChangeListener(ChangeListener l) {\n repositoryStep.addChangeListener(l);\n }", "public void addChangeListener (ChangeListener listener)\n {\n listenerList.add(ChangeListener.class, listener);\n }", "public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n }", "void addPropertyChangeListener(PropertyChangeListener listener);", "public interface CalcValueListener {\n\n\t/**\n\t * Method notifies the implementing class that a value has changed.\n\t * \n\t * @param model\n\t * implementation of the CalcModel\n\t */\n\tvoid valueChanged(CalcModel model);\n}", "public void addChangeListener(ChangeListener listener)\r\n {\r\n listeners.add(listener);\r\n }", "public void listen(int UPDATE_VALUE){\n \tif(this.filterType.filter(UPDATE_VALUE)) {\n \t\tthis.setBNumber(this.getBNumber() + UPDATE_VALUE);\n \t}\n }", "public interface SettingListener<U> {\n void onSettingValueChanged(Setting setting, U value);\n}", "public void valueChanged(IntegerStorageChange change);", "public final void addChangeListener(ChangeListener l) {\n\t\tsynchronized (listeners) {\n\t\t\tlisteners.add(l);\n\t\t}\n\t}", "public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\tgetPropertyChange().addPropertyChangeListener(listener);\r\n}", "public void changed(cz.ive.messaging.Hook initiator) {\r\n value.value = FuzzyValueHolder.True;\r\n hook.unregisterListener(this);\r\n notifyListeners();\r\n }", "public void addPropertyChangeListener(PropertyChangeListener l);", "public void setWatcher(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localWatcherTracker = true;\r\n } else {\r\n localWatcherTracker = false;\r\n \r\n }\r\n \r\n this.localWatcher=param;\r\n \r\n\r\n }", "@Override\n public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n listeners = new PropertyChangeSupport(this);\n }\n listeners.addPropertyChangeListener(listener);\n }", "public void addCellValueListener(CellValueListener listener) {\n\t\tctx.getListenerList(sheetIndex).add(listener);\n\t}", "public void addPropertyChangeListener(@NotNull PropertyChangeListener listener) {\n }", "public void addChangeListener(ChangeListener listener) {\n\t\tchangeListeners.add(listener);\n\t}", "protected void installListeners() {\n spinner.addPropertyChangeListener(propertyChangeListener); }", "protected void fireValueChangedEvent(ValueChangedEvent event) {\n\t\tif (listeners != null) {\n\t\t\tfor (int i = 0; i < listeners.length; i++) { \n\t\t\t\tlisteners[i].valueChanged(event);\n\t\t\t}\n\t\t}\n\t}", "public void startListening(){\n\t\t// viewerFilter =\n\t\t// cv.getConfigurer().getControlFieldProvider().createFilter();\n\t\tcv.getConfigurer().getControlFieldProvider().addChangeListener(this);\n\t}", "public void addChangeListener(ChangeListener l) {\n\t\t//do nothing\n\t}", "@Override\n\tpublic Registration addValueChangeListener(ValueChangeListener<? super ValueChangeEvent<String>> listener) {\n\t\treturn null;\n\t}", "void onTimeUpdated(Consumer<Double> listener) {\n timeUpdatedListeners.add(listener);\n }", "@Override\n public void setValue(Object val) {\n synchronized (this) {\n attachDataListener();\n }\n try {\n dataModel.setValue(val);\n } catch (DataInputException ex) {\n onInputError(val, ex);\n }\n }", "void watchListenerData(int port, ListenerWatcher watcher) {\n }", "public void setOnSeekChangeListener(OnSeekChangeListener listener) {\n this.mSeekChangeListener = listener;\n }", "public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n\t}", "public void addChangeListener(ChangeListener<BufferedImage> listener) {\n observer.add(listener);\n }", "private void fireValueChange(boolean b) {\n \t\n\t\t\n\t}", "public void initializeRecorderListener() {\n\t\tsliderRecordedFileDuration.valueProperty().addListener(new InvalidationListener() {\n\t\t\tpublic void invalidated(Observable arg0) {\n\n\t\t\t\tif (sliderRecordedFileDuration.isPressed()) {\n\t\t\t\t\trecorderSliderPressed();\n\t\t\t\t\tcontroller.recorderTimerCancel();\n\t\t\t\t\tdouble currentPoint = sliderRecordedFileDuration.getValue();\n\t\t\t\t\tsliderRecordedFileDuration.setValue(currentPoint);\n\t\t\t\t\tcontroller.recorderPlayFromDesiredSec(currentPoint);\n\t\t\t\t\taudioFileProcessedTimeString = secondsToMinutesAndSeconds(sliderRecordedFileDuration.getValue());\n\t\t\t\t\ttextRecordFileDuration.setText(audioFileProcessedTimeString + \" / \" + audioFileDurationString);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void valueChange(ValueChangeEvent event) {\n\t\t\n\t}", "public void setListener(Listener listener) {\n this.mListener = listener;\n }", "public void setListener(Listener listener) {\n this.mListener = listener;\n }", "public static void setListener(QuadConsumer listener) {\n\t\t\n\t\tnotificationListener = listener;\n\t\t\n\t}", "public interface SettingsListener {\n void changed();\n}", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "@Override\n\tpublic void staticByActivityListener() {\n\t\tsb.setOnSeekBarChangeListener(this);\n\t}", "private void setUpListeners()\n {\n fromDatePicker.valueProperty().addListener((observable, oldValue, newValue) -> {\n if (newValue.isAfter(toDate))\n {\n showAlert(\"OOOPS!\", \"\\\"Från och med\\\" kan inte vara efter \\\"till och med\\\"\", Alert.AlertType.ERROR);\n fromDatePicker.setValue(oldValue);\n fromDate = oldValue;\n return;\n }\n fromDate = newValue;\n });\n\n // Set up listener to toDateSelectedValueProperty\n toDatePicker.valueProperty().addListener((observable, oldValue, newValue) -> {\n\n if (newValue.isBefore(fromDate))\n {\n showAlert(\"OOOPS!\", \"\\\"Tilloch med\\\" kan inte vara tidigare än \\\"från och med\\\"\", Alert.AlertType.ERROR);\n toDatePicker.setValue(oldValue);\n fromDate = oldValue;\n return;\n }\n toDate = newValue;\n });\n }", "public void addChangeListener(ChangeListener listener) {\n listenerList.add(ChangeListener.class, listener);\n }", "default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }", "public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\t\tgetPropertyChange().addPropertyChangeListener(listener);\n\t}", "public String listen(String key, Match keyMatchingRule, PropertyChangedCallback callback);", "protected final void fireChangeEvent() {\n\t\tIterator<ChangeListener> it;\n\t\tsynchronized (listeners) {\n\t\t\tit = new HashSet<ChangeListener>(listeners).iterator();\n\t\t}\n\t\tChangeEvent ev = new ChangeEvent(this);\n\t\twhile (it.hasNext()) {\n\t\t\tit.next().changed(ev);\n\t\t}\n\t}", "public interface OnSensorValueChangeListener {\n public void onSensorValueChanged(int newVal);\n}", "private void setListeners() {\n\n }", "public void addListener(PropertyChangeListener listener, String propertyType);", "public void setOnCheckedChangeListener(OnCheckedChangeListener listener) {\n onCheckedChangeListener = listener;\n }", "void valueChanged(CalcModel model);" ]
[ "0.7387643", "0.68382007", "0.68140167", "0.6793841", "0.67833054", "0.663912", "0.64783984", "0.6468164", "0.6338804", "0.63317376", "0.6330817", "0.6330817", "0.63253194", "0.6320923", "0.631575", "0.631575", "0.6306144", "0.6245242", "0.61341757", "0.613266", "0.6106095", "0.6066907", "0.60590625", "0.605883", "0.60323954", "0.60148245", "0.60048777", "0.59966487", "0.59883547", "0.5946865", "0.59328365", "0.59103346", "0.58754164", "0.5853846", "0.58265287", "0.58089703", "0.5799409", "0.5788387", "0.5788387", "0.5785348", "0.57812953", "0.57812953", "0.5770576", "0.5770576", "0.576217", "0.576217", "0.5760794", "0.5737141", "0.5733888", "0.5733548", "0.5729738", "0.57290316", "0.57262725", "0.57241726", "0.57150906", "0.5692505", "0.5690074", "0.56771606", "0.56687576", "0.56422144", "0.56414485", "0.5639788", "0.5623468", "0.5613068", "0.5608186", "0.5606435", "0.560156", "0.55829054", "0.5580602", "0.5578381", "0.55770004", "0.5572918", "0.5560527", "0.55573446", "0.55510044", "0.5546939", "0.55414844", "0.55253077", "0.5514446", "0.55118227", "0.55117744", "0.5500548", "0.54823375", "0.54651135", "0.54626197", "0.54626197", "0.5458834", "0.5458576", "0.54435956", "0.5442821", "0.5441058", "0.54373467", "0.5435885", "0.5433603", "0.5423508", "0.5407235", "0.5405803", "0.5402238", "0.54007876", "0.53933173", "0.53877705" ]
0.0
-1
Creates the deck with the specified number of decks
@Override public void createShoe(int ndecks) { Deck deck; for (int i = 0; i < ndecks; i++) { deck = new Deck(); this.cards.addAll(deck.getDeck()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildDeck(int numDecks) {\n for (int i = 0; i < numDecks; ++i) {\n for (int j = 1; j < 14; ++j) {\n deck.add(new Card(j, Suit.Clubs));\n deck.add(new Card(j, Suit.Hearts));\n deck.add(new Card(j, Suit.Diamonds));\n deck.add(new Card(j, Suit.Spades));\n }\n }\n }", "public void createDeck() {\n\t\t// for loop that repeats 4 times - one for each suit\n\t\tfor (String suit : suits) {\n\t\t\t// for loop that repeats 13 times (2-14) - once for each value\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\t//create instance of new card createCard(value, name);\n\t\t\t\tCard card = new Card(i, suit);\n\t\t\t\t//add card to deck array\n\t\t\t\taddCardToDeck(card);\n\t\t\t}\t\n\t\t}\n\t}", "public void createDecks(){\r\n\t\tfor (int j = 10; j < 20; j++){\r\n\t\t\taddCard(new Card(cardNames[j]));\r\n\t\t}\r\n\t}", "public void makeDeck()\r\n\t{\r\n\t\tfor (int i = 1; i < 5; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 2; j < 15; j++)\r\n\t\t\t{\r\n\t\t\t\tdeck.add(new Card(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Deck(int numDecks) {\n\t\t// Loop through number of decks, suits, and rank\n\t\tfor (int k = 0; k<numDecks; k++) {\n\t\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\t\tfor (int j = 1; j <= 13; j++) {\n\t\t\t\t\t// Add Card object to linked list\n\t\t\t\t\tdeck.add(new Card(i,j));\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void createCards(int n) {\n mController.createCards(n);\n }", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "public static Stack<int[]> createDeck() {\n\t\t// Populate deck with 4 suits, 13 cards each [RANK, SUIT]\n\t\tStack<int[]> deck = new Stack<int[]>();\n\t\tfor (int j = HEARTS; j <= SPADES; j++) {\n\t\t\tfor (int i = 1; i <= 13; i++) {\n\t\t\t\tint[] card = new int[] {i, j};\n\t\t\t\tdeck.push(card);\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(deck);\n\t\treturn deck;\n\t}", "public void buildDeck(){\n\t\tfor(int i = 0; i < deckSize; i++){\n\t\t\tdeck[i] = i;\n\t\t}\n\t}", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public Deck(int numPacks) {\n //Build the master pack.\n this.allocateMasterPack();\n //If the user wants more packs than are available, give them the max.\n if (numPacks > Deck.MAX_PACKS)\n this.init(Deck.MAX_PACKS);\n //If the user wants 0 or less packs, give them one.\n else if (numPacks < 1)\n this.init(1);\n else\n //Otherwise, build the deck with the specified number of packs.\n this.init(numPacks);\n }", "public VegasDeckClass(int numberOfDecks){\n createCards(VEGAS, numberOfDecks);\n this.vegasDeckCardList = getCardList();\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "@Override\n public void createDeck(){\n for (char suit:standardSuits) {\n for (Map.Entry<Character, Integer> item:deckCards.entrySet()) {\n Card card = new Card(item.getKey(),item.getValue(),suit);\n deckOfCards.add(card);\n }\n }\n }", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "private void buildDeck() {\r\n //Initialise size of deck and number of cards \r\n this.numOfCards = FIFTYTWO;\r\n //create new Deck Array \r\n this.deck = new ICard[this.numOfCards];\r\n //Creates Deck deck \r\n createDeck(Suit.values(), Rank.values());\r\n //shuffles deck \r\n shuffleCards(deck);\r\n\r\n }", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public Shoe(int numDecks) {\n\t\tthis.deckCount = numDecks;\n\t\tthis.numCards = deckCount * numDecks;\n\t\tif (numDecks >= minDecks) {\n\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Minimum decks is 4\");\n\t\t}\n\t\tCollections.shuffle(Shoe);\n\t}", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "public Deck () {\r\n int arrayPlace = 51;\r\n cardDeck = new Card [52];\r\n String [] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n for (int index = 0; index < suits.length; index++) {\r\n for (int i = 1; i < 14; i++) {\r\n cardDeck [arrayPlace] = new Card (i, suits[index]);\r\n arrayPlace--;\r\n }\r\n }\r\n }", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public stdDeck(){\n super();\n for(int i=1; i<14; i++){\n stdCard card = new stdCard(Suit.CLUBS, i);\n deck.add(card);\n card = new stdCard(Suit.DIAMONDS, i);\n deck.add(card);\n card = new stdCard(Suit.HEARTS, i);\n deck.add(card);\n card = new stdCard(Suit.SPADES, i);\n deck.add(card);\n }\n }", "public Shoe(int numDecks)\n {\n\n // this will construct the remaining decks.\n\n cardAry = new Card[numDecks*52];\n // create the cards ....\n for (int deckIdx=0; deckIdx<numDecks; deckIdx++)\n {\n for (int suit=0; suit<4; suit++) {\n for( int rank = 1; rank < 14; rank++) {\n cardAry[(deckIdx*52)+(suit*13+rank-1)] = new Card (Card.Suit.numToSuit(suit),\n rank);\n }\n }\n }\n this.numDecks = numDecks;\n this.numCards = 52*numDecks;\n }", "@Override\r\n public void fillDealerDeck(int numberOfCards, int deckPosition) {\r\n for (int i = 0; i < numberOfCards; i++) {\r\n this.dealer.addCard(deckPosition, new Card());\r\n }\r\n System.out.println(\"Deck filled\");\r\n }", "private Pile createDeck() {\n \t\tPile deck = new Pile(\"deck\"); // TODO Refactor, no hardcoded string\n\t\tpileNames.add(\"deck\");\n \t\tfor (Suit suit : Suit.values()) {\n \t\t\tfor (Rank rank : Rank.values()) {\n \t\t\t\tdeck.addCard(new Card(suit, rank));\n \t\t\t}\n \t\t}\n \t\t// Put the deck at the middle of the table\n \t\tmTable.set(MID_OF_TABLE, deck);\n \t\treturn deck;\n \t}", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "private List<Card> createDeck(){\n List<Card> newDeck= new ArrayList<Card>();\n for (int i =0;i<CardSet.ALL_CARDS.size(); ++i ) {\n newDeck.add(CardSet.ALL_CARDS.get(i));\n }\n return newDeck;\n }", "public void test(){\r\n int nCards = 52;\r\n Card deck[] = new Card[nCards];\r\n //for loop that iterates the size of nCards(52)\r\n for(int i = 0; i<nCards;i++){\r\n //create a new Card object, and set it equal to (i) print out the current card.\r\n deck[i] = new Card(i);\r\n System.out.print(deck[i].toString());\r\n }\r\n }", "public Deck(int deckSize,Suit suits[]){\r\n this.suits = suits;\r\n this.deckSize = deckSize;\r\n this.fillDeck();\r\n this.shuffle();\r\n }", "public SpoonsDeck() {\r\n\t deck = new ArrayList<SpoonsCard>();\r\n\t int cardCt = 0; // How many cards have been created so far.\r\n\t for ( int suit = 0; suit <= 3; suit++ ) {\r\n\t for ( int value = 2; value <= 14; value++ ) {\r\n\t \t deck.add(cardCt, new SpoonsCard(value,suit)); \r\n\t \t cardCt++;\r\n\t }\r\n\t \r\n\t }\r\n\t cardsUsed = 0;\r\n }", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "public PileOfCards(int numCards) {\n descriptors = CardFactory.getDescriptorKeySet();\n pile = new ArrayList<Card>(numCards);\n for(int i = 0; i < numCards; i++)\n pile.add(CardFactory.drawCard());\n }", "void makeDeck() {\n\t\t// start with an array of 1..28 for easy shuffling\n\t\tint[] cardValues = new int[28];\n\t\t// assign values from 1 to 28\n\t\tfor (int i=0; i < cardValues.length; i++) {\n\t\t\tcardValues[i] = i+1;\n\t\t}\n\n\t\t// shuffle the cards\n\t\tRandom randgen = new Random();\n\t\tfor (int i = 0; i < cardValues.length; i++) {\n\t\t\tint other = randgen.nextInt(28);\n\t\t\tint temp = cardValues[i];\n\t\t\tcardValues[i] = cardValues[other];\n\t\t\tcardValues[other] = temp;\n\t\t}\n\n\t\t// create a circular linked list from this deck and make deckRear point to its last node\n\t\tCardNode cn = new CardNode();\n\t\tcn.cardValue = cardValues[0];\n\t\tcn.next = cn;\n\t\tdeckRear = cn;\n\t\tfor (int i=1; i < cardValues.length; i++) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = cardValues[i];\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "private ArrayList<AbstractCard> createDeck(ArrayList<Event> allEvents, int deckSize) {\n\n ArrayList<AbstractCard> deck = new ArrayList<AbstractCard>();\n\n // If deck has less events than numOfEvents set numOfEvents to be the number of events in\n // the deck\n if (deckSize > allEvents.size()) {\n deckSize = allEvents.size();\n }\n\n for (int i = 0; deckSize > i; i++) {\n // Pick a random event and removes it from allEvents\n Random rand = new Random();\n int randomEventNum = rand.nextInt(allEvents.size());\n Event pickedEvent = allEvents.get(randomEventNum);\n allEvents.remove(randomEventNum);\n\n // Creates cards from pickedEvent and adds them to the decks array if the cards are valid\n pickedEvent.createCards();\n if (pickedEvent.getIsValid()) {\n deck.addAll(pickedEvent.getCards());\n }\n }\n return deck;\n }", "public Deck( Card c1, Card c2, Card c3, Card c4, Card c5, Card c6, Card c7, Card c8, Card c9,\n\t\t\t\t Card c10, Card c11, Card c12, Card c13, Card c14, Card c15, Card c16, Card c17, Card c18,\n\t\t\t\t Card c19, Card c20, Card c21, Card c22, Card c23, Card c24, Card c25, Card c26, Card c27, \n\t\t\t\t Card c28, Card c29, Card c30, Card c31, Card c32, Card c33, Card c34, Card c35, Card c36, \n\t\t\t\t Card c37, Card c38, Card c39, Card c40, Card c41, Card c42, Card c43, Card c44, Card c45, \n\t\t\t\t Card c46, Card c47, Card c48, Card c49, Card c50, Card c51, Card c52 ) \n\t{\n\t\tCard[] tempDeck = { c1, c2, c3, c4, c5, c6, c7, c8, c9,\n\t\t\t\t\t\t\tc10, c11, c12, c13, c14, c15, c16, c17, c18,\n\t\t\t\t\t\t\tc19, c20, c21, c22, c23, c24, c25, c26, c27,\n\t\t\t\t\t\t\tc28, c29, c30, c31, c32, c33, c34, c35, c36, c37,\n\t\t\t\t\t\t\tc38, c39, c40, c41, c42, c43, c44, c45, c46, \n\t\t\t\t\t\t\tc47, c48, c49, c50, c51, c52 };\n\t\t\n\t\tdeck = new Card[tempDeck.length];\n\t\t\n\t\tfor( int i = 0; i < tempDeck.length; i++ ) {\n\t\t\tdeck[i] = tempDeck[i];\n\t\t}\n\t}", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public void createFullDeck(){\n for(Suit cardSuit: Suit.values()){\n //iterating over all the values\n for(Value cardValue: Value.values()){\n cards.add(new Card(cardSuit,cardValue));\n }\n }\n }", "private void makeCards() {\n //make number cards(76 cards)\n for (int i = 0; i < 10; i++) {\n String s = i + \"\";\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n if(i > 0) {\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n }\n }\n\n //make wild cards(8 cards)⨁\n for (int i = 0; i < 4; i++) {\n cards.add(new WildCard(\"W\", Color.BLACK));\n cards.add(new WildDrawCard(\"W+4\", Color.BLACK));\n }\n\n //make reverse cards(8 cards)⤤⤦\n for (int i = 0; i < 2; i++) {\n cards.add(new ReverseCard(\"Rev\", Color.RED));\n cards.add(new ReverseCard(\"Rev\", Color.GREEN));\n cards.add(new ReverseCard(\"Rev\", Color.BLUE));\n cards.add(new ReverseCard(\"Rev\", Color.YELLOW));\n }\n\n //make draw cards(8 cards)⧉\n for (int i = 0; i < 2; i++) {\n cards.add(new Draw2Card(\"D+2\", Color.RED));\n cards.add(new Draw2Card(\"D+2\", Color.GREEN));\n cards.add(new Draw2Card(\"D+2\", Color.BLUE));\n cards.add(new Draw2Card(\"D+2\", Color.YELLOW));\n }\n\n //make skip cards(8 cards)🚫\n for (int i = 0; i < 2; i++) {\n cards.add(new SkipCard(\"Ski\", Color.RED));\n cards.add(new SkipCard(\"Ski\", Color.GREEN));\n cards.add(new SkipCard(\"Ski\", Color.BLUE));\n cards.add(new SkipCard(\"Ski\", Color.YELLOW));\n }\n //Shuffling cards list\n Collections.shuffle(cards);\n }", "public void generateDeck(){\n\t\tString type;\n\t\t//Randomize MAX_TILES number of Tile Objects\n\t\tfor(int i=0; i<GameInfo.MAX_TILES; i++){\n\t\t\ttype = GameInfo.allowedTiles[rg.nextInt(GameInfo.MAX_TYPES)];\n\t\t\tdeck.add(tf.create(type));\n\t\t}\n\t\tgenerated = true;\n\t}", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }", "public Card[] initialize(Card[] deck, int decks) {\n counter = 0;\n\n //Initialize the deck\n for (int i = 0; i < decks; i++) {\n for (int suit = 0; suit < 4; suit++) {\n for (int rank = 0; rank < 13; rank++) {\n cards[counter] = new Card(suit, rank, resolvePNG(suit, rank));\n counter++;\n }\n }\n }\n\n return deck;\n }", "public void createDeck(){\n //Does nothing because it will be overridden in the child classes.\n }", "public Deck( int copiesPerCard ) {\n if (copiesPerCard <= 0) {\n throw new IllegalArgumentException();\n }\n this.cards = new Card[STANDARD_DECK_SIZE * copiesPerCard];\n this.topCardIndex = 0;\n int DeckLength = this.cards.length;\n int cardIndex = 0;\n for (int copy = 1; copy <= copiesPerCard ; copy++ ) {\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public static int[] createShuffledDeck(){\n //create a deck\n int[] deck = new int[52];\n //make each item their respective index + 1 to avoid repetition\n for(int i = 0; i < deck.length; i++){\n deck[i] = i+1;\n }\n //shuffle deck\n shuffle(deck);\n return deck;\n }", "public void populateStandardDeck() {\n\n int deckSize = 52; // Standard 52 card deck\n\n // Remove any cards currently in deck\n while (!this.isEmpty()) {\n cards.pop();\n }\n\n // Set suit names\n String[] allSuits = {\"Diamonds\",\"Spades\",\"Hearts\",\"Clubs\"};\n\n // Begin adding cards\n for (int i = 0; i < allSuits.length; ++i) {\n String suit = allSuits[i];\n\n for (int j = 1; j < (deckSize/allSuits.length) + 1; ++j) {\n // Iterate through values\n String value = Integer.toString(j);\n switch (value) {\n case \"1\": value = \"Ace\"; break;\n case \"11\": value = \"Jack\"; break;\n case \"12\": value = \"Queen\"; break;\n case \"13\": value = \"King\"; break;\n }\n\n // Create new card and add to deck\n Card card = new Card(suit,value);\n addCard(card);\n }\n\n }\n }", "public void fillTreasureDeck() {\n\t\t// create 20 treasure cards\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tthis.addCard(new Card(\"The Earth Stone\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Ocean's Chalice\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Statue of the Wind\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Crystal of Fire\", CardType.TREASURE));\n\t\t}\n\n\t\t// create 3 helicopter lift cards\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tthis.addCard(new Card(\"Helicopter Lift\", CardType.HELI));\n\t\t}\n\n\t\t// create 2 sandbag cards\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tthis.addCard(new Card(\"Sandbag\", CardType.SANDBAG));\n\t\t}\n\n\t\t// create 3 water rise cards\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tthis.addCard(new Card(\"Water Rise\", CardType.WATER_RISE));\n\t\t}\n\t}", "public Deck makeComputerDeck()\r\n\t{\r\n\t\tDeck computer = new Deck();\r\n\r\n \tfor (int i = 0; i < (DECK_COUNT/2); i++)\r\n \t{\r\n \t computer.addToDeck(deck.remove(0));\r\n \t}\r\n\r\n\t\treturn computer;\r\n\t}", "private void createFullPackOfCards()\r\n {\r\n // Todo\r\n\r\n // Using a for-loop, add all the Card instances to cards.\r\n for ( int i = 0; i < NOOFCARDSINFULLPACK; i ++) {\r\n addTopCard( new Card(i));\r\n }\r\n }", "@Test\n public void create() {\n Deck deck = new DeckImplementation();\n assertEquals(\"Wrong initial deck size!\", 180,\n deck.numberOfCardsRemaining());\n deck.drawACard();\n assertEquals(\"Wrong size deck after draw!\", 179,\n deck.numberOfCardsRemaining());\n }", "private void generateNewCards()\n {\n // Set the card sets to be drafted from.\n setsForDraft = new ArrayList<>();\n setsForDraft.add(M19_CARD_TABLE);\n\n // Generates sealed pool and places in openedCardPool.\n drawPacksFromSets();\n\n // Initialize a selectedCardPool that is empty, for the user to move cards into when desired.\n selectedCardPool = new ArrayList<>();\n }", "private void createDeck() {\n FileReader reader = null;\n try {\n try {\n reader = new FileReader(deckInputFile);\n Scanner in = new Scanner(reader);\n \n // read the top line column names of the file\n // e.g. description, size, speed etc.\n String categories = in.nextLine();\n\n // loop through the file line by line, creating a card and adding to the deck\n while (in.hasNextLine()) {\n String values = in.nextLine();\n Card newCard = new Card(categories, values);\n deck.add(newCard);\n }\n } finally {\n if (reader != null) {\n reader.close();\n }\n }\n } catch (IOException e) {\n System.out.print(\"error\");\n }\n }", "Deck(byte decks, byte burn, byte times) \n \t{\n\t\tdeck = new ArrayList<Card>(); // Instantiate the ArrayList.\n\t \thowManyDecks = decks; // How many 52-card decks the deck should contain.\n\t \tshuffleTimes = times; // How many times to shuffle the deck\n\t \n\t \tfillDeck(); // Fill it with Cards.\n\t \tshuffleDeck(); //shuffle the deck \n\t \tburn(burn); // remove given amount of Cards from the top of the deck\n\t}", "@Override\r\n public void fillPlayerDeck(int numberOfCards, int playerPosition,\r\n int plDeckPosition) {\r\n for (int i = 0; i < numberOfCards; i++) {\r\n this.players.get(playerPosition).addCard(plDeckPosition, \r\n new Card());\r\n }\r\n }", "@Override\r\n public void allPlayersCreateDeck() {\r\n // Loop through all players and call createNewDeck\r\n for (int i = 0; i < this.players.size(); i++) {\r\n this.playerCreateNewDeck(i);\r\n }\r\n }", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "private void createDeckFromInput() {\n\n if(titleField.getText().isBlank()) {\n MainGUI.confirmDialog(\"Deckname cannot be blank\");\n return;\n }\n String deckName = titleField.getText();\n Deck deck = new Deck(deckName, 0,0,0,0,0);\n int deckID = DatabaseAPI.storeDeck(deck);\n DatabaseAPI.createUserDeckBridge(user.getId(), deckID);\n\n String[] tags = FormatData.formatHashtags(tagField.getText());\n for(String tag : tags) {\n if(!FormatData.isBlankString(tag)) {\n int tagID = DatabaseAPI.checkTag(tag);\n if(tagID != 0) {\n DatabaseAPI.createDeckTagBridge(deckID, tagID);\n } else {\n int newTagID = DatabaseAPI.storeTag(tag);\n DatabaseAPI.createDeckTagBridge(deckID, newTagID);\n }\n }\n }\n\n\n }", "public void createNew(int size);", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "private void initDecks() {\n\t\tDeck[] decks = new Deck[2];\n\t\tdecks[0] = charDeck;\n\t\tdecks[1] = mainDeck;\n\n\t\tfor (int i = 0; i < decks.length; i++) {\n\t\t\tDeck d = decks[i];\n\t\t\td.setNrOfShownCards(d.getDeckSize());\n\t\t\td.setShownLines(showLines);\n\t\t\td.setLineLength(lineLength);\n\t\t\td.setHandPosRelative(-21, -20);\n\t\t\td.reset();\n\t\t}\n\t}", "@Override\r\n public void fillDealerDeckPlayingCards(int deckPosition){\r\n\r\n for(int i = 0; i < 4; i ++){\r\n for(int j = 0; j < 13; j ++){\r\n this.dealer.addCard(deckPosition, new PlayingCard(i,j)); \r\n }\r\n }\r\n System.out.println(\"Deck Filled\");\r\n }", "@Override\r\n public void dealerCreateNewDeck() {\r\n this.dealer.createNewDeck();\r\n System.out.println(\"Dealer deck created\");\r\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "Pinochle(){\n createDeck();\n createDeck();\n this.originalSizeOfDeck = this.deckOfCards.size();\n }", "public void init(int numPacks) {\n //Initialize the cards array.\n this.cards = new Card[numPacks * Deck.MAX_CARDS_IN_PACK];\n //Until the total number of cards are reached, keep adding cards from the\n //master pack.\n for (int i = 0; i < numPacks * Deck.MAX_CARDS_IN_PACK; i++) {\n this.cards[i] = this.masterPack[i % Deck.MAX_CARDS_IN_PACK];\n }\n //Set the top card to the last card allocated.\n this.topCard = numPacks * Deck.MAX_CARDS_IN_PACK;\n }", "private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void makeDeck(ArrayList<Card> deck) throws FileNotFoundException {\n\t\t// make a Scanner inputFile and connect to file cards.txt\n\t\tScanner inputFile = new Scanner(BlackJackGame.class.getResourceAsStream(\"cards.txt\"));\n\n\t\t// while loop, as long as k<52 AND there is more info in file\n\n\t\t// read a char from the file, store in suit\n\n\t\t// read an int from the file, store in rank\n\n\t\t// make a Card temp a new Card with the suit and rank you read\n\n\t\t// assign temp to the next location in the deck array\n\n\t\t// add 1 to k for next time around\n\n\t\tint k = 0;\n\n\t\twhile (k < 52 && inputFile.hasNext()) {\n\t\t\tchar suit = inputFile.next().charAt(0);\n\t\t\tint rank = inputFile.nextInt();\n\t\t\tCard temp = new Card(suit, rank);\n\t\t\tdeck.add(temp);\n\t\t\tk++;\n\t\t}\n\t\tinputFile.close();\n\t}", "public Deck() {\n generateDeckOfCards();\n }", "public void getNewCards(int n) {\t\n\t\tif (n==0)\n\t\t\treturn;\n\t\tString cards = \"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tint val = (int)(Math.random() * 100 + 1);\n\t\t\tint nc = 0;\n\t\t\tString type = \"Common\";\n\t\t\tif (val <= 5) {\n\t\t\t\tnc++;\n\t\t\t\ttype = \"Legendary\";\n\t\t\t}\n\t\t\telse if(val<=20) {\n\t\t\t\tnc++;\n\t\t\t\ttype = \"Epic\";\n\t\t\t}\n\t\t\telse if(val<=50) {\n\t\t\t\tnc++;\n\t\t\t\ttype = \"Rare\";\n\t\t\t}\n\t\t\tif(i==n-1 && nc<1) {type = \"Rare\";}\n\t\t\tcards += ClientNetwork.getCardIDByRarityAddToUser(TitleScreen.UserID, type)+\"\\n\";\n\t\t}\n\t\tJOptionPane.showMessageDialog(null, \"You recieved the following cards from your pack:\\n\"+cards);\n\t}", "public Deck(boolean shuffle) {\n\t\t//52 cards\n\t\tthis.cardNumber = 52;\n\t\t//Total slots of 52 ARRAY\n\t\tthis.card = new Card[this.cardNumber];\n\t\t\n\t\t//location of the card\n\t\tint cardLocation= 0;\n\t\t\n\t\t// each suit\n\t\tfor(int suit = 0; suit < 4; suit++)\n\t\t{\n\t\t\t//each number in the deck\n\t\t\tfor(int num = 1; num <=13; num++)\n\t\t\t{\n\t\t\t\t// add a new card to the deck \n\t\t\t\tthis.card[cardLocation] = new Card(Suit.values()[suit],num);\n\t\t\t\tcardLocation++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Shuffling done\n\t\tif(shuffle == true)\n\t\t{\n\t\t\tthis.shuffle();\n\t\t}\n\t}", "public Shoe(Card.Suit suit, int numCards)\n \n { \n cardAry = new Card[numCards];\n\n int numSuits = numCards / 13;\n\n for(int deckIdx = 0; deckIdx<= numSuits; deckIdx++)\n {\n int cardsInSuit;\n if(deckIdx == numSuits)\n cardsInSuit = numCards % 13;\n else\n cardsInSuit = 13;\n for(int rankIdx = 1; rankIdx<=cardsInSuit; rankIdx++)\n {\n cardAry[deckIdx*13 + rankIdx-1] = new Card(suit, rankIdx);\n }\n }\n\n this.numDecks = 0;\n this.numCards = numCards;\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Deck() {\n cards = new LinkedList<Integer>();\n removedCards = new LinkedList<Integer>();\n \n int i, j;\n for (i = MIN_VALUE; i <= MAX_VALUE; i++) {\n for (j = 0; j <= NUM_SUITS; j++) {\n cards.add(i);\n }\n }\n }", "public void initChestDeck() {\n\t\tchestDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchestDeck.addCard(new Card(i + 16));\n\t\t}\n\t\t//makes cards random\n\t\tchestDeck.shuffle();\n\t}", "public static Group newDeck() {\n\t\tGroup g = new Group();\n\t\tfor (Suit s : Suit.values()) {\n\t\t\tfor (Rank r : Rank.values()) {\n\t\t\t\tCard c = new Card(r,s);\n\t\t\t\tg.add(c);\n\t\t\t}\n\t\t}\n\t\treturn g;\n\t}", "@Override\r\n public void playerCreateNewDeck(int playerPosition) {\r\n this.players.get(playerPosition).createNewDeck();\r\n System.out.println(\"Player \" + playerPosition + \" created new deck.\");\r\n }", "void makeDeck(Scanner scanner) \n\t\t\tthrows IOException {\n\t\tCardNode cn = null;\n\t\tif (scanner.hasNextInt()) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = scanner.nextInt();\n\t\t\tcn.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t\twhile (scanner.hasNextInt()) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = scanner.nextInt();\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "public GroupOfCards(int givenSize)\r\n {\r\n size = givenSize;\r\n }", "public void fill(){\n int i = 0;\n for (Suit suit:Suit.values()){\n for (Rank rank:Rank.values()) {\n deck[i] = new Card(rank, suit);\n numCards++;\n i++;\n }\n }\n }", "public static Deck buildStandardDeck() {\n final List<Card> cards = new ArrayList<>();\n for (final Rank rank : Rank.values()) {\n for (final Suite suite : Suite.values()) {\n cards.add(new Card(rank, suite));\n }\n }\n return new Deck(cards);\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "public static void main(String[] args) {\r\n\t\t/* *** TO BE IMPLEMENTED IN ACTIVITY 2 *** */\r\n\t\tfinal String[] ranks = {\"Ace\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\r\n\t\tfinal String[] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n\t\tfinal int[] pointValues = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10};\r\n\t\t\r\n\t\tDeck deck1 = new Deck(ranks, suits, pointValues);\r\n\t\tDeck deck2 = new Deck(ranks, suits, pointValues);\r\n\t\tDeck deck3 = new Deck(ranks, suits, pointValues);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(deck1.isEmpty());\r\n\t\tSystem.out.println(deck1.size());\r\n\t\tSystem.out.println(deck1.deal());\r\n\t\tSystem.out.println(deck1);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n\t\tfor (int counter = 0; counter < 10; counter++)\r\n\t\t{\r\n\t\t\tSystem.out.println(deck2.deal());\r\n\t\t}\r\n\t\tSystem.out.println(deck2.isEmpty());\r\n\t\tSystem.out.println(deck2);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n\t\twhile (!deck3.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(deck3.deal());\r\n\t\t}\r\n\t\tSystem.out.println(deck3.isEmpty());\r\n\t\tSystem.out.println(deck3);\r\n\t\t\r\n\t}", "public Dealer(int deckNum, HandCard handCard) {\n List<Deck> deckList = new ArrayList<>();\n for (int i = 0; i < deckNum; i++) {\n deckList.add(new Deck());\n }\n this.deckList = deckList;\n this.handCard = handCard;\n\n this.cardIterator = new CardIterator();\n }", "public void setChosenDeckNumber(int n){\n this.chosenDeckNumber = n;\n }", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public static void createCards(List<Cards> cardsList, String[] cardArray, String suitName) {\n\t\t\n\t\tfor(int i=0; i < cardArray.length; i++) {\n\t\t\tcardsList.add(new Cards(suitName,cardArray[i],i));\n\t\t}\n\t\t\n\t}", "public void buildCards(){\n\t\tfor(Suit suit: Suit.values()){\n\t\t\tfor(Face face: Face.values()){\n\t\t\t\tcards.add(new Card(face, suit));\n\t\t\t}\n\t\t}\n\t}", "public CardGameFramework( int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand)\n {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers )\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "private void initializeDeck() {\n drawPile.clear();\n\n for (ICard.Color color : ICard.Color.values()) {\n // Numbered cards\n drawPile.add(new NumberedCard(color, 0));\n for (int value = 1; value < 10; value++) {\n drawPile.add(new NumberedCard(color, value));\n drawPile.add(new NumberedCard(color, value));\n }\n\n // Special cards\n drawPile.add(new SkipCard(color));\n drawPile.add(new SkipCard(color));\n\n drawPile.add(new ReverseCard(color));\n drawPile.add(new ReverseCard(color));\n\n drawPile.add(new DrawTwoCard(color));\n drawPile.add(new DrawTwoCard(color));\n }\n\n for (int i = 0; i < 4; i++) {\n drawPile.add(new WildCard());\n drawPile.add(new WildFourCard());\n }\n }", "private void createCardDeck(FrameLayout deckPos) {\n // create drawables for normal cards BLUE\n /*Drawable blue_0 = this.appContext.getResources().getDrawable(R.drawable.blue_0);\n Drawable blue_1 = this.appContext.getResources().getDrawable(R.drawable.blue_1);\n Drawable blue_2 = this.appContext.getResources().getDrawable(R.drawable.blue_2);\n Drawable blue_3 = this.appContext.getResources().getDrawable(R.drawable.blue_3);\n Drawable blue_4 = this.appContext.getResources().getDrawable(R.drawable.blue_4);\n Drawable blue_5 = this.appContext.getResources().getDrawable(R.drawable.blue_5);\n Drawable blue_6 = this.appContext.getResources().getDrawable(R.drawable.blue_6);\n Drawable blue_7 = this.appContext.getResources().getDrawable(R.drawable.blue_7);\n Drawable blue_8 = this.appContext.getResources().getDrawable(R.drawable.blue_8);\n Drawable blue_9 = this.appContext.getResources().getDrawable(R.drawable.blue_9);\n // create drawables for special cards BLUE\n Drawable blue_skip = this.appContext.getResources().getDrawable(R.drawable.blue_skip);\n Drawable blue_plus2 = this.appContext.getResources().getDrawable(R.drawable.blue_plus2);\n Drawable blue_turn = this.appContext.getResources().getDrawable(R.drawable.blue_turn);\n\n // create drawables for normal cards RED\n Drawable red_0 = this.appContext.getResources().getDrawable(R.drawable.red_0);\n Drawable red_1 = this.appContext.getResources().getDrawable(R.drawable.red_1);\n Drawable red_2 = this.appContext.getResources().getDrawable(R.drawable.red_2);\n Drawable red_3 = this.appContext.getResources().getDrawable(R.drawable.red_3);\n Drawable red_4 = this.appContext.getResources().getDrawable(R.drawable.red_4);\n Drawable red_5 = this.appContext.getResources().getDrawable(R.drawable.red_5);\n Drawable red_6 = this.appContext.getResources().getDrawable(R.drawable.red_6);\n Drawable red_7 = this.appContext.getResources().getDrawable(R.drawable.red_7);\n Drawable red_8 = this.appContext.getResources().getDrawable(R.drawable.red_8);\n Drawable red_9 = this.appContext.getResources().getDrawable(R.drawable.red_9);\n // create drawables for special cards red\n Drawable red_skip = this.appContext.getResources().getDrawable(R.drawable.red_skip);\n Drawable red_plus2 = this.appContext.getResources().getDrawable(R.drawable.red_plus2);\n Drawable red_turn = this.appContext.getResources().getDrawable(R.drawable.red_turn);\n\n // create drawables for normal cards GREEN\n Drawable green_0 = this.appContext.getResources().getDrawable(R.drawable.green_0);\n Drawable green_1 = this.appContext.getResources().getDrawable(R.drawable.green_1);\n Drawable green_2 = this.appContext.getResources().getDrawable(R.drawable.green_2);\n Drawable green_3 = this.appContext.getResources().getDrawable(R.drawable.green_3);\n Drawable green_4 = this.appContext.getResources().getDrawable(R.drawable.green_4);\n Drawable green_5 = this.appContext.getResources().getDrawable(R.drawable.green_5);\n Drawable green_6 = this.appContext.getResources().getDrawable(R.drawable.green_6);\n Drawable green_7 = this.appContext.getResources().getDrawable(R.drawable.green_7);\n Drawable green_8 = this.appContext.getResources().getDrawable(R.drawable.green_8);\n Drawable green_9 = this.appContext.getResources().getDrawable(R.drawable.green_9);\n // create drawables for special cards GREEN\n Drawable green_skip = this.appContext.getResources().getDrawable(R.drawable.green_skip);\n Drawable green_plus2 = this.appContext.getResources().getDrawable(R.drawable.green_plus2);\n Drawable green_turn = this.appContext.getResources().getDrawable(R.drawable.green_turn);\n\n // create drawables for normal cards YELLOW\n Drawable yellow_0 = this.appContext.getResources().getDrawable(R.drawable.yellow_0);\n Drawable yellow_1 = this.appContext.getResources().getDrawable(R.drawable.yellow_1);\n Drawable yellow_2 = this.appContext.getResources().getDrawable(R.drawable.yellow_2);\n Drawable yellow_3 = this.appContext.getResources().getDrawable(R.drawable.yellow_3);\n Drawable yellow_4 = this.appContext.getResources().getDrawable(R.drawable.yellow_4);\n Drawable yellow_5 = this.appContext.getResources().getDrawable(R.drawable.yellow_5);\n Drawable yellow_6 = this.appContext.getResources().getDrawable(R.drawable.yellow_6);\n Drawable yellow_7 = this.appContext.getResources().getDrawable(R.drawable.yellow_7);\n Drawable yellow_8 = this.appContext.getResources().getDrawable(R.drawable.yellow_8);\n Drawable yellow_9 = this.appContext.getResources().getDrawable(R.drawable.yellow_9);\n // create drawables for special cards YELLOW\n Drawable yellow_skip = this.appContext.getResources().getDrawable(R.drawable.yellow_skip);\n Drawable yellow_plus2 = this.appContext.getResources().getDrawable(R.drawable.yellow_plus2);\n Drawable yellow_turn = this.appContext.getResources().getDrawable(R.drawable.yellow_turn);\n\n // create drawables for special cards & backside\n Drawable color_change = this.appContext.getResources().getDrawable(R.drawable.color_change);\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);*/\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n\n\n // blue\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_0), card_back, \"Blue 0\", \"\", \"0\", \"Blue\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_1), card_back, \"Blue 1\", \"\", \"1\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_2), card_back, \"Blue 2\", \"\", \"2\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_3), card_back, \"Blue 3\", \"\", \"3\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_4), card_back, \"Blue 4\", \"\", \"4\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_5), card_back, \"Blue 5\", \"\", \"5\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_6), card_back, \"Blue 6\", \"\", \"6\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_7), card_back, \"Blue 7\", \"\", \"7\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_8), card_back, \"Blue 8\", \"\", \"8\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_9), card_back, \"Blue 9\", \"\", \"9\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_skip), card_back, \"Blue Skip\", \"\", \"SKIP\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_turn), card_back, \"Blue Turn\", \"\", \"TURN\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_plus2), card_back, \"Blue Plus 2\", \"\", \"PLUS 2\", \"Blue\"));\n }\n\n // red\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_0), card_back, \"red 0\", \"\", \"0\", \"Red\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_1), card_back, \"Red 1\", \"\", \"1\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_2), card_back, \"Red 2\", \"\", \"2\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_3), card_back, \"Red 3\", \"\", \"3\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_4), card_back, \"Red 4\", \"\", \"4\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_5), card_back, \"Red 5\", \"\", \"5\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_6), card_back, \"Red 6\", \"\", \"6\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_7), card_back, \"Red 7\", \"\", \"7\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_8), card_back, \"Red 8\", \"\", \"8\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_9), card_back, \"Red 9\", \"\", \"9\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_skip), card_back, \"Red Skip\", \"\", \"SKIP\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_turn), card_back, \"Red Turn\", \"\", \"TURN\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_plus2), card_back, \"Red Plus 2\", \"\", \"PLUS 2\", \"Red\"));\n }\n\n // green\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_0), card_back, \"Green 0\", \"\", \"0\", \"Green\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_1), card_back, \"Green 1\", \"\", \"1\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_2), card_back, \"Green 2\", \"\", \"2\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_3), card_back, \"Green 3\", \"\", \"3\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_4), card_back, \"Green 4\", \"\", \"4\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_5), card_back, \"Green 5\", \"\", \"5\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_6), card_back, \"Green 6\", \"\", \"6\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_7), card_back, \"Green 7\", \"\", \"7\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_8), card_back, \"Green 8\", \"\", \"8\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_9), card_back, \"Green 9\", \"\", \"9\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_skip), card_back, \"Green Skip\", \"\", \"SKIP\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_turn), card_back, \"Green Turn\", \"\", \"TURN\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_plus2), card_back, \"Green Plus 2\", \"\", \"PLUS 2\", \"Green\"));\n }\n\n // yellow\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_0), card_back, \"Yellow 0\", \"\", \"0\", \"Yellow\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_1), card_back, \"Yellow 1\", \"\", \"1\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_2), card_back, \"Yellow 2\", \"\", \"2\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_3), card_back, \"Yellow 3\", \"\", \"3\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_4), card_back, \"Yellow 4\", \"\", \"4\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_5), card_back, \"Yellow 5\", \"\", \"5\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_6), card_back, \"Yellow 6\", \"\", \"6\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_7), card_back, \"Yellow 7\", \"\", \"7\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_8), card_back, \"Yellow 8\", \"\", \"8\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_9), card_back, \"Yellow 9\", \"\", \"9\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_skip), card_back, \"Yellow Skip\", \"\", \"SKIP\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_turn), card_back, \"Yellow Turn\", \"\", \"TURN\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_plus2), card_back, \"Yellow Plus 2\", \"\", \"PLUS 2\", \"Yellow\"));\n }\n\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n\n // LOGGING ONLY\n Toast.makeText(this.appContext, \"CardDeck created. Size=\" + this.cards.size(), Toast.LENGTH_LONG).show();\n this.mixDeck();\n // mix it !\n Tools.showToast(\"CardDeck mixed.\", Toast.LENGTH_SHORT);\n }", "public static void main(String[] args) {\nArrayList<PlayingCard>deck=new ArrayList();\r\n\r\nint count=0;\r\n\r\nfor(int suit=1;suit<=4;suit++) {\r\n\tfor(int value=1;value<=13;value++) {\r\n\t\tPlayingCard pc=new PlayingCard(value,suit);\r\n\t\tdeck.add(pc);\r\n\t\tcount++;\r\n\t}\r\n}\r\n\r\nfor(PlayingCard pc:deck) {\r\n\tSystem.out.println(pc);\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t}" ]
[ "0.79922485", "0.79167485", "0.7886422", "0.76493293", "0.7584557", "0.7266947", "0.7156782", "0.7152926", "0.71057737", "0.7058875", "0.7001999", "0.69405943", "0.6939166", "0.6923349", "0.6903831", "0.6852141", "0.68394256", "0.6806678", "0.6799581", "0.6789631", "0.67648506", "0.67469376", "0.67417395", "0.6741278", "0.672631", "0.6713492", "0.6691452", "0.6677526", "0.66058815", "0.6585098", "0.6492822", "0.64697176", "0.64662534", "0.6404502", "0.64041656", "0.6400391", "0.63847077", "0.6375146", "0.6361883", "0.63222986", "0.6312913", "0.62882096", "0.62821245", "0.6247048", "0.62401885", "0.62334925", "0.62303936", "0.62269384", "0.6225449", "0.6222513", "0.62015045", "0.6195268", "0.6186491", "0.6171292", "0.61649567", "0.61605597", "0.61182123", "0.61110115", "0.6107375", "0.61006206", "0.60874116", "0.60777444", "0.607669", "0.60643566", "0.60518765", "0.6049018", "0.6031975", "0.60156465", "0.60147303", "0.60021436", "0.6001823", "0.5997554", "0.5961788", "0.5960003", "0.594945", "0.59441614", "0.5938013", "0.5922047", "0.59209913", "0.5918279", "0.59124607", "0.5903847", "0.59010184", "0.5883478", "0.58579385", "0.58508843", "0.5831095", "0.5827415", "0.5798993", "0.5795502", "0.5777574", "0.577009", "0.57680696", "0.57633305", "0.5762508", "0.573901", "0.5732037", "0.57299894", "0.5726473", "0.5700767" ]
0.75894696
4
Creates the shoe from file
@Override public void createShoeFromFile(String fileName) { File file = new File(fileName); Scanner myReader = null; try { myReader = new Scanner(file); } catch (FileNotFoundException e) { e.printStackTrace(); } while (myReader.hasNextLine()) { String rankStr = ""; Rank rank; rank = Rank.ACE; String suit = ""; // The cards are separated by spaces in the file // Splits next line of the file into chunks containing each Card of the Shoe // Iterates over each card for (String data : myReader.nextLine().split(" ")) { int len = data.length(); if(data.length() == 3){ rankStr = ""; suit = ""; rankStr += String.valueOf(data.charAt(0)); rankStr += String.valueOf(data.charAt(1)); //1 char suit suit = String.valueOf(data.charAt(2)); this.cards.add(new Card( Suit.valueOf(suit), rank.getRank(rankStr), true)); }else if(data.length() == 2){ rankStr = ""; suit = ""; rankStr = String.valueOf(data.charAt(0)); suit = String.valueOf(data.charAt(1)); this.cards.add(new Card(Suit.valueOf(suit), rank.getRank(rankStr), true)); }else if(data.length() == 0){ return; }else{ System.out.println("Error reading card."); System.exit(0); } } } myReader.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void createSprites() throws FileNotFoundException;", "@SuppressWarnings(\"resource\")\n\tpublic void setPieces(String filename) throws IOException\n {\n\tString[] colors = new String[11]; //array containing the colors of the pieces\n\tcolors[0] = \"Red\";\n\tcolors[1] = \"Orange\";\n\tcolors[2] = \"Yellow\";\n\tcolors[3] = \"Green\";\n\tcolors[4] = \"Teal\";\n\tcolors[5] = \"Sky\";\n\tcolors[6] = \"Azure\";\n\tcolors[7] = \"Blue\";\n\tcolors[8] = \"Pink1\";\n\tcolors[9] = \"Pink2\";\n\tcolors[10] = \"Violet\";\n\n\tFileReader file = new FileReader(filename);\n\tScanner stringIn = new Scanner(file);\n\tString[] temp_pieces = new String[11]; \n\tint index = 0;\n\twhile(stringIn.hasNext())\n\t {\n\t\ttemp_pieces[index] = stringIn.nextLine(); \n\t\tindex++;\n\t }\n\n\tpieces = new Piece[11];\n\tunused = new Piece[11];\n\tfor(int i=0;i<temp_pieces.length;i++)\n\t {\n\t\tPiece temp = new Piece(temp_pieces[i],colors[i]); //creates new pieces from the temp array\n\t\tpieces[i] = temp;\n\t\tunused[i] = temp;\n\t\t}\n }", "@Override\r\n\tpublic void createBoardWithFile(Board board) {\n\t\t\r\n\t}", "public ShapeFile(java.io.File file) throws Exception {\n if (!file.exists() || !file.isFile()) throw new IllegalArgumentException(\"Invalid file\");\n\n String ext = getExtension(file).toLowerCase();\n if (ext.equals(\"dbf\")){\n dbf = file;\n shp = getFile(file, \"shp\");\n shx = getFile(file, \"shx\");\n }\n else if (ext.equals(\"shp\")){\n shp = file;\n dbf = getFile(file, \"dbf\");\n shx = getFile(file, \"shx\");\n }\n else if (ext.equals(\"shx\")){\n shx = file;\n shp = getFile(file, \"shp\");\n dbf = getFile(file, \"dbf\");\n }\n\n //Parse index\n ShxInputStream shxInputStream = new ShxInputStream(new FileInputStream(shx));\n int[][] index = shxInputStream.getIndex();\n numShapes = index[1].length;\n shxInputStream.close();\n }", "Stone create();", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public void generate(File file) throws IOException;", "private List<String> generateSquareStructureFromFile(String path) {\n Scanner scanner;\n List<String> readInput;\n InputStream inputStream = getClass().getResourceAsStream(path);\n scanner = new Scanner(inputStream);\n readInput = new ArrayList<>();\n\n while (scanner.hasNextLine()) {\n readInput.add(scanner.nextLine());\n }\n scanner.close();\n\n roomsToBuild = new ArrayList<>();\n squares = new ArrayList<>();\n spawnPoints = new ArrayList<>();\n for(int i = 0; i<readInput.size(); i++){\n if(i%2 == 0)\n squares.add(new ArrayList<>());\n }\n\n int row = 0;\n int col;\n char c;\n String s;\n while(row < readInput.size()){\n col = 0;\n while(col < readInput.get(row).length()){\n c = readInput.get(row).charAt(col);\n s = String.valueOf(c).toLowerCase();\n\n if(c=='R'||c=='B'||c=='Y'||c=='G'||c=='W'||c=='P') {\n SpawnPoint tempSquare = new SpawnPoint(row/2, col/2, Color.fromString(s));\n squares.get(row/2).add(tempSquare);\n spawnPoints.add(tempSquare);\n if(!roomsToBuild.contains(Color.fromString(s)))\n roomsToBuild.add(Color.fromString(s));\n }\n else if(c=='r'||c=='b'||c=='y'||c=='g'||c=='w'||c=='p'){\n squares.get(row/2).add(new Square(row/2, col/2, Color.fromString(s)));\n if(!roomsToBuild.contains(Color.fromString(s)))\n roomsToBuild.add(Color.fromString(s));\n }\n else if(c==' ' && row%2==0 && col%2==0){\n squares.get(row/2).add(null);\n }\n //update max\n if(row/2 + 1> numRow)\n numRow = row/2 + 1;\n if(col/2 + 1> numCol)\n numCol = col/2 + 1;\n col++;\n }\n row++;\n }\n\n return readInput;\n\n }", "private void createDeck() {\n FileReader reader = null;\n try {\n try {\n reader = new FileReader(deckInputFile);\n Scanner in = new Scanner(reader);\n \n // read the top line column names of the file\n // e.g. description, size, speed etc.\n String categories = in.nextLine();\n\n // loop through the file line by line, creating a card and adding to the deck\n while (in.hasNextLine()) {\n String values = in.nextLine();\n Card newCard = new Card(categories, values);\n deck.add(newCard);\n }\n } finally {\n if (reader != null) {\n reader.close();\n }\n }\n } catch (IOException e) {\n System.out.print(\"error\");\n }\n }", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "public static void generateFile(\n String[] movies, int firstHeight, int firstWidth, int secondHeight, int secondWidth\n ) {\n try {\n File seatsStateFile = new File(\"seats_state.txt\");\n FileWriter fileWriter = new FileWriter(seatsStateFile, true);\n\n for (int i = 0; i < movies.length; i++) {\n fileWriter.write(movies[i] + \" {\\n\");\n System.out.println(\"wrote: \" + movies[i]);\n\n for (int j = 0; j < firstHeight; j++) {\n for (int k = 0; k < firstWidth; k++) {\n fileWriter.write(\"\\t\" + 0 + \" \");\n }\n fileWriter.write(\"\\n\");\n }\n\n fileWriter.write(\"\\t---\\n\");\n\n for (int j = 0; j < secondHeight; j++) {\n for (int k = 0; k < secondWidth; k++) {\n fileWriter.write(\"\\t\" + 0 + \" \");\n }\n fileWriter.write(\"\\n\");\n }\n\n fileWriter.write(\"}\\n\\n\");\n }\n\n fileWriter.flush();\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private Node createFromSpeciesFile(String[] line, String alias1, Node parent, int cnt, double bl){\n\t\t String name = line[1];\n\t\t String[] names = name.split(\"\\\\|\");\n\t\t \n\t\t if(names.length>3 && names[3].startsWith(\"NC\")) name = names[3];\n\t\t Node n = new SimpleNode(name,bl);\n\t\t Identifier id = n.getIdentifier();\n\t\t Identifier pid = parent.getIdentifier();\n\t\t String prefix = ((String)pid.getAttribute(\"prefix\"));\n\t\t if(parent.isRoot()) prefix = prefix+\"+-\";\n\t\t id.setAttribute(\"level\",((Integer) pid.getAttribute(\"level\"))+2);\n\t\t id.setAttribute(\"prefix\", \" | \"+prefix);\n\t\t id.setAttribute(\"alias\", line[0]);\n\t\t id.setAttribute(\"alias1\", alias1);\n\t\t id.setAttribute(\"speciesIndex\", cnt);\n\t\t String css =(String) pid.getAttribute(\"css\");\n\t\t if(css!=null){\n\t\t\t id.setAttribute(\"css\", css);\n\t\t }\n\t\t parent.addChild(n);\n\t\t this.putSlug(n);\n\t\t return n;\n\t }", "public void loadSaveGameFromFile(File file) {\r\n\t\t//TODO\r\n\t}", "public Shot(int damage, int dx, int dy, Point position, String imageFile) {\n setTouchBehaviour(new HurtShip(damage));\n setDx(dx);\n setDy(dy);\n loadImageFrom(imageFile);\n setPosition(position);\n }", "public static void buildShapesFromFile(String fileName, Shape [] cArray, Shape [] sArray , Shape [] rArray , Shape [] pArray, Shape [] tArray) {\n\r\n\t String path = System.getProperty(\"user.dir\");\r\n\t Shape sp = null; //buffer shape used to append into arrays from file\r\n\t String s; //holds line in file\r\n\r\n\t //try (BufferedReader br = new BufferedReader(new FileReader(\"./Root/\" + fileName))) { // code board\r\n\t // if you run locally on your environment use: new FileReader(path + \"/src/\" + fileName)\r\n\t \r\n\t try (BufferedReader br = new BufferedReader(new FileReader(path + \"/src/package1/\" + fileName))) {\r\n\t \t \r\n int circleIndex = 0;//Stores current available array index & used to count successful shapes created\r\n int squareIndex = 0;\r\n int rectangleIndex = 0;\r\n int parallelogramIndex = 0;\r\n int triangleIndex = 0;\r\n int badLine = 0;\r\n int badShape = 0;\r\n \r\n\t while ((s = br.readLine()) != null) {\r\n\t \t //System.out.println(s); //prints file contents for testing\r\n\t String[] tok = s.split(\",\"); //Split string \"s\" into tok string array using \",\" as delimiter\r\n\t \r\n\t // Second tryblock used to prevent entire method from terminating upon a single invalid line\r\n\t // Could replace second tryblock by catching exceptions within shape constructor instead, but wanted specify practice\r\n\t try{ \r\n\t\t switch(tok[0]){\r\n\t\t \r\n\t\t case \"Circle\": \r\n\t\t sp = new Circle( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t cArray[circleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(cArray[circleIndex]); //print recently appended shape\r\n\t\t circleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Square\": \r\n\t\t sp = new Square( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t sArray[squareIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(sArray[squareIndex]); //print recently appended shape\r\n\t\t squareIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Rectangle\": \r\n\t\t sp = new Rectangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t rArray[rectangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(rArray[rectangleIndex]); //print recently appended shape\r\n\t\t rectangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Parallelogram\":\r\n\t\t sp = new Parallelogram( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t pArray[parallelogramIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(pArray[parallelogramIndex]); //print recently appended shape\r\n\t\t parallelogramIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Triangle\":\r\n\t\t sp = new Triangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]), Double.parseDouble(tok[3]) ); //create shape\r\n\t\t tArray[triangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(tArray[triangleIndex]); //print recently appended shape\r\n\t\t triangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t default: System.out.println(tok[0] + \" is not a valid shape\");\r\n\t\t \t \t\tbadShape++;\r\n\t\t break; \r\n\t\t }//End of Switch(tok[0])\r\n\t\t \r\n\t\t //prevent entire method from terminating by just reporting a bad line \r\n\t }catch(IllegalArgumentException e){\r\n\t \t badLine++;\r\n\t \t System.out.println(e.getMessage()); \r\n\t }\r\n\t \r\n\t }//While there are lines still being read \r\n\t \r\n\t System.out.println(\"Number of Circle's Created: \" + circleIndex);\r\n\t System.out.println(\"Number of Square's Created: \" + squareIndex);\r\n\t System.out.println(\"Number of Retangle's Created: \" + rectangleIndex);\r\n\t System.out.println(\"Number of Parallelogram's Created: \" + parallelogramIndex);\r\n\t System.out.println(\"Number of Triangle's Created: \" + triangleIndex);\r\n\t System.out.println(\"Number of Incorrect Arguments : \" + badLine);\r\n\t System.out.println(\"Number of Incorrect Shapes : \" + badShape);\r\n\t \r\n\t //catch exceptions related to BufferedReader and FileReader\r\n\t } catch (IOException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\r\n\t //void return\r\n\t}", "private void loadInventory(String fileName){\t\t\r\n\t\tList<String> list = new ArrayList<String>();\r\n\r\n\t\ttry (Stream<String> stream = Files.lines(Paths.get(fileName))) {\r\n\t\t\t//Convert it into a List\r\n\t\t\tlist = stream.collect(Collectors.toList());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String itemList : list){\r\n\t\t\tString[] elements = itemList.split(\"--\");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tswitch(elements[0].toUpperCase()){\r\n\t\t\t\t\tcase \"BURGER\":\r\n\t\t\t\t\t\t\tinventory.add(createBurger(elements));;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"SALAD\":\r\n\t\t\t\t\t\t\tinventory.add(createSalad(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"BEVERAGE\":\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createBeverage(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"SIDE\":\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createSide(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"DESSERT\":\r\n\t\t\t\t\t\t\tinventory.add(createDessert(elements));;\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "private void fixInventory(FileInputStream fis, FileOutputStream fos) throws FileNotFoundException, IOException, Exception {\n\t\tint numberOfRecord = this.getNumberOfLines(INPUT_FILE_NAME);\n\t\tif (numberOfRecord == 0 || numberOfRecord == 1) {\n\t\t\tSystem.out.println(\"The \" + INPUT_FILE_NAME + \" is empty or only has one record. The program would do nothing and terminate.\");\n\t\t} else {\n\t\t\twsArr = new Warship[numberOfRecord];\n\t\t\tthis.readFileToArray(fis, wsArr);\n\t\t\tthis.correctSerialNumber();\n\t\t\tthis.writeArrayToFile(wsArr, fos);\n\t\t}\n\t}", "public Shot(int damage, Point position, String imageFile) {\n this(damage, 0, 0, position, imageFile);\n }", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public void createCards(String fileWorker, String fileBuilder, String fileMachine) {\n\t\tint id = 0;\n\t\ttry{\n\t\t\tFileReader file = new FileReader (fileWorker);\n\t\t\tScanner in = new Scanner(file);\n\t\t\twhile(in.hasNext()) {\n\t\t\t\tid++;\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tline.trim();\n\t\t\t\tScanner scan = new Scanner(line).useDelimiter(\";\");\n\t\t\t\tString name = scan.next();\n\t\t\t\tint cost = scan.nextInt();\n\t\t\t\tint stone = scan.nextInt();\n\t\t\t\tint wood = scan.nextInt();\n\t\t\t\tint knowledge = scan.nextInt();\n\t\t\t\tint tiles = scan.nextInt();\n\t\t\t\tthis.worker.add(new Worker(id, name, cost, stone, wood, knowledge, tiles));\n\t\t\t}\n\t\t\tin.close();\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tSystem.out.println(fileWorker + \" not found\");\n\t\t}\n\n\t\ttry{\n\t\t\tFileReader file = new FileReader (fileBuilder);\n\t\t\tScanner in = new Scanner(file);\n\t\t\twhile (in.hasNext()) {\n\t\t\t\tid++;\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tline.trim();\n\t\t\t\tScanner scan = new Scanner(line).useDelimiter(\";\");\n\t\t\t\tString name = scan.next();\n\t\t\t\tint cost = scan.nextInt();\n\t\t\t\tint point = scan.nextInt();\n\t\t\t\tint stone = scan.nextInt();\n\t\t\t\tint wood = scan.nextInt();\n\t\t\t\tint knowledge = scan.nextInt();\n\t\t\t\tint tiles = scan.nextInt();\n\t\t\t\tthis.building.add(new Building(id, name, cost, point, stone, wood, knowledge, tiles));\n\t\t\t}\n\t\t\tin.close();\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tSystem.out.println(fileBuilder + \" not found\");\n\t\t}\n\n\t\ttry{\n\t\t\tFileReader file = new FileReader (fileMachine);\n\t\t\tScanner in = new Scanner(file);\n\t\t\twhile (in.hasNextLine()) {\n\t\t\t\tid++;\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tline.trim();\n\t\t\t\tScanner scan = new Scanner(line).useDelimiter(\";\");\n\t\t\t\tString name = scan.next().trim();\n\t\t\t\tint stoneProd = scan.nextInt();\n\t\t\t\tint woodProd = scan.nextInt();\n\t\t\t\tint knowledgeProd = scan.nextInt();\n\t\t\t\tint tileProd = scan.nextInt();\n\t\t\t\tint point = scan.nextInt();\n\t\t\t\tint stone = scan.nextInt();\n\t\t\t\tint wood = scan.nextInt();\n\t\t\t\tint knowledge = scan.nextInt();\n\t\t\t\tint tiles = scan.nextInt();\n\t\t\t\tthis.machine.add(new Machine(id, name, point, stone, wood, knowledge, tiles, stoneProd, woodProd, knowledgeProd, tileProd));\n\t\t\t}\n\t\t\tin.close();\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tSystem.out.println(fileMachine + \" not found\");\n\t\t}\n\t}", "public static void readFileSilver(String filename) throws FileNotFoundException{\n try {\n //Scanners and readers and everything??\n File text = new File(filename);\n Scanner inf = new Scanner(text);\n BufferedReader brTest = new BufferedReader(new FileReader(filename));\n String firstLine = brTest.readLine();\n String[] firstLineArray = new String[3];\n firstLineArray = firstLine.split(\" \");\n\n //Determines number of rows, cows, and time.\n N = Integer.parseInt(firstLineArray[0]);\n M = Integer.parseInt(firstLineArray[1]);\n T = Integer.parseInt(firstLineArray[2]);\n\n //Initializes pasture. Assume 0 for empty space, -1 for a tree.\n String temp = \"\";\n pasture = new int[N][M];\n inf.nextLine();\n\n for (int i = 0; i < N; i++){\n temp = inf.next();\n\n for (int j = 0; j < M; j++){\n if (temp.charAt(j) == '.'){\n pasture[i][j] = 0;\n }\n if (temp.charAt(j) == '*'){\n pasture[i][j] = -1;\n }\n }\n }\n\n //Determines (R1, C1) and (R2, C2).\n inf.nextLine();\n R1 = inf.nextInt(); C1 = inf.nextInt();\n R2 = inf.nextInt(); C2 = inf.nextInt();\n\n //Exceptions.\n } catch (FileNotFoundException ex){\n System.out.println(\"Yikes\");\n } catch (IOException ex){\n System.out.println(\"Yikes\");\n }\n }", "@Override\n public void createShoe(int ndecks) {\n Deck deck;\n for (int i = 0; i < ndecks; i++) {\n deck = new Deck();\n this.cards.addAll(deck.getDeck());\n }\n }", "@Override\n public Sprite createSprite(SnakeSmash game) {\n Texture texture = game.getAssetManager().get(\"pinkSquare.png\");\n return new Sprite(texture, texture.getWidth(), texture.getHeight());\n }", "public Board createBoard(String inputFileName) {\nList<String> ants = new ArrayList<>();\n\nint rows = 0;\nrows = getMatrixSize(inputFileName);\n\nBoard b = new Board(rows, rows);\n\nants = findAnts(inputFileName);\nfor (int k = 0; k < ants.size(); k++) {\nString firstAnt = ants.get(k);\nString[] firstAntSplitted = firstAnt.split(\" \");\nString name = \"\";\nint posX = 0;\nint posY = 0;\n\nname = firstAntSplitted[2];\nposX = Integer.parseInt(firstAntSplitted[0]);\nposY = Integer.parseInt(firstAntSplitted[1]);\n\nAnt a = new Ant(name);\n\n\nb.placeAnt(posX, posY, a);\n}\nreturn b;\n}", "private void createWinnerScheduleFile() {\n try {\n File scheduleFile = new File(filePath, \"winners.txt\");\n\n OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(scheduleFile), StandardCharsets.UTF_8);\n osw.write(\"WINNERS:\\n\" + winnerSchedule);\n osw.close();\n\n System.out.println(\"winners.txt successfully created.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void createFile() throws IOException {\n String newName = input.getText();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n\n if (user.exists() && !user.isDirectory()) {\n input.setStyle(\"-fx-border-color: red\");\n }\n if (user.exists() && !user.isDirectory() || newName.isEmpty()) {\n input.setStyle(\"-fx-border-color: red\");\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n }\n else {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().addAll(newName);\n PrintWriter newUser = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + newName + \".txt\"));\n newUser.write(\"0 0 0 0 icon0 car\");\n newUser.close();\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }\n }", "private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }", "Strobo createStrobo();", "public void addShop(String fileName)\r\n {\r\n //read file \r\n try\r\n {\r\n //file reader\r\n FileReader fin = new FileReader(fileName);\r\n //create a new scanner\r\n Scanner graphFile = new Scanner(fin);\r\n\r\n //String variable \r\n String line;\r\n //while the file has next line\r\n while(graphFile.hasNextLine())\r\n {\r\n\r\n //get the next line in the file\r\n line=graphFile.nextLine();\r\n\r\n //create a new StringTokenizer at that line\r\n StringTokenizer st = new StringTokenizer(line);\r\n //read through that line\r\n try\r\n {\r\n //if there is only 1 string in this line\r\n if(st.countTokens()==1)\r\n {\r\n // pick up this String as the number of coffeeshop in total \r\n int numOfShops = Integer.parseInt(st.nextToken());\r\n //continue to next iteration of the loop \r\n continue;\r\n }\r\n\r\n //if more than 1 String in the line\r\n //take the first String and store as the id of coffeeShop\r\n String id = (\"S\"+Integer.parseInt(st.nextToken()));\r\n //take the next String which contains the X coordinate of the coffeeshop\r\n String coordinateX = st.nextToken();\r\n //create a new StringTokenizer on this String\r\n StringTokenizer st1 = new StringTokenizer(coordinateX,\"(,\");\r\n //take the first String and store it as the x coordinate of this coffeeshop \r\n int x= Integer.parseInt(st1.nextToken());\r\n //take the next String which contains the Y coordinate of the coffeeshop\r\n String coordinateY = st.nextToken();\r\n //create a new StringTokenizer on this String\r\n StringTokenizer st2 = new StringTokenizer(coordinateY,\"):\");\r\n //take the first String and store it as the y coordinate of this coffeeshop \r\n int y= Integer.parseInt(st2.nextToken());\r\n //create a new Queue implement by linkedlist to store the order of the warehouse\r\n Queue<Integer> cargoList= new LinkedList<Integer> ();\r\n //while the line has more Strings inside it \r\n while(st.hasMoreTokens())\r\n {\r\n //take the next String in the line and store it as cargo\r\n String cargo =st.nextToken();\r\n //create a new StringTokenizer on this String\r\n StringTokenizer st3 = new StringTokenizer(cargo,\",\");\r\n //take the first String and store it as the order of this coffeeshop \r\n Integer order =Integer.parseInt(st3.nextToken());\r\n\r\n //add the order into the cargo list\r\n cargoList.add(order);\r\n \r\n\r\n }\r\n\r\n //add the coffeeshop into the graph \r\n town.addCoffeeShop(x,y,id, cargoList);\r\n\r\n\r\n\r\n }\r\n //catch exceptions\r\n catch(NumberFormatException e )\r\n { System.err.println( \"Skipping bad line \" + line ); }\r\n\r\n }\r\n\r\n }\r\n //catch exceptions \r\n catch( IOException e )\r\n { System.err.println( e ); }\r\n }", "public void startGame(String path) throws FileNotFoundException, IOException, BowlingGameException;", "public void saveGame(File fileLocation);", "public ActionScriptBuilder createFile(String filecontents,String filepath,boolean overwrite,String delimeter){\n\t\tline(\"createfile until \"+delimeter);\n\t\tlines(Arrays.asList(filecontents.split(\"\\n\")));\n\t\tline(delimeter);\n\t\tmove(\"__createfile\",filepath,overwrite);\n\t\treturn this;\n\t}", "void reloadeRooms( ) throws FileNotFoundException;", "protected void createSprite(String filename, int imgnumber, int originx, \n \t\tint originy, String name) throws FileNotFoundException\n {\n \tSprite newsprite = new Sprite(filename, imgnumber, originx, originy, \n name, this.applet);\n this.sprites.put(newsprite.getName(), newsprite);\n }", "public ActionScriptBuilder createFile(String filecontents, String filepath){\n\t\treturn createFile(filecontents,filepath,true);\n\t}", "void saveGameState(File saveName);", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tFileHelper.createFile();\n\t\tFileHelper.writeToFile();\n\t\tFileHelper.readFromFile();\n\n\t}", "private void initializeFile()\n\t{\n\t\tHighScore[] h={new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),\n\t\t\t\tnew HighScore(0,0,\" \"),new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),\n\t\t\t\tnew HighScore(0,0,\" \"),new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),\n\t\t\t\tnew HighScore(0,0,\" \")};\n\t\ttry \n\t\t{\n\t\t\tSystem.out.println(\"Hi1\");\n\t\t\tObjectOutputStream o=new ObjectOutputStream(new FileOutputStream(\"HighScores.dat\"));\n\t\t\to.writeObject(h);\n\t\t\to.close();\n\t\t} catch (FileNotFoundException e) {e.printStackTrace();}\n\t\tcatch (IOException e) {e.printStackTrace();}\n\t}", "public static void main (String[] args) {\n \n //initilialize Scanner, pass file input in same directory, pass to boyGirl function\n Scanner input = new Scanner(new File('tas.txt'));\n boyGirl(input);\n }", "private void createOrder(Shop shop, FileManager fileManager, ArrayList<Tool> toolList,\n ArrayList<Integer> quantityList) {\n if (toolList.size() != 0) {\n if (shop.createOrderOrAppendOrder(shop, toolList, quantityList, fileManager)) {\n System.out.println(\"Successfully added and/or appended order to orders.txt!\");\n } else {\n System.out.println(\"ERROR: Could not edit orders.txt.\");\n }\n }\n }", "public void criaTrolls() throws FileNotFoundException, IOException{\n \n String[] vetorNomes;\n vetorNomes = new String[20];\n int i = 0;\n String endereco = System.getProperty(\"user.dir\");\n endereco = endereco + \"/nomes/Nomes.txt\";\n Scanner leitor = new Scanner(new FileReader(endereco));\n while(leitor.hasNext() && i < 20){\n \n vetorNomes[i] = leitor.next();\n ++i;\n }\n // Atribuindo nomes aos trolls.\n Random gerador = new Random();\n int qtde = gerador.nextInt(2);\n for(i = 0; i < qtde; ++i){\n \n int rd = gerador.nextInt(20);\n setNome(vetorNomes[rd], i);\n }\n setQtdeTrolls(qtde);\n }", "@Override\n\tpublic Item createItem(Player player) throws FileNotFoundException {\n\n\t\tItem item = null;\n\t\tcountItems(player.getEntities());\n\t\tRandom r = new Random();\n\n\t\tif (player.getHealth() <= Player.MAX_HEALTH / 2 && health < 1) {\n\n\t\t\tdouble x = r.nextInt(1180) + 50;\n\t\t\tdouble y = r.nextInt(620) + 50;\n\n\t\t\titem = new Health(healthSprite(), x, y, 40, 40, 25, 20, new NoMovement(), new HealthPerkAttack());\n\n\t\t} else if (player.getHealth() == 100 && player.getArmor() < 100 && armor < 1 && r.nextDouble() > 0.999) {\n\n\t\t\tdouble x = r.nextInt(1180) + 50;\n\t\t\tdouble y = r.nextInt(620) + 50;\n\n\t\t\titem = new Armor(armorSprite(), x, y, 40, 50, 15, 10, new NoMovement(), new ArmorPerkAttack());\n\t\t} else if (player.getHealth() < 100 && health < 1 && r.nextDouble() > 0.999) {\n\n\t\t\tdouble x = r.nextInt(1180) + 50;\n\t\t\tdouble y = r.nextInt(620) + 50;\n\n\t\t\titem = new Health(healthSprite(), x, y, 40, 40, 25, 20, new NoMovement(), new HealthPerkAttack());\n\t\t}\n\n\t\treturn item;\n\t}", "public static void main(String args[])\n\t{\n\t\tAdvancedIceCreamCone cone = new AdvancedIceCreamCone();\n\t\tFileOutputStream iceCream = null;\n\t\tObjectOutputStream write = null;\n\t\t//Using a try to catch checked exceptions\n\t\ttry\n\t\t{\n\t\t\t//Applying the object output stream to the icecreamcones.ser file\n\t\t\ticeCream = new FileOutputStream(\"IceCreamCones.ser\");\n\t\t\twrite = new ObjectOutputStream(iceCream);\n\t\t\t//Instantiate the three objects to add to the array list\n\t\t\tAdvancedIceCreamCone vanillaCone = new AdvancedIceCreamCone();\n\t\t\tAdvancedIceCreamCone chocoCone = new AdvancedIceCreamCone();\n\t\t\tAdvancedIceCreamCone strawCone = new AdvancedIceCreamCone();\n\n\t\t\t//Modifying the member variables of each object\n\t\t\tvanillaCone.addScoop();\n\t\t\tvanillaCone.addScoop();\n\t\t\tvanillaCone.setTypeOfCone(\"Waffle\");\n\t\t\tvanillaCone.addToppings(\"Butterfinger\");\n\t\t\tvanillaCone.addToppings(\"Marshmallow\");\n\t\t\tchocoCone.addScoop();\n\t\t\tchocoCone.addScoop();\n\t\t\tchocoCone.addScoop();\n\t\t\tchocoCone.setFlavor(\"Chocolate\");\n\t\t\tchocoCone.setTypeOfCone(\"Chocolate Dipped\");\n\t\t\tchocoCone.addToppings(\"Reeses\");\n\t\t\tchocoCone.addToppings(\"Hot Fudge\");\n\t\t\tstrawCone.addScoop();\n\t\t\tstrawCone.setFlavor(\"Strawberry\");\n\t\t\tstrawCone.addToppings(\"Strawberry Syrup\");\n\t\t\tstrawCone.addToppings(\"Strawberries\");\n\t\t\tstrawCone.addToppings(\"Gummy Bears\");\n\n\t\t\t//Write the object stream as individual objects to the .ser file\n\t\t\twrite.writeObject(vanillaCone);\n\t\t\twrite.writeObject(chocoCone);\n\t\t\twrite.writeObject(strawCone);\n\t\t\t//Close the stream\n\t\t\twrite.close();\n\t\t}\n\t\t//Catching checked exceptions\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(IOException e )\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void createFile() throws Exception {\n\t\t // retrieve an instance of H4File\n\t\t FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF4);\n\n\t\t if (fileFormat == null) {\n\t\t System.err.println(\"Cannot find HDF4 FileFormat.\");\n\t\t return;\n\t\t }\n\n\t\t // create a new file with a given file name.\n\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\tH4File testFile = (H4File) fileFormat.create(fname);\n\n\t\t if (testFile == null) {\n\t\t System.err.println(\"Failed to create file:\" + fname);\n\t\t return;\n\t\t }\n\n\t\t // open the file and retrieve the root group\n\t\t testFile.open();\n\t\t Group root = (Group) ((javax.swing.tree.DefaultMutableTreeNode) testFile.getRootNode()).getUserObject();\n\n\t\t // set the data values\n\t\t int[] dataIn = new int[20 * 10];\n\t\t for (int i = 0; i < 20; i++) {\n\t\t for (int j = 0; j < 10; j++) {\n\t\t dataIn[i * 10 + j] = 1000 + i * 100 + j;\n\t\t }\n\t\t }\n\n\t\t // create 2D 32-bit (4 bytes) integer dataset of 20 by 10\n\t\t Datatype dtype = testFile.createDatatype(Datatype.CLASS_INTEGER, 4, Datatype.NATIVE, Datatype.NATIVE);\n\t\t @SuppressWarnings(\"unused\")\n\t\t\t\tDataset dataset = testFile\n\t\t .createScalarDS(\"2D 32-bit integer 20x10\", root, dtype, dims2D, null, null, 0, dataIn);\n\n\t\t // close file resource\n\t\t //testFile.close();\n\t\t }", "public void newDeck()\r\n\t{\r\n\t\t// attempts to read the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// sets up file input\r\n\t\t\tFile file = new File(FILE_NAME);\r\n\t\t\tScanner inputFile = new Scanner(file);\r\n\t\t\t\r\n\t\t\t// creates counter for array input\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t// reads card notations from file\r\n\t\t\twhile (inputFile.hasNext() && i < DECK_SIZE)\r\n\t\t\t{\r\n\t\t\t\tcards[i] = inputFile.nextLine();\r\n\t\t\t\t\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\r\n\t\t\t// Closes the file.\r\n\t\t\tinputFile.close();\r\n\t\t\t\r\n\t\t\t// Sets topCard\r\n\t\t\ttopCard = 51;\r\n\t\t\t\r\n\t\t\t// shuffles deck\r\n\t\t\tshuffle();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\t// prints error if file not found\r\n\t\t\tSystem.out.println(\"The file \" + FILE_NAME + \" does not exist.\");\r\n\t\t}\r\n\t}", "static Room randomWorld(String fileName, Random rand) throws IOException {\n Scanner fileIn = new Scanner(new File(fileName));\n ArrayList<Room> rooms = new ArrayList<Room>();\n \n // first create the rooms and their content - first room is the entrance room\n Room entrance = new Room(fileIn.nextLine());\n addStuff(entrance, fileIn);\n rooms.add(entrance);\n \n // add more rooms\n while (fileIn.hasNextLine()) {\n String name = fileIn.nextLine();\n if (name.equals(\"*****\")) break; // YUK!\n else {\n Room room = new Room(name);\n addStuff(room, fileIn);\n rooms.add(room); \n }\n }\n \n // now connect the rooms randomly\n for (Room room : rooms) {\n room.connectNorth(rooms.get(rand.nextInt(rooms.size())));\n room.connectEast(rooms.get(rand.nextInt(rooms.size())));\n room.connectSouth(rooms.get(rand.nextInt(rooms.size())));\n room.connectWest(rooms.get(rand.nextInt(rooms.size())));\n } \n return entrance; \n }", "static Room randomWorld(String fileName, Random rand) throws IOException {\n Scanner fileIn = new Scanner(new File(fileName));\n ArrayList<Room> rooms = new ArrayList<Room>();\n \n // first create the rooms and their content - first room is the entrance room\n Room entrance = new Room(fileIn.nextLine());\n addStuff(entrance, fileIn);\n rooms.add(entrance);\n \n // add more rooms\n while (fileIn.hasNextLine()) {\n String name = fileIn.nextLine();\n if (name.equals(\"*****\")) break; // YUK!\n else {\n Room room = new Room(name);\n addStuff(room, fileIn);\n rooms.add(room); \n }\n }\n \n // now connect the rooms randomly\n for (Room room : rooms) {\n room.connectNorth(rooms.get(rand.nextInt(rooms.size())));\n room.connectEast(rooms.get(rand.nextInt(rooms.size())));\n room.connectSouth(rooms.get(rand.nextInt(rooms.size())));\n room.connectWest(rooms.get(rand.nextInt(rooms.size())));\n } \n return entrance; \n }", "FileContent createFileContent();", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n File f = new File(\"Role.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //a 2d array is used to save the role description and the role salary\n String[][] role = new String[3][2];\n role[0][0] = \"Hardware Technician\";\n role[0][1] = \"32\";\n role[1][0] = \"Programmer\";\n role[1][1] = \"50\";\n role[2][0] = \"Software Installer\";\n role[2][1] = \"26\";\n //the instances are made and written to the file\n for (int i = 0; i < 3; i++) {\n Role role1 = new Role();\n role1.setRoleID(i + 1);\n role1.setRoleDesc(role[i][0]);\n role1.setHourlyPay(Integer.parseInt(role[i][1]));\n oos.writeObject(role1);\n }\n fos.close();\n oos.close();\n }", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "@Override\n public void seedBooks() throws IOException {\n if (this.bookRepository.count() > 0) {\n return;\n }\n\n String[] lines = this.readFileUtil.read(BOOKS_FILE_RELATIVE_PATH);\n for (int i = 0; i < lines.length; i++) {\n /* Get args */\n String[] args = lines[i].split(\"\\\\s+\");\n\n /* Get edition type */\n EditionType editionType = EditionType.values()[Integer.parseInt(args[0])];\n\n /* Get release date */\n LocalDate releaseDate = localDateUtil.parseByPattern(\"d/M/yyyy\", args[1]);\n\n /* Get copies */\n long copies = Long.parseLong(args[2]);\n\n /* Get price */\n BigDecimal price = new BigDecimal(args[3]);\n\n /* Get age restriction */\n AgeRestriction ageRestriction = AgeRestriction.values()[Integer.parseInt(args[4])];\n\n /* Get title */\n String title = Arrays.stream(args).skip(5).collect(Collectors.joining(\" \"));\n\n /* Get author */\n Author randomAuthor = this.randomAuthorUtil.getRandom();\n\n /* Get categories */\n Set<Category> randomCategories = this.randomCategoriesUtil.getRandom();\n\n /* Create book */\n Book book = new Book(ageRestriction, copies, editionType, price, releaseDate, title, randomAuthor);\n book.setCategories(randomCategories);\n\n /* Save the book */\n this.bookRepository.saveAndFlush(book);\n }\n }", "private void createGenotypes(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\t\t// And write back out in Flapjack format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"geno\")));\r\n\t\tout.write(\"# fjFile = GENOTYPE\");\r\n\t\tout.newLine();\r\n\r\n\t\t// Skip the first two lines; we'll just assume marker order...\r\n\t\tin.readLine(); in.readLine();\r\n\t\t// ...and use the data we already have from the map\r\n\t\tfor (Marker m: markers)\r\n\t\t\tout.write(\"\\t\" + m.name);\r\n\t\tout.newLine();\r\n\r\n\r\n\t\t// Now process each line\r\n\t\tint index = 0;\r\n\t\tString str = null;\r\n\t\twhile ((str = in.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (str.isEmpty())\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (index == 0)\r\n\t\t\t\tout.write(\"RP\");\r\n\t\t\telse if (index == 1)\r\n\t\t\t\tout.write(\"DP\");\r\n\t\t\telse\r\n\t\t\t\tout.write(\"RP[1]/DP-\" + index);\r\n\r\n\t\t\tfor (String allele: str.split(\",\"))\r\n\t\t\t\tout.write(\"\\t\" + allele);\r\n\r\n\t\t\tout.newLine();\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t}", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tListaNombre nombres = new ListaNombre();\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"juan\"));\n//\t\tnombres.add(new Nombre(\"juan\"));\n//\t\tnombres.add(new Nombre(\"daria\"));\n//\t\tnombres.add(new Nombre(\"daria\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.setCantRepetidos(3);\n//\t\tfor (Nombre nom : nombres.getNombres()) {\n//\t\t\tSystem.out.println(nom.getNombre() + \" \" + nom.getCant());\n//\t\t}\n\t\tnombres = ( Archivo.leer(\"C:\\\\Users\\\\guido\\\\eclipse-workspace\\\\DescubriendoNombresRepetidos\\\\premioA.in\"));\n\t\tArchivo.escribir(\"C:\\\\Users\\\\guido\\\\eclipse-workspace\\\\DescubriendoNombresRepetidos\\\\salida.out\",nombres);\n\t}", "public Fish create(){\n\t\tMovementStyle style = new NoMovement();\n\t\treturn new Shark(style);\n\t}", "public static void generateSHDSTest(String fileName, int rule_id, Topology topo, int span, int gran, int[] houseRatio) {\n JSONArray devices = convertDevices(readDevices(), gran);\n RuleGenerator ruleGen = new RuleGenerator(span, gran, devices);\n Generator gen = new Generator(topo, ruleGen, 2, houseRatio);\n ArrayList rList = new ArrayList();\n rList.add(rule_id);\n //rList.add(Integer.valueOf(1));\n try {\n FileWriter fileOut = new FileWriter(fileName + \".json\");\n fileOut.write(gen.generate(\"false\", rList).toString(2));\n fileOut.flush();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Shoe makeShoe() {\n\treturn new Shoe();\r\n}", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFile f = new File(\"data/testfile.dat\");\n\t\t\tboolean b = f.createNewFile();\n\t\t\t\n\t\t\tif (b){\n\t\t\t\tSystem.out.println(\"File created!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Already exists\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Exception occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void createShips() {\n //context,size, headLocation, bodyLocations\n Point point;\n Ship scout_One, scout_Two, cruiser, carrier, motherShip;\n if(player) {\n point = new Point(maxN - 1, 0); //row, cell\n scout_One = new Ship(1, point, maxN, \"Scout One\", player);\n ships.add(scout_One);\n point = new Point(maxN - 1, 1);\n scout_Two = new Ship(1, point, maxN, \"Scout Two\", player);\n ships.add(scout_Two);\n point = new Point(maxN - 2, 2);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n ships.add(cruiser);\n point = new Point(maxN - 2, 3);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n ships.add(carrier);\n point = new Point(maxN - 4, 5);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n ships.add(motherShip);\n\n }else{\n Random rand = new Random();\n int rowM = maxN-3;\n int colM = maxN -2;\n int row = rand.nextInt(rowM);\n int col = rand.nextInt(colM);\n point = new Point(row, col);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n updateOccupiedCells(motherShip.getBodyLocationPoints());\n ships.add(motherShip);\n\n rowM = maxN - 1;\n colM = maxN -1;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n updateOccupiedCells(carrier.getBodyLocationPoints());\n ships.add(carrier);\n checkIfOccupiedForSetShip(carrier, row, col, rowM, colM);\n\n\n rowM = maxN - 1;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n updateOccupiedCells(cruiser.getBodyLocationPoints());\n ships.add(cruiser);\n checkIfOccupiedForSetShip(cruiser, row, col, rowM, colM);\n\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_Two = new Ship(1, point, maxN, \"Scout_Two\", player);\n updateOccupiedCells(scout_Two.getBodyLocationPoints());\n ships.add(scout_Two);\n checkIfOccupiedForSetShip(scout_Two, row, col, rowM, colM);\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_One = new Ship(1, point, maxN, \"Scout_One\", player);\n updateOccupiedCells(scout_One.getBodyLocationPoints());\n ships.add(scout_One);\n checkIfOccupiedForSetShip(scout_One, row, col, rowM, colM);\n\n\n\n\n }\n //Need an algorithm to set enemy ship locations at random without overlaps\n }", "public Unscrambler(String file) throws FileNotFoundException\n {\n newFile = new File(file);\n\n }", "public Game() throws IOException\n\t {\n\t\t //reading the game.txt file \n\t\t try\n\t\t\t{\n\t\t\t \tHeliCopIn = new Scanner(HeliCopFile);\n\t\t\t\tString line = \"\";\n\t\t\t\twhile ( HeliCopIn.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tline = HeliCopIn.nextLine();\n\t\t\t\t\tStringTokenizer GameTokenizer = new StringTokenizer(line);\n\t\t\t\t\tif ( !GameTokenizer.hasMoreTokens() || GameTokenizer.countTokens() != 5 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint XCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint YCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint health = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumRocketsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumBulletsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tif (Player.Validate(line) == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t//creating a new player and initialising the number of bullets; \n\t\t\t\t\t pl = new Player(XCoord,YCoord,health,NumRocketsStart,NumBulletsStart); \n\t\t\t\t\t pl.NumBullets = pl.GetNumBulletsStart(); \n\t\t\t\t\t pl.NumRockets = pl.GetnumRocketsStart(); \n\t\t\t\t\t \n\t\t\t\t\t//\tSystem.out.println(XCoord) ;\n\t\t\t\t\t\t//System.out.println(YCoord) ;\n\t\t\t\t\t\t//System.out.println(health) ;\n\t\t\t\t\t\t//System.out.println(NumRocketsStart) ;\n\t\t\t\t\t\t//System.out.println(NumBulletsStart) ;\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\tcatch (FileNotFoundException ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif ( HeliCopIn != null )\n\t\t\t\t{\n\t\t\t\t\tHeliCopIn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t \n\t\t //loading the background image and explosion image\n\t\t try {\n\t\t\t\tBackGround = ImageIO.read(new File(\"images\\\\finalcloud.jpg\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tExplosion = ImageIO.read(new File(\"images\\\\explosion.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameOver = ImageIO.read(new File(\"images\\\\gameover.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameWin = ImageIO.read(new File(\"images\\\\gamewin.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tupdate();\n\t\t\t\n\t\t\tint del = 2000; \n\t\t // createEnemyHelicopter(); \n\t\t\ttime = new Timer(del , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tcreateEnemyHelicopter(); \n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t});\n\t\t\ttime.start();\n\t\t\t\n\t\t\ttime = new Timer(delay , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tif (GameOn==true ){\n\t\t\t\t\t\t updateEnemies(); \n\t\t\t\t \t UpdateBullets(); \n\t\t\t\t \t UpdateRockets(); \n\t\t\t\t \t pl.Update(); \n\t\t\t\t \t repaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t \t try {\n\t\t\t\t\t\tWiriteToBinary();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t});\n\t\t\ttime.start();\n\t\t\n\t\t\t//WiriteToBinary(); \n\t\t\t\n\t }", "public static Asset createAsset(File file) throws IOException {\n \t\treturn new Asset(FileUtil.getNameWithoutExtension(file), FileUtils.readFileToByteArray(file));\n \t}", "public GridFSInputFile createFile(File f) throws IOException {\n\treturn createFile(new FileInputStream(f), f.getName(), true);\n }", "public static void main(String[] args) throws FileNotFoundException, IOException, ClassNotFoundException {\n\t\tseri(\"/Volumes/HDD/java/test/testfile/objectzhu\");\n\t\tread(\"/Volumes/HDD/java/test/testfile/objectzhu\");\n\t}", "public void readFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\t// read the headlines\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumVertices = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumPaths = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\ttmax = Double.parseDouble(lineElements[1]);\n\t\t\n//\t\tSystem.out.println(numVertices + \", \" + numPaths + \", \" + tmax);\n\n\t\t/* read benefits1 */\n\t\tint index = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tdouble x = Double.parseDouble(lineElements[0]);\n\t\t\tdouble y = Double.parseDouble(lineElements[1]);\n\t\t\tList<Double> scores = new ArrayList<Double>();\n\t\t\tfor (int i = 2; i < lineElements.length; i++) {\n\t\t\t\tdouble score = Double.parseDouble(lineElements[i]);\n\t\t\t\tscores.add(new Double(score));\n\t\t\t}\n\t\t\tPOI POI = new POI(index, x, y, scores);\n\t\t\t//POI.printMe();\n\t\t\t\n\t\t\tvertices.add(POI);\n\t\t\tindex ++;\n\t\t}\n\t\t\n\t\t// create the arcs and the graph\n\t\tfor (int i = 0; i < vertices.size(); i++) {\n\t\t\tfor (int j = 0; j < vertices.size(); j++) {\n\t\t\t\tArc arc = new Arc(vertices.get(i), vertices.get(j));\n\t\t\t\tarcs.add(arc);\n\t\t\t\tgraph.put(new Tuple2<POI, POI>(vertices.get(i), vertices.get(j)), arc);\n\t\t\t}\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "public Roster(String fileName){\n players = new ArrayList<>();\n try {\n Scanner input = new Scanner(new File(fileName));\n\n // Loop will cycle through all the \"words\" in the text file\n while (input.hasNext()){\n // Concatenates the first and last names\n String name = input.next();\n name += \" \" + input.next();\n double attackStat = input.nextDouble();\n double blockStat = input.nextDouble();\n // Creates a new Player object and stores it in the players ArrayList\n players.add(new Player(name, attackStat, blockStat));\n }\n }\n catch (IOException e) {\n System.out.println(\"IO Exception \" + e);\n }\n\n }", "private void loadTiles(String filename) {\n\t\ttry {\n\t\t\tScanner s;\n\n\t\t\tif (StealthGame.EXPORT)\n\t\t\t\ts = new Scanner(ResourceLoader.load(filename));\n\t\t\telse\n\t\t\t\ts = new Scanner(new File(filename));\n\n\t\t\tif (s.hasNextLine()) {\n\t\t\t\tname = s.nextLine();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Room has no name\");\n\t\t\t}\n\t\t\txSize = s.nextInt();\n\t\t\tySize = s.nextInt();\n\t\t\ttiles = new Tile[xSize][ySize];\n\t\t\tint xPos = 0;\n\t\t\tint yPos = 0;\n\t\t\tint tileNum = 0;\n\n\t\t\t// List of doors to be given destinations\n\n\t\t\twhile (s.hasNext()) {\n\n\t\t\t\tif (s.hasNextInt()) {\n\t\t\t\t\tparseInt(s, xPos, yPos, tileNum);\n\n\t\t\t\t\txPos++;\n\t\t\t\t\ttileNum++;\n\n\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\tyPos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not a basic floor, door or wall\n\t\t\t\telse {\n\t\t\t\t\tString str = s.next();\n\t\t\t\t\tif (str.length() == 1) {\n\t\t\t\t\t\tparseChar(xPos, yPos, tileNum, str);\n\n\t\t\t\t\t\txPos++;\n\t\t\t\t\t\ttileNum++;\n\n\t\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\t\tyPos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (str.equals(\"door\")) {\n\t\t\t\t\t\t\tparseDoorDestination(s);\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\ts.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Room - Error loading file - IOException : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public void createStadium(Player player, Location location, String name, String configfile, boolean importRequired, String schematic){\n\t\tFile file = new File(plugin.getDataFolder()+\"/meaFlarf/schematics/\"+((schematic.endsWith(\"schematic\"))?schematic:schematic+\".schematic\"));\n\t\tif(!file.exists()){\n\t\t\tplayer.sendMessage(getMessage(\"stadiumDoesntExist\"));\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args)throws IOException\r\n\t{\n\t\tFile temp = File.createTempFile(\"holy\", null);\r\n\t\tRandomAccessFile file = new RandomAccessFile(temp, \"rw\");\r\n\t\tFileChannel channel = file.getChannel();\r\n\t\t\r\n\t\t//Create a working buffer\r\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(100);\r\n\t\tputData(0, byteBuffer, channel);\r\n\t\tputData(100, byteBuffer, channel);\r\n\t\tputData(5000, byteBuffer, channel);\r\n\t\t//Size will report the largest position written, but there\r\n\t\t//are two holes in this file.This file will not consume 5MB on disk\r\n\t\t//(unless the filesystem is extermely brain-damaged 除非文件系统极度脑残!汗!)\r\n\t\tSystem.out.println(\"Wrote temp file '\" + temp.getPath() + \"', size=\" + channel.size());\r\n\t\tchannel.close();\r\n\t\tfile.close();\r\n\t}", "private void loadSpaceObjects(String file){\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\tloadFactory(sc);\n\t\t\tloadPlanets(sc);\n\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramPlanets.txt\");\n\t\t}\n\t}", "public abstract T create(T file, boolean doPersist) throws IOException;", "public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }", "@Test\n public void CreateFile() throws Exception {\n createFile(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\",\n readTemplateXLSX(\"src\\\\TestSuite\\\\SampleFiles\\\\template_supervisor.xlsx\"));\n File file = new File(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\");\n Assert.assertTrue(file.exists());\n }", "public static void main(String[] args) throws FileNotFoundException {Main receives two arguments: path to input file and path to output file.\n\t\t// You can assume that they will always be provided, so no need to check them.\n\t\t// Scanner and PrintStream are already defined for you.\n\t\t// Use them to read input and write output.\n\t\t// \n\t\t// Good Luck!\n\t\t// \n\t\t\n\t\tScanner in = new Scanner(new File(args[0]));\n\t\t\n\t\tint N = in.nextInt();\n\t\tin.nextLine();\n\t\tString[] myFileData = new String[N];\n\t\tint keepPortID = 0;\n\t\tint keepShipID = 0;\n\t\tint keepContainerID = 0;\n\t\tArrayList<Port> myPorts = new ArrayList<Port>();\n\t\tArrayList<Ship> myShips = new ArrayList<Ship>();\n\t\tArrayList<Container> myContainers = new ArrayList<Container>();\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tmyFileData[i] = in.nextLine();\n\t\t}\n\t\t\n\t\tfor(int j = 0; j < N; j++) {\n\t\t\tString[] myLines = myFileData[j].split(\" \");\n\t\t\t\n\t\t\tif(myLines[0].equals(\"1\")) { //create a container\n\t\t\t\tPort containerPort = myPorts.get(Integer.parseInt(myLines[1]));\n\t\t\t\tif(myLines[myLines.length - 1].contains(\"L\") || myLines[myLines.length - 1].contains(\"R\")) {\n\t\t\t\t\tswitch(myLines[myLines.length-1]) {\n\t\t\t\t\tcase \"L\":\n\t\t\t\t\t\tLiquidContainer myNewLiquidContainer = new LiquidContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\t\tmyNewLiquidContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\t\tcontainerPort.containers.add(myNewLiquidContainer);\n\t\t\t\t\t\tcontainerPort.portLiquidContainers += 1;\n\t\t\t\t\t\tmyContainers.add(myNewLiquidContainer);\n\t\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t\tcase \"R\":\n\t\t\t\t\t\tRefrigeratedContainer myNewRefrigeratedContainer = new RefrigeratedContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\t\tmyNewRefrigeratedContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\t\tcontainerPort.containers.add(myNewRefrigeratedContainer);\n\t\t\t\t\t\tcontainerPort.portRefrigeratedContainers += 1;\n\t\t\t\t\t\tmyContainers.add(myNewRefrigeratedContainer);\n\t\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t\t} \n\t\t\t\t} else if(Integer.parseInt(myLines[2]) > 3000) {\n\t\t\t\t\tHeavyContainer myNewHeavyContainer = new HeavyContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\tmyNewHeavyContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\tcontainerPort.containers.add(myNewHeavyContainer);\n\t\t\t\t\tcontainerPort.portHeavyContainers += 1;\n\t\t\t\t\tmyContainers.add(myNewHeavyContainer);\n\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t} else {\n\t\t\t\t\tBasicContainer myNewBasicContainer = new BasicContainer(keepContainerID, Integer.parseInt(myLines[2]));\n\t\t\t\t\tmyNewBasicContainer.setPortID(Integer.parseInt(myLines[1]));\n\t\t\t\t\tcontainerPort.containers.add(myNewBasicContainer);\n\t\t\t\t\tcontainerPort.portBasicContainers += 1;\n\t\t\t\t\tmyContainers.add(myNewBasicContainer);\n\t\t\t\t\tkeepContainerID += 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t} else if(myLines[0].equals(\"2\")) { //create a ship\n\t\t\t\tint myPortID = Integer.parseInt(myLines[1]);\n\t\t\t\tint myWeightLimit = Integer.parseInt(myLines[2]);\n\t\t\t\tint maxAllCont = Integer.parseInt(myLines[3]);\n\t\t\t\tint maxHeavyCont = Integer.parseInt(myLines[4]);\n\t\t\t\tint maxRefCont = Integer.parseInt(myLines[5]);\n\t\t\t\tint maxLiqCont = Integer.parseInt(myLines[6]);\n\t\t\t\tdouble fuelConsumption = Double.parseDouble(myLines[7]);\n\t\t\t\tShip myNewShip = new Ship(keepShipID, myPorts.get(myPortID), myWeightLimit, maxAllCont, maxHeavyCont, maxRefCont, maxLiqCont, fuelConsumption);\n\t\t\t\tmyNewShip.currentPort.current.add(myNewShip);\n\t\t\t\tkeepShipID += 1;\n\t\t\t\tmyShips.add(myNewShip);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"3\")) { //create a port\n\t\t\t\tdouble x = Double.parseDouble(myLines[1]);\n\t\t\t\tdouble y = Double.parseDouble(myLines[2]);\n\t\t\t\tPort myNewPort = new Port(keepPortID, x, y);\n\t\t\t\tkeepPortID += 1;\n\t\t\t\tmyPorts.add(myNewPort);\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"4\")) { //loading a container\n\t\t\t\tint shipLoadID = Integer.parseInt(myLines[1]);\n\t\t\t\tint contLoadID = Integer.parseInt(myLines[2]);\n\t\t\t\tmyShips.get(shipLoadID).load(myContainers.get(contLoadID));\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"5\")) { //unloading a container\n\t\t\t\tint shipLoadID = Integer.parseInt(myLines[1]);\n\t\t\t\tint contLoadID = Integer.parseInt(myLines[2]);\n\t\t\t\tmyShips.get(shipLoadID).unLoad(myContainers.get(contLoadID));\n\t\t\t\t\n\t\t\t} else if(myLines[0].equals(\"6\")) { //sailing to another port\n\t\t\t\tint shipID = Integer.parseInt(myLines[1]);\n\t\t\t\tint portID = Integer.parseInt(myLines[2]);\n\t\t\t\tShip myShip = myShips.get(shipID);\n\t\t\t\tPort destinationPort = myPorts.get(portID);\n\t\t\t\tdouble contConsumption = 0.00;\n\t\t\t\tfor(Container cont : myShip.containersInShip) {\n\t\t\t\t\tcontConsumption += cont.consumption();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble consumptionPerKM = contConsumption + myShip.getFuelConsumptionPerKM();\n\t\t\t\tdouble distance = myShip.currentPort.getDistance(myPorts.get(portID));\n\t\t\t\tdouble totalFuelRequired = distance*consumptionPerKM;\n\t\t\t\tif(myShip.getFuel() >= totalFuelRequired) {\n\t\t\t\t\tmyShip.setFuel(myShip.getFuel() - totalFuelRequired);\n\t\t\t\t\tmyShip.currentPort.current.remove(myShip);\n\t\t\t\t\tmyShip.currentPort.outgoingShip(myShip);\n\t\t\t\t\tdestinationPort.incomingShip(myShip);\n\t\t\t\t\tmyShip.currentPort = destinationPort;\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} else if(myLines[0].equals(\"7\")) {\n\t\t\t\tint shipID = Integer.parseInt(myLines[1]);\n\t\t\t\tdouble fuel = Double.parseDouble(myLines[2]);\n\t\t\t\tmyShips.get(shipID).reFuel(fuel);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\t\tPrintStream out = new PrintStream(new File(args[1]));\n\t\t\n\t\tint portNumbers = myPorts.size();\n\t\tint shipNumbers;\n\t\tfor(int n = 0; n < portNumbers; n++ ) {\n\t\t\tPort printingPort = myPorts.get(n);\n\t\t\tout.print(\"Port \" + n + \":(\" + printingPort.getX() + \", \" + printingPort.getY() + \")\");\n\t\t\tArrayList<Integer> basicPortList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> heavyPortList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> liquidPortList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> refrigeratedPortList = new ArrayList<Integer>();\n\t\t\tfor(Container c : printingPort.containers) {\n\t\t\t\tif(c instanceof BasicContainer) {\n\t\t\t\t\tbasicPortList.add(c.ID);\n\t\t\t\t} else if(c instanceof LiquidContainer) {\n\t\t\t\t\tliquidPortList.add(c.ID);\n\t\t\t\t} else if(c instanceof RefrigeratedContainer) {\n\t\t\t\t\trefrigeratedPortList.add(c.ID);\n\t\t\t\t} else {\n\t\t\t\t\theavyPortList.add(c.ID);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.sort(basicPortList); Collections.sort(heavyPortList); Collections.sort(liquidPortList); Collections.sort(refrigeratedPortList);\n\t\t\tif(!(basicPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" BasicContainer: \");\t\n\t\t\t\tfor(int b = 0; b < basicPortList.size(); b ++) {\t\n\t\t\t\t\tout.print(basicPortList.get(b) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(heavyPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" HeavyContainer: \");\n\t\t\t\tfor(int h = 0; h < heavyPortList.size(); h++) {\n\t\t\t\t\tout.print(heavyPortList.get(h) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(refrigeratedPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" RefrigeratedContainer: \");\n\t\t\t\tfor(int r = 0; r < refrigeratedPortList.size(); r++) {\n\t\t\t\t\tout.print(refrigeratedPortList.get(r) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(liquidPortList.size() == 0)) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" LiquidContainer: \");\n\t\t\t\tfor(int l = 0; l < liquidPortList.size(); l++) {\n\t\t\t\t\tout.print(liquidPortList.get(l) + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Integer> portShipList = new ArrayList<Integer>();\n\t\t\tfor(Ship s : printingPort.current) {\n\t\t\t\tportShipList.add(s.getID());\n\t\t\t}\n\t\t\tCollections.sort(portShipList);\n\t\t\tfor(int p : portShipList) {\n\t\t\t\tout.println();\n\t\t\t\tout.print(\" Ship\" + p + \": \" + myShips.get(p).getFuel());\n\t\t\t\tArrayList<Integer> basicShipList = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> heavyShipList = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> liquidShipList = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> refrigeratedShipList = new ArrayList<Integer>();\n\t\t\t\tfor(Container co : myShips.get(p).containersInShip) {\n\t\t\t\t\tif(co instanceof BasicContainer) {\n\t\t\t\t\t\tbasicShipList.add(co.ID);\n\t\t\t\t\t} else if(co instanceof LiquidContainer) {\n\t\t\t\t\t\tliquidShipList.add(co.ID);\n\t\t\t\t\t} else if(co instanceof RefrigeratedContainer) {\n\t\t\t\t\t\trefrigeratedShipList.add(co.ID);\n\t\t\t\t\t} else {\n\t\t\t\t\t\theavyShipList.add(co.ID);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\tif(!(basicShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" BasicContainer:\");\n\t\t\t\t\tfor(int b : basicShipList) {\n\t\t\t\t\t\tout.print(\" \" + b);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!(heavyShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" HeavyContainer:\");\n\t\t\t\t\tfor(int h : heavyShipList) {\n\t\t\t\t\tout.print(\" \" + h);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!(refrigeratedShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" RefrigeratedContainer:\");\n\t\t\t\t\tfor(int r : refrigeratedShipList) {\n\t\t\t\t\t\tout.print(\" \" + r);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!(liquidShipList.size() == 0)) {\n\t\t\t\t\tout.println();\n\t\t\t\t\tout.print(\" LiquidContainer:\");\n\t\t\t\t\tfor(int l : liquidShipList) {\n\t\t\t\t\t\tout.print(\" \" + l);\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\tCollections.sort(basicShipList); Collections.sort(heavyShipList); Collections.sort(liquidShipList); Collections.sort(refrigeratedShipList);\n\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\t\n\t\t\t\n\t\t\tout.println();\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tin.close();\n\t\tout.close();\n\t}", "public static PicoFile create(File file) throws IOException {\n if (file == null) {\n throw new NullPointerException(\"The file is null.\");\n }\n return create(file, KeyUtils.makeKey());\n }", "private void loadScheme(File file)\n\t{\n\t\tString name = file.getName();\n\n\t\ttry\n\t\t{\n\t\t\tBedrockScheme particle = BedrockScheme.parse(FileUtils.readFileToString(file, Charset.defaultCharset()));\n\n\t\t\tthis.presets.put(name.substring(0, name.indexOf(\".json\")), particle);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public GObject(String fileName) throws FileNotFoundException, IOException\n {\n\t BufferedReader reader = null;\n\t try \n\t {\n\t\t File file = new File(fileName); // Get file\n\t\t reader = new BufferedReader(new FileReader(file));\n\t\t \n\t\t int vertexSize = Integer.parseInt(reader.readLine().trim()); \n\t\t vertex = new Point3D [vertexSize];\n\t\t for(int i = 0 ; i < vertexSize ; i ++)\n\t\t {\n\t\t \t\tString [] vertexArray = reader.readLine().split(\" \");\n\t\t \t\tvertex[i] = new Point3D(Double.parseDouble(vertexArray[0]),Double.parseDouble(vertexArray[1]),Double.parseDouble(vertexArray[2]));\n\t\t }\n\t\t \n\t\t reader.readLine(); // Skip a line\n\t\t \n\t\t int faceSize = Integer.parseInt(reader.readLine().trim());\n\t\t face = new Face[faceSize];//Store the faces\n\t\t for(int i = 0 ; i < faceSize ; i++)\n\t\t {\n\t\t \t\tint number_of_faces = Integer.parseInt(reader.readLine().trim());\n\t\t \t\tSystem.out.println(number_of_faces);\n\t\t \t\tString [] index = (reader.readLine().split(\" \"));\n\t\t \t\t\n\t\t \t\tint [] index_v = new int [number_of_faces];\n\t\t \t\t\n\t\t \t\tfor(int j = 0 ; j < index.length; j++)\n\t\t \t\t{\n\t\t \t\t\tindex_v[j] = Integer.parseInt(index[j]);\n\t\t \t\t}\n\t\t \t\tString [] color = reader.readLine().split(\" \");\n\t\t \t\tColor color_v = new Color(Float.parseFloat(color[0]),Float.parseFloat(color[1]),Float.parseFloat(color[2])); // Get the colours\n\t\t \t\tface[i] = new Face(index_v,color_v);\n\t\t \t\tface[i].toString();\n\t\t } \n\t\t} catch (IOException e) \n\t\t{\n\t\t e.printStackTrace();\n\t\t} finally {\n\t\t try \n\t\t {\n\t\t reader.close();\n\t\t } catch (IOException e) \n\t\t {\n\t\t e.printStackTrace();\n\t\t }\n\t\t}\n }", "public static void makeDeck(ArrayList<Card> deck) throws FileNotFoundException {\n\t\t// make a Scanner inputFile and connect to file cards.txt\n\t\tScanner inputFile = new Scanner(BlackJackGame.class.getResourceAsStream(\"cards.txt\"));\n\n\t\t// while loop, as long as k<52 AND there is more info in file\n\n\t\t// read a char from the file, store in suit\n\n\t\t// read an int from the file, store in rank\n\n\t\t// make a Card temp a new Card with the suit and rank you read\n\n\t\t// assign temp to the next location in the deck array\n\n\t\t// add 1 to k for next time around\n\n\t\tint k = 0;\n\n\t\twhile (k < 52 && inputFile.hasNext()) {\n\t\t\tchar suit = inputFile.next().charAt(0);\n\t\t\tint rank = inputFile.nextInt();\n\t\t\tCard temp = new Card(suit, rank);\n\t\t\tdeck.add(temp);\n\t\t\tk++;\n\t\t}\n\t\tinputFile.close();\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws FileNotFoundException \r\n\t{\r\n\t\t//here we try to read from the text file input.txt\r\n\t\tFileInputStream fis = new FileInputStream(\"D:/New folder/input.txt\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc = new Scanner(fis);\r\n\t\t//here we are trying to store the elements in the object array\r\n\t\tint number_of_employees = Integer.parseInt(sc.nextLine().split(\": \")[1]);\r\n\t\tGoodie[] goodieslist = new Goodie[10];\r\n\t\tint i = 0;\r\n\t\twhile (sc.hasNext()) {\r\n\t\t\tString[] nameprice = sc.nextLine().split(\": \");\r\n\t\t\tGoodie g1 = new Goodie(nameprice[0], Integer.parseInt(nameprice[1]));\r\n\t\t\tgoodieslist[i] = g1;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t//now the values present in the file are copied to the object array\r\n\r\n\t\t//in order to get the output we are calling this method \r\n\t\tGoodies_sort.goodiecheck(goodieslist, number_of_employees);\r\n\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tFile myFile = new File(\"newfile.txt\");\n\t\t/*try {\n\t\t\tboolean isCreated = myFile.createNewFile();\n\t\t\tif(isCreated) {\n\t\t\t\tSystem.out.println(\"Your file is created\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"File wasn't created, or it's already there\");\n\t\t\t}\n\t\t} catch (FileNotFoundException fnf){\n\t\t\tfnf.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} */\n\t\t\n\t\t////////////////////// WRITE TO A FILE //////////////////////////////\n\t\t/*\n\t\t * \n\t\t */\n\t\ttry{\n\t\t byte[] writeArr = {1,2,3,4,5};\n\t\t FileWriter os = new FileWriter(\"newfile.txt\");\n\t\t for(int i = 0; i < writeArr.length ; i++){\n\t\t os.write( writeArr[i] ); \n\t\t }\n\t\t os.close();\n\t\t \n\t\t \n\t\t FileReader is = new FileReader(\"newfile.txt\");\n\t\t BufferedReader bfr = new BufferedReader((is));\n\t\t bfr.readLine()\n\t\t int size = is.available();\n\t\t \n\t\t for(int i=0; i< size; i++){\n\t\t System.out.print(is.read() + \" \");\n\t\t }\n\t\t is.close();\n\t\t }catch(IOException e){\n\t\t System.out.print(\"Exception\");\n\t\t }\t\n\t\t\n\t\t\n\n\t}", "Board(String filename, SudokuContainer s) {\n\t\treadFromFile(filename);\n\t\trows = new Row[size];\n\t\tcolumns = new Column[size];\n\t\tboxes = new Box[height][length];\n\t\tcontainer = s;\n\t\tcreateBoard();\n }", "public void createFile(File file) {\n\t\tif (file.exists())\n\t\t\treturn;\n\t\ttry {\n\t\t\tfile.createNewFile();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tFile file = new File(\"test/a.txt\");\r\n\t\tFileUtil.createFile(file);\r\n\t\t/*if(! file.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tSkipList<String, Rectangle> list = new SkipList<String, Rectangle>();\n\t\tString file = args[0];\n\t\tScanner scan = new Scanner(new File(file));\n\t\t// FileProcessor fp = new FileProcessor();\n\t\t// fp.fileParser(line);\n\t\ttry {\n\t\t\tString lineReader = \"\";\n\t\t\twhile (scan.hasNextLine()) {\n\t\t\t\tlineReader = scan.nextLine();\n\t\t\t\t// regex string delimeter we need to figure out to get rid of excess whitespace\n\t\t\t\t// between parameters in text file\n\t\t\t\tString CMD = lineReader.trim();\n\t\t\t\tString[] lineCMD = CMD.split(\"\\\\s+\");\n\t\t\t\t// switch statement for all situations\n\t\t\t\tswitch (lineCMD[0]) {\n\t\t\t\tcase \"insert\":\n\t\t\t\t\tString name = lineCMD[1];\n\t\t\t\t\tint xCord = Integer.parseInt(lineCMD[2]);\n\t\t\t\t\tint yCord = Integer.parseInt(lineCMD[3]);\n\t\t\t\t\tint width = Integer.parseInt(lineCMD[4]);\n\t\t\t\t\tint height = Integer.parseInt(lineCMD[5]);\n\t\t\t\t\tRectangle rect = new Rectangle(name, xCord, yCord, width, height);\n\t\t\t\t\tKVPair<String, Rectangle> item = new KVPair<String, Rectangle>(name, rect);\n\t\t\t\t\tif (width <= 0 || height <= 0 || (xCord + width > 1024) || (xCord + width < 0)\n\t\t\t\t\t\t\t|| (yCord + height > 1024) || (yCord + height < 0) || (xCord < 0) || (yCord < 0)) {\n\t\t\t\t\t\tSystem.out.println(\"Rectangle rejected: (\" + name + \", \" + xCord + \", \" + yCord + \", \" + width\n\t\t\t\t\t\t\t\t+ \", \" + height + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.insert(name, rect);\n\t\t\t\t\t\tSystem.out.println(\"Rectangle Inserted: (\" + name + \", \" + xCord + \", \" + yCord + \", \" + width\n\t\t\t\t\t\t\t\t+ \", \" + height + \")\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"remove\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"regionsearch\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"intersections\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"search\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dump\":\n\t\t\t\t\tSystem.out.println(\"SkipList dump: \");\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(lineCMD[0]);\n\t\t\t}\n\t\t}\n\t\t// line = scan.nextLine();\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// String line = scan.nextLine();\n\t\t// System.out.println(line);\n\t\t// System.out.println(file);\n\t\t// fileParser(file);\n\t\t// Rectangle1 rect = new Rectangle1();\n\n\t}", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "public static FroggerGame read(String name) throws IOException {\r\n FroggerGame frogger = new FroggerGame();\r\n\r\n Gson gson = new Gson();\r\n\r\n try (Reader reader = new FileReader(name)) {\r\n\r\n // this line is a modified line copied from https://mkyong.com/java/how-to-parse-json-with-gson/\r\n RuntimeTypeAdapterFactory<Sprite> adapter = RuntimeTypeAdapterFactory.of(Sprite.class, \"type\")\r\n .registerSubtype(Frog.class)\r\n .registerSubtype(Enemy.class)\r\n .registerSubtype(Car.class)\r\n .registerSubtype(Truck.class)\r\n .registerSubtype(Alligator.class)\r\n .registerSubtype(Item.class);\r\n gson = new GsonBuilder().registerTypeAdapterFactory(adapter).create();\r\n frogger = gson.fromJson(reader,FroggerGame.class);\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.print(\"We could not find that save file \\n We will start you a new game \\n\");\r\n }\r\n\r\n return frogger;\r\n }", "public static void createFile(String name)\n {\n file = new File(name);\n try\n {\n if(file.exists())\n {\n file.delete();\n file.createNewFile();\n }else file.createNewFile();\n \n fileWriter = new FileWriter(file);\n fileWriter.append(\"Generation, \");\n fileWriter.append(\"Fitness, \");\n fileWriter.append(\"Average\\n\");\n \n }catch (IOException e) \n {\n System.out.println(e);\n }\n \n }", "public static void main(String[] args) throws IOException {\n\t\tScanner input= new Scanner(new File(\"input.txt\"));\n\t\tFile analysis = new File(\"analysis.txt\");\n\t\tanalysis.createNewFile();\n\t\tFileWriter wrt = new FileWriter(\"analysis.txt\");\n\t\t\n\t\t\n\t\tString line =new String();\n\t\tString arg =new String();\n\t\t\n\t\twhile(input.hasNextLine()){\n\t\t\tChessList list = new ChessList();\n\t\t\t//pulls arguments from input.txt\n\t\t\tline=input.nextLine();\n\t\t\targ=input.nextLine();\n\t\t\t\n\t\t\tString[] data=line.split(\"\\\\s+\");\n\t\t\tString[] ar = arg.split(\"\\\\s+\");\n\t\t\t\n\t\t\tint xarg = Integer.parseInt(ar[0]);\n\t\t\tint yarg = Integer.parseInt(ar[1]);\n\t\t\tint size = Integer.parseInt(data[0]);\n\t\t\tfor(int i=1;i<data.length;i+=3){\n\t\t\t\tString name=data[i];\n\t\t\t\tint x=Integer.parseInt(data[i+1]);\n\t\t\t\tint y=Integer.parseInt(data[i+2]);\n\t\t\t\tNode temp=new Node(createPiece(name,x,y,size));\n\t\t\t\tlist.add(temp);\n\t\t\t}\n\t\t\t\t\n\t\t\t\t//checks validity and writes it into analysis.txt\n\t\t\t\tif (list.checkValid()==false){\n\t\t\t\t\twrt.write(\"Invalid\");\n\t\t\t\t}\n\t\t\t\t//if valid, finds the argument and returns an attack if possible\n\t\t\t\telse{\n\t\t\t\t\tif(list.checkSpace(xarg, yarg)==null){\n\t\t\t\t\t\twrt.write(\"- \");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twrt.write(list.checkSpace(xarg, yarg).name()+\" \");\n\t\t\t\t\t}\n\t\t\t\t\tif(!list.checkAttack()){\n\t\t\t\t\t\twrt.write(\"-\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twrt.write(list.firstAttack());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\twrt.write(\"\\n\");\n\t\t}\n\t\tinput.close();\n\t\twrt.close();\n\t}", "public ObjModel(File file) throws FileNotFoundException {\r\n\r\n\t\tvertices = new ArrayList<>();\r\n\t\ttextureCoordinates = new ArrayList<>();\r\n\t\tfaces = new ArrayList<>();\r\n\r\n\t\tScanner scanner = new Scanner(file);\r\n\r\n\t\twhile (scanner.hasNextLine()) {\r\n\t\t\tString[] line = scanner.nextLine().split(\" \");\r\n\t\t\tif (line[0].equals(\"v\")) {\r\n\t\t\t\tfloat x = Float.parseFloat(line[1]);\r\n\t\t\t\tfloat y = Float.parseFloat(line[2]);\r\n\t\t\t\tfloat z = Float.parseFloat(line[3]);\r\n\t\t\t\tvertices.add(new Vector3f(x, y, z));\r\n\t\t\t} else if (line[0].equals(\"vt\")) {\r\n\t\t\t\tfloat x = Float.parseFloat(line[1]);\r\n\t\t\t\tfloat y = Float.parseFloat(line[2]);\r\n\t\t\t\ttextureCoordinates.add(new Vector3f(x, y));\r\n\t\t\t} else if (line[0].equals(\"f\")) {\r\n\t\t\t\tFace face = new Face();\r\n\t\t\t\tfor (int i = 1; i < line.length; i++) {\r\n\t\t\t\t\tString[] sections = line[i].split(\"/\");\r\n\t\t\t\t\tif (sections.length >= 1) {\r\n\t\t\t\t\t\tint vertex = Integer.parseInt(sections[0]);\r\n\t\t\t\t\t\tface.addVertex(vertex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (sections.length >= 2) {\r\n\t\t\t\t\t\tint textureCoordinate = Integer.parseInt(sections[1]);\r\n\t\t\t\t\t\tface.addTextureCoordinate(textureCoordinate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfaces.add(face);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscanner.close();\r\n\t}", "public static void createGoldenFile(String root, TestCase test, Object object)\n throws IOException {\n String goldenPath = (test.getClass().getName().replace('.', File.separatorChar)\n + \".golden.ser\");\n if (root != null) {\n goldenPath = root + File.separatorChar + goldenPath;\n }\n\n File goldenFile = new File(goldenPath);\n goldenFile.getParentFile().mkdirs();\n assertTrue(\"Could not create \" + goldenFile.getParentFile(),\n goldenFile.getParentFile().isDirectory());\n goldenFile.createNewFile();\n putObjectToStream(object, new FileOutputStream(goldenFile));\n\n // don't forget to remove it from test case after using\n fail(\"Generating golden file. Golden file name: \" + goldenFile.getAbsolutePath());\n }", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadGame(String fileName){\n\n }", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public static SnakeProblem buildProblemFromFile(File file) throws IOException {\n int NUM_ONE_AI_OBLIGATORY_PARAMS = 4;\n int NUM_TWO_AI_OBLIGATORY_PARAMS = 7;\n\n java.util.Scanner f;\n try {\n f = new java.util.Scanner(file);\n } catch (FileNotFoundException e) {\n return null;\n }\n\n List<String> lines = new LinkedList<>();\n\n while (f.hasNextLine()) {\n String s = f.nextLine();\n if (!s.equals(\"\") && !s.startsWith(\"//\")) {\n lines.add(s);\n }\n }\n\n List<String> parametersValues = new LinkedList<>();\n for (String line : lines) {\n String[] tokens = line.split(\":|,\");\n for (int i = 1; i < tokens.length; i++) {\n parametersValues.add(tokens[i].trim());\n }\n }\n\n int environmentSize, maxIterations, numEnvironmentRuns;\n\n\n try {\n environmentSize = Integer.parseInt(parametersValues.get(0));\n maxIterations = Integer.parseInt(parametersValues.get(1));\n numEnvironmentRuns = Integer.parseInt(parametersValues.get(2));\n } catch (NumberFormatException e) {\n return null;\n }\n\n if (parametersValues.size() > NUM_ONE_AI_OBLIGATORY_PARAMS) {\n List<Integer> numInputs = new ArrayList<>();\n List<Integer> numHiddenUnits = new ArrayList<>();\n List<Integer> numOutputs = new ArrayList<>();\n List<ActivationFunction> activationFunctions = new ArrayList<>();\n\n try {\n numInputs.add(Integer.parseInt(parametersValues.get(3)));\n\n if (parametersValues.size() > NUM_TWO_AI_OBLIGATORY_PARAMS) {\n numInputs.add(Integer.parseInt(parametersValues.get(4)));\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(5)));\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(6)));\n numOutputs.add(Integer.parseInt(parametersValues.get(7)));\n numOutputs.add(Integer.parseInt(parametersValues.get(8)));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(9).toUpperCase()));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(10).toUpperCase()));\n } else {\n numHiddenUnits.add(Integer.parseInt(parametersValues.get(4)));\n numOutputs.add(Integer.parseInt(parametersValues.get(5)));\n activationFunctions.add(ActivationFunction.valueOf(parametersValues.get(6).toUpperCase()));\n }\n } catch (IllegalArgumentException e) {\n return null;\n }\n\n return new SnakeProblem(\n environmentSize,\n maxIterations,\n numEnvironmentRuns,\n numInputs,\n numHiddenUnits,\n numOutputs,\n activationFunctions);\n }\n\n return new SnakeProblem(\n environmentSize,\n maxIterations,\n numEnvironmentRuns);\n }", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "public static void main(String[] args) {\n File file = new File (\"tesEt.txt\");\n // Path file = Paths.get(\"test.txt\");\n // System.out.println(file.get);\n System.out.println(file.getAbsoluteFile());\n System.out.println(file.isAbsolute());\n System.out.println(file.exists());\n \n // try {\n // // File.createTempFile(\"prefix\", \"suffix\");\n // sy\n // } catch (IOException e) {\n // // TODO Auto-generated catch block\n // e.printStackTrace();\n // }finally\n // {\n // System.out.println(\"hehehehe\");\n // }\n // file.\n\n }", "private void setSprite(String filepath){\n try {\n this.sprite = new Sprite(new Texture(Gdx.files.internal(filepath)));\n }\n catch (Exception e){\n }\n }", "public FileOnDisk(String name, File file) throws StyxException\n {\n this(name, file, 0666, true);\n }" ]
[ "0.58499163", "0.5751605", "0.5711513", "0.5667484", "0.5666145", "0.563188", "0.5556618", "0.5549265", "0.5352801", "0.5328735", "0.5327591", "0.53165805", "0.52575034", "0.52481294", "0.5233291", "0.52038056", "0.517564", "0.5175044", "0.515222", "0.5144641", "0.5144121", "0.5141504", "0.51401436", "0.5139241", "0.51277566", "0.51187515", "0.51149404", "0.51051235", "0.50931406", "0.50876206", "0.5079997", "0.5077185", "0.507706", "0.5068704", "0.504516", "0.5044556", "0.5040008", "0.5009322", "0.499998", "0.49998248", "0.4995322", "0.49916223", "0.49806884", "0.49735618", "0.4971877", "0.49586347", "0.49567425", "0.49567425", "0.49526933", "0.49494097", "0.494268", "0.49394307", "0.493725", "0.4926884", "0.49237508", "0.49200168", "0.49115595", "0.49058604", "0.49052328", "0.49036416", "0.48995608", "0.48974335", "0.48858806", "0.4880028", "0.48757443", "0.48720208", "0.4868572", "0.48674524", "0.48652795", "0.48627144", "0.48537385", "0.48512772", "0.4841427", "0.4839686", "0.48219368", "0.48214048", "0.48209625", "0.48192677", "0.48063967", "0.48063916", "0.48024988", "0.48023418", "0.48005983", "0.47940257", "0.4790837", "0.47903427", "0.47861904", "0.47852376", "0.47844124", "0.47788256", "0.4761765", "0.47603536", "0.47536477", "0.47519356", "0.47488973", "0.47445333", "0.47444785", "0.4743123", "0.4741216", "0.47407717" ]
0.7199949
0
Shuffles the cards in the shoe
@Override public void shuffle() { System.out.println("shuffling the shoe..."); Collections.shuffle(this.cards); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public void shuffleCards() {\n Collections.shuffle(suspectCards);\n Collections.shuffle(weaponCards);\n Collections.shuffle(roomCards);\n\n }", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public void shuffleDeck() {\n\t\tint numberOfShuffles = (int) ( Math.random() * 4 + 1 ) ;\n\t\tCard temp;\n\t\t\n\t\tfor( int j = 0; j < numberOfShuffles; j++ ) {\n\t\t\tfor( int i = 0; i < deck.length; i++ ) {\n\t\t\t\tint randSwitchNum = (int) (Math.random() * 52);\n\t\t\t\ttemp = deck[i];\n\t\t\t\tdeck[i] = deck[randSwitchNum];\n\t\t\t\tdeck[randSwitchNum] = temp;\n\t\t\t}\n\t\t}\t\n\t}", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "void shuffle() {\r\n cards.addAll(dealtCards);\r\n dealtCards.removeAll(dealtCards);\r\n Collections.shuffle(cards);\r\n System.out.println(\"Shuffled cards\" + cards);\r\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public void shuffle();", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "public void shuffle(int numShuffles)\n { \n Card tempCard;\n int switchOne, switchTwo;\n\n for (int i=0; i<numCards; i++){\n switchOne = rand.nextInt(numCards);\n switchTwo = rand.nextInt(numCards);\n\n tempCard = cardAry[switchOne];\n cardAry[switchOne] = cardAry[switchTwo];\n cardAry[switchTwo] = tempCard; \n }\n\n if(cardAry.length > 1 && cardAry.length <=5 && isSorted()==true)\n shuffle(2);\n }", "public void shuffle()\r\n {\r\n Collections.shuffle(cards);\r\n top = NUMCARDS - 1;\r\n }", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "void shuffle();", "void shuffle();", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "@Test\n public void reshuffle() {\n for(int i=0;i<10;i++){\n Shoe s = new Shoe(i);\n\n //draw a part of the cards\n for(int j=0;j<i*30;j++){\n s.drawCard();\n }\n\n s.reshuffle();\n Assert.assertEquals(i*Deck.getNumCardsInDeck(),s.getShoe().size());//checks if amount of cards is correct\n //shuffle is allready tested\n }\n\n System.out.println(\"reshuffle() is working fine\");\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle(){\n\t\t\n\t\tArrayList<Boolean> used = new ArrayList<Boolean>();\n\t\tArrayList<Integer> copyStones = new ArrayList<Integer>();\n\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\tcopyStones.add(gameStones.get(e));\n\t\t\tused.add(false);\n\t\t}\n\t\tfor(int e : copyStones){\n\t\t\tchar l = stoneChars.get(e);\n\t\t\tboolean placed = false;\t\t\n\t\t\twhile(!placed){\n\t\t\t\tint randNumber = (int) (Math.random() * 7);\n\t\t\t\tif(!used.get(randNumber)){\n\t\t\t\t\tgameStones.set(randNumber, e);\n\t\t\t\t\tstoneLetters.set(randNumber, l);\n\t\t\t\t\tused.set(randNumber, true);\n\t\t\t\t\tplaced = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void shuffle() {\n deck.clear();\n deck.addAll(allCards);\n Collections.shuffle(deck, new Random(System.nanoTime()));\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public abstract void shuffled();", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public void shuffle() {\n //Beginning with the top card, decrement i until i is 0.\n for (int i = this.topCard - 1; i >= 0; i--) {\n Card tmpCard = this.cards[i]; //Store the card at i, since it will be overwritten.\n //Choose a random card position from within the deck.\n int randomPosition = (int) (Math.random() * (this.topCard - 1));\n //Take the card from the random position and store it in the ith position.\n this.cards[i] = this.cards[randomPosition];\n //Take the card from the ith position, and put it into the randomly chosen position.\n this.cards[randomPosition] = tmpCard;\n //The cards have now been swapped.\n }\n }", "public void shuffleDeck() {\n\t\tCollections.shuffle(deck);\n\t}", "public static void shuffle(Card[] cards) {\n for (int i = 0; i < cards.length - 1; i++) {\n int j = i + (int)((cards.length - i) * Math.random());\n swap(i, j, cards);\n }\n }", "public void shuffle()\r\n {\r\n // We will start from the last element and swap the cards one by one. We actually\r\n // don't need to swap the last element.\r\n for (int i = valid - 1; i > 0; i --) { \r\n \r\n // By using Math.random, we will get a random integer from 0 to i\r\n int j = (int) ( (i+1) * Math.random()); \r\n \r\n // Swapping with the help of temp instance of Card Class.\r\n Card temp = cards[i]; \r\n cards[i] = cards[j]; \r\n cards[j] = temp; \r\n } \r\n // Prints the random array \r\n }", "public void shuffleDeck() {\n\t\tCollections.shuffle(this.deck);\n\t}", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "private void shuffleCards(final ICard[] myCards) {\r\n ICard tmp;\r\n int rand;\r\n for (int i = ZERO; i < myCards.length; i++) {\r\n rand = rmd.nextInt(myCards.length);\r\n tmp = myCards[i];\r\n myCards[i] = myCards[rand];\r\n myCards[rand] = tmp;\r\n }\r\n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "public boolean shuffleNeeded();", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "public ArrayList<PrizeCard> scramble() {\n java.util.Random rand1 = new java.util.Random();\n ArrayList<PrizeCard> scrambled = new ArrayList<PrizeCard>();\n scrambled = prizeCards;\n /* write your code here */\n\n\n\n for (int i = 0; i < 40; i++) {\n if (i % 10 == 0) {\n int rand = rand1.nextInt(39 / 10) * 10;\n PrizeCard temp = prizeCards.get(i);\n scrambled.set(i, prizeCards.get(rand));\n scrambled.set(rand, temp);\n } else if (i % 2 == 0) {\n int rand = rand1.nextInt(39 / 2) * 2;\n PrizeCard temp = prizeCards.get(i);\n scrambled.set(i, prizeCards.get(rand));\n scrambled.set(rand, temp);\n } else {\n int rand = (rand1.nextInt(38 / 2) * 2) + 1;\n PrizeCard temp = prizeCards.get(i);\n scrambled.set(i, prizeCards.get(rand));\n scrambled.set(rand, temp);\n }\n }\n\n return scrambled;\n }", "protected abstract void playShuffled();", "public int Shuffle_Distribute(int numberOfPlayers)\n\t{\n\t\t//put 52 cards in a list and shuffle them\n\t\tArrayList<String> pokerToUse = new ArrayList<String>(Arrays.asList(pokerCards));\n\t\tCollections.shuffle(pokerToUse);\n\t\t//based on how many people play\n\t\tint whoStarts=0;\n\t\tswitch(numberOfPlayers)\n\t\t{\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\tuser1card = new ArrayList<String>();\n\t\t\t\tuser2card = new ArrayList<String>();\n\t\t\t\t//give 13 cards to each player\n\t\t\t\tfor(int i=0;i<13;i++)\n\t\t\t\t{\n\t\t\t\t\t//give a random card to the first player\n\t\t\t\t\tint idx1 = new Random().nextInt(pokerToUse.size());\n\t\t\t\t\tString random1 = pokerToUse.get(idx1);\n\t\t\t\t\tpokerToUse.remove(idx1);\n\t\t\t\t\tuser1card.add(random1);\n\t\t\t\t\t//give a random card to the second player\n\t\t\t\t\tint idx2 = new Random().nextInt(pokerToUse.size());\n\t\t\t\t\tString random2 = pokerToUse.get(idx2);\n\t\t\t\t\tpokerToUse.remove(idx2);\n\t\t\t\t\tuser2card.add(random2);\n\t\t\t\t}\t\n\t\t\t\tboolean findWhoStarts = false;\n\t\t\t\tint cardNumber=4;\n\t\t\t\twhile(findWhoStarts==false)\n\t\t\t\t{\n\t\t\t\t\tString card = new StringBuilder(\"h\").append(Integer.toString(cardNumber)).toString();\n\t\t\t\t\tif(user1card.contains(card))\n\t\t\t\t\t{\n\t\t\t\t\t\tfindWhoStarts=true;\n\t\t\t\t\t\twhoStarts=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if(user2card.contains(card))\n\t\t\t\t\t{\n\t\t\t\t\t\tfindWhoStarts=true;\n\t\t\t\t\t\twhoStarts=2;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfindWhoStarts=false;\n\t\t\t\t\t\tcardNumber++;\n\t\t\t\t\t\t//it's rarely possible no one has a heart car. If it happesn, re shuffle \n\t\t\t\t\t\tif (cardNumber==14)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\twhoStarts=99;//error needs reshuffle\n\t\t\t\t\t\t\tbreak;\n\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\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tdefault:\n\t\t\t\twhoStarts=0;\n\t\t\t\tbreak;\n\t\t\n\t\t}\t\n\t\treturn whoStarts;\n\t}", "Vector<Card> shuffleDeck(Vector<Card> cards)\n\t{\n\t Collections.shuffle(cards);\n\t return cards;\n\t}", "private void mixDeck() {\n Random rnd = new Random();\n ArrayList<UnoCard> mixed = new ArrayList<UnoCard>();\n\n // mix it!\n for(int i = cards.size()-1; i>0;i--) {\n int index = rnd.nextInt(i+1);\n UnoCard helper = cards.get(index);\n cards.remove(index);\n mixed.add(helper);\n }\n\n // delete current arrayList\n cards = null;\n // set mixed cards to original carddeck\n cards = mixed;\n\n // paint cards again because order has changed\n for(UnoCard c : cards) {\n c.setContainer(deckPos);\n }\n\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "private void shuffleOnceRandom(){\n\t\t//You need to have a copy of the deck before you shuffled it so you can reference\n\t\t//It when you are trying to replace the new values\n\t\tList<Card> beforeShuffle = ourDeck.makeCopy().getCurrentDeck();\n\t\t//The topIndex tells us where we are in reference to the top half of the deck\n\t\t//Same with bottom this helps us reference the original deck to get whatever\n\t\t//Card we need and the deckIndex helps us put it in the correct spot\n\t\tint topIndex = 0, bottomIndex = ourDeck.getSize() / 2, deckIndex = 0;\n\t\t//These ints help us keep track of how many cards are left in each half\n\t\tint remainingTop = ourDeck.getSize() / 2, remainingBot = ourDeck.getSize() / 2;\n\t\tboolean shouldLoop = true;\n\t\t//This is the shuffling loop\n\t\twhile(shouldLoop){\n\t\t\t//This means the number coming from the specific deck which in this method is random\n\t\t\tint numTop = generator.nextInt(RAND_BOUND), numBot = generator.nextInt(RAND_BOUND);\n\t\t\t//After we determine the random number of cards we're using we have to do some checks\n\t\t\t//This means we wanted more than there was less therefore the stack is out\n\t\t\t//This is the stopping condition for the loop\n\t\t\tif(numTop >= remainingTop){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(numBot >= remainingBot){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t//This is where I replace the newCard into ourDeck\n\t\t\t//I iterate for the number of times we take from the top or bottom\n\t\t\tfor(int i = 1; i <= numTop; i++){\t\n\t\t\t\tCard newCard = beforeShuffle.get(topIndex);\t//I get the card we want to move\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\t\t//Then I move it to the new deckIndex\n\t\t\t\ttopIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tfor(int i = 1; i <= numBot; i++){\n\t\t\t\tCard newCard = beforeShuffle.get(bottomIndex);\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\n\t\t\t\tbottomIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tremainingTop = remainingTop - numTop;\n\t\t\tremainingBot = remainingBot - numBot;\n\t\t}\n\t}", "public void shuffle()\n {\n Collections.shuffle(artefacts);\n }", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "public void zipShuffle() {\r\n List<Card> half = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n int h = cards.size()/2;\r\n for (int i = 0; i < h; i++) {\r\n half.add(draw());\r\n }\r\n int j = 0;\r\n while ((half.size() + cards.size()) > 0) {\r\n if (half.size() > 0 && cards.size() > 0) {\r\n if (j % 2 == 0) {\r\n shuffledDeck.add(half.remove(0));\r\n } else {\r\n shuffledDeck.add(draw());\r\n }\r\n } else if (half.size() > 0) {\r\n shuffledDeck.add(half.remove(0));\r\n } else if (cards.size() > 0) {\r\n shuffledDeck.add(draw());\r\n }\r\n j++;\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n half.clear();\r\n shuffledDeck = tempDeck;\r\n shuffledDeck.clear();\r\n }\r\n }", "public static int[] createShuffledDeck(){\n //create a deck\n int[] deck = new int[52];\n //make each item their respective index + 1 to avoid repetition\n for(int i = 0; i < deck.length; i++){\n deck[i] = i+1;\n }\n //shuffle deck\n shuffle(deck);\n return deck;\n }", "public void scramble(){\r\n for (int i = 0; i < data.length / 2; i++){\r\n int randomIndex1 = (int)(Math.random()*(data.length - 1));\r\n int randomIndex2 = (int)(Math.random()*(data.length - 1));\r\n swap(randomIndex1, randomIndex2);\r\n }\r\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "public static SuggestHand shuffleAndAssignCards(\r\n ArrayList< Player > players )\r\n {\r\n int counter = 0; // Iterator pointer to keep track of the\r\n // cards\r\n SuggestHand solutionCards = null;\r\n\r\n /*\r\n * Grab all the names and types of each card Had to do some list\r\n * manipulation to get the enums into a modifiable list.\r\n */\r\n List< WeaponType > weaponEnums = new ArrayList< WeaponType >(\r\n Arrays.asList( WeaponCard.WeaponType.values() ) );\r\n List< CharacterName > characterEnums = new ArrayList< CharacterName >(\r\n Arrays.asList( CharacterCard.CharacterName.values() ) );\r\n List< RoomName > roomEnums = new ArrayList< RoomName >(\r\n Arrays.asList( RoomCard.RoomName.values() ) );\r\n\r\n //System.out.println( characterEnums.size() );\r\n\r\n // Card equivalents of the enums\r\n ArrayList< CharacterCard > characters = new ArrayList< CharacterCard >();\r\n ArrayList< RoomCard > rooms = new ArrayList< RoomCard >() ;\r\n ArrayList< WeaponCard > weapons = new ArrayList< WeaponCard >();\r\n\r\n for( CharacterName c : characterEnums )\r\n {\r\n characters.add( new CharacterCard( c ) );\r\n }\r\n\r\n for( RoomName r : roomEnums )\r\n {\r\n rooms.add( new RoomCard( r ) );\r\n }\r\n\r\n for( WeaponType w : weaponEnums )\r\n {\r\n weapons.add( new WeaponCard( w ) );\r\n }\r\n\r\n // Shuffle the ArrayLists\r\n Collections.shuffle( weapons );\r\n Collections.shuffle( characters );\r\n Collections.shuffle( rooms );\r\n\r\n //System.out.println( characters.get( 0 ).getCharacterName() );\r\n\r\n // Remove the top card from each card type and store as solution cards\r\n try\r\n {\r\n solutionCards = new SuggestHand( characters.remove( 0 ), rooms.remove( 0 ), weapons.remove( 0 ) );\r\n\r\n } catch( Exception e )\r\n {\r\n System.out.println( \"Error generating solution cards.\" );\r\n e.printStackTrace();\r\n System.exit( 0 );\r\n }\r\n\r\n // Combine all cards into one larger deck\r\n List< Card > deck = new ArrayList< Card >();\r\n deck.addAll( characters );\r\n\r\n deck.addAll( rooms );\r\n\r\n deck.addAll( weapons );\r\n\r\n\r\n // Shuffle the deck and assign to each player sequentially\r\n Collections.shuffle( deck );\r\n\r\n\r\n /*\r\n * Loops through the cards and players, assigning the cards to players\r\n * one by one.\r\n */\r\n for( Card card : deck )\r\n {\r\n players.get( counter % players.size() ).setCard( card );\r\n counter++;\r\n }\r\n\r\n // DEBUG Print statements to show the cards for each player\r\n// for( Player p : players )\r\n// {\r\n// System.out.println( p.PlayerNumber+ \" \" + p.getHand().toString() );\r\n// }\r\n\r\n // Return the three cards to be used as the solution cards.\r\n return solutionCards;\r\n\r\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public void shufflePerfectly() {\n\n ArrayList<Card> topDeck = new ArrayList<Card>(), botDeck = new ArrayList<Card>();\n for (int i = cards.size()-1; i >= 0; i--) {\n Card shuffleCard = null;\n try {\n shuffleCard = cards.get(i);\n }\n catch (Exception e) {\n // If card does not exist\n }\n if (shuffleCard != null) {\n if (i >= cards.size() / 2) {\n topDeck.add(shuffleCard);\n }\n else {\n botDeck.add(shuffleCard);\n }\n }\n }\n int len;\n boolean equalStacks = false;\n Card extraCard = null;\n\n if (topDeck.size() == botDeck.size()) {\n equalStacks = true;\n len = topDeck.size();\n }\n else {\n if (topDeck.size()>botDeck.size()) {\n len = botDeck.size();\n extraCard = topDeck.get(topDeck.size()-1);\n }\n else {\n len = topDeck.size();\n extraCard = botDeck.get(botDeck.size()-1);\n }\n }\n\n ArrayList<Card> shuffledDeck = new ArrayList<Card>();\n\n for (int i = len-1; i >= 0; i--) {\n // Shuffle the cards\n shuffledDeck.add(botDeck.get(i));\n shuffledDeck.add(topDeck.get(i));\n\n }\n if (!equalStacks) {\n shuffledDeck.add(extraCard);\n }\n\n ArrayList<Card> newDeck = new ArrayList<Card>();\n\n for (int i = 0; i < shuffledDeck.size(); i++) {\n newDeck.add(shuffledDeck.get(i));\n }\n cards = newDeck;\n }", "public void shuffle() {\n Collections.shuffle(this.plateau);\n }", "protected void shuffle(List<Card> deck) {\n Collections.shuffle(deck);\n }", "public void setChanceCardShuffle() {\n ChanceCardShuffle = true;\n }", "public void shuffle() {\n Collections.shuffle(this);\n }", "public void mixSalad() {\n Collections.shuffle(list);\n System.out.println(\"\\nSalad is ready.\");\n }", "private void shuffle(ArrayList<Product> dataSet) {\n\t\tfor (int i = 0; i < dataSet.size(); i++) {\n\t\t\tint k = rand(0, i);\n\t\t\tProduct temp = dataSet.get(k);\n\t\t\tdataSet.set(k, dataSet.get(i));\n\t\t\tdataSet.set(i, temp);\n\t\t}\t\n\t}", "public void setChestCardShuffle() {\n ChanceCardShuffle = true;\n }", "public static void shuffle(int[] deck){\n //temporary variable for swapping the values\n int storage = 0;\n //random integer\n int randomInt;\n for(int i = 0; i < deck.length; i++){\n //set the variable equal to a random integer every time\n randomInt = (int) (Math.random() * (deck.length));\n //store the original deck[i] in storage\n //swap deck[i] and deck[randomInt]\n storage = deck[i];\n deck[i] = deck[randomInt];\n deck[randomInt] = storage;\n }\n }", "public void shuffle() {\n\t\t\n\t\tRandom random = new Random();\n\t\tint position;\n\t\t\n\t\tfor(int i = 0; i < 200 * dimension; i++) {\n\t\t\tposition = random.nextInt(numTiles - 1);\n\t\t\tif(isValidMove(position)) {\n\t\t\t\tmakeMove(position);\n\t\t\t}\n\t\t}\n\t\t\n\t\tnumMoves = 0;\n\t}", "@Test\r\n public void test2() {\r\n int[] deck = new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\r\n shuffle(deck);\r\n String prepend = \"\";\r\n for (int i : deck) {\r\n System.out.print(prepend + i);\r\n prepend = \", \";\r\n }\r\n System.out.println();\r\n }", "public static void cardsPlayer(int player){\n System.out.println(\"Player has cards as below\");\n for(int i=0;i<player;i++){\n System.out.println(\"the player has cards\"+i);\n shuffleCards(arrayList,player);\n }\n }", "public void fakeCards(){\n this.drawPile = new ArrayList<>();\n drawPile.add(new RemoveActionCard(\"Fernsprechgerät\", (float) 0.5, 4, new SpecialActions(0,0,1) ));\n drawPile.add(new MovingCard(\"Millionärin\", 4, 5, 4, 99, new COLOR[]{COLOR.SAND}));\n drawPile.add(new RemoveMoveSellCard(\"Propellerflugzeug\", 4, 4, 4, 99, new COLOR[]{COLOR.SAND, COLOR.RIVER, COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new MovingCard(\"Ureinwohner\", (float) 0.5, 5, 99, 1, new COLOR[]{COLOR.BASECAMP, COLOR.RUBBLE, COLOR.JUNGLE, COLOR.SAND, COLOR.RIVER,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new ActionCard(\"Wissenschaftlerin\", (float) 0.5, 4, new SpecialActions(1,1,0)));\n drawPile.add(new MovingCard(\"Pionier\", (float) 0.5, 5, 5, 99, new COLOR[]{COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE}));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n Collections.shuffle(drawPile);\n }", "public static String[] randomizeHand(String[] arrayShuffle){\n String[] combine=new String[5];\n int k=-1;\n for(int i=0;i<5;i++){\n int j=(int)(Math.random()*52);\n if(j==k){continue;} // use if statements to avoid from picking up the same item twice\n else{combine[i]=arrayShuffle[j];k=j;\n }}\n return combine;}", "@Test\n void shuffleTest() {\n CardDeck deck = new CardDeck(testCardTexts);\n int[] occurences = new int[testCardTexts.length];\n int numberOfCards = testCardTexts.length;\n int numberOfDraws = 10000;\n\n for (int i = 0; i < numberOfDraws ; i++) {\n //Shuffles deck\n deck.shuffle();\n\n //Draws upper card and gets id - increments occurence\n occurences[deck.draw().getId()]++;\n }\n\n for (int i = 0; i < testCardTexts.length; i++) {\n assertTrue(occurences[i]<(numberOfDraws/numberOfCards)+50 && occurences[i]> (numberOfDraws/numberOfCards)-50);\n }\n\n }", "public static void shuffleCards(List<Cards> cardsList){\n\t\tCollections.shuffle(cardsList);\n\t}", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "public static int[] shuffle(int[] deck){\n\t\tRandom rnd = new Random();\n\t for (int i = deck.length - 1; i > 0; i--)\n\t {\n\t int index = rnd.nextInt(i + 1);\n\t int a = deck[index];\n\t deck[index] = deck[i];\n\t deck[i] = a;\n\t }\n\t return deck;\n\t}", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "public void shuffle()\r\n\t{\r\n\t\tCollections.shuffle(_tiles);\r\n\t}", "public void ArrangeSuits() {\n if (mCardCount > 0) {\n \tCard card;\n \tCard orderedCards[];\n \torderedCards = new Card[mCardCount];\n \tint iValue;\n \tint iOrder[];\n \tint iCount = 0;\n \tiOrder = new int [mCardCount];\n \tint iMinValue = Card.HEARTS * 13 + Card.KING;\n \tiOrder[0] = iMinValue;\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tcard = mCard[i];\n \t\tiValue = card.GetSuit()*13 + card.GetValue();\n \t\tiCount = 0;\n \t\t// See where the card value comes in the pecking order\n \t\twhile (iValue > iOrder[iCount]){\n \t\t\tiCount++;\n \t\t}\n \t\t// It goes here, so move everything else along one\n \t\tfor (int j = mCardCount-1; j > iCount; j--)\n \t\t\tiOrder[j] = iOrder[j-1];\n \t\tiOrder[iCount] = iValue;\n \t}\n \t\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tfor (int j = 0; j < mCardCount; j++){\n \t\tcard = mCard[j];\n \t\tiValue = card.GetSuit()*13 + card.GetValue(); \t\t\t\n \t\t\tif (iValue == iOrder[i]){\n \t\t\t\torderedCards[i] = mCard[j];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tmCard[i] = orderedCards[i];\n \t} \t\n }\n }", "@Test\n public void testShuffleGood() {\n System.out.println(\"shuffleGood\");\n Deck deck = new Deck();\n boolean shuffled = false;\n deck.shuffle();\n //we take out one card from the deck\n Card lastCard = deck.nextCard();\n //we take out 58 more cards\n for (int i =0 ; i<57;i++)\n {\n deck.nextCard();\n }\n //we take out the last card from the deck\n Card firstCard = deck.nextCard();\n \n //if both cards = the same value they were before being shuffled, then test will fail.\n if (lastCard.getValue() != CardType.WILDCARD )\n shuffled = true;\n else if (firstCard.getValue()!=CardType.ZERO)\n shuffled = true;\n \n //if either of the cards are different, that means the deck was shuffled and the test will pass\n assertEquals(true, shuffled);\n }", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "public void shuffle() {\n Collections.shuffle((List<Nummer>) this.albumNummers);\n }" ]
[ "0.81037927", "0.8062304", "0.79791033", "0.7951748", "0.78829527", "0.78666824", "0.7848585", "0.7835517", "0.7827754", "0.7823813", "0.7810385", "0.7767041", "0.7762954", "0.7761461", "0.77563435", "0.77431834", "0.7737196", "0.77249473", "0.7711048", "0.76930505", "0.7676308", "0.7675966", "0.7674856", "0.7660401", "0.7657545", "0.76151097", "0.7610694", "0.75862145", "0.758547", "0.75755125", "0.7574205", "0.7542121", "0.75256526", "0.7523889", "0.74870604", "0.74870604", "0.74854666", "0.74647224", "0.7411525", "0.7353924", "0.7335334", "0.7279305", "0.72136873", "0.72136873", "0.71915513", "0.7184922", "0.7169781", "0.71668506", "0.7147437", "0.71216416", "0.7088262", "0.7085797", "0.70635283", "0.70592535", "0.7019431", "0.69632816", "0.6896468", "0.68839306", "0.6880695", "0.68358546", "0.6798785", "0.67571026", "0.67565274", "0.67529416", "0.6751323", "0.67497176", "0.6718376", "0.6711629", "0.6690069", "0.6662423", "0.6631462", "0.6630489", "0.6627418", "0.6627316", "0.6596848", "0.65876734", "0.657598", "0.65641105", "0.65529037", "0.65354216", "0.651548", "0.6508179", "0.6504697", "0.6502502", "0.6472385", "0.6457525", "0.6436903", "0.6434944", "0.6427481", "0.64175653", "0.63918936", "0.63840103", "0.6379986", "0.6371889", "0.63715905", "0.6370006", "0.6363792", "0.63605165", "0.63513887", "0.6349485" ]
0.8268003
0
Removes a card (index i) from the shoe
@Override public void removeCard(int i) { this.cards.remove(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeCard(int index) {\n cards.remove(index);\n }", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public void removePapalCard(int i){\n this.gameboardPanel.removePapalCard(i);\n }", "public void remove(int idx) {\r\n\t\tcards.remove(idx);\r\n\t}", "public void removeCards(int i) {\n while (i > 0) {\n removeCard(cardViews.get(0));\n i--;\n }\n }", "public void removePapalCard(int i) {\n faithPathPane.removePapalCard(i);\n }", "for (Card ca : deck) {\n\t\tif (ca.suit == 'c') {\n\t\t\tdeck.remove(ca);\n\t\t}\n\t}", "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "public void removeCard(UnoCard cardToRemove){\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardToRemove.getName())){\n Log.d(\"Removed Card:\", c.getName());\n this.cards.remove(c);\n break;\n }\n }\n }", "public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}", "public Card playCard(int index)\n\t{\n\t\treturn currentHand.remove(index);\n\t}", "private void removeCard() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC ID number you'd like to remove:\");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input sic_idHolder\n\t\tscan.nextLine();\n\t\t\n\t\tinventoryObject.removeStockIndexCard(sic_idHolder); //calls removeStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t}", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "public void RemoveCardFromDeck(int value){\n deck.remove(value);\n }", "void cut(int cardPosition);", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "public void RemoveCardFromHuman(int value){\n handHuman.remove(value);\n }", "private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }", "public void discard(Card card) {\n discardPile.add(card);\n }", "void removeStock(int i);", "public void RemoveCardFromComputer(int value){\n handComputer.remove(value);\n }", "public Card removeFirstCard()\n {\n return cards.remove(0);\n }", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "@Override\r\n\tpublic Score remove(int i) throws IndexOutOfBoundsException {\r\n\t\t//when i is less than zero or greater than size()-1\r\n\t\tif (i < 0 || i > size() - 1)\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\tScore a = scoreList[i];\r\n\t\tfor (int j = i; j < numItems - 1; j++) {\r\n\t\t\tscoreList[j] = scoreList[j + 1];\r\n\t\t}\r\n\t\tnumItems--;\r\n\t\treturn a;\r\n\t}", "public void removeObject(int i);", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public void removeCardAndAddToHand(int location,ArrayList<Card> hand) {\n// if(cards.get(location).equals()){\n hand.add(cards.get(location));\n cards.remove(location);\n// }\n //add to player\n }", "void removeRoadside(int i);", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "public void removePresentCard() {\n storageCards.remove();\n }", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "public void remove(int index)\n {\n numItems--;\n items[index] = null;\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "void removeCardFromArgument(UUID argumentId, UUID cardId, short index);", "public void removeItem(int i) {\n checkIndex(i);\n\n if (items[i] != null) {\n size--;\n }\n items[i] = null;\n }", "public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }", "public void remove(int indx) {\n\t\tgameObjects.remove(indx);\n\t}", "Set<Card> remove();", "public void removeCard(Player player, AbstractCard card) { //throws exception\n\n for (Hand hand : hands)\n if (hand.getHandOwner().equals(player))\n hand.removeCard(card);\n\n }", "boolean canBeRemoved(int cardIndex);", "public Card drawCard(){\n if(size() == 0)\n throw new IndexOutOfBoundsException();\n Card card = cards.get(cards.size() - 1);\n cards.remove(card);\n return card;\n }", "@ZenCodeType.Method\n default void remove(int index) {\n \n doesNot(\"support removal by index\");\n }", "public void remove(int index);", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "@Test\r\n public void testRemove() {\n Game g = new Game();\r\n g.customDeal(0, 3, 6, 9);\r\n g.remove(2);\r\n assertEquals(0, g.columns.get(2).cards.size());\r\n }", "public void removeCard(Card rCard, int id)\n\t{\n\t\tfor (int x = 0; x < hands[id].size(); x++) //look at each card in hand\n\t\t{\n\t\t\tCard cCard = hands[id].getCardAtSlot(x);\n\t\t\tif (rCard.getCardID() == cCard.getCardID())\n\t\t\t{\n\t\t\t\thands[id].remove(cCard);\n\t\t\t}\n\t\t}\n\t}", "public void remove(int index) {\n\n\t}", "void remove( int index );", "private static void eatPoison(int i) {\r\n\t\tstate = MOVE;\r\n\t\tscore -= 10;\r\n\r\n\t\tfood.remove(i);\r\n\t\tsnake.removeLast();\r\n\t\tsnake.removeLast();\r\n\t}", "void removeGuide(int i);", "public void removeParade(){\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tthis.getChildren().remove(paradeCards[i]);\n\t\t}\n\t}", "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "public void remove(int index) {\n items.remove(index);\n }", "void remove(int index);", "void remove(int index);", "void remove(int index);", "void remove(int index);", "public void removePrevCardList(){\n for (int i = 0; i < playerCardList.getPlayerCardListSize(); i++){\n playerCardPuzzle.getChildren().remove(playerCardList.getPlayerCardByNo(i));\n }\n }", "public void discardCard(int player, Card card) {\r\n\t\tplayers.get(player).removeCard(card);\r\n\t\tdiscardPile.addCard(card);\r\n\t}", "public void remove(int index) {\r\n\t\t//Das Element am Index soll weg:\r\n\t\t//1. Alle Elemente davor sollen erhalten bleiben\r\n\t\t//2. Alle Elemente dahinter sollen erhalten bleiben\r\n\t\t//und der Index 1 kleiner werden\r\n\t\tfor(int i=index+1;i < geheim.length; i++) {\r\n\t\t\tgeheim[i-1] = geheim[i];\r\n\t\t}\r\n\t\t//3. Das Array soll um eins kleiner sein\r\n\t\tresize(-1);\r\n\t}", "public void removeTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){\n playerHand.remove(i);\n break;\n }\n }\n }", "public void removeCards() {\n\t\tthis.content.removeAll(this.content);\n\t}", "public void removeElementAt(int index);", "public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }", "abstract void remove(int index);", "public Object remove (int i)\r\n {\r\n }", "public void removeCardToSplit() {\n if (cards.size() == 2) {\n cards.remove(1);\n super.setSize(1);\n }\n }", "public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "default void removeSheet(int index) {\r\n getSheet(index).remove();\r\n }", "public void RemoveItemFromUcet(int index)\n {\n\n\n\n\n celk_kor -= ucty.get(index).kor;\n celk_hal -= ucty.get(index).hal;\n\n\n if (celk_hal < 0)\n {\n celk_kor -= 1;\n celk_hal = 100 + celk_hal;\n }\n\n TextView celkem = (TextView) findViewById(R.id.celkova_castka);\n celkem.setText(\"\"+celk_kor+\".\"+celk_hal+\" Kč\");\n\n\n for (int i = index; i < ucty.size(); i++)\n {\n ucty.get(i).index -= 1;\n }\n ucty.remove(index);\n mGalleryView.removeView(index);\n }", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "@Override\n\t\tpublic Community remove(int index) {\n\t\t\treturn null;\n\t\t}", "void remove(int idx);", "E remove(int i ) throws IndexOutOfBoundsException;", "private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }", "public void remove(int index) {\n\t\tpoints.remove(index);\n\t}", "public Bacteria remove(int i) {\n\t\tBacteria parent = getAtIndex(i);\n\t\tthis.inds.remove(i);\n\t\tpopSize--;\n\t\treturn parent;\n\t}", "E remove(int i) throws IndexOutOfBoundsException;", "public void removeFruit(int i) {\n\t\tfruits.remove(i);\n\t}", "public boolean removeCard(HomeCellSpider x, Card top) {\n \tpiles= x.piles;\n \tif(piles.get(piles.size()-1) == top) {//check to see if top is really the top card of the homecellpile\n \t\tpiles.remove(piles.size()-1);//if so remove it and decrease the overall cardCounter\n \tcardCounter--;\n \treturn true;\n \t}else {\n \t\treturn false; // only top card can be removed\n \t}\n }", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "public void removeIndex(int i) {\n // YOUR CODE HERE\n }", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "public void removeItemAt(int theIndex) {\n\t\tList<Item> keys = new ArrayList<Item>(inventory.keySet());\t\n\t\tItem item = keys.get(theIndex);\n\t\tinventory.remove(item);\t\t\n\t}", "public Type remove(int index);", "@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }", "public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "public void deleteBoat(int i) {\n\t\tboatList.remove(i);\n\t}", "@Override\r\n\tpublic void removeToIndex(int index) {\n\t}", "public void removeAt(int pos)\n {\n for (int i = pos; i < length - 1; i++)\n {\n list[i] = list[i + 1];\n }\n length--;\n }", "public void removePlayer(int index) {\n trickPoints.remove(index);\n gamePoints.remove(index);\n lives.remove(index);\n }", "public void playCard(int joshleisajoke)\r\n\t{\n\t\tCard thing = hand.remove(joshleisajoke);\r\n\t\tw.build(thing);\r\n\t\tif(thing.getCost().containsKey(\"coin\"))\r\n\t\t\tcoins--;\r\n\t\tdoEffect(thing);\r\n\t}", "public void remove(int index) {\n\t\t\tcheckIndex(index);\n\t\t\tfor(int i = index; i < size - 1; i++) {\n\t\t\t\telementData[i] = elementData[i + 1];\n\t\t\t}\n\t\t}", "public CardCollection destroyRandom(int number) ;", "public void removeActor(int index) { ActorSet.removeElementAt(index); }", "public void removeWatersheds(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(WATERSHEDS$4, i);\r\n }\r\n }", "private void removePiece(Piece piece) {\n addPiece(piece, piece.rowPosition, piece.columnPosition);\n }", "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "public Card pop(){\r\n Card temp = cards.get(0);\r\n cards.remove(0);\r\n deckSize--;\r\n return temp;\r\n }" ]
[ "0.7834818", "0.766974", "0.7581872", "0.74000174", "0.7195049", "0.7108414", "0.70204246", "0.701168", "0.68682176", "0.6822399", "0.6817762", "0.6804617", "0.67394745", "0.6734226", "0.6711573", "0.6669831", "0.6650413", "0.6638087", "0.66288453", "0.65624905", "0.65557015", "0.6549291", "0.6523866", "0.650871", "0.6497951", "0.64804196", "0.64780235", "0.64639723", "0.64458334", "0.64303225", "0.6401876", "0.6395613", "0.6388075", "0.63800806", "0.63642156", "0.63551354", "0.6350109", "0.634824", "0.633278", "0.6322635", "0.6321907", "0.63179696", "0.6310946", "0.6293589", "0.6292603", "0.62861454", "0.6274474", "0.625993", "0.62345254", "0.62245107", "0.6216406", "0.6214926", "0.6205543", "0.6191779", "0.6191779", "0.6191779", "0.6191779", "0.6181038", "0.61796504", "0.617363", "0.61651134", "0.6162915", "0.61603415", "0.6126496", "0.6124851", "0.6116169", "0.6095133", "0.60852844", "0.60709906", "0.60704273", "0.60354847", "0.60263085", "0.60221636", "0.60214937", "0.601087", "0.6001463", "0.59987766", "0.5997093", "0.59943557", "0.5989954", "0.59814245", "0.59804744", "0.5977427", "0.59763026", "0.59759814", "0.5974989", "0.59680724", "0.5966832", "0.5953655", "0.5932796", "0.5924715", "0.59013766", "0.5899503", "0.58973193", "0.58918566", "0.5890776", "0.588324", "0.5879361", "0.58790916", "0.5874449" ]
0.8209554
0
Gets the card from the shoe without removing it
@Override public Card getCard(int i) { return this.cards.get(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }", "public Card getCard(Card c){\n\t\tif(contains(c)){\n\t\t\tfor(int i = 0; i < hand.size(); i ++)\n\t\t\t{\n\t\t\t\tif(hand.get(i).getSuit().equals(c.getSuit()))\n\t\t\t\t{\n\t\t\t\t\thand.remove(i);\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//else\n\t\treturn null;\n\t}", "public Card takeCard() {\n return this.deck.pop();\n }", "public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "public Optional<Card> dealOneCard() {\n if (cards.size() > 0) {\n return Optional.of(cards.remove(0));\n } else {\n return Optional.empty();\n }\n }", "public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }", "public Card drawFromDeck() {\n\t\treturn cards.remove(0);\n\t}", "public Card getCard(){\n return cards.get(0);\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public Card drawCard() {\n\t\tCard c = cards.get(0);\n\t\tcards.remove(0);\n\n\t\treturn c;\n\t}", "public Card hit() {\n Card drawn = deck.get(0);\n deck.remove(0);\n return drawn;\n }", "public Card drawCard() {\n return gameDeck.removeTopCard();\n }", "public ArrayList<Card> getShoe() {\n\t\treturn Shoe;\n\t}", "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "Card getCard(UUID cardId);", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "public Card removeFirstCard()\n {\n return cards.remove(0);\n }", "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }", "public Card deal()\n\t{\n\t\tif (cards.isEmpty())\n\t\t\treturn null;\n\t\t\n\t\t//Generate a random index to pull a random card from the ordered deck\n\t\tint rand = (int) (Math.random() * cards.size());\n\t\tCard dealt = cards.get(rand);\n\t\t//Remove the pulled card from the deck\n\t\tcards.remove(rand);\n\t\t\n\t\treturn dealt;\n\t}", "public TrainCard draw(){\n TrainCard card = cardDeck.get(0);\n cardDeck.remove(0);\n return card;\n }", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "private Card drawCard() {\n return cardStack.pop();\n }", "public Card drawFromCommunityChest()\n {\n Random draw = new Random();\n \n //if the chance cards are exhausted, re-fill the cards\n if(m_communityChest.size() == 0)\n {\n m_communityChest = m_drawnCommChest;\n m_drawnCommChest.clear();\n }\n \n //draw a random card and add it to the list of the cards drawn\n int drawFrom = draw.nextInt(m_chance.size() - 1) + 1;\n Card card = m_communityChest.remove(drawFrom);\n m_drawnCommChest.add(card);\n\n return card;\n }", "public Card enemyPlayCard(){ //Is it really worth the effort to give the enemy a full deck/temp hand? Having 2-4 basic abilities that vary should be enough.\n if(!(enemyHand.isEmpty())){\n return enemyHand.get(0);\n } else {\n return null;\n }\n }", "public Card getPresentCard() {\n return storageCards.peek();\n }", "public Card draw() {\r\n\t\t\r\n\t\tif(cards.size() > 0) {\r\n\t\t\treturn cards.remove(0);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public Card pop(){\r\n Card temp = cards.get(0);\r\n cards.remove(0);\r\n deckSize--;\r\n return temp;\r\n }", "public Card draw() {\n\t\t\n\t\tCard topCard = deck.get(0);\n\t\tdeck.remove(0);\n\t\treturn topCard;\n\t\t\n\t}", "public ErgebnisLOSCard drawECard() {\n\t\tErgebnisLOSCard result=eCards.get(0);\n\t\teCards.remove(result);\n\t\tcurrent.addeCard(result);\n\t\treturn result;\n\t}", "public Card drawCard(){\n if(size() == 0)\n throw new IndexOutOfBoundsException();\n Card card = cards.get(cards.size() - 1);\n cards.remove(card);\n return card;\n }", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "@Override\r\n public Card getPlayerCard(int player, int plDeckPosition) {\r\n // Get the top card of the specified player deck\r\n return this.players.get(player).getTopCardRemove(plDeckPosition);\r\n }", "public Card dealOne() {\r\n\t\tif (cards.isEmpty()) {\r\n\t\t\t// Make this and retrieve_one an exception instead?\r\n\t\t\tSystem.out.println(\"dealOne(): Deck is empty\");\r\n\t\t}\r\n\t\tCard topCard = top();\r\n\t\tcards.remove(cards.size() - 1);\r\n\t\treturn topCard;\r\n\t}", "public Card drawCard() {\n return deck.pop();\n }", "private PlayingCard chooseCard(HeartsGraphics g){\t\t\n\t\tHearts.setCurrentPlayer(this);\n\t\t\n\t\tif(number != PLAYER_ONE){\n\t\t\t// A.I. code\n\t\t\tint index;\n\t\t\t\n\t\t\tRandom r = new Random();\n\t\t\tindex = r.nextInt(hand.size());\t\t\t\n\t\t\t\n\t\t\treturn hand.get(index);\t\t\t\n\t\t} else {\n\t\t\treturn getCard(g);\n\t\t}\t\t\n\t}", "public Card getCard() {\n return this.card;\n }", "public Card getCard() {\n return this.card;\n }", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "public Card deal() {\n size--;\n return cards[size];\n }", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public WeaponCardClient remove(String weaponCard) {\n WeaponCardClient toRemove = null;\n for (WeaponCardClient weaponCardClient: weaponCards)\n if (weaponCard.equals(weaponCardClient.getWeaponName()))\n toRemove = weaponCardClient;\n toRemove.setSlotPosition(null, -1);\n weaponCards.remove(toRemove);\n return toRemove;\n }", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public UnoCard getPlayerCard(String pid, int choice) {\r\n ArrayList<UnoCard> hand = getPlayerHand(pid);\r\n return hand.get(choice);\r\n }", "public CardStack getAvailableCards()\n {\n return null;\n }", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "Card drawCard() {\n if (this.pointer >= this.cards.size()) {\n throw new NoMoreCardsAvailableException();\n }\n return cards.get(pointer++);\n }", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "public Card pop(){\n\t\treturn super.pop();\n\t}", "@Override\r\n public ICard dealCard() {\r\n //get the first card from top of the deck \r\n ICard top = this.deck[ZERO];\r\n //shift cards to the left, because we get the first one \r\n for (int i = ONE; i < this.numOfCards; i++) {\r\n this.deck[i - ONE] = this.deck[i];\r\n }\r\n this.deck[this.numOfCards - ONE] = null;\r\n //decrement the number of cards currently in the deck \r\n this.numOfCards--;\r\n\r\n return top;\r\n }", "public Card getCard(int index)\n {\n if( index <0 || index >=52)\n return null;\n\n return cardAry[index];\n }", "public String GetTopTrashCard(){\n //System.out.println(\"TOP: \" + topCard);\n return topCard;\n }", "public void getCard(Card card, Board board){\n card.action(this, board);\n }", "ICard getTopCard() throws IllegalArgumentException;", "public Card getClickedCardFromHand(int X, int Y){\n // Cek kartu apa yang di klik dari tangan player saat itu\n // Return null kalo gak ada kartu yang di klik\n // Caranya loop untuk setiap kartu di hand kalo Sprite.OverlapPoint\n for (Card kartu : this.currentPlayer.getPlayerHands()){\n if (kartu.getSprite().isPointOverlap(X, Y)){\n return kartu;\n }\n }\n return null;\n }", "public T drawCard() {\n\t\treturn (T) this.deck.pop();\n\t}", "public void returnCard(Card card) {\n\t\t// Update counters in the deck.\n\t\tdealtCards.getAndDecrement();\n\t\tAtomicInteger cardsBySuit = dealtCardsBySuit.get(card.getSuit());\n\t\tcardsBySuit.getAndDecrement();\n\t}", "public DevCard giveDevCard(){\n \n return null;\n }", "public ArrayList<PlayingCard> getHand();", "public Card draw() {\n if (cards.size() == 0) {\n shuffleDiscardToCards();\n }\n return cards.remove(cards.size() - 1);\n }", "public Card getWinningCard() {\n return winningCard;\n }", "public Card getPlayer2Card()\n {\n player2card = new Card(player2Hand.dequeue().toString());\n return player2card;\n \n }", "private PlayingCard getCard(HeartsGraphics g){\n\t\t\n\t\tsynchronized(lock){\n\t\t\ttry {\t\t\t\n\t\t\t\tlock.wait();\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn chosenCard;\n\t}", "@Override\n\tpublic PlayingCard[] getCards() {\n\t\tif(getCount() != 0) {\n\t\t\tPlayingCard[] kopie = new SkatCard[getCount()];\n\t\t\tfor(int i = 0; i < getCount(); i++) {\n\t\t\t\tkopie[i] = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t}\n\t\t\treturn kopie;\n\t\t}else {\n\t\t\tSystem.out.println(\"Stapel leer --> Kopie vom Stapel leer\");\n\t\t\treturn null;\n\t\t}\n\t}", "Set<Card> remove();", "public Card pop()\n\t{\n\t\tint last = size() - 1;\n\t\tCard tempCard = card.get(last);\n\t\tcard.remove(last);\n\t\treturn tempCard;\n\t}", "public Card getCard(int index){\n return cards.get(index - 1);\n }", "public Card[] GetCardStack() { return null; }", "public void discard(Card card) {\n discardPile.add(card);\n }", "public List<Card> getCards(){\n\t\treturn this.pile;\n\t}", "public List<Card> getCardsInPlay() {\n List<Card> cards = new ArrayList<>(cardsInPlayStack);\n cardsInPlayStack.removeAllElements();\n return cards;\n }", "public Card getCard(int index)\n\t{\n\t\treturn hand[index];\n\t}", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public Card viewTopCardInPlay(){\n if(cardsInPlayStack.isEmpty()) {\n return null;\n }\n return cardsInPlayStack.peek();\n }", "public List<Card> getDiscardPile() {\r\n return discardPile;\r\n }", "public Card getTopCardDiscardPile() {\r\n return discardPile.get(discardPile.size() - 1);\r\n }", "public Card chooseCard(Hand h, Trick t);", "public UnoCard getCardByName(String cardName){\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n UnoCard card = new UnoCard(this.appContext, deckPos, new Point(20, 20), color_change_plus4, card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\");\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardName)){\n card = c;\n break;\n }\n }\n return card;\n }", "public void removePresentCard() {\n storageCards.remove();\n }", "public Card topDeckCard(){\n Preconditions.checkArgument(!isDeckEmpty());\n return deck.topCard();\n }", "public Card playerPlayCard(Integer choice){\n if(!(playerHand.isEmpty())){\n return playerHand.get(choice);\n } else {\n return null;\n }\n }", "public Card DrawCard() {\n\t\tCard card = mydeck.get(0);\r\n\t\tmydeck.remove(0);\r\n\t\t\r\n\t\t//TODO delete print line\r\n\t\tSystem.out.println(\"Print Card: \" + card);\r\n\t\tSystem.out.println(\" \");\r\n\t\t// print deck\r\n\t\tSystem.out.println(\"Printing Deck\");\r\n\t\tfor (int i = 0; i <= mydeck.size()-1; i++) {\r\n\t\t\tSystem.out.println(mydeck.get(i).getCardNbr());}\r\n\t\treturn card;\r\n\t}", "public Card topCard() {\n return this.deck.peek();\n }", "public Card drawCard() {\n\t// To draw a card, it isn't necessary to change the contents of the array.\n\t// But you do want to make sure that each card can be drawn only once.\n\t// Do you see how to do this? (Hint: it's easiest to draw cards from the\n\t// high end of the array.)\n\t\n\tif (cardsLeft==0)\n\t return null;\n\tcardsLeft--;\n\treturn (this.cards[cardsLeft]);\n \n }", "public Card peek()\n\t{\n\t\treturn card.get(card.size() - 1);\n\t}", "public Map<String,Card> getCard(){\n return null;\n }", "public Card getPlayer1Card()\n {\n player1card = new Card(player1Hand.dequeue().toString());\n return player1card;\n }", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "@Override\n\tpublic Cards getCards() {\n\t\treturn cards;\n\t}" ]
[ "0.7103684", "0.70501524", "0.7049173", "0.703933", "0.6828719", "0.67926025", "0.67882365", "0.6767238", "0.6725021", "0.67053926", "0.6661999", "0.66570956", "0.6655319", "0.664109", "0.6626553", "0.6554515", "0.654888", "0.6506976", "0.65028405", "0.6479016", "0.645608", "0.6452163", "0.64379483", "0.64213717", "0.64152855", "0.64125913", "0.6400006", "0.6388689", "0.6381257", "0.6357384", "0.63517225", "0.6335713", "0.6328537", "0.62992924", "0.62976134", "0.628888", "0.6277948", "0.6267378", "0.6258153", "0.6250469", "0.6247991", "0.6223959", "0.6206463", "0.61825144", "0.6174508", "0.6171146", "0.615955", "0.61314976", "0.61285573", "0.6113013", "0.60967547", "0.6078616", "0.6074773", "0.60682416", "0.60631263", "0.6053075", "0.6043538", "0.60414034", "0.6035238", "0.6032234", "0.6028419", "0.6026334", "0.6022201", "0.6020735", "0.60161346", "0.60143113", "0.60142803", "0.6007031", "0.600113", "0.5994093", "0.59875387", "0.59751576", "0.59743387", "0.59630555", "0.59494805", "0.5942365", "0.5924522", "0.59243065", "0.592231", "0.5908827", "0.58938205", "0.5887169", "0.58867687", "0.5882771", "0.58827615", "0.5869753", "0.58670115", "0.58650005", "0.58644396", "0.5852711", "0.5850667", "0.58464414", "0.5826816", "0.58267856", "0.5810923", "0.58071655", "0.58033", "0.5802963", "0.5784917", "0.5782444", "0.57816035" ]
0.0
-1
Receives list of cards and adds them to shoe Useful when reshuffling
@Override public void moveAllToShoe(ArrayList<Card> cardsToAdd) { this.cards.addAll(cardsToAdd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "@Override\n public void shuffle() {\n System.out.println(\"shuffling the shoe...\");\n Collections.shuffle(this.cards);\n }", "public void shuffleCards() {\n Collections.shuffle(suspectCards);\n Collections.shuffle(weaponCards);\n Collections.shuffle(roomCards);\n\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "void shuffle() {\r\n cards.addAll(dealtCards);\r\n dealtCards.removeAll(dealtCards);\r\n Collections.shuffle(cards);\r\n System.out.println(\"Shuffled cards\" + cards);\r\n }", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "public void fakeCards(){\n this.drawPile = new ArrayList<>();\n drawPile.add(new RemoveActionCard(\"Fernsprechgerät\", (float) 0.5, 4, new SpecialActions(0,0,1) ));\n drawPile.add(new MovingCard(\"Millionärin\", 4, 5, 4, 99, new COLOR[]{COLOR.SAND}));\n drawPile.add(new RemoveMoveSellCard(\"Propellerflugzeug\", 4, 4, 4, 99, new COLOR[]{COLOR.SAND, COLOR.RIVER, COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new MovingCard(\"Ureinwohner\", (float) 0.5, 5, 99, 1, new COLOR[]{COLOR.BASECAMP, COLOR.RUBBLE, COLOR.JUNGLE, COLOR.SAND, COLOR.RIVER,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new ActionCard(\"Wissenschaftlerin\", (float) 0.5, 4, new SpecialActions(1,1,0)));\n drawPile.add(new MovingCard(\"Pionier\", (float) 0.5, 5, 5, 99, new COLOR[]{COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE}));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n Collections.shuffle(drawPile);\n }", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public void takeACard(Card card){\n hand.add(card);\n }", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "public static void shuffleCards(List<Cards> cardsList){\n\t\tCollections.shuffle(cardsList);\n\t}", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "private void mixDeck() {\n Random rnd = new Random();\n ArrayList<UnoCard> mixed = new ArrayList<UnoCard>();\n\n // mix it!\n for(int i = cards.size()-1; i>0;i--) {\n int index = rnd.nextInt(i+1);\n UnoCard helper = cards.get(index);\n cards.remove(index);\n mixed.add(helper);\n }\n\n // delete current arrayList\n cards = null;\n // set mixed cards to original carddeck\n cards = mixed;\n\n // paint cards again because order has changed\n for(UnoCard c : cards) {\n c.setContainer(deckPos);\n }\n\n }", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public static void cardsPlayer(int player){\n System.out.println(\"Player has cards as below\");\n for(int i=0;i<player;i++){\n System.out.println(\"the player has cards\"+i);\n shuffleCards(arrayList,player);\n }\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public static SuggestHand shuffleAndAssignCards(\r\n ArrayList< Player > players )\r\n {\r\n int counter = 0; // Iterator pointer to keep track of the\r\n // cards\r\n SuggestHand solutionCards = null;\r\n\r\n /*\r\n * Grab all the names and types of each card Had to do some list\r\n * manipulation to get the enums into a modifiable list.\r\n */\r\n List< WeaponType > weaponEnums = new ArrayList< WeaponType >(\r\n Arrays.asList( WeaponCard.WeaponType.values() ) );\r\n List< CharacterName > characterEnums = new ArrayList< CharacterName >(\r\n Arrays.asList( CharacterCard.CharacterName.values() ) );\r\n List< RoomName > roomEnums = new ArrayList< RoomName >(\r\n Arrays.asList( RoomCard.RoomName.values() ) );\r\n\r\n //System.out.println( characterEnums.size() );\r\n\r\n // Card equivalents of the enums\r\n ArrayList< CharacterCard > characters = new ArrayList< CharacterCard >();\r\n ArrayList< RoomCard > rooms = new ArrayList< RoomCard >() ;\r\n ArrayList< WeaponCard > weapons = new ArrayList< WeaponCard >();\r\n\r\n for( CharacterName c : characterEnums )\r\n {\r\n characters.add( new CharacterCard( c ) );\r\n }\r\n\r\n for( RoomName r : roomEnums )\r\n {\r\n rooms.add( new RoomCard( r ) );\r\n }\r\n\r\n for( WeaponType w : weaponEnums )\r\n {\r\n weapons.add( new WeaponCard( w ) );\r\n }\r\n\r\n // Shuffle the ArrayLists\r\n Collections.shuffle( weapons );\r\n Collections.shuffle( characters );\r\n Collections.shuffle( rooms );\r\n\r\n //System.out.println( characters.get( 0 ).getCharacterName() );\r\n\r\n // Remove the top card from each card type and store as solution cards\r\n try\r\n {\r\n solutionCards = new SuggestHand( characters.remove( 0 ), rooms.remove( 0 ), weapons.remove( 0 ) );\r\n\r\n } catch( Exception e )\r\n {\r\n System.out.println( \"Error generating solution cards.\" );\r\n e.printStackTrace();\r\n System.exit( 0 );\r\n }\r\n\r\n // Combine all cards into one larger deck\r\n List< Card > deck = new ArrayList< Card >();\r\n deck.addAll( characters );\r\n\r\n deck.addAll( rooms );\r\n\r\n deck.addAll( weapons );\r\n\r\n\r\n // Shuffle the deck and assign to each player sequentially\r\n Collections.shuffle( deck );\r\n\r\n\r\n /*\r\n * Loops through the cards and players, assigning the cards to players\r\n * one by one.\r\n */\r\n for( Card card : deck )\r\n {\r\n players.get( counter % players.size() ).setCard( card );\r\n counter++;\r\n }\r\n\r\n // DEBUG Print statements to show the cards for each player\r\n// for( Player p : players )\r\n// {\r\n// System.out.println( p.PlayerNumber+ \" \" + p.getHand().toString() );\r\n// }\r\n\r\n // Return the three cards to be used as the solution cards.\r\n return solutionCards;\r\n\r\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "private void dealCards(){\n\t\tfor(int k = 0; k <2;k++){\n\t\t\tfor(int i = 0; i < Players.size();i++){\n\t\t\t\tPlayers.get(i).addCardToHand(gameDeck.dealCard());\n\t\t\t}\n\t\t}\n\t\t\n\t setChanged();\n\t notifyObservers(\"CardsDealed\");\n\t}", "public void shuffle(int numShuffles)\n { \n Card tempCard;\n int switchOne, switchTwo;\n\n for (int i=0; i<numCards; i++){\n switchOne = rand.nextInt(numCards);\n switchTwo = rand.nextInt(numCards);\n\n tempCard = cardAry[switchOne];\n cardAry[switchOne] = cardAry[switchTwo];\n cardAry[switchTwo] = tempCard; \n }\n\n if(cardAry.length > 1 && cardAry.length <=5 && isSorted()==true)\n shuffle(2);\n }", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void shuffleDeck() {\n\t\tint numberOfShuffles = (int) ( Math.random() * 4 + 1 ) ;\n\t\tCard temp;\n\t\t\n\t\tfor( int j = 0; j < numberOfShuffles; j++ ) {\n\t\t\tfor( int i = 0; i < deck.length; i++ ) {\n\t\t\t\tint randSwitchNum = (int) (Math.random() * 52);\n\t\t\t\ttemp = deck[i];\n\t\t\t\tdeck[i] = deck[randSwitchNum];\n\t\t\t\tdeck[randSwitchNum] = temp;\n\t\t\t}\n\t\t}\t\n\t}", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void setCards(List<T> cards) {\n\t\tthis.cards = cards;\n\t}", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "void add(Set<Card> cards);", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public void putCard(Cards cards) {\n playedCards.add(cards);\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void shuffleThePresentCardToTheEnd() {\n storageCards.add(storageCards.remove());\n }", "private void InitializeDeck(){\n //Spades\n\n deck.add(\"spadesace\");\n deck.add(\"spadesjack\");\n deck.add(\"spadesqueen\");\n deck.add(\"spadesking\");\n deck.add(\"spades2\");\n deck.add(\"spades3\");\n deck.add(\"spades4\");\n deck.add(\"spades5\");\n deck.add(\"spades6\");\n deck.add(\"spades7\");\n deck.add(\"spades8\");\n deck.add(\"spades9\");\n deck.add(\"spades10\");\n\n\n //Diamonds\n deck.add(\"diamondsace\");\n deck.add(\"diamondsjack\");\n deck.add(\"diamondsqueen\");\n deck.add(\"diamondsking\");\n deck.add(\"diamonds2\");\n deck.add(\"diamonds3\");\n deck.add(\"diamonds4\");\n deck.add(\"diamonds5\");\n deck.add(\"diamonds6\");\n deck.add(\"diamonds7\");\n deck.add(\"diamonds8\");\n deck.add(\"diamonds9\");\n deck.add(\"diamonds10\");\n\n //Clubs\n deck.add(\"clubsace\");\n deck.add(\"clubsjack\");\n deck.add(\"clubsqueen\");\n deck.add(\"clubsking\");\n deck.add(\"clubs2\");\n deck.add(\"clubs3\");\n deck.add(\"clubs4\");\n deck.add(\"clubs5\");\n deck.add(\"clubs6\");\n deck.add(\"clubs7\");\n deck.add(\"clubs8\");\n deck.add(\"clubs9\");\n deck.add(\"clubs10\");\n\n //Hearts\n deck.add(\"heartsace\");\n deck.add(\"heartsjack\");\n deck.add(\"heartsqueen\");\n deck.add(\"heartsking\");\n deck.add(\"hearts2\");\n deck.add(\"hearts3\");\n deck.add(\"hearts4\");\n deck.add(\"hearts5\");\n deck.add(\"hearts6\");\n deck.add(\"hearts7\");\n deck.add(\"hearts8\");\n deck.add(\"hearts9\");\n deck.add(\"hearts10\");\n\n Collections.shuffle(deck);\n\n for(int i = 0; i < deck.size(); i++){\n System.out.println(deck.get(i));\n }\n }", "public static ArrayList<String> shuffleCards(ArrayList<String> arrayList,int player){\n System.out.println(\"the cards are shuffule properly\");\n ArrayList<String> temp = new ArrayList<>();\n while(! arrayList.isEmpty()){\n int loc = (int) (Math.random()*arrayList.size());\n temp.add(arrayList.get(loc));\n arrayList.remove(loc);\n }\n arrayList = temp;\n display(arrayList);\n cardFlowCompute(arrayList,player);\n return arrayList;\n }", "protected void shuffle(List<Card> deck) {\n Collections.shuffle(deck);\n }", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "void chooseCards(List<SortedBag<Card>> options,\n ChooseCardsHandler handler);", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "public void addToHand(ArrayList<PlayingCard> cardsToAdd)\n\t{\n\t\tcurrentHand.addAll(cardsToAdd);\n\t}", "public void giveCards(Deck deck, ArrayList<Cards> player1, ArrayList<Cards> player2)\n {\n player1.add(deck.getCard());\n player2.add(deck.getCard());\n player1.add(deck.getCard());\n player2.add(deck.getCard());\n }", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "public void shuffle()\r\n {\r\n Collections.shuffle(cards);\r\n top = NUMCARDS - 1;\r\n }", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public void gatherCards() {\n this.cards.clear();\n this.cards.addAll(this.roomCards);\n this.cards.addAll(this.weaponCards);\n this.cards.addAll(this.suspectCards);\n }", "public void shufflePerfectly() {\n\n ArrayList<Card> topDeck = new ArrayList<Card>(), botDeck = new ArrayList<Card>();\n for (int i = cards.size()-1; i >= 0; i--) {\n Card shuffleCard = null;\n try {\n shuffleCard = cards.get(i);\n }\n catch (Exception e) {\n // If card does not exist\n }\n if (shuffleCard != null) {\n if (i >= cards.size() / 2) {\n topDeck.add(shuffleCard);\n }\n else {\n botDeck.add(shuffleCard);\n }\n }\n }\n int len;\n boolean equalStacks = false;\n Card extraCard = null;\n\n if (topDeck.size() == botDeck.size()) {\n equalStacks = true;\n len = topDeck.size();\n }\n else {\n if (topDeck.size()>botDeck.size()) {\n len = botDeck.size();\n extraCard = topDeck.get(topDeck.size()-1);\n }\n else {\n len = topDeck.size();\n extraCard = botDeck.get(botDeck.size()-1);\n }\n }\n\n ArrayList<Card> shuffledDeck = new ArrayList<Card>();\n\n for (int i = len-1; i >= 0; i--) {\n // Shuffle the cards\n shuffledDeck.add(botDeck.get(i));\n shuffledDeck.add(topDeck.get(i));\n\n }\n if (!equalStacks) {\n shuffledDeck.add(extraCard);\n }\n\n ArrayList<Card> newDeck = new ArrayList<Card>();\n\n for (int i = 0; i < shuffledDeck.size(); i++) {\n newDeck.add(shuffledDeck.get(i));\n }\n cards = newDeck;\n }", "@Override\n\tpublic void addCard(PlayingCard card) {\n\t\t\n\t\t\n\t\tif(card == null)return;\n\t\tif(!(card instanceof SkatCard))return;\n\t\tif(!(card.getSuit().equals(SkatCard.suitHerz)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKaro) \n\t\t\t\t|| card.getSuit().equals(SkatCard.suitPik)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKreuz)))return;\n\t\tif(!(card.getRank() == SkatCard.rank7\n\t\t\t\t|| card.getRank() == SkatCard.rank8\n\t\t\t\t|| card.getRank() == SkatCard.rank9\n\t\t\t\t|| card.getRank() == SkatCard.rank10\n\t\t\t\t|| card.getRank() == SkatCard.rankBube\n\t\t\t\t|| card.getRank() == SkatCard.rankDame\n\t\t\t\t|| card.getRank() == SkatCard.rankKoenig\n\t\t\t\t|| card.getRank() == SkatCard.rankAss))return;\n\t\tif(getCount() >= kartenAnzahl)return;\n\t\tfor(int i = 0; i < getCount(); i++) {\n\t\t\tif(card.compareTo(aktuellesDeck[i]) == 0)return;\n\t\t}\n\t\t\n\t\t/*\n\t\t * eigentliches addCard\n\t\t */\n\t\taktuellesDeck[getCount()] = card;\n\t\tcount++;\n\t}", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "Vector<Card> shuffleDeck(Vector<Card> cards)\n\t{\n\t Collections.shuffle(cards);\n\t return cards;\n\t}", "private void prepareDeal(){\n\t\tdeck.shuffle();\n\t\tplayers.clear(); //Remove any possible rubbish\n\t\tfor(Player p : seatPlayers){\n\t\t\tif(p != null){\n\t\t\t\tList<BlackjackHand> hands = new ArrayList<>();\n\t\t\t\tBlackjackHand hand = new BlackjackHandPlayer();\n\t\t\t\thands.add(hand);\n\t\t\t\thistoricalActions.put(hand, new ArrayList<>());\n\t\t\t\tplayers.put(p, hands);\n\t\t\t}\n\t\t}\n\t\tdealerHand = new BlackjackHandDealer();\n\t}", "public void addToDeck(ArrayList<Card> cards)\r\n\t{\r\n\t\tfor (int i = 0; i < cards.size(); i++)\r\n\t\t{\r\n\t\t\tdeck.add(cards.get(i));\r\n\t\t}\r\n\t}", "public void addToHand(PlayingCard card){\n\t\thand.add(card);\n\t}", "@Override\n public void createShoe(int ndecks) {\n Deck deck;\n for (int i = 0; i < ndecks; i++) {\n deck = new Deck();\n this.cards.addAll(deck.getDeck());\n }\n }", "public void shuffle() {\n deck.clear();\n deck.addAll(allCards);\n Collections.shuffle(deck, new Random(System.nanoTime()));\n }", "@Test\n public void reshuffle() {\n for(int i=0;i<10;i++){\n Shoe s = new Shoe(i);\n\n //draw a part of the cards\n for(int j=0;j<i*30;j++){\n s.drawCard();\n }\n\n s.reshuffle();\n Assert.assertEquals(i*Deck.getNumCardsInDeck(),s.getShoe().size());//checks if amount of cards is correct\n //shuffle is allready tested\n }\n\n System.out.println(\"reshuffle() is working fine\");\n }", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "public void AddCardToComputerHand(){\n //Add the first card to the computer\n handComputer.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "private void addRandomFoilCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n\n // Very Rare foils\n for (int i=0; i<3; ++i) {\n possibleCards.add(\"9_94\"); // Fighters Coming In\n possibleCards.add(\"7_168\"); // Boelo\n possibleCards.add(\"106_11\"); // Chall Bekan\n possibleCards.add(\"8_94\"); // Commander Igar\n possibleCards.add(\"9_110\"); // Janus Greejatus\n possibleCards.add(\"9_118\"); // Myn Kyneugh\n possibleCards.add(\"9_120\"); // Sim Aloo\n possibleCards.add(\"4_116\"); // Bad Feeling Have I\n possibleCards.add(\"1_222\"); // Lateral Damage\n possibleCards.add(\"6_149\"); // Scum And Villainy\n possibleCards.add(\"7_241\"); // Sienar Fleet Systems\n possibleCards.add(\"101_6\"); // Vader's Obsession\n possibleCards.add(\"9_147\"); // Death Star II: Throne Room\n possibleCards.add(\"4_161\"); // Executor: Holotheatre\n possibleCards.add(\"4_163\"); // Executor: Meditation Chamber\n possibleCards.add(\"3_150\"); // Hoth: Wampa Cave\n possibleCards.add(\"2_147\"); // Kiffex (Dark)\n possibleCards.add(\"106_10\"); // Black Squadron TIE\n possibleCards.add(\"110_8\"); // IG-88 In IG-2000\n possibleCards.add(\"106_1\"); // Arleil Schous\n possibleCards.add(\"7_44\"); // Tawss Khaa\n possibleCards.add(\"5_23\"); // Frozen Assets\n possibleCards.add(\"7_62\"); // Goo Nee Tay\n possibleCards.add(\"1_55\"); // Mantellian Savrip\n possibleCards.add(\"4_30\"); // Order To Engage\n possibleCards.add(\"101_3\"); // Run Luke, Run!\n possibleCards.add(\"104_2\"); // Lone Rogue\n possibleCards.add(\"6_83\"); // Kiffex (Light)\n possibleCards.add(\"9_64\"); // Blue Squadron B-wing\n possibleCards.add(\"103_1\"); // Gold Leader In Gold 1\n possibleCards.add(\"9_73\"); // Green Squadron A-wing\n possibleCards.add(\"9_76\"); // Liberty\n possibleCards.add(\"103_2\"); // Red Leader In Red 1\n possibleCards.add(\"106_9\"); // Z-95 Headhunter\n }\n\n // Super Rare foils\n for (int i=0; i<2; ++i) {\n possibleCards.add(\"109_6\"); // 4-LOM With Concussion Rifle\n possibleCards.add(\"9_98\"); // Admiral Piett\n possibleCards.add(\"9_99\"); // Baron Soontir Fel\n possibleCards.add(\"110_5\"); // Bossk With Mortar Gun\n possibleCards.add(\"108_6\"); // Darth Vader With Lightsaber\n possibleCards.add(\"110_7\"); // Dengar With Blaster Carbine\n possibleCards.add(\"1_171\"); // Djas Puhr\n possibleCards.add(\"109_11\"); // IG-88 With Riot Gun\n possibleCards.add(\"110_9\"); // Jodo Kast\n possibleCards.add(\"9_117\"); // Moff Jerjerrod\n possibleCards.add(\"7_195\"); // Outer Rim Scout\n possibleCards.add(\"9_136\"); // Force Lightning\n possibleCards.add(\"3_138\"); // Trample\n possibleCards.add(\"104_7\"); // Walker Garrison\n possibleCards.add(\"2_143\"); // Death Star\n possibleCards.add(\"9_142\"); // Death Star II\n possibleCards.add(\"109_8\"); // Boba Fett In Slave I\n possibleCards.add(\"9_154\"); // Chimaera\n possibleCards.add(\"109_10\"); // Dengar In Punishing One\n possibleCards.add(\"106_13\"); // Dreadnaught-Class Heavy Cruiser\n possibleCards.add(\"9_157\"); // Flagship Executor\n possibleCards.add(\"9_172\"); // The Emperor's Shield\n possibleCards.add(\"9_173\"); // The Emperor's Sword\n possibleCards.add(\"110_12\"); // Zuckuss In Mist Hunter\n possibleCards.add(\"104_5\"); // Imperial Walker\n possibleCards.add(\"8_172\"); // Tempest Scout 1\n possibleCards.add(\"9_178\"); // Darth Vader's Lightsaber\n possibleCards.add(\"110_11\"); // Mara Jade's Lightsaber\n possibleCards.add(\"9_1\"); // Capital Support\n possibleCards.add(\"9_6\"); // Admiral Ackbar\n possibleCards.add(\"2_2\"); // Brainiac\n possibleCards.add(\"109_1\"); // Chewie With Blaster Rifle\n possibleCards.add(\"8_3\"); // Chief Chirpa\n possibleCards.add(\"9_13\"); // General Calrissian\n possibleCards.add(\"8_14\"); // General Crix Madine\n possibleCards.add(\"1_15\"); // Kal'Falnl C'ndros\n possibleCards.add(\"102_3\"); // Leia\n possibleCards.add(\"108_3\"); // Luke With Lightsaber\n possibleCards.add(\"7_32\"); // Melas\n possibleCards.add(\"8_23\"); // Orrimaarko\n possibleCards.add(\"110_3\"); // See-Threepio\n possibleCards.add(\"9_31\"); // Wedge Antilles, Red Squadron Leader\n possibleCards.add(\"8_32\"); // Wicket\n possibleCards.add(\"3_32\"); // Bacta Tank\n possibleCards.add(\"3_34\"); // Echo Base Operations\n possibleCards.add(\"1_52\"); // Kessel Run\n possibleCards.add(\"1_76\"); // Don't Get Cocky\n possibleCards.add(\"1_82\"); // Gift Of The Mentor\n possibleCards.add(\"5_69\"); // Smoke Screen\n possibleCards.add(\"1_138\"); // Yavin 4: Massassi Throne Room\n possibleCards.add(\"111_2\"); // Artoo-Detoo In Red 5\n possibleCards.add(\"9_65\"); // B-wing Attack Squadron\n possibleCards.add(\"9_68\"); // Gold Squadron 1\n possibleCards.add(\"106_4\"); // Gold Squadron Y-wing\n possibleCards.add(\"9_74\"); // Home One\n possibleCards.add(\"9_75\"); // Independence\n possibleCards.add(\"109_2\"); // Lando In Millennium Falcon\n possibleCards.add(\"9_81\"); // Red Squadron 1\n possibleCards.add(\"106_7\"); // Red Squadron X-wing\n possibleCards.add(\"7_150\"); // X-wing Assault Squadron\n possibleCards.add(\"104_3\"); // Rebel Snowspeeder\n possibleCards.add(\"9_90\"); // Luke's Lightsaber\n }\n\n // Ultra Rare foils\n for (int i=0; i<1; ++i) {\n possibleCards.add(\"9_109\"); // Emperor Palpatine\n possibleCards.add(\"9_113\"); // Lord Vader\n possibleCards.add(\"110_10\"); // Mara Jade, The Emperor's Hand\n possibleCards.add(\"9_24\"); // Luke Skywalker, Jedi Knight\n }\n\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), true);\n }", "public void shuffle()\r\n {\r\n // We will start from the last element and swap the cards one by one. We actually\r\n // don't need to swap the last element.\r\n for (int i = valid - 1; i > 0; i --) { \r\n \r\n // By using Math.random, we will get a random integer from 0 to i\r\n int j = (int) ( (i+1) * Math.random()); \r\n \r\n // Swapping with the help of temp instance of Card Class.\r\n Card temp = cards[i]; \r\n cards[i] = cards[j]; \r\n cards[j] = temp; \r\n } \r\n // Prints the random array \r\n }", "public void dealCards() {\n for(int i=0; i < 5; i++) { \n for(PokerPlayer player : players) {\n player.takeCard(deck.draw());\n }\n }\n }", "private void makeCards() {\n //make number cards(76 cards)\n for (int i = 0; i < 10; i++) {\n String s = i + \"\";\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n if(i > 0) {\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n }\n }\n\n //make wild cards(8 cards)⨁\n for (int i = 0; i < 4; i++) {\n cards.add(new WildCard(\"W\", Color.BLACK));\n cards.add(new WildDrawCard(\"W+4\", Color.BLACK));\n }\n\n //make reverse cards(8 cards)⤤⤦\n for (int i = 0; i < 2; i++) {\n cards.add(new ReverseCard(\"Rev\", Color.RED));\n cards.add(new ReverseCard(\"Rev\", Color.GREEN));\n cards.add(new ReverseCard(\"Rev\", Color.BLUE));\n cards.add(new ReverseCard(\"Rev\", Color.YELLOW));\n }\n\n //make draw cards(8 cards)⧉\n for (int i = 0; i < 2; i++) {\n cards.add(new Draw2Card(\"D+2\", Color.RED));\n cards.add(new Draw2Card(\"D+2\", Color.GREEN));\n cards.add(new Draw2Card(\"D+2\", Color.BLUE));\n cards.add(new Draw2Card(\"D+2\", Color.YELLOW));\n }\n\n //make skip cards(8 cards)🚫\n for (int i = 0; i < 2; i++) {\n cards.add(new SkipCard(\"Ski\", Color.RED));\n cards.add(new SkipCard(\"Ski\", Color.GREEN));\n cards.add(new SkipCard(\"Ski\", Color.BLUE));\n cards.add(new SkipCard(\"Ski\", Color.YELLOW));\n }\n //Shuffling cards list\n Collections.shuffle(cards);\n }", "public void addToHand(String card) {\n\t\tString[] handtemp = new String[hand.length+1];//increase hand size by one\n\t\tfor (int i = 0; i < hand.length; i++) {//loop through the length of the hand\n\t\t\thandtemp[i] = hand[i];//add all elements to the temp array\n\t\t}\n\t\thandtemp[hand.length] = card;//add the new card to the end of the temp array\n\t\thand = handtemp;//make the hand equal to the temp array\n\t}", "public void giveOneCard(Deck deck, ArrayList<Cards> table)\n {\n //Burn one card\n deck.getCard();\n\n //Add 1 card\n table.add(deck.getCard());\n }", "public void addToPassing(PlayingCard[] cards){\n\t\tpassing.addAll(Arrays.asList(cards));\n\t}", "Deque<PokerCard> getShuffledHalfDeck();", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "@Test\r\n\tpublic void testPlayableCards2()\r\n\t{\n\t\t\r\n\t\tCardList clubList = new CardList();\r\n\t\tclubList.add(AllCards.a6C);\r\n\t\tclubList.add(AllCards.aTC);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.CLUBS, null).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tCardList diamondsList = new CardList();\r\n\t\tdiamondsList.add(AllCards.a7D);\r\n\t\tdiamondsList.add(AllCards.aQD);\r\n\t\tdiamondsList.add(AllCards.aKD);\r\n//\t\tassertTrue( h.playableCards(Suit.DIAMONDS, null).toString().equals(diamondsList.toString()));\r\n\t\t\r\n\t\tCardList heartsList = new CardList();\r\n\t\theartsList.add(AllCards.a9H);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.HEARTS, null).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tCardList spadesList = new CardList();\r\n\t\tspadesList.add(AllCards.aTS);\r\n\t\tspadesList.add(AllCards.a7S);\r\n\t\tspadesList.add(AllCards.aJS);\r\n\t\tspadesList.add(AllCards.aKS);\r\n//\t\tassertTrue( h.playableCards(Suit.SPADES, null).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\tCardList joker = new CardList();\t\t\t\r\n\t\tjoker.add(AllCards.aLJo);\t\t\r\n\t\tjoker.add(AllCards.aHJo);\r\n//\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, null).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\t\r\n\t\t// Trump\r\n\t\tclubList.add(AllCards.aJS);\r\n\t\tclubList.add(AllCards.aLJo);\r\n\t\tclubList = clubList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.CLUBS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tdiamondsList.add(AllCards.aLJo);\r\n\t\tdiamondsList = diamondsList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(diamondsList.toString()));\r\n\r\n\t\theartsList = heartsList.sort(new Card.ByRankComparator());\t\t\r\n\t\tassertTrue( h.playableCards(Suit.HEARTS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tspadesList.remove(AllCards.aJS);\r\n\t\tspadesList = spadesList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.SPADES, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\t// no Trump in hand\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\tCardList jackList = new CardList();\r\n\t\tjackList.add(AllCards.aJS);\r\n\t\tjackList.add(AllCards.aJC);\r\n\t\tassertTrue(jackHand.playableCards(Suit.CLUBS, Suit.SPADES).sort(new Card.ByRankComparator()).toString().equals(jackList.toString()));\r\n\t\t\r\n\t}", "public void addCard(Card card) {\n myCards.add(card);\n cardNumber = myCards.size();// reset the number of cards\n }", "public String addCards(ArrayList<Card> cards){\n if(!check(cards))\n return \"false\";\n for(Card c : cards){\n pile.add(c);\n //tens are special\n if (c.getVal() == 10){\n pile = new ArrayList<Card>();\n return \"goAgain\";\n }\n }\n if(checkForCodek()){\n System.out.println(\"CODEK\");\n pile.clear();\n return \"goAgain\";\n }\n return \"true\";\n }", "public void dealCards () {\t\n\n\t\tint numOfPlayers = players.size();\n\t\tint count = 0;\n\t\tCard[] cards = deck.getDeck();\n\t\tfor (int i=0; i<cards.length; i++) {\n\t\t\t\t// Go through all the cards, for each player deal 1 card at a time\n\t\t\t\t(players.get(count % numOfPlayers).getCards()).add(cards[i]); \n\t\t\t\tcount++;\n\t\t}\n\t}", "void refillCards() {\n if (this.gameDeck.isEmpty() && !this.wonDeck.isEmpty()) {\n this.wonDeck.shufffle();\n Deck temp = this.gameDeck;\n this.gameDeck = this.wonDeck;\n this.wonDeck = temp;\n\n }\n\n }", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "public static int[] createShuffledDeck(){\n //create a deck\n int[] deck = new int[52];\n //make each item their respective index + 1 to avoid repetition\n for(int i = 0; i < deck.length; i++){\n deck[i] = i+1;\n }\n //shuffle deck\n shuffle(deck);\n return deck;\n }", "public void reFillCard() {\n ArrayList<Cards> refill = new ArrayList<Cards>();\n for (Cards card : playedCards) {\n refill.add(card);\n }\n setDeckCards(new Deck(refill));\n playedCards.clear();\n playedCards.add(refill.get(refill.size()-1));\n }", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "private void shuffleCards(final ICard[] myCards) {\r\n ICard tmp;\r\n int rand;\r\n for (int i = ZERO; i < myCards.length; i++) {\r\n rand = rmd.nextInt(myCards.length);\r\n tmp = myCards[i];\r\n myCards[i] = myCards[rand];\r\n myCards[rand] = tmp;\r\n }\r\n }", "public void addToUse(int card) {\r\n\t\tthis.toUse.add(card);\r\n\t}", "public int Shuffle_Distribute(int numberOfPlayers)\n\t{\n\t\t//put 52 cards in a list and shuffle them\n\t\tArrayList<String> pokerToUse = new ArrayList<String>(Arrays.asList(pokerCards));\n\t\tCollections.shuffle(pokerToUse);\n\t\t//based on how many people play\n\t\tint whoStarts=0;\n\t\tswitch(numberOfPlayers)\n\t\t{\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\tuser1card = new ArrayList<String>();\n\t\t\t\tuser2card = new ArrayList<String>();\n\t\t\t\t//give 13 cards to each player\n\t\t\t\tfor(int i=0;i<13;i++)\n\t\t\t\t{\n\t\t\t\t\t//give a random card to the first player\n\t\t\t\t\tint idx1 = new Random().nextInt(pokerToUse.size());\n\t\t\t\t\tString random1 = pokerToUse.get(idx1);\n\t\t\t\t\tpokerToUse.remove(idx1);\n\t\t\t\t\tuser1card.add(random1);\n\t\t\t\t\t//give a random card to the second player\n\t\t\t\t\tint idx2 = new Random().nextInt(pokerToUse.size());\n\t\t\t\t\tString random2 = pokerToUse.get(idx2);\n\t\t\t\t\tpokerToUse.remove(idx2);\n\t\t\t\t\tuser2card.add(random2);\n\t\t\t\t}\t\n\t\t\t\tboolean findWhoStarts = false;\n\t\t\t\tint cardNumber=4;\n\t\t\t\twhile(findWhoStarts==false)\n\t\t\t\t{\n\t\t\t\t\tString card = new StringBuilder(\"h\").append(Integer.toString(cardNumber)).toString();\n\t\t\t\t\tif(user1card.contains(card))\n\t\t\t\t\t{\n\t\t\t\t\t\tfindWhoStarts=true;\n\t\t\t\t\t\twhoStarts=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if(user2card.contains(card))\n\t\t\t\t\t{\n\t\t\t\t\t\tfindWhoStarts=true;\n\t\t\t\t\t\twhoStarts=2;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfindWhoStarts=false;\n\t\t\t\t\t\tcardNumber++;\n\t\t\t\t\t\t//it's rarely possible no one has a heart car. If it happesn, re shuffle \n\t\t\t\t\t\tif (cardNumber==14)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\twhoStarts=99;//error needs reshuffle\n\t\t\t\t\t\t\tbreak;\n\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\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tdefault:\n\t\t\t\twhoStarts=0;\n\t\t\t\tbreak;\n\t\t\n\t\t}\t\n\t\treturn whoStarts;\n\t}", "public void addCardsToDiscardPile(List<Card> cards) {\r\n discardPile.addAll(cards); // TODO: this triggers a nullpointerexception ( ava.lang.NullPointerException: Attempt to invoke interface method 'int java.util.Collection.size()' on a null object reference\r\n // at java.util.LinkedList.addAll(LinkedList.java:386)\r\n // at ch.ethz.inf.vs.a4.minker.einz.model.GlobalState.addCardsToDiscardPile(GlobalState.java:158) )\r\n discardPile.subList(Math.max(0, discardPile.size() - maxDiscardPileSize), discardPile.size());\r\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }" ]
[ "0.7364878", "0.7259722", "0.7050741", "0.6844212", "0.6813486", "0.68067116", "0.6805991", "0.6781339", "0.67678684", "0.6711434", "0.6710473", "0.66992587", "0.6671019", "0.6645906", "0.6624287", "0.6608282", "0.6584469", "0.6572945", "0.65727365", "0.65671486", "0.6557293", "0.6540381", "0.65384626", "0.65312487", "0.6526262", "0.65248823", "0.6518201", "0.65094364", "0.648232", "0.6453738", "0.64528", "0.6442264", "0.64338857", "0.6428277", "0.64159536", "0.6406996", "0.6405082", "0.6401594", "0.6393531", "0.6373463", "0.636929", "0.6347832", "0.63401145", "0.6331619", "0.632691", "0.6326738", "0.63240796", "0.63181955", "0.6304975", "0.6298692", "0.62801206", "0.62746334", "0.62745255", "0.62736195", "0.6257363", "0.6255986", "0.62453145", "0.62439156", "0.6229743", "0.62226194", "0.62145895", "0.621338", "0.61979264", "0.6196849", "0.6170669", "0.61704427", "0.61626726", "0.61625105", "0.61604464", "0.6142433", "0.6137603", "0.6137499", "0.61265624", "0.6121499", "0.611855", "0.611519", "0.6110952", "0.61012924", "0.61011344", "0.60915536", "0.60902697", "0.608911", "0.6085459", "0.60720676", "0.60602915", "0.605977", "0.6055796", "0.6047122", "0.60269433", "0.6025706", "0.60149455", "0.6012241", "0.6011896", "0.6007959", "0.5999349", "0.5996093", "0.59862393", "0.5985142", "0.59831244", "0.5983086" ]
0.7035703
3
Gets the size of the shoe
@Override public int getShoeSize() { return this.cards.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getSize();", "public int getSize(){\n\t\treturn shipSize;\n\t}", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "Dimension getSize();", "Dimension getSize();", "public int getSize() {\n\t\treturn WORLD_SIZE;\n\t}", "public abstract float getSquareSize();", "public double getSize() \n {\n return size;\n }", "public int getShoes() {\n return shoes_;\n }", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "public int getShoes() {\n return shoes_;\n }", "public int getWidth() {\n return mySize.getWidth();\n }", "public float getSize()\n {\n return size;\n }", "public double getSize() {\n return size_;\n }", "public FireSize getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "public float getSize() {\n\t\treturn size;\n\t}", "public float getSize() {\n return size;\n }", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public double getSize() {\n return size_;\n }", "public double getMySize() {\n\t\treturn size;\n\t}", "public static int getSIZE() {\n return SIZE;\n }", "public int getSize( )\n {\n return size;\n }", "public Size getSize() {\n return size;\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public Number getSizeSno() {\n return (Number)getAttributeInternal(SIZESNO);\n }", "public Point getSize();", "public long getSize() {\n\t\treturn Math.abs(getXSize() * getYSize() * getZSize());\n\t}", "int getSize() {\n return size;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() { return size; }", "public final int getSize() {\n return size;\n }", "private int getSize() {\n\t\t\treturn size;\n\t\t}", "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public abstract int getPuzzleLengthSize();", "public int getSize() {\n\n return size;\n }", "public abstract int getSize();", "public abstract int getSize();", "public abstract int getSize();", "public abstract int getSize();", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "int getSize ();", "public int getLength() {\n return mySize.getLength();\n }", "public int getSize() { \n return size;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\r\n return _size;\r\n }", "public int getSize()\n {\n return this.size;\n }", "public int getSize() {\n return size;\n }", "public int getSize()\n\t{\n\n\t\t// Return the number of Products in the inventory\n\t\treturn myProductInventory.size();\n\n\t}", "int getSize() {\n return size;\n }", "long getSize();", "public long getSize();", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public int getSize() {\r\n\t\treturn size;\r\n\t}", "@Override\n\tpublic String getSize() {\n\t\treturn sizeOfTheBeverage;\n\t}", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "public final Vector2f getSize() {\r\n return size;\r\n }", "private int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize() {\r\n \treturn size;\r\n }", "public int getSize() {\n return this.size;\n }", "public int getSize() {\r\n return dice.size();\r\n }", "public int getSize() {\r\n return this.size;\r\n }", "public int getSize()\n\n {\n\n return size;\n\n }", "public long getSize() {\n\t\treturn size;\n\t}" ]
[ "0.7048648", "0.70337605", "0.6981179", "0.69721687", "0.6970916", "0.6970916", "0.6933545", "0.6919676", "0.6905563", "0.68609154", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.6824172", "0.68065095", "0.6771351", "0.67485785", "0.67356044", "0.67353487", "0.67261827", "0.6724079", "0.6716632", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.67125607", "0.6689316", "0.667324", "0.6666585", "0.66632825", "0.66526794", "0.6649235", "0.6633173", "0.663038", "0.6627555", "0.66174847", "0.66119206", "0.66075975", "0.66073585", "0.66073585", "0.66073585", "0.6604302", "0.6604302", "0.6604302", "0.6604302", "0.6604302", "0.6604302", "0.6604302", "0.6604302", "0.6601791", "0.6601772", "0.6599361", "0.6599092", "0.6595736", "0.65921515", "0.65916115", "0.65916115", "0.65916115", "0.65916115", "0.6590298", "0.659007", "0.65880543", "0.6587706", "0.6587252", "0.65839356", "0.6583204", "0.6578356", "0.6564419", "0.65603477", "0.6556228", "0.6556211", "0.6548419", "0.65458906", "0.65454584", "0.65444875", "0.65440756", "0.65440756", "0.6542704", "0.65418947", "0.6539422", "0.65378964", "0.653188", "0.65301824", "0.6528157", "0.6520632" ]
0.8017662
0
Prints all cards in the shoe
public String toString() { String cardListOutput = ""; for (Card aCard : this.cards) { cardListOutput += aCard.toString() + "\n"; } return cardListOutput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showCards() {\n\t\tfor(int i=0;i<cards.size();i++) {\n\t\t\tSystem.out.println(cards.get(i).toString());\n\t\t}\n\t}", "public void displayCards() {\n\t\tSystem.out.println(\"\\n---------- Deck Worker ----------\");\n\t\tfor(Card worker : this.deckWorker) {\n\t\t\tSystem.out.print(worker.toString());\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---------- Deck Building and Machine ----------\");\n\t\tfor(IBuilding building : this.deckBuilding) {\n\t\t\tSystem.out.print(building.toString());\n\t\t}\n\t\tSystem.out.println();\n\t}", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsInDeck[index].getColor() + \",\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "void showcards() {\n \tfor(String card: mycards){\n \t\tSystem.out.println(\"My card is \" + card);\n \t\t}\n\t}", "public void printCards()\n {\n System.out.println(\"Your Card \" + playerCard.toString() + \" and the Computer Card \" + computerCard.toString());\n }", "public void printMyCards() {\n System.out.print(String.format(\"%c[%d;%dfPlayer : %s\", escCode, 29, 1, getName()));// print the name\n ArrayList<Card> myCards = getMyCards();\n Iterator<Card> it = myCards.iterator();\n\n for (int i = 1; it.hasNext(); i++) { // print the cards in order\n Card tempCard = it.next();\n int x = 30;\n if (i > 10) {\n x = 40;// to go to the next line\n }\n System.out.printf(\"%c[0m\", escCode);\n tempCard.visiblePrint(x, i, \"\", i);\n System.out.printf(\"%c[0m\", escCode);\n }\n }", "public void display(){\r\n for(Card c: cards){\r\n System.out.println(c);\r\n }\r\n }", "public void printCard() {\r\n String print = \"[\";\r\n for (Card card : cards) {\r\n print += card.toString();\r\n print += \",\";\r\n }\r\n\r\n print = print.substring(0, print.length() - 1);\r\n print += \"]\";\r\n print += \" Score = \";\r\n print += score();\r\n\r\n System.out.println(print);\r\n }", "public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }", "public void print_Deck() {\n for(int i = 0; i<52; i++) {\n System.out.println(deck.get(i));\n }\n }", "public void printHand(Cards cards) {\n\t\tfor (int j = 0; j < hand.length; j++) {//loop through the hand\n\t\t\tcards.makeCard(cards.getColorAndNum(hand[j])[0], cards.getColorAndNum(hand[j])[1], hand[j]);\n\t\t\t//System.out.println((j+1) + \": \" + hand[j]);//print each card with its slot number\n\t\t}\n\t}", "public String showCards() {\n String message = \"[ \";\n for (Card card : personHand) {\n message += card + \" \";\n }\n message += \"]\";\n return message;\n }", "public void printHand(){\n\t\tSystem.out.println(name + \"'s hand:\");\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tSystem.out.print(i+1 + \".\\t\");\n\t\t\thand.get(i).printCard();\n\t\t}\n\t}", "private void printDeck() {\n for (int i = 0; i < deck.length; i++) {\n System.out.println(deck[i]);\n }\n\n }", "public String toString(){\n return \"Hand: \" + cards; \n }", "public void getDeck()\r\n\t{\r\n\t\t// counter for number of cards displayed per row\r\n\t\tint row = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i <= topCard; i++)\r\n\t\t{\r\n\t\t\t// prints card notation\r\n\t\t\tSystem.out.print(cards[i] + \" \");\r\n\t\t\t\r\n\t\t\t// increments row\r\n\t\t\trow++;\r\n\t\t\t\r\n\t\t\t// if the row is maxed out, moves display to next line\r\n\t\t\tif (row >= 13)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"\\n\");\r\n\t}", "public void printDeck() {\n\t\t// Inform the user if the deck is empty.\n\t\tif (this.deck.isEmpty() == true) {\n\t\t\tSystem.out.println(\"Deck is empty.\");\n\t\t} else {\n\t\t\tStack<T> tmp = this.deck;\n\t\t\tfor (int i = 0; tmp.size() > i; i++) {\n\t\t\t\tSystem.out.println(tmp.elementAt(i).toString());\n\t\t\t}\n\t\t}\n\t}", "public void displayCards(boolean ignoreFacedownCards)\n {\n for (Card c : cards)\n {\n // normal cards\n if (ignoreFacedownCards == false || c.getFacedown() == false)\n System.out.format(\" %s%n\", c.toString());\n // facedown = true\n else\n System.out.format(\" ???%n\");\n }\n // print sum of cards after listing them\n System.out.format(\" Total: %d%n%n\", getSumOfCards(ignoreFacedownCards));\n }", "public void printAllPlayerHands(){\n\t\tfor(int i = 0 ; i < this.players.length; i++){\n\t\t\tplayers[i].printPlayerHand();\t\t \n\t\t}\t\n\t}", "protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }", "void displayCards(List<Card> cards, String title);", "@Override\n\tpublic void printDeck() {\n\t\tfor(int i = getCount() - 1; i >= 0; i--) {\n\t\t\tSystem.out.println(\"[\" + i + \"]\" + this.aktuellesDeck[i].toString());\n\t\t}\n\t}", "public void printCarte() {\r\n\r\n\t\tSystem.out.println(\"Welcome to Yoyo-Restaurant <3\");\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"-<3----<3----<3----<3----<3----<3----<3----<3----<3----<3\");\r\n\t\tSystem.out.println(\"Our Menu \");\r\n\t\tfor (Menu menu : items) {\r\n\t\t\tmenu.print();\r\n\t\t}\r\n\r\n\t}", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "public void printCompHand(){\n for(int i = 0; i < GetSizeOfComputerHand(); i++){\n System.out.println(handComputer.get(i));\n }\n }", "public void print() {\r\n\t\tObject tmp[] = piece.values().toArray();\r\n\t\tfor (int i = 0; i < piece.size(); i++) {\r\n\t\t\tChessPiece p = (ChessPiece)tmp[i];\r\n\t\t\tSystem.out.println(i + \" \" + p.chessPlayer + \":\" + p.position + \" \" + p.isEnabled());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(body.countComponents());\r\n\t}", "public void testOnlyPrint()\r\n {\r\n for ( int i =0; i < valid; i++)\r\n {\r\n System.out.println( cards[i] );\r\n }\r\n }", "public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }", "private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "public void printDrawCard(PoliticCard card);", "@Override\r\n\tpublic String toString() {\r\n\t\treturn name + \" (Deck, \" + cards.size() + \" cards)\";\r\n\t}", "public void printPermitCards(Player player);", "public String toString()\r\n {\r\n StringBuilder sBuilder = new StringBuilder();\r\n sBuilder.append(\"Hand: \");\r\n sBuilder.append(\"\\n\");\r\n if (numCards == 0)\r\n {\r\n sBuilder.append(\"Out of Cards\");\r\n return sBuilder.toString();\r\n }\r\n for (int i = 0; i < numCards; i++)\r\n {\r\n if (myCards[i] != null)\r\n {\r\n if (i != numCards - 1)\r\n {\r\n if ((i + 1) % 10 == 0 && i != 0)\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\"\\n\");\r\n } else\r\n {\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\", \");\r\n }\r\n }\r\n\r\n } else\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n }\r\n }\r\n }\r\n return sBuilder.toString();\r\n }", "public void printHand(){\n System.out.println();\n for(int i = 1 ; i <= 6; i++){\n for(int j = 0 ; j < hand.size(); j++){\n if(j == hand.size()-1){\n System.out.print(hand.get(j).fullRowString(i));\n }\n else{\n System.out.print(hand.get(j).halfRowString(i));\n }\n }\n System.out.println();\n }\n System.out.println();\n for(int k = 0; k < hand.size() ; k++){\n if(k >= 10){\n System.out.print(\" \" + (k+1) + \" \");\n }\n else{\n System.out.print(\" \" + (k+1) + \" \");\n }\n }\n System.out.println();\n }", "public void printHand() {\n\t\thandIterator = new HandIterator(hand.getCards());\n\t\tSystem.out.println(\"\\n\" + getName() + \"'s hand:\");\n\t\twhile(handIterator.hasNext()) {\n\t\t\tCard card = (Card) handIterator.next();\n\t\t\tSystem.out.println(\"\\t\" + card);\n\t\t}\n\t\tSystem.out.println(\"\\tHand value: \" + hand.checkHandValue());\n\t}", "@Override\n public String toString() {\n StringBuilder stringBuilder = new StringBuilder(\"Hand contains:\\n\");\n for (Card c : cardList) {\n stringBuilder.append(c.getFace().toString());\n stringBuilder.append(\" of \");\n stringBuilder.append(c.getSuit().toString());\n stringBuilder.append(\"\\n\");\n }\n return stringBuilder.toString();\n }", "public void displayLeaderCards() {\n int i = 1;\n for (LeaderCard card : leaderCards) {\n String toDisplay = i + \" \" + card.getName() + \" -> cost: \" +\n card.getActivationCost() +\" : \" + card.getCardCostType();\n if (card.isActivated()) {\n toDisplay += \" activated\";\n }\n this.sOut(toDisplay);\n i++;\n }\n }", "public void printCardHoldersName(ArrayList<VentraCard> cards) {\n \t\n \tfor(int i=0; i<cards.size(); i++) {\n \t\tSystem.out.println(\"Name \"+ cards.get(i).getFullName()+\" Cardnumber: \"+cards.get(i).getCardNumber());\n \t}\n }", "public void displayComputerWinnings()\n {\n for(int card = 0; card < computerCardsWon; card++)\n {\n System.out.println(compWinnings[card].toString());\n }\n }", "@Override\n public String toString() {\n String hand = \"\";\n for (int i = 0; i < cards.size(); i++) {\n hand += \"(\"+(i+1)+\")\"+cards.get(i).toString() + \", \";\n }\n return hand;\n }", "public String showCardInHand(){\n String handCard = \"\";\n int cardNum = 0;\n for(Card cards: playerHand)\n {\n String cardDesc;\n if (cards instanceof Mineral) {\n // Description of the Mineral card\n cardDesc = \"No: \" + cardNum + \" \" +\n \"Name: \" + cards.getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) cards).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) cards).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) cards).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) cards).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) cards).getCardEconomicValue() + \"\\n\";\n }\n else{\n // Description of the Supertrump card\n cardDesc = \"No: \"+ cardNum+ \" \" + \"Name: \" + cards.getCardName()+ \" \" + \"Description: \" +\n ((SuperTrumps) cards).effectDescription()+ \"\\n\";\n }\n cardNum += 1;\n handCard += cardDesc; // Used for adding the description of the card in the hand\n }\n return handCard;\n }", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void displayCartContents() {\r\n for (int i = 0; i < numItems; i++) { // Checks all objects in the cart\r\n if ((cart[i].getContents() != \"\")) { // If not item\r\n System.out.println(cart[i].getDescription()); // Display bag description\r\n System.out.println(cart[i].getContents()); // Display contents of bag\r\n } else { // Else it must be item\r\n System.out.println(cart[i].getDescription()); // Display item description\r\n }\r\n }\r\n }", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public static void printBoard() {\n\t\tSystem.out.println(\"Board:\");\r\n\t\tfor(int i=0; i<BoardSquare.numberOfSquare; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(String.format(\"%4s\", (i+1) + \":\"));\r\n\t\t\tif(BoardGame.board.get(i).isPlayerOne()) System.out.print(\" P1\"); \r\n\t\t\tif(BoardGame.board.get(i).isPlayerTwo()) System.out.print(\" P2\");\r\n\t\t\tif(BoardGame.board.get(i).isHasCard()) System.out.print(\" C\");\t\t\t\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n deck = new Deck();\n\n //1c)\n hand = deck.assign(10);\n\n // prints all cards in hand\n System.out.print(String.format(\"Printing all %s cards in hand: \", hand.size()));\n hand.stream()\n .map(Card::getDetails)\n .sorted() //TODO fix sorting by numeric value. x1 x11 x12 x10 x2 etc..\n .forEachOrdered(\n det -> Stream.concat(Stream.of(det), Stream.of(\", \"))\n .forEachOrdered(System.out::print));\n //TODO refactor formatted print to own method\n System.out.println(\"\");\n\n //1d) filter and print specific suit from hand\n //TODO refactor to separate method and make calls for each suit\n\n System.out.print(\"Printing all Spades suit cards: \");\n hand.stream()\n .filter(Card -> (Card.getSuit() == 'S'))\n .map(Card::getDetails)\n .sorted() //TODO fix sorting by numeric value. x1 x11 x12 x10 x2 etc..\n .forEachOrdered(\n det -> Stream\n .concat( Stream.of(det), Stream.of(\", \") ) //separates cards with \", \"\n .forEachOrdered(System.out::print) );\n System.out.println(\"\"); //line break\n\n\n // 1e) filters heart cards from hand into new set\n HashSet<Card> cardsOfHeart = hand.stream()\n .filter(Card -> ( Card.getSuit() == 'H') )\n .collect(Collectors\n .toCollection(HashSet::new));\n\n //print heart cards\n System.out.print( String.format( \"Printing all %s heart cards: \", cardsOfHeart.size() ) );\n cardsOfHeart.stream()\n .map(Card::getDetails) //map to card details\n .sorted() //TODO fix sorting by numeric value. x1 x11 x12 x10 x2 etc..\n .forEachOrdered(\n det -> Stream\n .concat( Stream.of(det), Stream.of(\", \") ) //separates cards with \", \"\n .forEachOrdered(System.out::print)\n );\n System.out.println(\"\");\n\n //1f) stream map cards to stream of suit chars\n System.out.print(\"Printing only suit value of cards in hand: \");\n hand.stream().map(Card::getSuit).sorted().forEachOrdered(System.out::print);\n System.out.println(\"\");\n\n //1g) stream reduce card values to sum of values in hand\n System.out.println(\n String.format(\"The sum of the face values on hand is %s\",\n hand.stream()\n .map(Card::getFace)\n .reduce(0, Integer::sum)\n )\n );\n\n }", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "public void printPoliticCards(Player player);", "public void printAll() {\n\t\tSystem.out.println(mainPot);\n\t\tcurrentPlayer.printHandAndPocket();\n\t\tcurrentPlayer.printCombos();\n\t\topponentPlayer.printCombos();\n\t\tSystem.out.println();\n\t}", "for (Card c : humanPlayerHand.getAllCards) {\n StackPane cardGrouping = new StackPane; // used to center the rectangle and text\n Rectangle card = new Rectangle(width, height); // where width and height are defined elsewhere\n card.setArcWidth(arcSize); // where arcSize is defined elsewhere\n card.setArcHeight(arcSize);\n card.setFill(c.getSuit); // color will be based on suit but implementation will differ slightly - different method will pull the colors matched to suits from data file\n cardGrouping.add(card);\n Text cardText = new Text();\n\n if (c.getValue < 10) {\n cardText.setText(c.getValue);\n }\n // also need cases for special cards\n cardGrouping.add(cardText);\n\n HBox.add(cardGrouping);\n }", "public void printBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n System.out.print(board[i][j]);\n }\n if(i == 0) {\n System.out.print(\" Apples eaten: \" + appleCount);\n }\n System.out.println(\"\");\n }\n }", "private void makeCards() {\n //make number cards(76 cards)\n for (int i = 0; i < 10; i++) {\n String s = i + \"\";\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n if(i > 0) {\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n }\n }\n\n //make wild cards(8 cards)⨁\n for (int i = 0; i < 4; i++) {\n cards.add(new WildCard(\"W\", Color.BLACK));\n cards.add(new WildDrawCard(\"W+4\", Color.BLACK));\n }\n\n //make reverse cards(8 cards)⤤⤦\n for (int i = 0; i < 2; i++) {\n cards.add(new ReverseCard(\"Rev\", Color.RED));\n cards.add(new ReverseCard(\"Rev\", Color.GREEN));\n cards.add(new ReverseCard(\"Rev\", Color.BLUE));\n cards.add(new ReverseCard(\"Rev\", Color.YELLOW));\n }\n\n //make draw cards(8 cards)⧉\n for (int i = 0; i < 2; i++) {\n cards.add(new Draw2Card(\"D+2\", Color.RED));\n cards.add(new Draw2Card(\"D+2\", Color.GREEN));\n cards.add(new Draw2Card(\"D+2\", Color.BLUE));\n cards.add(new Draw2Card(\"D+2\", Color.YELLOW));\n }\n\n //make skip cards(8 cards)🚫\n for (int i = 0; i < 2; i++) {\n cards.add(new SkipCard(\"Ski\", Color.RED));\n cards.add(new SkipCard(\"Ski\", Color.GREEN));\n cards.add(new SkipCard(\"Ski\", Color.BLUE));\n cards.add(new SkipCard(\"Ski\", Color.YELLOW));\n }\n //Shuffling cards list\n Collections.shuffle(cards);\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "public String toString() {\n // return \"Card {suit: \"+getSuitString()+\", rank: \"+getRankString()+\"}\";\n return \"{\"+getSuitString()+\",\"+getRankString()+\"}\";\n }", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n break;\n case 14:\n card+= \"A\";\n break; \n default:\n card+= String.valueOf(cardValue); \n break;\n }\n \n switch(cardSuit){\n case 0:\n card+= \" of Clubs\";\n break;\n case 1:\n card+= \" of Diamonds\";\n break;\n case 2:\n card+= \" of Spades\";\n break;\n case 3:\n card+= \" of Hearts\";\n break;\n default:\n break;\n }\n \n return card;\n }", "public String getCards()\r\n\t{\r\n\t\t// creates a larger string which will have the cards appended to it\r\n\t\tString cardList = \"\";\r\n\t\t\r\n\t\t// adds all cards currently in hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tcardList = cardList + pCards[i] + \" \";\r\n\t\t}\r\n\t\t\r\n\t\treturn cardList;\r\n\t}", "public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public void printStack(){\n\t\tswitch (type) {\n\t\tcase 's' : {\n\t\t\tSystem.out.print(\"[XX]\");\n\t\t}\n\t\tbreak;\n\t\tcase 'w' : {\n\t\t\tSystem.out.print(this.peek().toString());\n\t\t}\n\t\tbreak;\n\t\tcase 't' : {\n\t\t\tStack<Card> temp = new Stack<Card>();\n\t\t\tCard currentCard = null;\n\t\t\tString fullStack = \"\";\n\t\t\twhile(!this.isEmpty()){\n\t\t\t\ttemp.push(this.pop());\n\t\t\t}\n\t\t\twhile(!temp.isEmpty()){\n\t\t\t\tcurrentCard = temp.pop();\n\t\t\t\tfullStack += currentCard.isFaceUp() ? currentCard.toString() : \"[XX]\";\n\t\t\t\tthis.push(currentCard);\n\t\t\t}\n\t\t\tSystem.out.println(fullStack);\n\t\t}\n\t\tbreak;\n\t\tcase 'f' : {\n\t\t\tSystem.out.print(this.peek().toString());\n\t\t}\n\t\tbreak;\n\t\t}\n\t}", "public void print() {\n System.out.println(\"fish: \"+name+\", species= \"+species+\", color= \"+color+\", #fins= \"+fins);\n }", "private static void showMatchedDeckInfo() {\n }", "public void print(){\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ~ THREE ROOM DUNGEON GAME ~ \");\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tSystem.out.print(\":( \");\n\t\t\t\t}\n\t\t\t\telse if(this.Ari[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" ? \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\n\t}", "public static void showHands(){\n Scanner scan=new Scanner(System.in);//call the Scanner constructor\n int Deck[]=new int[52];//set up the array for deck\n String answer=\"\";\n do{\n //store 0 to 51 into the Deck array\n for(int i=0;i<Deck.length;i++){\n Deck[i] = i; \n }\n \n int Hand[]={-1,-1,-1,-1,-1};//set up and initialize the array for hand\n \n Random r = new Random ();//Decalre a instance of the Random generator\n int k = Deck.length;//declare a variable to show the effective length of the Deck array\n //set up a loop to draw cards from the deck ramdomly\n for(int j=0;j<Hand.length;j++){\n int draw = r.nextInt(k-1);\n Hand[j] = Deck[draw];//store the ramdom pick from Deck into Hand\n //set the random pick in Deck to -1 and swap with the last effective number in Deck\n Deck[draw]=Deck[k-1];\n Deck[k-1]= -1;\n k--;//reduce the effective array size\n }\n \n //set up the strings, which will indicate the result\n String Clubs = \"Clubs: \";\n String Diamonds = \"Diamonds: \";\n String Hearts = \"Hearts: \";\n String Spades = \"Spades: \";\n //set up a loop to determine the kind and value of each card in hand\n for(int j=0;j<Hand.length;j++){\n int kind = Hand[j]/13;//calculate the kind of the card\n int rank = Hand[j]%13;//calculete the rank of the card\n switch (kind){\n case 0:\n switch (rank){\n case 0:\n Clubs += \"A \";\n break;\n case 1:\n Clubs += \"K \";\n break; \n case 2:\n Clubs += \"Q \";\n break; \n case 3:\n Clubs += \"J \";\n break; \n case 4:\n Clubs += \"10 \";\n break; \n case 5:\n Clubs += \"9 \";\n break; \n case 6:\n Clubs += \"8 \";\n break; \n case 7:\n Clubs += \"7 \";\n break; \n case 8:\n Clubs += \"6 \";\n break; \n case 9:\n Clubs += \"5 \";\n break; \n case 10:\n Clubs += \"4 \";\n break; \n case 11:\n Clubs += \"3 \";\n break; \n case 12:\n Clubs += \"2 \";\n break; \n } \n break;\n case 1:\n switch (rank){\n case 0:\n Diamonds += \"A \";\n break;\n case 1:\n Diamonds += \"K \";\n break; \n case 2:\n Diamonds += \"Q \";\n break; \n case 3:\n Diamonds += \"J \";\n break; \n case 4:\n Diamonds += \"10 \";\n break; \n case 5:\n Diamonds += \"9 \";\n break; \n case 6:\n Diamonds += \"8 \";\n break; \n case 7:\n Diamonds += \"7 \";\n break; \n case 8:\n Diamonds += \"6 \";\n break; \n case 9:\n Diamonds += \"5 \";\n break; \n case 10:\n Diamonds += \"4 \";\n break; \n case 11:\n Diamonds += \"3 \";\n break; \n case 12:\n Diamonds += \"2 \";\n break; \n } \n break;\n case 2:\n switch (rank){\n case 0:\n Hearts += \"A \";\n break;\n case 1:\n Hearts += \"K \";\n break; \n case 2:\n Hearts += \"Q \";\n break; \n case 3:\n Hearts += \"J \";\n break; \n case 4:\n Hearts += \"10 \";\n break; \n case 5:\n Hearts += \"9 \";\n break; \n case 6:\n Hearts += \"8 \";\n break; \n case 7:\n Hearts += \"7 \";\n break; \n case 8:\n Hearts += \"6 \";\n break; \n case 9:\n Hearts += \"5 \";\n break; \n case 10:\n Hearts += \"4 \";\n break; \n case 11:\n Hearts += \"3 \";\n break; \n case 12:\n Hearts += \"2 \";\n break; \n } \n break;\n case 3:\n switch (rank){\n case 0:\n Spades += \"A \";\n break;\n case 1:\n Spades += \"K \";\n break; \n case 2:\n Spades += \"Q \";\n break; \n case 3:\n Spades += \"J \";\n break; \n case 4:\n Spades += \"10 \";\n break; \n case 5:\n Spades += \"9 \";\n break; \n case 6:\n Spades += \"8 \";\n break; \n case 7:\n Spades += \"7 \";\n break; \n case 8:\n Spades += \"6 \";\n break; \n case 9:\n Spades += \"5 \";\n break; \n case 10:\n Spades += \"4 \";\n break; \n case 11:\n Spades += \"3 \";\n break; \n case 12:\n Spades += \"2 \";\n break; \n } \n break;\n }\n }\n \n //print out the results\n System.out.println(Clubs);\n System.out.println(Diamonds);\n System.out.println(Hearts);\n System.out.println(Spades);\n //ask user for input\n System.out.print(\"Go again? Enter 'y' or 'Y', anything else to quit- \");\n answer=scan.next();\n }while(answer.equals(\"Y\") || answer.equals(\"y\"));\n return;\n }", "private static void showDeckInfo() {\n }", "private void mostrarCoches() {\n int i = 0;\n for (Coche unCoche : coches) {\n System.out.println((i + 1) + \"º \" + coches.get(i));\n ++i;\n }\n }", "public void printBoard() {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+getPiece(j, i).getColor().toString().charAt(0)+getPiece(j, i).getName().charAt(0)+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "public void print(){\n for (int i=0; i<11; i++){\n for (int j=0; j<11; j++){\n //print 0-9s on the horizontal and vertical axis\n if (i == 0 & j==0) System.out.print(\" \");\n else if (i==0) System.out.print(\" \"+(j-1)+\" \");\n else if (j==0) System.out.print(\" \"+(i-1)+\" \");\n else{\n //print out ships and status\n Ship ship = ships[i-1][j-1];\n if(ship.isSunk()) System.out.print(\" x \");\n else if(ship.getShipType().equals(\"empty\") && ship.hit[1]) System.out.print(\" - \");\n else if(ship.getShipType().equals(\"empty\") && !ship.hit[1]) System.out.print(\" . \");\n else if(ship.isHorizontal() && ship.hit[j-1-ship.getBowColumn()]) System.out.print(\" S \");\n else if(ship.isHorizontal() && !ship.hit[j-1-ship.getBowColumn()]) System.out.print(\" . \");\n else if(!ship.isHorizontal() && ship.hit[i-1-ship.getBowRow()]) System.out.print(\" S \");\n else if(!ship.isHorizontal() && !ship.hit[i-1-ship.getBowRow()]) System.out.print(\" . \");\n }\n }\n System.out.print(\"\\n\");\n }\n }", "static void display(int[][] card) {\n for (int i = 0; i < card.length; i++) { // tranverse rows\n System.out.println(\"\");\n for (int j = 0; j < card[i].length; j++) { // tranverse coloumns\n System.out.print(card[i][j] + \" \" + \"\\t\");\n }\n }\n System.out.println(\"\");\n }", "public ArrayList<card> displayPack()\n {\n dbObj=new dbFlashCards(uid);\n return dbObj.fetchAllCards(packId);\n \n \n \n }", "public String toString() {\n String handString = \"( \";\n for (int i = 0; i < this.numCards; i++) {\n handString += this.myCards[i].toString();\n if (i != this.numCards - 1)\n handString += \", \";\n }\n handString += \" )\";\n return handString;\n }", "public void printCart() {\n\t\tSystem.out.println(\"Items currently in the cart: \\n\");\n\t\tfor (int i =0; i < currentSize; i ++) {\n\t\t\tSystem.out.println(\"Item \" + i + \":\\n\" + Cart[i]);\n\t\t}\n\t}", "public String toString() {\n\t\treturn String.format(\"%-6s %-8s\", pileNum, numOfCards) + card.toString();\n\t}", "private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "public String toString(){\n String handString = \"\";\n int i = 1;\n sort();\n for(Card c: cards){\n handString += Integer.toString(i) + \": \" + c + \"\\n\";\n i++;\n }\n handString = handString.substring(0, handString.length() - 1);\n return handString;\n }", "public void printCardNumbers(ArrayList <VentraCard> cards){\n \t\n \tfor(int i=0; i<cards.size();i++) {\n \t\tSystem.out.println(cards.get(i).getCardNumber()+\"\\n\");\n \t}\n \t\n }", "public void printBoard() {\n\t\tSystem.out.print(\"\\r\\n\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\");\n\t\tfor(int i = BOARD_SIZE ; i > 0 ; i--) {\n\t\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\t\tfor(int j = 0; j < BOARD_SIZE ; j++) {\n\t\t\t\tif(j == 0) {\n\t\t\t\t\tSystem.out.print(i + \" |\");\n\t\t\t\t} \n\t\t\t\tif(this.tiles.get(i).get(j).getPiece() != null) {\n\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece().getColor() == PrimaryColor.BLACK) {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" B |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"B Q|\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" W |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"W Q|\");\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\" |\");\n\t\t\t\t}\n\n\t\t\t\tif(j==BOARD_SIZE-1) {\n\t\t\t\t\tSystem.out.print(\" \" + i); \n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\\r\\n\");\n\n\t}", "public void Print() {\r\n\t\tfor(Cell2048[] a : game) {\r\n\t\t\tfor(Cell2048 b : a) {\r\n\t\t\t\tSystem.out.print(b.getValue() + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"score : \"+ score);\r\n\t}", "public static void main(String[] args) {\n CardGame c = new CardGame(4, 0);\r\n c.start();\r\n\r\n // h 9\r\n // h 7\r\n // h 12\r\n // h 4\r\n // p 5\r\n // p 6\r\n // p 14\r\n // p 11\r\n // e 13\r\n // e 10\r\n // e 9\r\n // c 7\r\n // c 4\r\n\r\n // System.out.println(Arrays.toString(c.onePlay(new int[][] { { 1, 12 }, { 0, 2\r\n // }, { 1, 10 }, { 1, 9 } }, 0)));\r\n\r\n // [] Hukum 0\r\n // [] Paan 1\r\n // [] Eat 2\r\n // [] Chiddi 3\r\n }", "public void displayCards(int [] ourHand)\n\t{\n\t\tfor (int i =0; i<5;i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tImage myImage = ImageIO.read(getClass().getResourceAsStream(ourHand[i]+\".jpg\"));\n\t\t\t\ticon = new ImageIcon(myImage); //determines the correct icon\n\t\t\t}\n\t\t\tcatch (IOException e){}\n\t\t\tunderneathDisplay[i] = new JPanel();\n\t\t\tunderneathDisplay[i].setBackground(tableGreen);\n\t\t\tunderneathDisplay[i].addMouseListener(this);\n\t\t\tdisplay[i] = new JLabel(); // use array instead to know which one was selected\n\t\t\tdisplay[i].setIcon(icon); //sets the correct icon to display\n\t\t\tunderneathDisplay[i].add(display[i]); //panel for the JLabels\n\t\t\tcardPanel.add(underneathDisplay[i]); //panel that holds all the cards\n\t\t}\n\t}", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void showCar(){\n for (int i=0; i<car.size(); i++){\n System.out.println((i+1) + \". \" + car.get(i).formatForBuy());\n }\n }", "public String showFirstRoundCards() {\n String message = \"[ Unknown \";\n message += personHand.get(1) + \" ]\";\n return message;\n }", "private static void printDeck(String cardSetName, ArrayList<String> deck) throws InterruptedException {\n\t\t\n\t\t// Print the header\n\t\tSystem.out.printf(\"%s (%s cards) contains:\\n\", cardSetName, deck.size());\n\t\tensurePrintOrder();\n\t\t\n\t\t// Print the cards in the deck\n\t\tfor (int i = 0; i < deck.size(); i++) {\n\t\t\tString card = deck.get(i);\n\t\t\tif (card.toUpperCase().contains(\"SPADES\") || card.toUpperCase().contains(\"CLUBS\")) {\n\t\t\t\tSystem.out.println(\"\\t\" + card);\n\t\t\t\tensurePrintOrder();\n\t\t\t}\n\t\t\telse { // Diamonds or Hearts\n\t\t\t\tSystem.err.println(\"\\t\" + card);\n\t\t\t\tensurePrintOrder();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Print a new line after all the cards are printed\n\t\tSystem.out.println();\n\t\tensurePrintOrder();\n\t}", "public void print(){\r\n\t\t\t\r\n\t\t\tint i=1;\r\n\t\t\t//Iterator<Receipt> iter=reciptlist.iterator();\r\n\t\t\t\r\n\t\t\tfor(Receipt R : reciptlist){\r\n\t\t\t\r\n\t\t\t\tSystem.out.println( \"--------------------------------------\");\r\n\t\t\t\tSystem.out.println( \"Reciet number: \" +i );\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println( \"ShoeType: \" + R.getShoeType());\r\n\t\t\t\t\tSystem.out.println( \" Amount: \" + R.getAmountSold());\r\n\t\t\t\t\tSystem.out.println( \" Discounted: \" + R.getDiscount());\r\n\t\t\t\t\tSystem.out.println( \" issuedTick : \" + R.getIssuedTick());\r\n\t\t\t\t\tSystem.out.println( \" requestd tick : \" + R.getRequestTick());\r\n\t\t\t\t\tSystem.out.println( \" customer : \" + R.getCustomer());\r\n\t\t\t\t\tSystem.out.println( \" seller : \" + R.getSeller());\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}", "public String showCard(int card) {\n\t\tswitch (card) {\n\t\tcase 1:\n\t\t\treturn \"Ace\";\n\t\tcase 2:\n\t\t\treturn \"2\";\n\t\tcase 3:\n\t\t\treturn \"3\";\n\t\tcase 4:\n\t\t\treturn \"4\";\n\t\tcase 5:\n\t\t\treturn \"5\";\n\t\tcase 6:\n\t\t\treturn \"6\";\n\t\tcase 7:\n\t\t\treturn \"7\";\n\t\tcase 8:\n\t\t\treturn \"8\";\n\t\tcase 9:\n\t\t\treturn \"9\";\n\t\tcase 10:\n\t\t\treturn \"10\";\n\t\tcase 11:\n\t\t\treturn \"Jack\";\n\t\tcase 12:\n\t\t\treturn \"Queen\";\n\t\tcase 13:\n\t\t\treturn \"King\";\n\t\tdefault:\n\t\t\treturn \"??\";\n\t\t}\n\t}", "public void printPieces()\n {\n\tint last = 1;\n\tfor(int i=0;i<unused.length;i++)\n\t {\n\t\tif(unused[i]!=null)\n\t\t {\n\t\t\tSystem.out.println(last + \". \" + unused[i]);\n\t\t\tlast++;\n\t\t }\n\t }\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "@Override\n public void shuffle() {\n System.out.println(\"shuffling the shoe...\");\n Collections.shuffle(this.cards);\n }", "public Card DrawCard() {\n\t\tCard card = mydeck.get(0);\r\n\t\tmydeck.remove(0);\r\n\t\t\r\n\t\t//TODO delete print line\r\n\t\tSystem.out.println(\"Print Card: \" + card);\r\n\t\tSystem.out.println(\" \");\r\n\t\t// print deck\r\n\t\tSystem.out.println(\"Printing Deck\");\r\n\t\tfor (int i = 0; i <= mydeck.size()-1; i++) {\r\n\t\t\tSystem.out.println(mydeck.get(i).getCardNbr());}\r\n\t\treturn card;\r\n\t}", "public void printBoard() {\n\t\t// loop through board and add appropriate character based on board\n\t\t// contents\n\n\t\t// for each board column\n\t\tfor (int row = 0; row < board.length; row++) {\n\t\t\t// for each board row\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\n\t\t\t\tif (board[row][col] == 0) {\n\t\t\t\t\tSystem.out.println(\" \");\n\t\t\t\t} else if (board[row][col] == 1) {\n\t\t\t\t\tSystem.out.println(\"X\");\n\t\t\t\t} else if (board[row][col] == 2) {\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}\n\n\t\t\t\t// set the dividers\n\t\t\t\tif (col < board[row].length) {\n\t\t\t\t\tSystem.out.print(\"|\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"-----\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check if the board is occupied by player X, or player O, or neither\n\t\t// Print the correct character to the screen depending on the contents\n\t\t// of the square\n\t\t// System.out.print(\"stuff\") will print things on the same row\n\n\t\t// System.out.print(\"/n\") or System.out.println() will print a new line\n\t\t// Don't forget to add in the grid lines!\n\t}", "public void print() {\n\t\tcounter++;\n\t\tSystem.out.print(counter + \" \");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(squares[j][i].getValue());\n\t\t }\n\t\t System.out.print(\"//\");\n\t\t}\n\t\tSystem.out.println();\n }" ]
[ "0.8026635", "0.77610874", "0.7683753", "0.76577073", "0.76401824", "0.76234245", "0.75988376", "0.75972074", "0.73543376", "0.72456354", "0.72273177", "0.7209421", "0.7138729", "0.7102188", "0.702203", "0.6875583", "0.6859883", "0.6819752", "0.67598414", "0.6728301", "0.6686063", "0.665526", "0.6643046", "0.6631152", "0.6615546", "0.66111463", "0.661006", "0.65852123", "0.6546418", "0.6532623", "0.64740103", "0.6473394", "0.64712656", "0.647026", "0.6444356", "0.6434524", "0.6425533", "0.64205694", "0.6410179", "0.6384425", "0.6379581", "0.6355075", "0.6345825", "0.6342682", "0.6334426", "0.633131", "0.63225746", "0.631799", "0.63008356", "0.629848", "0.6288967", "0.6284419", "0.62794954", "0.6278212", "0.62780935", "0.62622744", "0.6256862", "0.6231836", "0.62301457", "0.62298715", "0.62265325", "0.6204648", "0.61811423", "0.6167007", "0.6165232", "0.61644876", "0.616429", "0.6158854", "0.61550754", "0.6141719", "0.6141002", "0.613917", "0.6130377", "0.6127182", "0.61227953", "0.6121164", "0.6116917", "0.6116295", "0.611124", "0.6105607", "0.6099862", "0.6080917", "0.6073338", "0.6067018", "0.6061485", "0.60600424", "0.60529757", "0.60501105", "0.6047107", "0.60431725", "0.60397965", "0.60280484", "0.6022352", "0.6022136", "0.6020693", "0.60204387", "0.600674", "0.60005784", "0.6000208", "0.59890896" ]
0.6290614
50
/ declare 3 numbers if n1 and n2 are equal => n1$n2 are equal if n2 and n3 are equal => n2&n3 are equal if n3 and n1 are equal => n3&n1 are equal if all equal => all equal if none are equal => none of them are equal Do NOT use single if statement
public static void main(String[] args) { int n1 = 0; int n2 = 0; int n3 = 0; if (n1 == n2 && n1 != n3) { System.out.println("n1 and n2 equal"); } else if (n2 == n3 && n2 != n1) { System.out.println("n2 and n3 equal"); } else if (n3 == n1 && n1 != n2) { System.out.println("n3 and n1 equal"); } else if (n1 == n2 && n1 == n3) { System.out.println("all equal"); } else { System.out.println("none equal"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n\t\tint n1, n2, n3;\n\t\tn1 = 41;\n\t\tn2 = 4;\n\t\tn3 = 421;\n\n\t\tif (n1 == n2 && n1 != n3) {\n\t\t\tSystem.out.println(\"n1 and n2 are equal.\");\n\t\t}\n\n\t\telse if (n2 == n3 && n2 != n1) {\n\t\t\tSystem.out.println(\"n2 and n3 are equal.\");\n\t\t}\n\n\t\telse if (n1 == n3 && n1 != n2) {\n\t\t\tSystem.out.println(\"n1 and n3 are equal.\");\n\t\t}\n\n\t\telse if (n1 == n2 && n1 == n3 && n2 == n3) {\n\t\t\tSystem.out.println(\"They are all equal.\");\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"None of them are equal.\");\n\t\t}\n\n\t\tSystem.out.println(\"=======================\");\n\t\t// 2nd solution. wrong solution.\n\n\t\tint n11 = 15;\n\t\tint n22 = 15;\n\t\tint n33 = 15;\n\n\t\tif (n11 == n22 && n11 == n33 && n22 == n33) {\n\t\t\tSystem.out.println(\"all equal.\");\n\t\t}\n\n\t\tif ((n11 == n22) & (n11 != n33)) {\n\t\t\tSystem.out.println(\"n11 and n22 are equal.\");\n\t\t}\n\n\t\tif (n22 == n33 & n22 != n11) {\n\t\t\tSystem.out.println(\"n22 and n33 are equal.\");\n\t\t}\n\n\t\tif (n11 == n33 & n11 != n22) {\n\t\t\tSystem.out.println(\"n11 and n33 are equal.\");\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"none of them are equal.\");\n\t\t}\n\t\tSystem.out.println(\"=======================\");\n\n\t\t// 3rd solution. nested if\n\n\t\tint A = 15;\n\t\tint B = 151;\n\t\tint C = 11;\n\n\t\tif (A == B && A == C && B == C) {\n\t\t\tSystem.out.println(\"all are equal.\");\n\t\t}\n\n\t\telse // if they are not all equal\n\t\t\tif (A == B) {\n\t\t\t\tSystem.out.println(\"A and B are equal.\");\n\t\t\t}\n\t\n\t\t\telse if (A == C) {\n\t\t\t\tSystem.out.println(\"A and C are equal.\");\n\t\t\t}\n\t\n\t\t\telse if (B == C) {\n\t\t\t\tSystem.out.println(\"B and C are equal.\");\n\t\t\t}\n\t\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"none of them are equal.\");\n\t\t\t}\n\n\t\tSystem.out.println(\"=======================\");\n\n\t\tint grade = 101;\n\n\t\tif (grade >= 60 && grade <= 100) {\n\n\t\t\tif (grade >= 90 && grade <= 100) {\n\t\t\t\tSystem.out.println(\"grade is A\");\n\t\t\t}\n\n\t\t\telse if (grade >= 80 && grade < 90) {\n\t\t\t\tSystem.out.println(\"grade is B\");\n\t\t\t}\n\n\t\t\telse if (grade >= 70 && grade < 80) {\n\t\t\t\tSystem.out.println(\"grade is C\");\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"grade is D\");\n\t\t\t}\n\t\t} // closing curly brace of the first if statement. very important.\n\n\t\telse if (grade >= 0 && grade < 60) {\n\t\t\tSystem.out.println(\"Failed.\");\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"invalid entry\");\n\t\t}\n\n\t}", "public static void printEqual(int num1, int num2, int num3){\n if(num1==num2 && num2==num3){\n System.out.println(\"All numbers are equal\");\n }\n else if(num1!=num2 && num2!=num3){\n System.out.println(\"All numbers are different\");\n }\n else{\n System.out.println(\"Neither all are equal or different\");\n }\n }", "public static void main(String[]args)\r\n\t{\r\n\t\tScanner sc = new Scanner(System.in); /*\r\n\t\t * Scanner class is been used to take input from the user.\r\n\t\t */\r\n\t\tSystem.out.println(\"Enter the first number :\");\r\n\t\tint x = sc.nextInt(); // Taking input first number.\r\n\t\tSystem.out.println(\"Enter the second number :\");\r\n\t\tint y = sc.nextInt(); // Taking input second number .\r\n\t\tSystem.out.println(\"Enter the third number :\");\r\n\t\tint z = sc.nextInt(); // Taking input third number .\r\n\t\t\r\n\t\tif(!bln) // Use of NOT operator .'!' mark is used to define it.\r\n\t\t\t// if value true it will assign false and vice-versa.\r\n\t\t{\r\n\t\tif(x==y && y==z && z==x)// Use of logical AND .\r\n\t\t{\r\n\t\t\tSystem.out.println(\"All the three numbers entered are equal.\");\r\n\t\t}\r\n\t\t\r\n\t\telse if(x==y || y==z || z==x) // Use of logical OR.\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Any of the two values entered are equal.\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"No numbers enterd are equal.\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tsc.close();\r\n\t\t}\r\n\t\t \r\n\t}", "public static boolean canThreePartsEqualSum(int[] arr) {\n int sum=0;\n int cumulative[]=new int[arr.length];\n for(int i=0;i<arr.length;i++){\n sum+=arr[i];\n cumulative[i]=sum;\n }\n for(int i=0;i<cumulative.length;i++){\n for(int j=i+1;j<cumulative.length;j++){\n if(cumulative[i]==cumulative[j]-cumulative[i]){\n if(cumulative[i]==cumulative[cumulative.length-1]-cumulative[j] && (cumulative.length-1) !=j){\n return true;\n }\n }\n }\n }\n return false;\n}", "public static void main(String[] args) {\n\n int month = 2;\n int year = 2019;\n if (year % 4 != 0) {\n if (month > 0 && month < 13) {\n if (month != 2) {\n if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\n System.out.println(\"31 Days\");\n } else System.out.println(\"30 Days\");\n\n\n } else System.out.println(\"28 Days\");\n } else System.out.println(\"Invalid entry\");\n } else {\n if (month > 0 && month < 13) {\n if (month != 2) {\n if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {\n System.out.println(\"31 Days\");\n } else System.out.println(\"30 Days\");\n\n\n } else System.out.println(\"29 Days\");\n } else System.out.println(\"Invalid entry\");\n }\n\n //Warm up question 2\n\n int num1 = 2;\n int num2 = 3;\n int num3 = 'A';\n\n if(num1 == num2) {\n if(num2 == num3) {\n System.out.println(\"All equal\");\n } else System.out.println(\"n1 and n2 are equal\");\n }\n else if(num1 == num3) {\n System.out.println(\"n1 and n3 are equal\");\n } else if(num2 == num3) {\n System.out.println(\"n2 and n3 are equal\");\n } else System.out.println(\"none of the are equal\");\n }", "public static void main(String[] args) {\n\t\tint i,j,k;\r\n\t\tfor(i=1;i<=3;i++) {\r\n\t\t\tfor(j=1;j<=3;j++) {\r\n\t\t\t\tfor(k=1;k<=3;k++) {\r\n\t\t\t\t\tif(i!=j && j!=k && k!=i) {\r\n\t\t\t\t\tSystem.out.println(i+\"\"+j+\"\"+k);\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\t\r\n\t}", "void findCommon(int ar1[], int ar2[], int ar3[], int n1,\n int n2, int n3)\n{\n int i = 0, j = 0, k = 0;\n int prev1, prev2, prev3;\n prev1 = prev2 = prev3 = INT_MIN;\n while (i < n1 && j < n2 && k < n3) {\n while (ar1[i] == prev1 && i < n1)\n i++;\n while (ar2[j] == prev2 && j < n2)\n j++;\n while (ar3[k] == prev3 && k < n3)\n k++;\n if (ar1[i] == ar2[j] && ar2[j] == ar3[k]) {\n cout << ar1[i] << \" \";\n prev1 = ar1[i];\n prev2 = ar2[j];\n prev3 = ar3[k];\n i++;\n j++;\n k++;\n }\n else if (ar1[i] < ar2[j]) {\n prev1 = ar1[i];\n i++;\n }\n else if (ar2[j] < ar3[k]) {\n prev2 = ar2[j];\n j++;\n }\n else {\n prev3 = ar3[k];\n k++;\n }\n }\n}", "public static void main(String[] args) {\n int T, O, G, D;\n for ( T=0; T<10; T++ ) {\n for ( O=0; O<10; O++ ){\n for ( G=0; G<10; G++ ){\n for ( D=0; D<10; D++ ){\n if ((T*100+O*10+O)*4 == (G*1000+O*100+O*10+D)) {\n if (T!=O && T!=G && T!=D && O!=G && O!=D && G!=D) {\n System.out.println(\"T is \"+T+\",\"+ \"O is \"+O+\",\"+ \"G is \"\n +G+\",\"+ \"D is \"+D+\".\" );\n }\n }\n }\n }\n }\n } \n }", "private int finalCheck(int n, int max1, int max2){\r\n\r\n //this represents all the numbers that are guaranteed not to be the answer.\r\n //the distance to the end of the array for each array from max is all the right hand numbers the answer cannot be\r\n\r\n n = n - (array1.length + array2.length - max1 - max2 - 2);\r\n\r\n int x0, x1, x2, x3;\r\n x0 = x1 = x2 = x3 = 0;\r\n\r\n //assigning all the values into 4 variables\r\n x0 = array1[max1];\r\n x1 = array2[max2];\r\n //sometimes the pairs are both assigned to the end of the list, so the lower hand value is checked for vailidity\r\n if(max1 > 0){\r\n x2 = array1[max1-1];\r\n }\r\n if(max2 > 0){\r\n x3 = array2[max2-1];\r\n }\r\n\r\n //put into an array, sorted and returned based on previous n calculation\r\n int[] array = new int[]{x0, x1, x2,x3};\r\n\r\n sorter(array);\r\n\r\n if(n==3){\r\n return array[1];\r\n } else if(n==2){\r\n return array[2];\r\n } else return array[3];\r\n }", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "private boolean checkMatch(String first, String second, String third)\n {\n // First makes sure the given inputs aren't empty\n if (!first.isEmpty())\n {\n // Set the winner to be the current player\n return first.equals(second) && first.equals(third);\n }\n /*\n * If one or more of them are empty, set he current winner to -1 and\n * return false\n */\n return false;\n }", "public boolean canThreePartsEqualSum(int[] A) {\r\n \tint totalSum = 0, partCount = 0, sum = 0;\r\n \t\r\n \tfor (int n : A)\r\n \t\ttotalSum += n;\r\n \t\r\n \t// When two groups of A make totalSum / 3, \r\n \t// the sum of remaining group is automatically totalSum / 3\r\n \t// x + x + y = 3x -> y = x;\r\n \tfor (int i = 0; i < A.length; i++) {\r\n \t\tsum += A[i];\r\n \t\t\r\n \t\tif (sum == totalSum / 3) {\r\n \t\t\tsum = 0;\r\n \t\t\tpartCount++;\r\n \t\t\t\r\n \t\t\tif (partCount >= 3)\r\n \t\t\t\treturn true;\r\n \t\t}\r\n \t}\r\n \treturn false;\r\n }", "public boolean check3sameNumbersMax(String password) {\n for (int i = 0; i < password.length() - 3; i++) {\n if (String.valueOf(password.charAt(i)).matches(\"\\\\d\")) { //next time: Character.isDigit(passtword.charAt(i))\n for (int j = i; j < i+3; j++) {\n if (password.charAt(j) != password.charAt(j + 1)) {\n break;\n } else if (j-i == 2) {\n return false;\n }\n }\n }\n }\n return true;\n }", "@Test\n public void testIsSameNumber() {\n int x = 1;\n int y = 1;\n int z = 2;\n\n assertEquals(true, Flik.isSameNumber(x, y));\n assertEquals(false, Flik.isSameNumber(x, z));\n }", "public static void main(String[] args) {\n\t\tString n1 = \"aaa\";\n\t\tString n2 = \"aaa\";\n\t\tString n3 = new String(\"aaa\");\n\n\t\t// ==는 주소값 비교\n\t\tSystem.out.println(\"n1==n2:\" + (n1 == n2));\n\t\tSystem.out.println(\"n1==n3:\" + (n1 == n3));\n\n\t\t// String의 equals(): 문자열의 내용을 비교하여 같으면 true, 아니면 false반환\n\t\tSystem.out.println(\"n1.equals(n2):\" + (n1.equals(n2)));\n\t\tSystem.out.println(\"n1.equals(n3):\" + (n1.equals(n3)));\n\n\t\tint a = 10, b = 20;\n\t\tString x = (a>b)?\"a는 b보다 크다\":\"a는 b보다 크지 않다\";\n\t\tSystem.out.println(x);\n\t\t\n\t\tint c = 4;\n\t\t//삼항 연산자를 활용하여 c가 짝수인지 홀수인지 출력\n\t\tString y = (c % 2)==0?\"짝수입니다\":\"홀수입니다\";\n\t\tSystem.out.println(y);\n\t}", "public boolean areEqualByThreeDecimalPlaces(double firstNum, double secondNum) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tboolean matches = false;\n\t\tString firstDec = Double.toString(firstNum);\n\t\tString secondDec = Double.toString(secondNum);\n\t\tint charcount = 0;\n\t\tif(firstNum == secondNum) {\n\t\t\tmatches = true;\n\t\t}\n\t\telse {\n\t\t\tif(firstDec.length() > secondDec.length()) {\n\t\t\t\tfor(int i =0; i < secondDec.length(); i++) {\n\t\t\t\t\tif(firstDec.charAt(i) == secondDec.charAt(i)) {\n\t\t\t\t\t\tcharcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(firstDec.length() < secondDec.length()) {\n\t\t\t\tfor(int i =0; i < firstDec.length(); i++) {\n\t\t\t\t\tif(firstDec.charAt(i) == secondDec.charAt(i)) {\n\t\t\t\t\t\tcharcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(charcount >= 4) {\n\t\t\t\tmatches = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmatches = false;\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t}", "public static int equalStacks(List<Integer> h1, List<Integer> h2, List<Integer> h3) {\n Stack<Integer> stack1 = getStack(h1);\n Stack<Integer> stack2 = getStack(h2);\n Stack<Integer> stack3 = getStack(h3);\n int stack1Sum = stack1.stream().mapToInt(Integer::intValue).sum();\n int stack2Sum = stack2.stream().mapToInt(Integer::intValue).sum();\n int stack3Sum = stack3.stream().mapToInt(Integer::intValue).sum();\n while (true){\n if(stack1.isEmpty() || stack2.isEmpty() || stack3.isEmpty()){\n return 0;\n }\n if(stack1Sum == stack2Sum && stack1Sum == stack3Sum){\n return stack1Sum;\n }\n if(stack1Sum>=stack2Sum && stack1Sum>=stack3Sum){\n int top = stack1.pop();\n stack1Sum = stack1Sum-top;\n }\n else if(stack2Sum>=stack1Sum && stack2Sum>=stack3Sum){\n int top = stack2.pop();\n stack2Sum = stack2Sum-top;\n }\n else{\n int top = stack3.pop();\n stack3Sum = stack3Sum-top;\n }\n }\n }", "public static void main(String[] args) {\n\t\t\tScanner myScanner = new Scanner(System.in);\r\n\t\t\tint n= myScanner.nextInt();\r\n\t\t\t//check all the options, from 1 (because in case of 0 its obivious) until the number n\r\n\t\t\tfor(int a=1;a<=n;a=a+1){\r\n\t\t\t\tfor(int b=1;b<=n;b=b+1)\r\n\t\t\t\t\tfor(int c=1;c<=n;c=c+1)\r\n\t\t\t\t\t\tif((a*a+b*b==c*c)&(a<=b))\r\n\t\t\t\t\t\t\tSystem.out.println(a+\" \"+b+\" \"+c);\r\n\t\t\t}\r\n\t\t\t\r\n // ----------------- write your code ABOVE this line only ---------\r\n\t\t\r\n\t}", "private static boolean fun3(List<String> res, List<String> ac1) {\n\t\tHashSet<String> hs=new HashSet<String>();\r\n\t\tfor(int i=0;i<res.size();i++){\r\n\t\t\ths.add(res.get(i));\r\n\t\t}\r\n\t\tfor(int i=0;i<ac1.size();i++){\r\n\t\t\tif(hs.contains(ac1.get(i)))\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private int check(Button A1, Button A2, Button A3, Button B1, Button B2, Button B3,Button C1,Button C2,Button C3)\r\n {\n if(A1.getText().equals(A2.getText())&& A2.getText().equals(A3.getText()) && A3.getText().equals(\"X\")||\r\n B1.getText().equals(B2.getText())&& B2.getText().equals(B3.getText()) && B3.getText().equals(\"X\")||\r\n C1.getText().equals(C2.getText())&& C2.getText().equals(C3.getText()) && C3.getText().equals(\"X\")||\r\n A1.getText().equals(B1.getText())&& B1.getText().equals(C1.getText()) && C1.getText().equals(\"X\")||\r\n A2.getText().equals(B2.getText())&& B2.getText().equals(C2.getText()) && C2.getText().equals(\"X\")||\r\n A3.getText().equals(B3.getText())&& B3.getText().equals(C3.getText()) && C3.getText().equals(\"X\")||\r\n A1.getText().equals(B2.getText())&& B2.getText().equals(C3.getText()) && C3.getText().equals(\"X\")||\r\n A3.getText().equals(B2.getText())&& B2.getText().equals(C1.getText()) && C1.getText().equals(\"X\")\r\n ) //end of if condition\r\n {\r\n return 2;\r\n }\r\n else if(A1.getText().equals(A2.getText())&& A2.getText().equals(A3.getText()) && A3.getText().equals(\"O\")||\r\n B1.getText().equals(B2.getText())&& B2.getText().equals(B3.getText()) && B3.getText().equals(\"O\")||\r\n C1.getText().equals(C2.getText())&& C2.getText().equals(C3.getText()) && C3.getText().equals(\"O\")||\r\n A1.getText().equals(B1.getText())&& B1.getText().equals(C1.getText()) && C1.getText().equals(\"O\")||\r\n A2.getText().equals(B2.getText())&& B2.getText().equals(C2.getText()) && C2.getText().equals(\"O\")||\r\n A3.getText().equals(B3.getText())&& B3.getText().equals(C3.getText()) && C3.getText().equals(\"O\")||\r\n A1.getText().equals(B2.getText())&& B2.getText().equals(C3.getText()) && C3.getText().equals(\"O\")||\r\n A3.getText().equals(B2.getText())&& B2.getText().equals(C1.getText()) && C1.getText().equals(\"O\")\r\n ) //end of if condition\r\n {\r\n return 1;\r\n }\r\n else if(turn > 9 && playerfirst == 1)\r\n {\r\n return 0;\r\n }\r\n else if(turn > 10 && playerfirst == 2)\r\n {\r\n return 0;\r\n }\r\n else{\r\n return 4;\r\n }\r\n }", "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }", "public static void main(String[] args) {\n\t\tint num1;\r\n\t\tint num2;\r\n\t\tint num3;\r\n\t\tScanner s= new Scanner (System.in);\r\n\r\n\t\tSystem.out.println(\"enter 1st num: \");\r\n\t\tnum1 = s.nextInt();\r\n\t\tSystem.out.println(\"enter 2nd num: \");\r\n\t\tnum2 = s.nextInt();\r\n\t\tSystem.out.println(\"enter 3rd num: \");\r\n\t\tnum3 = s.nextInt();\r\n\t\ts.close();\r\n\t\t\r\n\t\tSystem.out.println(\"&& comparison =\" +((num1>num2)&&(num1<num2)&&(num2<num3)));\r\n\t\tSystem.out.println(\"|| comparison =\" +((num1>num2)||(num1<num2)||(num2<num3)));\r\n\t\tSystem.out.println(\"! comparison =\" + !(num1>num2));\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println((0+15)/2);\r\n\t\tSystem.out.println(2.0e-6*10000000000.1);\r\n\t\tSystem.out.println(true&&false||true&&true);\r\n\t\t\r\n\t\t//1.1.2\r\n\t\tSystem.out.println((1+2.236)/2);\r\n\t\tSystem.out.println(1+2+3+4.0);\r\n\t\tSystem.out.println(4.1>=4);\r\n\t\tSystem.out.println(1+2+\"3\");\r\n\t\t\r\n\t\t//1.1.3\r\n//\t\tSystem.out.println(\"Please enter three nums\");\r\n\t\tScanner scanner=new Scanner(System.in);\r\n//\t\tint num=scanner.nextInt();\r\n//\t\tint num2=scanner.nextInt();\r\n//\t\tint num3=scanner.nextInt();\r\n//\t\r\n//\t\tif(num==num2&&num==num3) {\r\n//\t\t\tSystem.out.println(\"Eqaul:\");\r\n//\t\t}else {\r\n//\t\t\tSystem.out.println(\"Not equal:\");\r\n//\t\t}\r\n//\r\n//\t\t\t\r\n//\t\t//1.1.4\r\n//\t\t//a. then 语法错误\r\n//\t\t//b. ok\r\n//\t\t//c. ok\r\n//\t\t//d. ok\r\n//\r\n//\t\t\r\n//\t\t//1.1.5\r\n//\t\tint x=scanner.nextInt();\r\n//\t\tint y=scanner.nextInt();\r\n//\t\tif(x<1.0 && y<1.0 && x>0 && y>0) {\r\n//\t\t\tSystem.out.println(\"true\");\r\n//\t\t}\r\n//\t\telse {\r\n//\t\t\tSystem.out.println(\"false\");\r\n//\t\t}\r\n//\t\t\r\n\t\t\r\n\t\t//1.1.6\r\n//\t\tint f=0;\r\n//\t\tint g=1;\r\n//\t\tfor(int i=0;i<=15;i++) {\r\n//\t\t\tSystem.out.print(f+\"\\t\");\r\n//\t\t\tf=f+g;\r\n//\t\t\tg=f-g;\r\n//\t\t}\r\n\t\t\r\n\t\t//1.1.7\r\n//\t\tdouble t=9.0;\r\n//\t\twhile(Math.abs(t-9.0/t)> .001) {\r\n//\t\t\tt=(9.0/t+t)/2.0;\r\n//\t\t}\r\n//\t\tSystem.out.printf(\"%.5f\\n\", t);\r\n//\t\t\r\n//\t\t\r\n//\t\tint sum=0;\r\n//\t\tfor(int i=1;i<1000;i++)\r\n//\t\t\tfor(int j=0;j<i;j++)\r\n//\t\t\t\tsum++;\r\n//\t\tSystem.out.println(sum);\r\n//\t\r\n//\t\t\r\n//\t\tint sum2=0;\r\n//\t\tfor(int i=1;i<1000;i*=2)\r\n//\t\t\tfor(int j=0;j<1000;j++)\r\n//\t\t\t\tsum2++;\r\n//\t\tSystem.out.println(sum2);\r\n\t\r\n\t\t//1.1.8\r\n//\t\tSystem.out.println('b');\r\n//\t\tSystem.out.println('b'+'c');\r\n//\t\tSystem.out.println((char)('a'+4));\r\n\t\t\r\n\t\t//1.1.9\r\n//\t\tSystem.out.println(\"Please enter one num and return with a binary code\");\r\n//\t\tint N=scanner.nextInt();\r\n//\t\tString string=\"\";\r\n//\t\tfor(int n=N;n>0;n/=2) {\r\n//\t\t\tstring=(n%2)+string;\r\n//\t\t}\r\n//\t\tSystem.out.println(string);\r\n\t\t\r\n\t\t//1.1.10\r\n\t\t//int[] a=new int[10];\r\n\t\t\r\n\t\t//1.1.11\r\n//\t\tboolean[][] arrays= {{true,true,true},\r\n//\t\t\t\t{false,false,false},\r\n//\t\t\t\t{true,false,true},\r\n//\t\t};\r\n//\t\t\r\n//\t\tfor(int i=0;i<arrays.length;i++)\r\n//\t\t\tfor(int j=0;j<arrays.length;j++) {\r\n//\t\t\t\tif(arrays[i][j]) {\r\n//\t\t\t\t\tSystem.out.print(\"*\"+\"\\t\");\r\n//\t\t\t\t}\r\n//\t\t\t\telse {\r\n//\t\t\t\t\tSystem.out.print(\"^\"+\"\\t\");\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t//1.1.12\r\n//\t\tint[] a=new int[10];\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\ta[i]=9-i;\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\ta[i]=a[a[i]];\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\tSystem.out.println(i);\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t}", "public boolean checkEquation(int num1, int num2, int num3)\n\t{\n\t\tswitch(operationSign)\n\t\t{\n\t\tcase 1:\t\t//if addition\n\t\t\tif (num1 + num2 == num3)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\tcase 2:\t\t//if subtraction\n\t\t\tif (num1 - num2 == num3)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\tcase 3:\t\t//if multiplication\n\t\t\tif (num1*num2 == num3)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\tcase 4:\t\t//if division\n\t\t\tif (num1/num2 == num3)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdefault: \n\t\t\t\treturn false;\n\t\t}// end switch statements\n\t}", "public boolean isThreeOfAKind(){\n \r\n List<PokerCard> threeCards;\r\n \r\n //First possibility: first three cards match\r\n threeCards = cards.subList(0, 3);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: middle three cards match\r\n threeCards = cards.subList(1, 4);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Third possibility: last three cards match\r\n threeCards = cards.subList(2, 5);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isThreeOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n int pairsOfThree = 0;\n int pairsOfTwo = 0;\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 2){\n pairsOfTwo++;\n }\n if (numSame == 3){\n pairsOfThree++;\n }\n }\n if (pairsOfTwo > 0){\n return false;\n }\n return (pairsOfThree == 3);\n }", "public static boolean checkPermutation3 (String input1, String input2) {\n\t\t\n\t\tint[] asciiVal = new int[256];\n\t\t\n\t\tfor (int i = 0; i < input1.length(); i++) {\n\t\t\tasciiVal[(int) input1.charAt(i)] += 1;\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < input2.length(); j++) {\n\t\t\tif (asciiVal[(int) input2.charAt(j)] <= 0) return false;\n\t\t\tasciiVal[(int) input2.charAt(j)] -= 1;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean isEqual(int[] x, int[] y) {\n for (int i = 0; i < 3; i++) {\n if (x[i] != y[i]) {\n return false;\n }\n }\n return true;\n }", "@Test\n \tpublic void testf1Equalf3() {\n \t\tAssert.assertTrue(f1.equals(f3));\n \t}", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "private void instantiateThirdVar(IntVar var1, int coeff1, IntVar var2, int coeff2, IntVar var3, int coeff3, int constant, Propagator prop) throws ContradictionException {\n IntIterableRangeSet possibleValues3 = new IntIterableRangeSet();\n int lb3 = var3.getLB();\n DisposableValueIterator iterator1 = var1.getValueIterator(true);\n while(iterator1.hasNext()){\n int v1 = iterator1.next();\n int updatedConstant = zpz.sub(constant,\n zpz.mul(zpz.repr(v1),coeff1));\n DisposableValueIterator iterator2 = var2.getValueIterator(true);\n while(iterator2.hasNext()){\n int v2 = iterator2.next();\n possibleValues3.add(zpz.getSmallestGreaterEqThan(lb3, zpz.div(zpz.sub(updatedConstant,\n zpz.mul(zpz.repr(v2),coeff2)),\n coeff3)));\n }\n }\n var3.removeAllValuesBut(possibleValues3, prop);\n }", "public void ejercicio03() {\r\n\t\tcabecera(\"03\", \"Comparar numeros\");\r\n\r\n // Inicio modificacion\r\n\t\t\r\n NumeroEntero n1 = new NumeroEntero(10);\r\n NumeroEntero n2 = new NumeroEntero(10);\r\n\r\n if (n1.comapreTo(n2) == -1){\r\n \t System.out.println(\"N1-> \"+n1);\r\n System.out.println(\"N1 es mayor que N2\");\r\n }\r\n else if (n1.comapreTo(n2) ==1) {\r\n System.out.println(\"N1 -> \"+n1);\r\n System.out.println(\"N1 es menor que N2\");\r\n }\r\n else{\r\n System.out.println(\"N1 y N2 son iguales -> N1 ->\"+n1+\" N2 -> \"+n2);\r\n }\r\n\r\n\t\t// Fin modificacion\r\n\t\t\r\n\t}", "public static boolean isEqual(String str1, String str2, String str3) {\n\treturn isEqual(str1, str2) || isEqual(str1, str3);\n }", "public static void main(String[] args) {\n\t\tString FirstNumber = 15 + \"\" ;\n\t\tString SecondNumber = 15 + \"\";\n\t\t\n\t\tif(FirstNumber . compareTo(SecondNumber)==0)\n\t\t\n\t\t\tSystem.out.println(\"Numbers are equal\");\n\t\t\n\t\telse\n\t\t\t\n\t\t\tSystem.out.println(\"Numbers are not equal\");\n\t}", "private static boolean isEqual(int[] nums1, int[] nums2){\n \tfor(int i=0; i<nums1.length; i++){\n \t\tif(nums1[i]!=nums2[i]){\n \t\t\treturn false;\n \t\t}\n \t}\n \treturn true;\n }", "public boolean double23(int[] nums) {\n int numsLen = nums.length;\n if(numsLen == 2) {\n int n0 = nums[0];\n int n1 = nums[1];\n if((n0==2&&n1==2)||(n0==3&&n1==3)) {\n return true;\n }\n } else if(numsLen==1) {\n return false;\n }\n return false;\n }", "public static boolean containTwoOrThree(int[] numbers)\r\n {\r\n if (numbers[0] == 2 || numbers[1] == 2)\r\n {\r\n return true;\r\n }\r\n else if(numbers[0]==3 || numbers[1]==3)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "public boolean judgePoint241(int[] nums) {\n double n1 = nums[0];\n double n2 = nums[1];\n double n3 = nums[2];\n double n4 = nums[3];\n //case1:\n if(Math.abs(n1-8)<=0.01&&Math.abs(n2-4)<=0.01){\n int a = 1;\n }\n if(combine(combine(n1,n2),combine(n3,n4)))return true;\n //case2:\n for(double d:combine(n2,n3)){\n if(contains(combine(n1,d,n4),24.0)){\n return true;\n };\n }\n //case3:\n for(double d:combine(n1,n2,n3)){\n if(contains(combine(d,n4),24.0))return true;\n }\n //case4:\n for(double d:combine(n2,n3,n4)){\n if(contains(combine(n1,d),24.0))return true;\n }\n return false;\n }", "int llegue(int a,int b,int c,int d){\n if(a==c && b==d){\n return 1;\n }else{return 0;}\n }", "static boolean areSame(String expr1, String expr2)\n\t{\n\n\t\t// Create a vector for all operands and\n\t\t// initialize the vector as 0.\n\t\tint[] v = new int[MAX_CHAR];\n\n\t\t// Put signs of all operands in expr1\n\t\teval(expr1, v, true);\n\n\t\t// Subtract signs of operands in expr2\n\t\teval(expr2, v, false);\n\n\t\t// If expressions are same, vector must\n\t\t// be 0.\n\t\tfor (int i = 0; i < MAX_CHAR; i++)\n\t\t\tif (v[i] != 0)\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean check() {\n BigInteger t1 = y.modPow(int2, c.p);\n BigInteger t2 = x.modPow(int3, c.p);\n BigInteger t3 = ((t2.add(c.a.multiply(x))).add(c.b)).mod(c.p);\n return t1.compareTo(t3) == 0;\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint num = 20;\n\t\t\n\t\tnum = 25; \n\t\t\n\t\t//\" == \" sign or comparison boolean kullanilir \n\t\t\n\t\tboolean isTrue = 5 + 2 == 7;\n\t\t\n\t\tboolean isFalse = 5 + 2 == 8;\n\t\t\n\t\tSystem.out.println(isTrue == isFalse); // this says True equals False. it doesnt so it gives False result \n\t\t\n\n\t\t\n\t\t//!= Not Equal Sing\n\t\t\n\t\t\n\t\tboolean isTrue1 = 5+2 != 8;\n\t\t\n\t\tboolean noteq = 5+2 != 23;\n\t\t\n\t\tSystem.out.println(isTrue1);\n\t\tSystem.out.println(noteq);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// \">\" , \">=\" , \"<\" , \"<=\" ==> All returns boolean\n\t\t\n\t\t// && and operator .... If you have at least one false result \n\t\t// || Or operation ... If you have just one true the result will be true \n\t\t\n\t\tSystem.out.println(5>8); //False\n\t\t\n\t\tSystem.out.println(8>11-5); // True \n\t\t\n\t\t\n\t\tboolean b1 = 5>2;\t // true \n\t\tboolean b2 = 5==2+3;\t// true \n\t\tboolean b3 = 5==2;\t // false\n\t\tboolean b4 = 5<2; \t\t//false\n\t\t\n\t\t\n\t\t\n\t\t// to get true && all variables must ben true \n\t\t\n\t\tSystem.out.println(b1 && b2); // both true so result rue \n\t\t\n\t\tSystem.out.println(b1 && b3); //false \n\t\t\n\t\tSystem.out.println(b3 && b4); // false \n\t\t\n\t\t\n\t\t// || Or \n\t\tSystem.out.println(b2 || b1); // true bec at least one of the variables is true \n\t\t\n\t\tSystem.out.println(b3 || b4); // false bec all everything is false \n\t\t\n\t\tSystem.out.println(b1 || b2 || b3 || b4); // True bec at least one variable is true \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\n\t}", "void findCommon(int ar1[], int ar2[], int ar3[])\n{\n int i = 0, j = 0, k = 0;\n while (i < ar1.length && j < ar2.length && k < ar3.length)\n {\n if (ar1[i] == ar2[j] && ar2[j] == ar3[k])\n { System.out.print(ar1[i]+\" \"); i++; j++; k++; }\n else if (ar1[i] < ar2[j])\n i++;\n else if (ar2[j] < ar3[k])\n j++;\n else\n k++;\n }\n }", "public boolean isSame(){\r\n\t\tHugeInt mod2 = new HugeInt(this.p);\r\n\t\tmod2.modByHugeInt(new HugeInt(\"2\"));\r\n\t\tmod2.printHugeInt();\r\n\t\t\r\n\t\tHugeInt mod3 = new HugeInt(this.p);\r\n\t\tmod3.modByHugeInt(new HugeInt(\"3\"));\r\n\t\t\r\n\t\tif(this.p.compareHugeInts(this.p, new HugeInt(\"1\")) != -1)\r\n\t\t\tSystem.out.println(\"less than or equal to 1\");\r\n\t\telse if(this.p.compareHugeInts(this.p, new HugeInt(\"3\")) != -1)\r\n\t\t\tSystem.out.println(\"greater than 1 but less than 3\");\r\n\t\telse if(mod2.areAllZeros() || mod3.areAllZeros())\r\n\t\t\tSystem.out.println(\"mod by 2 or 3\");\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Üçgen cizebilmek için 1.kenar uzunlugunu giriniz\");\n\t\tdouble num1 = scan.nextInt();\t\n\t\tSystem.out.println(\"Üçgen cizebilmek için 2.kenar uzunlugunu giriniz\");\n\t\tdouble num2 = scan.nextInt();\n\t\tSystem.out.println(\"Üçgen cizebilmek için 3.kenar uzunlugunu giriniz\");\n\t\tdouble num3 = scan.nextInt();\n\t\t\n\t\t\n\t\t\n\t\tif((num1+num2>num3 && num1-num2<num3) && (num2+num3>num1 && num2-num3<num1) && (num1+num3>num2 &&num1-num3<num2)) {\n\t\t\tif (num1==num2 && num2==num3) {\n\t\t\tSystem.out.println(\"Eskenar ücgen cizilebilir\");\n\t\t\t}else if(num1 == num2 || num2== num1 || num1==num3) {\n\t\t\t\tSystem.out.println(\"Ikizkenar ücgen cizilebilir\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Ucgen cizilebilir\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"Ucgen cizilemez\");\n\t\t}\n\t\t\n\t\t\n\t\tscan.close();\n\t\t\n\t\t\n\t}", "public static boolean hasThreeOfAKind(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=3){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public int getOutcome(int first, int second, int third) {\n\t\tif (first + second + third == 2) {\n\t\t\treturn 10;\n\t\t} else if (first == second && first == third && second == third) {\n\t\t\treturn 5;\n\t\t} else if (first != second && first != third) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "protected boolean checkThreeOfAKind(ReturnValue returnValue) {\n\t\tboolean returnBool = false;\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tint localDiceInt;\n\t\tboolean localBool = false;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\tif (intList.get(i) == intList.get(j)) {\n\t\t\t\t\tlocalCheck++;\n\t\t\t\t\tif (localCheck == 3) {\n\t\t\t\t\t\tlocalBool = true;\n\t\t\t\t\t\tlocalPoints = intList.get(i) * 3;\n\t\t\t\t\t\tlocalDiceInt = intList.get(i);\n\t\t\t\t\t\treturnValue.setValue(localBool, localPoints, Box.THREE_OF_A_KIND);\n\t\t\t\t\t\treturnValue.setTheDiceInt(localDiceInt);\n\t\t\t\t\t\treturnBool = true;\n\t\t\t\t\t\treturn returnBool;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocalCheck = 0;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, Box.THREE_OF_A_KIND);\n\t\treturn returnBool;\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter first number\");\r\n\t\tint num1 = input.nextInt();\r\n\t\tSystem.out.println(\"Enter second number\");\r\n\t\tint num2 = input.nextInt();\r\n\r\n\t\tif (num1 != num2) {\r\n\t\t\tSystem.out.println(num1 + \" and \" + num2 + \" are equal: \" + isNotEqual());\r\n\t\t\tSystem.out.println(num1 + \" and \" + num2 + \" are not equal: \" + isEqual());\r\n\t\t} else if (num1 == num2) {\r\n\t\t\tSystem.out.println(num1 + \" and \" + num2 + \" are equal: \" + isEqual());\r\n\t\t\tSystem.out.println(num1 + \" and \" + num2 + \" are not equal: \" + isNotEqual());\r\n\t\t}\r\n\r\n\t}", "public static boolean isValid(double side1, double side2, double side3) {\n\t boolean isValid = side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1 ;\n\t return isValid;\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\nint a= sc.nextInt();\nint b=sc.nextInt();\nint c=sc.nextInt();\nif(a+b==10 || b+c==10 || c+a==10)\n{\nSystem.out.println(\"The out put value is: \"+10);\n}\nelse if ((a+b)==(b+c)+10 || (a+b)==(c+a)+10 )\n\t\n{\n\tSystem.out.println(\"The out put value is: \"+5);\n}\nelse{\n\tSystem.out.println(\"The out put value is: \"+0);\n}\n\t}", "public static int solution(int[] l) {\n // remainder 1 mod 3\n final List<Integer> r1 = new ArrayList<>();\n // remainder 2 mod 3\n final List<Integer> r2 = new ArrayList<>();\n // remainder 0 mod 3;\n final List<Integer> r0 = new ArrayList<>();\n int total = 0;\n for (int num : l) {\n if (num % 3 == 0) {\n r0.add(num);\n } else if (num % 3 == 1) {\n r1.add(num);\n } else {\n r2.add(num);\n }\n total = (total + num) % 3;\n }\n final List<Integer> ok = new ArrayList<>(r0);\n if (total == 0) {\n ok.addAll(r1);\n ok.addAll(r2);\n } else if (total == 1) {\n Collections.sort(r1);\n Collections.sort(r2);\n if (!r1.isEmpty()) {\n for (int i = 1; i < r1.size(); i++) { ok.add(r1.get(i)); }\n ok.addAll(r2);\n } else {\n for (int i = 2; i < r2.size(); i++) { ok.add(r2.get(i)); }\n }\n } else if (total == 2) {\n Collections.sort(r1);\n Collections.sort(r2);\n if (!r2.isEmpty()) {\n for (int i = 1; i < r2.size(); i++) { ok.add(r2.get(i)); }\n ok.addAll(r1);\n } else {\n for (int i = 2; i < r1.size(); i++) { ok.add(r1.get(i)); }\n }\n }\n ok.sort(Collections.reverseOrder());\n int res = 0;\n for (int num : ok) {\n res = res * 10 + num;\n }\n return res;\n }", "private boolean checkValue(char v1, char v2, char v3){ \r\n\t\treturn ((v1 != '-') && (v1 == v2) && (v2==v3));\r\n\t}", "public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"enter first\");\n\t\tint n1=sc.nextInt();\n\t\tSystem.out.println(\"enter sec\");\n\t\tint n2=sc.nextInt();\n\t\tSystem.out.println(\"enter third\");\n\t\tint n3=sc.nextInt();\n\t\tif(n1==n2&&n2==n3&&n3==n1)\n\t\t\tSystem.out.println(\"cant find\");\n\t\telse {\n\t\tif(n1>n2&&n1>n3)\n\t\t\tSystem.out.println(\"first number is largest\"+n1);\n\t\telse if(n2>n1&&n2>n3)\n\t\t\tSystem.out.println(\"second number is largest\"+n2);\n\t\telse\n\t\t\tSystem.out.println(\"third number is largest\"+n3);\n\t\t}\n\n\t}", "private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }", "public static boolean haveThree(int[] nums) {\n\n\t\tint count = 0;\n\t\t\n\t\tfor (int i=0; i < nums.length; i++) {\n\t\t\tif (nums[i] == 3) {\n\t\t\t\tcount++;\t\n\t\t\t}\t\t\n\t\t}\n\n\n\t\tfor (int i=0; i < nums.length-1; i++) {\n\t\t\tif (nums[i] == 3 && nums[i+1] == 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\n\t\tif (count==3) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean checkGrid(Set<Integer> numeros, Set<Integer> n_chances) {\n\t\t\n\t\t// The set structure assures there are no doublons\n\t\t\n\t\t// Checks the allowed combinaisons\n\t\tInteger nb_numeros = numeros.size();\n\t\tInteger nb_chances = n_chances.size();\n\t\t\n\t\tif ((nb_numeros > 9) || (nb_numeros < 5)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if ((nb_chances > 10) || (nb_chances < 1)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (nb_numeros == 9) {\n\t\t\tif (nb_chances > 1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse if (nb_numeros == 8) {\n\t\t\tif (nb_chances > 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse if (nb_numeros == 7) {\n\t\t\tif (nb_chances > 8) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Checks if numeros are between 1 and 49 and n_chances are between 1 and 10\n\t\tIterator<Integer> iterator1 = numeros.iterator();\n\t\tIterator<Integer> iterator2 = n_chances.iterator();\n\t\t\n\t\tInteger setElement = null;\n\t\twhile(iterator1.hasNext()) {\n\t \tsetElement = iterator1.next();\n\t \tif((setElement < 1) || (setElement > 49)) {\n\t \t\treturn false;\n\t \t}\n\t }\n\t\t\n\t\tsetElement = null;\n\t while(iterator2.hasNext()) {\n\t \tsetElement = iterator2.next();\n\t \tif((setElement < 1) || (setElement > 10)) {\n\t \t\treturn false;\n\t \t}\n\t }\n\t\t\n\t\treturn true;\n\t}", "private boolean checkRowCol(int c1, int c2, int c3) \r\n {\r\n return ((c1 != -1) && (c1 == c2) && (c2 == c3)); //eida ekhon porjonto kaaj e lage nai\r\n }", "private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}", "public void doIt() throws IOException {\n String line;\n while ((line = br.readLine()) != null) {\n StringTokenizer st = new StringTokenizer(line);\n String first = st.nextToken();\n String second = st.nextToken();\n\n //Suppose i have first and second number:\n //2,A - they will never be equal\n //9,C - C is from base that certainly has C, so base 13 minimum, 9 is from base that certainly has 9, so 9 at minimum.\n //9,C - they will never be the same number.\n\n //SOLUTION: If it is a single digit, if two digits are not equal, they will never be equal\n /*\n If one of them is not a single digit, start iterating combinations, for each base of first number,\n for each base of second number, if the second number is already larger than the first number, break first loop\n */\n\n\n }\n }", "public void isItATriangle(){\n Scanner firstSide = new Scanner(System.in);\n System.out.println(\"Please put in your first side length: \");\n int side1 = firstSide.nextInt();\n\n Scanner secondSide = new Scanner(System.in);\n System.out.println(\"Please put in your second side length: \");\n int side2 = secondSide.nextInt();\n\n Scanner thirdSide = new Scanner(System.in);\n System.out.println(\"Please put in your third side length: \");\n int side3 = thirdSide.nextInt();\n\n System.out.println(\"\\nNow calculating to see if you have a Triangle...\");\n System.out.println(\"Your first side value: \" + side1 + \"\\nYour second side value: \" + side2 + \"\\nYour third side value: \" + side3 + \"\\n\");\n\n //*****************************************************************\n /*\n *This is seeing is the sides are going to be enough for a Triangle\n *using Triangle Inequality Theorem\n */\n if(side1 + side2 > side3){\n if(side1 + side3 > side2){\n if(side2 + side3 > side1){\n System.out.println(\"Yes! This is a Triangle!\");\n\n if ((side1 == side2) && (side2 == side3) && (side3 == side1)){\n System.out.println(\"Oh hey! Your Triangle is an Equilaterall Triangle!\");\n }else{\n System.out.print(\"\");\n }\n\n if (((side1 == side2) && (side2 != side3)) || ((side2 == side3) && (side3 != side1)) || ((side3 == side1) && (side3 != side2))){\n System.out.println(\"Wow! Your triangle is Isosoleces!\");\n }else{\n System.out.print(\"\");\n }\n\n }else{\n System.out.println(\"No, Not a Triangle\");\n }\n }else{\n System.out.println(\"No, Not a Triangle\");\n }\n }else{\n System.out.println(\"No, Not a Triangle.\");\n return;\n }\n\n //checking to see if equilaterall\n\n }", "public static void main(String[] args) {\nint a=10;\nint b=55;\nif(b==a) {\n\tSystem.out.println(\"equal\");\n}\nelse {\n\tSystem.out.println(\"not equal\");\n}\nSystem.out.println(1);\nSystem.out.println(2);\nSystem.out.println(3);\n\t}", "public static void main(String[] args) {\n\t\tint[] arr1 = { 10, 12, 55, 32, 17 };\n\t\tint[] arr2 = { 10, 12, 55, 32, 17 };\n\t\t/*//Second set\n\t\tint[] arr1 = {10,12,55,32,17,99};\n\t\tint[] arr2 = {10,12,55,32,17}};*/\n\t\t/* //Third set\n\t\tint[] arr1 = {10,12,55,32,17};\n\t\tint[] arr2 = {10,12,99,32,17}};*/\n\n\t\tArraysIdentical arrayidentical = new ArraysIdentical();\n\t\tarrayidentical.identicalCheck(arr1, arr2);\n\n\t}", "public static void main(String[] args) {\r\n\t\r\n\t\tint n1 = 10;\r\n\t\tboolean c1 = n1 > 5;\r\n\t\tboolean c2 = n1 < 5;\r\n\t\tboolean c3 = n1 >= 5;\r\n\t\tboolean c4 = n1 <= 5;\r\n\t\tboolean c5 = n1 == 5;\r\n\t\tboolean c6 = n1 != 5;\r\n\t\t\r\n\t\tSystem.out.println(c1);\r\n\t\tSystem.out.println(c2);\r\n\t\tSystem.out.println(c3);\r\n\t\tSystem.out.println(c4);\r\n\t\tSystem.out.println(c5);\r\n\t\tSystem.out.println(c6);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hi There.. Welcome to find which is big number out of 3 numbers you entered\");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter 3 numbers one by one\");\r\n\t\tdouble a = sc.nextInt();\r\n\t\tdouble b = sc.nextInt();\r\n\t\tdouble c = sc.nextInt();\r\n\t\tif (a>b && a>c) {\r\n\t\t\tSystem.out.println(\"The number \" +a+ \" enterd by you is greater than others\");\r\n\t\t}\r\n\t\telse if (b>a && b>c)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The number \" +b+ \" enterd by you is greater than others\");\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\telse if (a==b && b==c)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The number \" +c+ \" enterd by you is qual with others\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The number \" +c+ \" enterd by you is greater than others\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n for (int c = 1; c < 999; c++) {\n for (int b = 1; b < c; b++) {\n for (int a = 0; a < b; a++) {\n if((a+b+c) == 1000 && Math.pow(c,2) == (Math.pow(a,2)+ Math.pow(b,2))){\n System.out.println(\"a : \"+ a);\n System.out.println(\"b : \"+ b);\n System.out.println(\"c : \"+ c);\n System.out.println(a*b*c);\n }\n\n }\n }\n }\n}", "int main()\n{\nint a,b,count=0;\ncin>>a>>b;\nint arr1[a],arr2[b];\n for(int i=0;i<a;i++)\n {\ncin>>arr1[i];\n }\n for(int i=0;i<b;i++)\n {\ncin>>arr2[i];\n }\n if(a==b)\n {\n for(int i=0;i<a;i++)\n {\n if(arr1[i]==arr2[i])\n {\n count++;\n }\n }\n if(count==a)\n {\ncout<<\"Same\";\n }\n else\n {\ncout<<\"Not Same\";\n }\n }\n else\n {\ncout<<\"Not Same\";\n}\n}", "public boolean isEqual(Triangle t){\n return((a==t.a)&&(b==t.b)&&(c==t.c));\n }", "public static void main(String[] args) {\nScanner scan=new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Please enter three numbers\");\n\t\t\n\t\tint num1=scan.nextInt();\n\t\t\n\t\tint num2=scan.nextInt();\n\t\t\t\t\n\t\tint num3=scan.nextInt();\n\t\t\n\t\tif (num1==num2 && num1==num3) {\n\t\t\tSystem.out.println(\"The numbers are equal\");\n\t\t}else {\n\t\t\t\n\t\t}\n\t\tif (num1>=num2 && num1>num3){\n\t\t\tSystem.out.println(num1+ \" is largest\");\n\t\t\t\n\t\t}else if (num2>=num1 && num2>num3) {\n\t\t\t\n\t\t\tSystem.out.println(num2 + \" is largest\");\n\t\t\t\n }else if (num3>=num1 && num3>num2) {\n\t\t\t\n\t\t\tSystem.out.println(num3+ \" is largest\");\n \t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "static void compare()\n {\n \tif(a < c)\n\t\t {\n\t\t\t comp_one = 1; //store this value , else zero default \n\t\t }\n\t\t if(c < b)\n\t\t {\n\t\t\t comp_two = 2; //store this value , else zero default\n\t\t }\n\t\t if(b < a)\n\t\t {\n\t\t\t comp_thr = 5; //store this value , else zero default\n\t\t }\n\t\t \n\t\t comp_val = comp_one + comp_two + comp_thr; //create a unique value by addition\n }", "public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n long[] num = new long[n];\n for (int i = 0; i < n; i++) {\n num[i] = scn.nextLong();\n }\n int m = n;\n long[] arr = new long[m];\n for (int i = 0; i < m; i++) {\n arr[i] = scn.nextLong();\n }\n boolean x = isTwoArrayEqual(num, arr);\n System.out.println(x);\n }", "public boolean equals(Matrix3f m1) {\n\treturn m1 != null\n\t && m00 == m1.m00\n\t\t&& m01 == m1.m01\n\t\t&& m02 == m1.m02 \n\t\t&& m10 == m1.m10\n\t\t&& m11 == m1.m11\n\t\t&& m12 == m1.m12\n\t\t&& m20 == m1.m20\n\t\t&& m21 == m1.m21\n\t\t&& m22 == m1.m22;\n }", "public boolean checkR3(String candidateSolution){\n\t\t//Split the string to a number of 9 digits\n\t\tString []candSol = candidateSolution.split(\"(?<=\\\\G.........)\");\n\t\tint candSolIndex = 0;\n\t\t\n\t\twhile(candSolIndex < 9){\n\n\t\t\tString testPart = candSol[candSolIndex];\n\t\t\t//R2 part\n\t\t\tboolean ok = checkIfDublicate(testPart);\n\t\t\tcandSolIndex++;\n\t\t\tif(ok){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn true;\t\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "private boolean eq(int[] a,int[] b){\n\t\tboolean eq = true;\n\t\tif(a.length != b.length) return false;\n\t\tfor(int i=0;i<a.length;i++){\n\t\t\tif( a[i] != b[i] ){\n\t\t\t\teq = false;\n\t\t\t\tbreak;\n\t\t\t}else{\n\n\t\t\t}\n\t\t}\n\t\treturn eq;\n\t}", "boolean checkValidity(int side1, int side2, int side3);", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tInteger[] numbers = new Integer[] {1, 73, 12, - 5, 73, 8, - 5, 1, 12};\n\t\n\t\tSet<Integer> equalNumbers = new HashSet<Integer>();\n\t\tSet<Integer> uniqueNumbers = new HashSet<Integer>();\n\t\tString uniqueNumber = \"\";\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tfor (int j = i + 1; j < numbers.length; j++) {\n\t\t\tif (numbers[i] == numbers[j]) {\n\t\t\t\tif (!equalNumbers.contains(numbers[j])) {\n\t\t\t\t\tequalNumbers.add(numbers[j]);\t// 1, -5, 73, 12,\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!uniqueNumbers.contains(numbers[j]))\n\t\t\t\tuniqueNumbers.add(numbers[j]);\t // 1, -5, 8, 73, 12, \t\t\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tfor (Integer number : equalNumbers) {\n\t\t\tSystem.out.print(number.toString() + \", \"); // 1, -5, 73, 12,\n\t\t}\t\n\t\tSystem.out.println();\t\t\n\t\tfor (Integer number : uniqueNumbers) {\n\t\t\tSystem.out.print(number.toString() + \", \"); // 1, -5, 8, 73, 12, \n\t\t} \n\t\t\n\t\tfor (Integer number : uniqueNumbers) {\n\t\t\tif (!equalNumbers.contains(number)) {\n\t\t\t\tuniqueNumber += number;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\t\n System.out.println(\"The uniqie number is : \" + uniqueNumber);\n\t}", "public String solve(long n, long a, long b, long c, long d, long x0, long y0, long m)\n {\n long[] count = new long[9];\n long x = x0;\n long y = y0;\n for (long t = 0; t < n; t++)\n {\n// System.out.println(x + \", \" + y);\n int i = (int) (x % 3) * 3 + (int) (y % 3);\n count[i]++;\n x = (a * x + b) % m;\n y = (c * y + d) % m;\n }\n\n long totalCount = 0;\n for (int i1 = 0; i1 < 9; i1++)\n {\n long count1 = count[i1];\n if (count1 == 0)\n {\n continue;\n }\n count[i1]--;\n for (int i2 = i1; i2 < 9; i2++)\n {\n long count2 = count[i2];\n if (count2 == 0)\n {\n continue;\n }\n count[i2]--;\n int x1 = i1 / 3;\n int y1 = i1 % 3;\n int x2 = i2 / 3;\n int y2 = i2 % 3;\n int x3 = (3 - (x1 + x2) % 3) % 3;\n int y3 = (3 - (y1 + y2) % 3) % 3;\n int i3 = (x3 % 3) * 3 + (y3 % 3);\n long count3 = count[i3];\n if (i3 >= i2 && count3 > 0)\n {\n // either i1==i2==i3 OR i1!=i2!=i3; you can never have only two i's the same.\n if (i1 == i2 && i2 == i3)\n {\n totalCount += calcCombinations(count1);//the first count value is the genuine count for that x,y coordinate.\n }\n else\n {\n totalCount += count1 * count2 * count3;\n }\n }\n count[i2]++;\n }\n count[i1]++;\n }\n\n return String.valueOf(totalCount);\n }", "boolean checkThreeSum(List<Integer> a, int threeSum) {\n\t\tCollections.sort(a); // n log n\n\t\t\n\t\tfor (int index = 0; index <= a.size() - 1; index++) {// o [n square]\n\t\t\tint current = a.get(index);\n\t\t\tif (checkTwoSum(a, threeSum - current, index)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\n\t Scanner in = new Scanner(System.in);\n\t int n = in.nextInt();\n\t int k = in.nextInt();\n\t int a[] = new int[n];\n\t for(int a_i=0; a_i < n; a_i++){\n\t a[a_i] = in.nextInt();\n\t }\n\t int count=0;\n\t for(int a1=0;a1<n-1;a1++)\n\t {\n\t \tfor(int b=1;b<n;b++)\n\t \t{\n\t \t if(a[a1]+a[b]%3==0)\n\t \t {\n\t \t\t count++;\n\t \t }\n\t \t}\n\t }\n\t System.out.println(count);\n\n\t}", "boolean isEquilateral() {\r\n\t\treturn (side1 == side2 && side2 == side3 && side3 == side1);\r\n\t}", "public static boolean opposites(Pair[] data){\n HashSet<Pair> hs = new HashSet<>(20, 0.9f);\n for(Pair p : data) {\n if(hs.contains(new Pair(p.b(), p.a())))\n return true;\n hs.add(p);\n }\n return false;\n }", "protected int compareNumbers(Number n1, Number n2) {\n BigDecimal bd1 = new BigDecimal(n1.toString());\n BigDecimal bd2 = new BigDecimal(n2.toString());\n return bd1.compareTo(bd2);\n }", "public static <A, B, C> Equal<P3<A, B, C>> p3Equal(final Equal<A> ea, final Equal<B> eb, final Equal<C> ec) {\n return new Equal<P3<A, B, C>>(new F<P3<A, B, C>, F<P3<A, B, C>, Boolean>>() {\n public F<P3<A, B, C>, Boolean> f(final P3<A, B, C> p1) {\n return new F<P3<A, B, C>, Boolean>() {\n public Boolean f(final P3<A, B, C> p2) {\n return ea.eq(p1._1(), p2._1()) && eb.eq(p1._2(), p2._2()) && ec.eq(p1._3(), p2._3());\n }\n };\n }\n });\n }", "public boolean no23(int[] nums) {\n for(int j=0; j<2; j++)\n {\n if(nums[j]==2||nums[j]==3)\n {\n return false;\n }\n }\n return true;\n}", "static boolean Isosceles(long AA, long BB, long CC){\n if((AA==BB)||((AA==CC)||(BB==CC)))\n return true;\n else\n return false;\n }", "public static boolean isPowerOfThree3(int n)\n\t{\n\t\tif(n <= 0)\n\t\t\treturn false;\n\t\tdouble r = Math.log10(n) / Math.log10(3);\n\t\tif (r % 1 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t\t\n\t}", "public static void main(String[] args) \r\n {\n Scanner input = new Scanner(System.in);\r\n \r\n //Declare the anonymous variables as a double variable data type\r\n double n1, n2, n3;\r\n \r\n //Allow user input first random number of any size\r\n System.out.println(\"Enter first number: \");\r\n n1 = input.nextDouble();\r\n \r\n //Allow user input second random number of any size\r\n System.out.println(\"Enter second number: \");\r\n n2 = input.nextDouble();\r\n \r\n //Allow user input third random number of any size\r\n System.out.println(\"Enter third number: \");\r\n n3 = input.nextDouble();\r\n \r\n /*Computation that compares the values of the variables inputed by the\r\n user\r\n */\r\n \r\n if (n1 > n2 & n1 > n3)\r\n System.out.println(n1 + \" is the largest number.\");\r\n \r\n else if (n2 > n1 & n2 > n3)\r\n System.out.println(n2 + \" is the largest number.\");\r\n \r\n else if (n3 > n2 & n3 > n1)\r\n System.out.println(n3 + \" is the largest number.\");\r\n \r\n else System.out.println(\"The numbers are not distinct.\");\r\n \r\n //Details of the Author of the program are displayed below output of the program\r\n System.out.println(\"Name: BECKLEY Moses Oluwadamilola\");\r\n System.out.println(\"Email: [email protected]\");\r\n System.out.println(\"Phone Number: 07030325335\");\r\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number that include 6 numbers\");\r\n\t\tint a = sc.nextInt();\r\n\t\tint a1=a/100000;\r\n\t\tint a2=a%100000/10000;\r\n\t\tint a3=a%10000/1000;\r\n\t\tint a4=a%1000/100;\r\n\t\tint a5=a%100/10;\r\n\t\tint a6=a%10;\r\n\t\tif (a1==a6 && a2==a5 && a3==a4){\r\n\t\t\tSystem.out.println(\"Yours number is polyndromic\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Yours number is unpolyndromic\");\r\n\t\t}\r\n\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner keyboard= new Scanner(System.in);\r\nSystem.out.print(\"Enter a number:\");\r\nString word1,word2 = null,word3 = null,word4; //Create four string for four outputs\r\nint number = keyboard.nextInt();\r\nif(number%15==0){ word1=\"special\";}//check weather it is special\r\nelse { word1=\"not special\";}\r\nif( number>999){word3=\"big\";}//check weather it is big\r\nelse{word3=\"not big\";}\r\nif(number%5==0&&number%6==0&&number%18!=0){word2=\"weird\";} //check weather it is weird\r\nelse{word2=\"not weird\";}\r\nif(word3==\"big\"||word2==\"weird\"){word4=\"scary\";}//check weather it is scary\r\nelse{word4=\"not scary\";}\r\n \r\n// strings ae compared in oder to check the all possible outcome combinations\r\n//Then outcomes are printed as given in the sample test cases\r\n\r\nif(word1==\"special\" && word4!=\"scary\"){\r\n\tSystem.out.println(number+\" is \"+\" \"+word1+\", but \"+word4+\".\");\r\n}\r\nif(word1==\"special\" && word3!=\"big\"&& word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\", \"+word2+\", \"+word4+\", but \"+word3+\".\");\r\n}\r\nif(word1==\"special\" && word3==\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\" , \"+word3+\", \"+word4+\", but \"+word2+\".\");\r\n}\r\nif(word1!=\"special\" && word3==\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word3+\", \"+word4+\", but \"+word2+\".\");\r\n}\r\nif(word1!=\"special\" && word3!=\"big\" && word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word2+\", \"+word4+\", but \"+word3+\".\");\r\n}\r\nif(word1!=\"special\" && word3!=\"big\" && word2!=\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word4+\".\");\r\n}\r\nif(word1==\"special\" && word3==\"big\" && word2==\"weird\"){\r\n\tSystem.out.println(number+\" is \"+word1+\", \"+word3+\", \"+word2+\", \"+word4+\".\");\r\n}\r\n\r\n\r\nkeyboard.close();\r\n\t}", "public static final boolean allTheSame(float... numbers) {\n\n for (int i = 1; i < numbers.length; i++) {\n if (numbers[i] != numbers[i - 1]) return false;\n }\n return true;\n }", "private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }", "private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }", "public boolean isConsistent(Variable var, Variable[][] assignment) {\n\t\tfor (Constraint constraint : var.constraints) {\n\t\t\tif ( assignment[constraint.row][constraint.col].value == var.value\n\t\t\t\t\t|| grid[constraint.row][constraint.col].value == var.value) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean a(ao aoVar, ao aoVar2) {\n return (aoVar == null && aoVar2 == null) ? true : aoVar != null && aoVar2 != null && aoVar.bu == aoVar2.bu && aoVar.bw == aoVar2.bw && n(aoVar.packageName, aoVar2.packageName) && n(aoVar.softName, aoVar2.softName) && n(aoVar.certMd5, aoVar2.certMd5) && n(aoVar.aA, aoVar2.aA) && n(aoVar.version, aoVar2.version) && n(aoVar.dexSha1, aoVar2.dexSha1) && aoVar.bv == aoVar2.bv;\n }", "private void check5(){\n \n if (errorCode == 0){\n \n int firstSum = 0;\n int lastSum = 0;\n String firstFour = number.substring(0,4);\n String lastFour = number.substring(8,12);\n \n for(int i = 0; i < firstFour.length();){\n firstSum += Integer.parseInt(firstFour.substring(i, ++i));\n }\n \n for(int i = 0; i < lastFour.length();){\n lastSum += Integer.parseInt(lastFour.substring(i, ++i));\n }\n \n if (!(firstSum == lastSum - 1)){\n valid = false;\n errorCode = 5;\n }\n }\n\t}", "public static void main(String args[]) {\n Scanner in=new Scanner(System.in);\n int n=in.nextInt();\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=in.nextInt();\n int val=in.nextInt();\n int c=0;\n while(c<n)\n {\n for(int i=c+1;i<n;i++)\n {\n if(arr[c]+arr[i]==val)\n System.out.println(arr[c]+\", \"+arr[i]);\n }\n c++;\n }\n }", "public boolean equals(@org.jetbrains.annotations.Nullable java.lang.Object r3) {\n /*\n r2 = this;\n if (r2 == r3) goto L_0x0047\n boolean r0 = r3 instanceof com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection\n if (r0 == 0) goto L_0x0045\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r3 = (com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection) r3\n com.bitcoin.mwallet.core.models.slp.Slp r0 = r2.token\n com.bitcoin.mwallet.core.models.slp.Slp r1 = r3.token\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x0045\n java.util.List<kotlin.ULong> r0 = r2.quantities\n java.util.List<kotlin.ULong> r1 = r3.quantities\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x0045\n com.bitcoin.bitcoink.tx.Satoshis r0 = r2.fee\n com.bitcoin.bitcoink.tx.Satoshis r1 = r3.fee\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x0045\n com.bitcoin.bitcoink.tx.Satoshis r0 = r2.change\n com.bitcoin.bitcoink.tx.Satoshis r1 = r3.change\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x0045\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r0 = r2.utxos\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r1 = r3.utxos\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x0045\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r0 = r2.error\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r3 = r3.error\n boolean r3 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r3)\n if (r3 == 0) goto L_0x0045\n goto L_0x0047\n L_0x0045:\n r3 = 0\n return r3\n L_0x0047:\n r3 = 1\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.equals(java.lang.Object):boolean\");\n }", "private boolean Equals(ArrayList<Integer> list) {\n f = list.get(0);\n o = list.get(1);\n r = list.get(2);\n t = list.get(3);\n y = list.get(4);\n s = list.get(5);\n i = list.get(6);\n x = list.get(7);\n e = list.get(8);\n n = list.get(9);\n // Y is in 1's place, T in 10's, R in 100's, O in 1000's place and finally F in 10000's place. assign these\n // values approprately for each number.\n FORTY = (f * 10000 + o * 1000 + r * 100 + t * 10 + y * 1);\n SIXTY = (s * 10000 + i * 1000 + x * 100 + t * 10 + y * 1);\n TEN = (t * 100 + e * 10 + n * 1);\n int sum = FORTY + TEN + TEN;\n\n // if our values match up correctly, then we will show the values of each.\n if (sum == SIXTY) {\n System.out.printf(\"Forty: %d,\\nTen: %d,\\nSixty: %d\\n\", FORTY, TEN, SIXTY);\n System.out.printf(\"The values of each letters are as follows:\\nF = %d,\\nO = %d,\\nR = %d,\\nT = %d,\\nY = %d,\\n\" +\n \"S = %d,\\nI = %d,\\nX = %d,\\nE = %d,\\nand N = %d.\", f, o, r, t, y, s, i, x, e, n);\n return true;\n }\n return false;\n }", "@Test\n public void equals_DifferentPriceCents_Test() {\n Assert.assertFalse(bq1.equals(bq5));\n }" ]
[ "0.80127794", "0.6806918", "0.60699815", "0.59473723", "0.58617514", "0.581993", "0.58182687", "0.5765056", "0.57392406", "0.57030416", "0.5656571", "0.56148005", "0.55922115", "0.5583524", "0.5562583", "0.5515766", "0.55136937", "0.54952806", "0.54932326", "0.54924905", "0.54922676", "0.54743856", "0.5438924", "0.54350483", "0.5419579", "0.5410521", "0.5393804", "0.53917414", "0.5383217", "0.53830934", "0.53688586", "0.5365398", "0.5363597", "0.53336376", "0.532994", "0.5323922", "0.53069556", "0.52954924", "0.52660286", "0.5262613", "0.5258896", "0.5258252", "0.5257579", "0.52568877", "0.52558875", "0.5248033", "0.5236008", "0.5235323", "0.5228321", "0.5227754", "0.5220112", "0.5217715", "0.5213803", "0.5209449", "0.51953125", "0.5187808", "0.5173456", "0.5173404", "0.51720273", "0.51716155", "0.5157738", "0.5153886", "0.5153148", "0.5145417", "0.5139118", "0.511849", "0.5112761", "0.51048934", "0.5102838", "0.5102048", "0.5085475", "0.50840425", "0.5075113", "0.5072876", "0.507245", "0.5070659", "0.5069013", "0.5068961", "0.5066201", "0.5065828", "0.506315", "0.50517917", "0.50510216", "0.50497156", "0.50471944", "0.50457066", "0.50422156", "0.5027622", "0.5027423", "0.50212395", "0.5020686", "0.5020647", "0.50199175", "0.5014691", "0.5012674", "0.50092053", "0.500731", "0.5007031", "0.5005475", "0.49983686" ]
0.8044534
0
Created by Administrator on 2018/4/8 0008.
public interface View { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \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 mo55254a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo6081a() {\n }", "@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 RepositorioAtendimentoPublicoHBM() {\r\t}", "public Pitonyak_09_02() {\r\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\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 public void memoria() {\n \n }", "private Rekenhulp()\n\t{\n\t}", "public void mo12930a() {\n }", "public void mo55254a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private TMCourse() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo1531a() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void getExras() {\n }", "private void m50366E() {\n }", "Petunia() {\r\n\t\t}", "public void mo9848a() {\n }", "public void create() {\n\t\t\n\t}", "zzang mo29839S() throws RemoteException;", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "private Singletion3() {}", "@Override\n\tpublic void create() {\n\n\t}", "private void poetries() {\n\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "protected boolean func_70814_o() { return true; }", "public void mo3376r() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@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\tpublic void einkaufen() {\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private static void oneUserExample()\t{\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private UsineJoueur() {}", "@Override\n public String toString() {\n return \"\";\n }", "public static void listing5_14() {\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "private void kk12() {\n\n\t}", "public void mo12628c() {\n }", "public void gored() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n public int getVersion() {\n return 0;\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo21779D() {\n }", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private CompareDB () {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void mo21825b() {\n }", "@Override\n public Date getCreated()\n {\n return null;\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}" ]
[ "0.60921514", "0.59446394", "0.5823108", "0.5760146", "0.5681099", "0.56693035", "0.5642316", "0.56415427", "0.5637409", "0.56101817", "0.5599942", "0.5599942", "0.5599942", "0.5599942", "0.5599942", "0.5599942", "0.5599942", "0.5599225", "0.55550027", "0.5553378", "0.55524594", "0.55457973", "0.5541868", "0.5541868", "0.5535627", "0.55227464", "0.55200845", "0.54947114", "0.5481205", "0.5481205", "0.54805577", "0.5480188", "0.5476494", "0.54752284", "0.54680777", "0.54553545", "0.54517686", "0.5436806", "0.54222465", "0.54189503", "0.5417422", "0.5414911", "0.5405381", "0.5401435", "0.53937554", "0.5393714", "0.5381848", "0.53733337", "0.53690064", "0.5341692", "0.53284127", "0.5327492", "0.53252846", "0.53206587", "0.5315389", "0.53094095", "0.5307235", "0.52993536", "0.5294917", "0.52893364", "0.5281622", "0.5276305", "0.526986", "0.52690166", "0.5254675", "0.52541065", "0.52541065", "0.52541065", "0.52541065", "0.52541065", "0.52541065", "0.52528983", "0.5252634", "0.5249997", "0.5248781", "0.52487427", "0.5246888", "0.52446437", "0.5243236", "0.52422625", "0.5238944", "0.52337235", "0.5233598", "0.522872", "0.5226824", "0.522519", "0.5222855", "0.5222057", "0.52184314", "0.5214751", "0.521289", "0.5207182", "0.5199777", "0.5196466", "0.5193973", "0.51908815", "0.5187728", "0.51824975", "0.5180928", "0.5177626", "0.5175626" ]
0.0
-1
TODO Autogenerated method stub
public static JPanel newPanel() { 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
Finds all airports in provided txt file, with corresponding city with comments in database. Airport that does not have active city in database is not part of resulting HashMap.
@Override public HashMap<String, Airport> findAll() { List<City> cities = cityDao.findAll(0); airportFile = new File(AirportDao.class.getClassLoader().getResource("airports.txt").getPath()); try { FlightFileReader.consumeNonEmptyLinesFromFile(airportFile, line -> { String[] params = line.split(",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)", -1); String airportID = params[0].replace("\"", ""); String airportIATA = params[4].replace("\"", ""); String airportICAO = params[5].replace("\"", ""); String airportMapKey = (airportIATA.isEmpty() && airportICAO.isEmpty()) ? airportID : (airportIATA.equals("\\N") ? airportICAO : airportIATA); try { if (isCityAvailable(cities, params[2].replace("\"", ""))) { airportsMap.put(airportMapKey, Airport.builder() .airportId(Integer.parseInt(params[0])) .name(params[1].replace("\"", "")) .city(params[2].replace("\"", "")) .country(params[3].replace("\"", "")) .iata(params[4].replace("\"", "")) .icao(params[5].replace("\"", "")) .latitude(Double.parseDouble(params[6])) .longitude(Double.parseDouble(params[7])) .altitude(Double.parseDouble(params[8])) .timezone(params[9]) .dst(params[10].replace("\"", "")) .tz(params[11].replace("\"", "")) .type(params[12].replace("\"", "")) .source(params[13].replace("\"", "")) .build()); } } catch (Exception ex) { lgr.log(Level.SEVERE, ex.getMessage(), ex); } }); } catch (Exception ex) { lgr.log(Level.SEVERE, ex.getMessage(), ex); } return airportsMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Map<String, City> readCityFromFile(String filePath) throws FileNotFoundException {\n Scanner scan = new Scanner(new File(filePath));\n Map<String, City> cities = new HashMap<String, City>();\n String cityName;\n int cityPoints;\n double latitude;\n double longitude;\n\n while (scan.hasNext()) {\n String entireString = scan.next();\n String[] splitString = entireString.split(\",\");\n cityName = splitString[0];\n longitude = Double.parseDouble(splitString[3]);\n cityPoints = Integer.parseInt(splitString[1]);\n latitude = Double.parseDouble(splitString[2]);\n\n City tmpCity = new City(cityName, cityPoints, latitude, longitude);\n cities.put(tmpCity.getCityName(), tmpCity);\n\n }\n\n return cities;\n\n }", "Map<SportEquipment, Integer> fill(String address) throws FileNotFoundException {\n\n File f = new File(System.getProperty(Strings.USER_DIR) + Strings.SRC + address);\n Scanner s = null;\n int lineNumber = 0;\n goods = new TreeMap<SportEquipment, Integer>();\n\n try {\n s = new Scanner(f);\n\n //defines category\n while (s.hasNextLine()) {\n\n String line = s.nextLine();\n lineNumber++; //counts lines for log to define the places of possible mistakes\n\n try {\n String[] parts = line.split(Strings.REGEX);\n Category category = null;\n switch (parts[0].trim()) {\n case Strings.TENNIS:\n category = Category.TENNIS;\n break;\n case Strings.FOOTBALL:\n category = Category.FOOTBALL;\n break;\n case Strings.CHESS:\n category = Category.CHESS;\n break;\n case Strings.GYMNASTICS:\n category = Category.GYMNASTICS;\n break;\n case Strings.SWIMMING:\n category = Category.SWIMMING;\n break;\n default:\n throw new EnumConstantNotPresentException(Category.class, parts[0]);\n }\n\n String title = parts[1].trim(); //defines good's name\n double price = Double.valueOf(parts[2].trim()); //defines price\n int amount = Integer.valueOf(parts[3].trim()); //defines available amount\n\n if (amount <= 0 || title.length() < 3) {\n throw new NullPointerException();\n }\n\n goods.put(new SportEquipment(category, parts[1], price), amount); //creates a mapping\n\n } catch (EnumConstantNotPresentException e) {\n Reporter.getInstance().printProblem(e.enumType() + Strings.SPACE + e.constantName() +\n Strings.ENUM_NOT_EXIST + lineNumber);\n\n } catch (IndexOutOfBoundsException e) {\n Reporter.getInstance().printProblem(Strings.LACK_OF_DATA + lineNumber);\n\n } catch (NumberFormatException e) {\n Reporter.getInstance().printProblem(Strings.WRONG_NUMBER_DATA + lineNumber);\n\n } catch (NullPointerException e) {\n Reporter.getInstance().printProblem(Strings.NULL_NEGATIVE + lineNumber);\n }\n\n }\n return goods;\n\n } finally {\n s.close(); //closes Scanner in order to release the file \"Goods.txt\" and let the Reporter overwrite it\n }\n }", "public void setFlightList(String filePath) throws FileNotFoundException, NoSuchCityException, ParseException {\n Scanner scan = new Scanner(new File(filePath));\n while (scan.hasNextLine()) { // while there's another line in the file\n String line = scan.nextLine();\n if (line == \"\") { // if the line is empty, break from the loop\n break;\n }\n int i = 0; // to keep track of the iterator's placement in a line\n int n = 0; // to keep track of information in store\n String[] flightInformation = new String[8];\n while (i < line.length()) {\n String store = \"\";\n while (i < line.length() && line.charAt(i) != ',') {\n store += line.charAt(i);\n i++;\n }\n i++;\n n++;\n switch (n) { // checks which piece of flight information\n case 1:\n flightInformation[0] = store;\n break;\n case 2:\n flightInformation[1] = store;\n break;\n case 3:\n flightInformation[2] = store;\n break;\n case 4:\n flightInformation[3] = store;\n break;\n case 5:\n flightInformation[4] = store;\n break;\n case 6:\n flightInformation[5] = store;\n break;\n case 7:\n flightInformation[6] = store;\n break;\n case 8:\n flightInformation[7] = store;\n break;\n }\n }\n // convert String to Double\n double costDouble = Double.parseDouble(flightInformation[6]);\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n Calendar departureDateTime = Calendar.getInstance();\n departureDateTime.setTime(df.parse(flightInformation[1]));\n Calendar arrivalDateTime = Calendar.getInstance();\n arrivalDateTime.setTime(df.parse(flightInformation[2]));\n boolean b = false;\n for (Flight f: this.flightList) {\n if (f.getFlightNumber().equals(flightInformation[0])) {\n b = true;\n f.setDepartureDateTime(departureDateTime);\n f.setArrivalDateTime(arrivalDateTime);\n f.setAirline(flightInformation[3]);\n // need to update cityGraph\n f.setOrigin(flightInformation[4]);\n f.setDestination(flightInformation[5]);\n f.setCost(costDouble);\n f.setNumSeats(Integer.parseInt(flightInformation[7]));\n\n }\n }\n if (!b) {\n this.flightList.add(new Flight(flightInformation[0], departureDateTime, arrivalDateTime,\n flightInformation[3], flightInformation[4], flightInformation[5], costDouble, Integer.parseInt(flightInformation[7])));\n flightSystem.getCityGraph().addFlight(new Flight(flightInformation[0], departureDateTime, arrivalDateTime,\n flightInformation[3], flightInformation[4], flightInformation[5], costDouble, Integer.parseInt(flightInformation[7])));\n }\n\n }\n scan.close();\n setChanged();\n notifyObservers(flightList);\n\n }", "private static HashMap<String, String> buildHashMap() {\n HashMap<String, String> capitals;\n Scanner fileReader;\n String states;\n \n capitals = new HashMap<>();\n \n // Load the file\n try {\n fileReader = new Scanner(\n new BufferedReader(\n new FileReader(FILEPATH)\n )\n );\n } catch(FileNotFoundException ex) {\n System.out.println(FILEPATH + \" not found\");\n System.exit(-1);\n return null;\n }\n \n // Unmarchal the data\n System.out.println(\"=====\\nHERE ARE THE STATES:\");\n states = \"\";\n while (fileReader.hasNextLine()) {\n String currentLine, state, capital;\n String[] data;\n \n currentLine = fileReader.nextLine();\n data = currentLine.split(\"::\");\n if (data.length != 2) {\n System.out.println(\"Invalid file format\");\n System.exit(-1);\n return null;\n }\n \n state = data[0];\n capital = data[1];\n capitals.put(state, capital);\n states += state + \" \";\n }\n System.out.println(states);\n \n return capitals;\n }", "public void read_india_states() throws IOException {\r\n\t\tString line = \"\";\r\n\t\tString splitBy = \",\";\r\n\t\tString path = \".\\\\src\\\\main\\\\java\\\\com\\\\covidProject\\\\covid19\\\\Datasets\\\\Indian Cities Database.csv\";\r\n\t\tHashMap<String, List<String>> state_city = new HashMap<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// parsing a CSV file into BufferedReader class constructor\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(path));\r\n\t\t\twhile ((line = br.readLine()) != null) // returns a Boolean value\r\n\t\t\t{\r\n\t\t\t\tString[] info = line.split(splitBy); // use comma as separator\r\n\t\t\t\tString City = info[0].toLowerCase();\r\n\t\t\t\tString State = info[5].toLowerCase();\r\n\r\n\t\t\t\tif (state_city.get(State) == null) {\r\n\t\t\t\t\tList<String> temp_list = new ArrayList<>();\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tList<String> temp_list = state_city.get(State);\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tList<Document> list = new ArrayList<Document>();\r\n\t\t\t\r\n\t\t\t//Initialize country\r\n\t\t\tCovidCountry countryDoc = new CovidCountry();\r\n\t\t\tcountryDoc.setName(\"India\");\r\n\t\t\t\r\n\t\t\t//Initialize state list\r\n\t\t\tList<CovidState> states_list = new ArrayList<>();\r\n\t\t\t\r\n\t\t\tfor (Map.Entry<String, List<String>> entry : state_city.entrySet()) {\r\n\t\t\t\t\r\n\t\t\t\t//get state and cities from the map we created \r\n\t\t\t\tString state = entry.getKey();\r\n\t\t\t\tList<String> cities = entry.getValue();\r\n\r\n\t\t\t\tList<CovidSubCity> city_list = new ArrayList<>();\r\n\r\n\t\t\t\t//Cities are created before states.\r\n\t\t\t\tfor (String city : cities) {\r\n\t\t\t\t\tCovidCity covidCity = new CovidCity(city,state,countryDoc.getName());\r\n\t\t\t\t\tthis.covidCityRepository.save(covidCity);\r\n\t\t\t\t\tCovidSubCity subCity = new CovidSubCity(city,covidCity.getId());\r\n\t\t\t\t\tcity_list.add(subCity);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//create state\r\n\t\t\t\tCovidState covidState = new CovidState(state,city_list);\r\n\t\t\t\t//this.covidStateRepository.save(covidState);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstates_list.add(covidState);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcountryDoc.setStates(states_list);\r\n\t\t\tthis.covidCountryRepository.save(countryDoc);\r\n\t\t\t\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n public List<AirportRecord> from(final List<List<String>> airports) {\n final List<AirportRecord> airportRecords = new ArrayList<>();\n\n for (final List<String> airport : airports) {\n\n final String iataCode = airport.get(4);\n final String icaoCode = airport.get(5);\n\n final String latitude = airport.get(6);\n final String longitude = airport.get(7);\n\n if (NumberUtils.isCreatable(latitude) &&\n NumberUtils.isCreatable(longitude)) {\n\n final AirportRecord airportRecord = AirportRecord.builder()\n .name(airport.get(1))\n .cityName(airport.get(2))\n .countryName(airport.get(3))\n .iataCode(iataCode)\n .icaoCode(icaoCode)\n .latitude(Double.parseDouble(latitude))\n .longitude(Double.parseDouble(longitude))\n .build();\n\n if (StringUtils.isNotBlank(airportRecord.getIataCode()) && iataPattern.matcher(airportRecord.getIataCode()).matches() &&\n StringUtils.isNotBlank(airportRecord.getIcaoCode()) && icaoPattern.matcher(airportRecord.getIcaoCode()).matches()\n &&\n StringUtils.isNotBlank(airportRecord.getName()) &&\n StringUtils.isNotBlank(airportRecord.getCityName()) &&\n StringUtils.isNotBlank(airportRecord.getCountryName())) {\n\n airportRecords.add(airportRecord);\n }\n }\n\n }\n\n return airportRecords;\n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "public static Map readingFilesMap(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n*/\n Map map = lines.collect(Collectors.toMap(\n line -> line.substring(line.lastIndexOf(\" \")),\n line -> line.substring(0, line.lastIndexOf(\" \"))\n ));//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n map.forEach((k, v) -> {\n System.out.println(\"key:\"+k+ \" Value=\"+v);\n } );\n return map;\n\n //set.forEach(System.out::print);\n\n\n }", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "public static boolean loadMap(String path) throws FileNotFoundException {\n\n// System.out.println(\" Enter map file address\");\n// String path = sc.next();\n\n // ---------------- Reading file-------------------------------\n File file_map = new File(path.trim());\n HashMap<String, List<String>> neighborsList = new HashMap<>();\n\n if (file_map.exists()) {\n Scanner myReader = new Scanner(file_map);\n\n while (myReader.hasNextLine()) {\n\n String data = myReader.nextLine();\n\n if (\"[Continents]\".equals(data.trim())) {\n System.out.println(\"==>\" + data.trim());\n data = myReader.nextLine();\n\n while (!data.equals(\"[Territories]\")) {\n System.out.println(data);\n String split[] = data.split(\"=\");\n String continent_name = split[0];\n String no_of_countries = split[1];\n continents.put(continent_name, Integer.parseInt(no_of_countries));\n data = myReader.nextLine();\n }\n }\n\n System.out.println(\"continents: \" + continents.toString());\n board.setContinents(continents);\n\n if (\"[Territories]\".equals(data)) {\n\n while (myReader.hasNextLine()) {\n String country_input = myReader.nextLine();\n\n String split[] = country_input.split(\",\");\n String country = split[0];\n int x = Integer.parseInt(split[1]);\n int y = Integer.parseInt(split[2]);\n String continent = split[3];\n List<String> neighbours = new ArrayList<>();\n\n for (int i = 4; i < split.length; i++) {\n neighbours.add(split[i]);\n }\n\n board.createTile(country, x, y, continent);\n neighborsList.put(country, neighbours);\n\n }\n }\n\n for (Map.Entry entry : neighborsList.entrySet()) {\n board.setNeighbourTile((List<String>) entry.getValue(), (String) entry.getKey());\n }\n\n\n }\n System.out.println(\"Risk Map Loaded!\");\n HashMap<String, Tile> map = board.getTiles();\n\n System.out.println(\"Map\" + map.keySet().toString());\n\n if (board.getContinents().size() == 0 || board.getTiles().size() == 0)\n return false;\n return true;\n\n } else {\n System.out.println(\"File does not exist! \");\n return false;\n }\n\n }", "public HashMap readFile(String filePath, HashMap source){\n\t\tArrayList<String> temp1 = new ArrayList<String>();\n\t\tArrayList<String> temp2 = new ArrayList<String>();\n\t\tBufferedReader br = null;\n\t\t\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\t\n\t\t\t// \"Users/Jasmine/Documents/Eclipse/CacheDictionary/src/english.txt\"\n\t\t\tbr = new BufferedReader(new FileReader(filePath)); \n\t\t\t\n\t\t\t//str.matches(\".*\\\\d+.*\"); ==> string that contains numbers\n\t\t\t//.matches(\"[a-zA-Z]+\"); ==> string that only contains letter\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if the source file itself is not one word per line, we need to split the string\n\t\t\t\t * only letter(not single) will be stored in the array\n\t\t\t\t */\n\t\t\t\t//\n\t\t\t\tif(sCurrentLine.matches(\".*([ \\t]).*\")){ //check if the current line is a single word or not\n\t\t\t\t\ttemp1.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t\telse if(sCurrentLine.matches(\"[a-zA-Z]+\") && sCurrentLine.length()>1){\n\t\t\t\t\ttemp2.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t}// end of while loop\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(!temp1.isEmpty()){\n\t\t\tfor(int i = 0; i< temp1.size(); i++){\n\t\t\t\tString thisLine[] = temp1.get(i).split(\" \");\n\t\t\t\t//for each word in this line\n\t\t\t\tfor(int j = 0; j < thisLine.length; j++){\n\t\t\t\t\t//if it is a valid word\n\t\t\t\t\tif(thisLine[j].matches(\"[a-zA-Z]+\") && thisLine[j].length()>1 ){\n\t\t\t\t\t\tif( source.get(thisLine[j]) == null){\n\t\t\t\t\t\t\tsource.put(thisLine[j].toLowerCase(),thisLine[j].toLowerCase());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t} // end of if current word i valid\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // end of temp1\n\t\t\n\t\tif(!temp2.isEmpty()){\n\t\t\tfor(int i = 0; i< temp2.size(); i++){\n\t\t\t\tif(temp2.get(i).matches(\"[a-zA-Z]+\") && temp2.get(i).length()>1){\n\t\t\t\t\tif(source.get(temp2.get(i)) == null){\n\t\t\t\t\t\tsource.put(temp2.get(i).toLowerCase(),temp2.get(i).toLowerCase());\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn source;\n\t}", "@Override\r\n public Map getData(String fileName) {\r\n Map<String, Integer> map = new HashMap<>();\r\n \r\n File file = new File(fileName);\r\n \r\n try (BufferedReader bufferedReader =\r\n new BufferedReader(new FileReader(file))) {\r\n \r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n \r\n //if the word have already been in the map,\r\n //increases the number of occurances,\r\n //otherwise sets this number to 1\r\n //and puts a new value to the map\r\n String[] words = line.split(\" \");\r\n for (String word : words) {\r\n Integer value = map.get(word);\r\n if (value == null) {\r\n value = 1;\r\n } else {\r\n value++;\r\n }\r\n map.put(word, value);\r\n }\r\n }\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n return null;\r\n }\r\n \r\n return map;\r\n }", "private void loadCSVFileIntoHashmap(){\n try {\n postCodesFileReader = new FileReader(postCodesFileLocation);\n String line;\n //Open up the buffered reader so we can start looping through our CSV file\n BufferedReader br = new BufferedReader(postCodesFileReader);\n while ((line = br.readLine()) != null) {\n String[] country = line.split(fieldSeperator);\n if(country.length<=3){\n //Add the region code and matching country to the hashmap\n postCodesMap.put(country[0].trim(), country[2].trim());\n }\n }\n br.close();\n } \n catch (Exception e) {\n //Ideally we would use a custom log file, but for the sake of a quick demo use the stderr \n e.printStackTrace();\n } \n }", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "private void readFile(Path file, Charset charset) {\n\n BufferedReader reader = null;\n try {\n log.info(\"Reading file \" + file.getFileName().toString());\n reader = Files.newBufferedReader(file, charset);\n\n String line = null;\n while ((line = reader.readLine()) != null) {\n\n String[] splitLine = line.split(\",\");\n LocalDateTime ldt = LocalDateTime.parse(splitLine[0], DateTimeFormatter.ISO_DATE_TIME);\n\n /**\n * Creation of new map filtered to get all lines before the current date got from the current file line\n */\n Map<LocalDateTime, String> filteredMap = mapLines.entrySet().stream()\n .filter(entry -> entry.getKey().isBefore(ldt))\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (v1,v2) ->{ throw new RuntimeException(String.format(\"Duplicate key for values %s and %s\", v1, v2));},\n TreeMap::new));\n\n /**\n * Printing each line from filter map, also we delete those objects to maintain memory.\n */\n filteredMap.forEach((localDateTime, s) -> {\n System.out.println(s);\n mapLines.remove(localDateTime, s);\n });\n filteredMap.clear();\n\n mapLines.put(ldt, line);\n TimeUnit.SECONDS.sleep(1);\n }\n } catch (MalformedInputException m) {\n readFile(file, Charset.forName(\"Windows-1252\"));\n } catch (IOException e) {\n log.error(e, e);\n }\n catch (InterruptedException ie) {\n log.error(ie, ie);\n }\n }", "private static HashMap<HitCategory, ArrayList<HitsPerClub>> readHitsFromFile(String fileName, boolean fillActiveHitMap) {\n String filePath = fileDirectory + \"/\" + fileName ;\n HashMap<HitCategory, ArrayList<HitsPerClub>> tempHitMap;\n\n tempHitMap = new HashMap<>();\n List<ArrayList<String>> csvLines = CsvFile.readFile(filePath, CSV_SEPARATOR);\n if (null != csvLines) {\n Iterator<ArrayList<String>> it = csvLines.iterator();\n while (it.hasNext()) {\n ArrayList<String> nextItem = it.next();\n HitCategory category = HitCategory.valueOf(nextItem.get(CATEGORY_POS));\n String clubName = nextItem.get(CLUB_NAME_POS);\n Integer qualityGood = Integer.valueOf(nextItem.get(QUALITY_GOOD_COUNTER_POS));\n Integer qualityNeutral = Integer.valueOf(nextItem.get(QUALITY_NEUTRAL_COUNTER_POS));\n Integer qualityBad = Integer.valueOf(nextItem.get(QUALITY_BAD_COUNTER_POS));\n\n ArrayList<HitsPerClub> hits = tempHitMap.get(category);\n if (null == hits) {\n hits = new ArrayList<>();\n }\n Club club = BagController.getClubByName(clubName);\n hits.add(new HitsPerClub(club, qualityGood, qualityNeutral, qualityBad));\n tempHitMap.put(category, hits);\n }\n }\n\n if (fillActiveHitMap) {\n hitMap = tempHitMap;\n }\n return tempHitMap;\n }", "private Map<String, ArrayList<String>> createChordChanges(String file) throws FileNotFoundException {\n Map<String, ArrayList<String>> tempChords = new HashMap<String, ArrayList<String>>();\n Scanner modeScan = new Scanner(new File(file));\n while (modeScan.hasNextLine()) {\n Scanner line = new Scanner(modeScan.nextLine());\n String name = line.next();\n ArrayList<String> changes = new ArrayList<String>();\n while (line.hasNext()) {\n changes.add(line.next());\n }\n tempChords.put(name, changes);\n }\n return tempChords;\n }", "public HashMap<String, Car> createCarsFromFile(String filename) throws FileNotFoundException {\n\t\t\n\n\t\tFile fh = new File(filename);\n\t\tScanner myScanner = new Scanner(fh);\n\t\twhile(myScanner.hasNextLine()){\n\t\t\tString line = myScanner.nextLine();\n\t\t\tString[] lineArr = line.split(\";\");\n\t\t\tString id = IdFactory.getRegNr();\n\t\t\tString make = lineArr[0];\n\t\t\tString[] makeStuff = lineArr[1].split(\" \");\n\t\t\tString model = lineArr[0];\n\t\t\tString type = makeStuff[0];\n\t\t\tint mpg = Integer.parseInt(lineArr[4]);\n\t\t\tint weight = Integer.parseInt(lineArr[6]);\n\t\t\tCar c = new Car(make,model,type,mpg,weight);\n\t\t\tmyCars.put(c.getRegNr(),c);\n\t\t\tSystem.out.println(\"CAR\" + c);\n\t\t}\n\t\treturn myCars;\n\t}", "private void createHisMap(Customer customer)\n {\n hisMap= new HashMap<>();\n idFile.open(\"history.txt\");\n String line=idFile.getNextLine();\n String name = customer.getUsername();\n specificLine=-1;\n int i=0;\n while (line!=null)\n {\n int j=0;\n String[] fields = line.split(\",\");\n if(fields[0].equals(name))\n {\n specificLine=i;\n }\n\n String[] fields2 = fields[1].split(\"%\");\n\n\n while (j<fields2.length)\n {\n if(hisMap.get(fields[0])==null)\n {\n hisMap.put(fields[0],new ArrayList<>());\n hisMap.get(fields[0]).add(fields2[j]);\n\n }\n else\n {\n hisMap.get(fields[0]).add(fields2[j]);\n }\n j++;\n }\n\n line=idFile.getNextLine();\n i++;\n }\n if(specificLine== -1)\n specificLine=i;\n }", "public HashMap<String, BusStops> readLtaBusStops(String file, String file2) throws IOException {\n\t\t//Reads Lta Bus Stop Codes and add it into a hashmap\n\t\tHashMap<String, BusStops> busStopMap = new HashMap<>();\n\t\tFile ltaBusStopCodes = new File(file); //Instantiates the file to read\n\t\tFile otherFile = new File(file2);\n\t\t//Tries to read the file using buffered reader\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(ltaBusStopCodes))) {\n\t\t\tbr.readLine();//To skip first line\n\t\t\tStringTokenizer st; //String tokenizer to read the csv token by token\n\t\t\tString line;\n\t\t\t//loops through the csv file and read it\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\"); //using StringTokenizer's delimiter for \",\". Each word as a single token.\n\t\t\t\t//2nd while loop to loop each and every word after delimiter \",\"\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString busStopCode = st.nextToken();\n\t\t\t\t\tString roadDesc = st.nextToken();\n\t\t\t\t\tString busStopDesc = st.nextToken();\n\t\t\t\t\t//Creates a LtaBusStopCodes object with the data read from csv and insert into the hashmap\n\t\t\t\t\tBusStops ltaBsStopCode = new BusStops(busStopCode, roadDesc, busStopDesc);\n\t\t\t\t\tbusStopMap.put(ltaBsStopCode.getBusStopCode(), ltaBsStopCode);\n\t\t\t\t}//End while loop for each token\n\t\t\t}//End while loop\n\t\t}\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(otherFile))) {\n\t\t\tbr.readLine();\n\t\t\tStringTokenizer st;\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tdouble latitude = Double.parseDouble(st.nextToken());\n\t\t\t\t\tdouble longitude = Double.parseDouble(st.nextToken());\n\t\t\t\t\tint zid = Integer.parseInt(st.nextToken());\n\t\t\t\t\tBusStops bs = busStopMap.get(st.nextToken());\n\t\t\t\t\tif (bs != null) {\n\t\t\t\t\t\tbs.setX(latitude);\n\t\t\t\t\t\tbs.setY(longitude);\n\t\t\t\t\t\tbs.setZid(zid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn busStopMap;\n\t}", "private static City[] fileInterpreter(Scanner file,int numberOfLines){\n City[] cities = new City [numberOfLines];\n for(int i = 0 ; file.hasNextLine(); i++){\n String line = file.nextLine();\n Scanner string = new Scanner(line); //String Scanner to consume the line into city and country and rainfall...\n String cityName = string.next();\n String countryName = string.next();\n double[] data = extractRainfallInformation(line.split(\"[ \\t]+[ \\t]*\")); //to create the array of monthly rainfall\n cities[i] = new City(cityName , countryName , data);\n string.close();\n }\n file.close();\n return cities;\n }", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadConversationMap() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(DATA_DIR + \"/assistant.txt\"));\r\n\t\tString line, currentCategory;\r\n\t\tint iline = 0;\r\n\t\tcurrentCategory = \"\";\r\n\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\tline = line.trim();\t\t\t\r\n\t\t\tif ( !line.isEmpty() ) {\r\n\t\t\t\tif (iline % 2 == 0) {\r\n\t\t\t\t\tcurrentCategory = line;\r\n\t\t\t\t\tconversationMap.put(currentCategory, new ArrayList<String>(10));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint pos = 0;\r\n\t\t\t\t\tint nextSemicolonPos = line.indexOf(\";\");\r\n\t\t\t\t\tif (nextSemicolonPos == -1)\r\n\t\t\t\t\t\tconversationMap.get(currentCategory).add(line);\r\n\t\t\t\t\twhile ( pos < line.length() ) {\r\n\t\t\t\t\t\tif (nextSemicolonPos != -1) {\r\n\t\t\t\t\t\t\tconversationMap.get(currentCategory).add(line.substring(pos, nextSemicolonPos));\r\n\t\t\t\t\t\t\tpos = nextSemicolonPos + 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconversationMap.get(currentCategory).add(line.substring(pos));\r\n\t\t\t\t\t\t\tpos = line.length();\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tnextSemicolonPos = line.indexOf(\";\", nextSemicolonPos + 1);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tiline++; \r\n\t\t\t} \r\n\t\t}\r\n\t\tbr.close();\t\t\t\r\n\t}", "public HashMap<String,String> readMapFile(String filename) throws IOException {\n\t\tHashMap<String,String> valueMap = new HashMap<String,String>();\t\t\n List<String> cols = new ArrayList<String>(); \n\t\t\n try{\n \t buf = new BufferedReader(new FileReader(filename)); \n\t String strRead; \n\t while ((strRead=buf.readLine())!=null) {\n\t \tcols = Arrays.asList(strRead.split(\"\\t\")); \t\n\t \tif(cols.size() != 2)\n\t \t\tcontinue; \t\n\t \tvalueMap.put(cols.get(0),cols.get(1)); \t\n\t \t }\n\t } catch(IOException e){\n\t e.printStackTrace();\n\t } finally {\n\t \tbuf.close(); \n\t }\n\t\t\t\n\t\treturn valueMap;\n\t}", "public static void load(Context context) throws IOException {\n // read the file\n String raw = File.readFile(\"vaccine.txt\", context);\n\n // clear the map and load contents of file into the map\n map.clear();\n for (String line : raw.split(\"\\n\")) {\n if (line.equals(\"\")) {\n continue;\n }\n String[] data = line.split(\",\");\n if (data[0].equals(\"\") || data.length != 3) {\n continue;\n }\n map.put(data[0], Boolean.getBoolean(data[1]));\n dateMap.put(data[0], data[2]);\n }\n }", "public Map<String, List<String>> processIncidenceFile(String fileName) throws AggregateFileInitializationException {\n \t\t\tFile file = new File(fileName);\n \t\t\tHashMap<String, List<String>> data = new HashMap<String,List<String>>();\n \t\t\t\n \t\t\ttry {\n \t\t String record; \n \t\t String header;\n \t\t int recCount = 0;\n \t\t List<String> headerElements = new ArrayList<String>();\n \t\t FileInputStream fis = new FileInputStream(file); \n \t\t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t\t \n \t\t //\n \t\t // Read the file header\n \t\t //\n \t\t if ( (header=d.readLine()) != null ) { \n \t\t \t\n \t\t\t StringTokenizer st = new StringTokenizer(header );\n \t\t\t \n \t\t\t while (st.hasMoreTokens()) {\n \t\t\t \t String val = st.nextToken(\",\");\n \t\t\t \t headerElements.add(val.trim());\n \t\t\t }\n \t\t } // read the header\n \t\t /////////////////////\n \t\t \n \t\t // set up the empty lists\n \t\t int numColumns = headerElements.size();\n \t\t for (int i = 0; i < numColumns; i ++) {\n \t\t \tString key = headerElements.get(i);\n \t\t \tdata.put(key, new ArrayList<String>());\n \t\t }\n \t\t \n \t\t // Here we check the type of the data file\n \t\t // by checking the header elements\n \t\t \n \t\t \n \t\t \n \t\t \n \t //////////////////////\n \t // Read the data\n \t //\n \t while ( (record=d.readLine()) != null ) { \n \t recCount++; \n \t \n \t StringTokenizer st = new StringTokenizer(record );\n \t int tcount = 0;\n \t\t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\t\t(data.get(key)).add(val.trim());\n \t\t\t\t\t\ttcount ++;\n \t\t\t\t\t}\n \t\t\t\t} // while file has data\n \t } catch (IOException e) { \n \t // catch io errors from FileInputStream or readLine()\n \t \t Activator.logError(\" IOException error!\", e);\n \t \t throw new AggregateFileInitializationException(e);\n \t }\n \t return data;\n \t\t }", "private void get_rooms() throws FileNotFoundException\n {\n Scanner room_all = new Scanner(new FileInputStream(db_rooms));\n room_all.nextLine();\n while(room_all.hasNextLine())\n {\n String [] searcher = (room_all.nextLine()).split(\"\\\"\");\n if(!searcher[7].equals(\"empty\"))\n data_set.add(new Room(searcher[3], searcher[5], (searcher[7].equals(\"booked\") ? 1 : 2), Integer.valueOf(searcher[1])));\n else\n data_set.add(new Room(Integer.valueOf(searcher[1])));\n }\n room_all.close();\n }", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\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 static HashMap<String, LatLong> readDistanceCSV(String srcCode,String destCode) throws FileNotFoundException, IOException {\n\t\tfinal int CODE_INDEX = 4, LAT_INDEX = 6, LNG_INDEX = 7;\n\t\tHashMap<String, LatLong> map = new HashMap<>();\n\t\tResource resource = new ClassPathResource(CODES_FILE_NAME);\n\t\tCSVReader csvReader = new CSVReader(new InputStreamReader(resource.getInputStream())); \n String[] nextRecord; \n \n while ((nextRecord = csvReader.readNext()) != null) { \n \t//If both the airports are already in hashmap, break\n \tif(map.size()==2)\n \t\tbreak;\n \t\n \tif(srcCode.equals(nextRecord[CODE_INDEX]) || destCode.equals(nextRecord[CODE_INDEX])) \n \t\tmap.put(nextRecord[CODE_INDEX], new LatLong(Double.parseDouble(nextRecord[LAT_INDEX]),Double.parseDouble(nextRecord[LNG_INDEX])));\n \t \n } \n\n\t\treturn map;\n\t}", "List<AirportDTO> getAirportsByCity(String city);", "public HashMap<String, ArrayList<Trajectory>> readTrajectories(String trajFileName) {\n Scanner csv = null;\n HashMap<String, ArrayList<Trajectory>> trajectories = new HashMap<String, ArrayList<Trajectory>>();\n try {\n csv = new Scanner(new File(trajFileName));\n ArrayList<Trajectory> tj = new ArrayList<Trajectory>();\n String currentId = \"\";\n while (csv.hasNextLine()) {\n String[] line = csv.nextLine().split(\",\");\n line[0] = line[0].substring(6, line[0].length() - 1);\n String[] locs = line[0].split(\" \");\n\n if (currentId.equals(\"\")) // first device\n {\n currentId = line[1];\n } else if (!currentId.equals(line[1])) // we are looking at a new device, add arrayList to the map, reset arrayList\n {\n trajectories.put(currentId, tj);\n tj = new ArrayList<Trajectory>();\n currentId = line[1];\n }\n tj.add(new Trajectory(Double.parseDouble(locs[0]), Double.parseDouble(locs[1]), line[1], Double.parseDouble(line[2])));\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return trajectories;\n }", "@SuppressWarnings(\"resource\")\n\tpublic static Map<String, Map<Integer, Nucleotide>> getNucleotideMapping(\n\t\t\tFile aFile) throws IOException, FileNotFoundException,\n\t\t\tInvalidResidueException {\n\t\tString aPdbId = PdbHelper.findPdbId(aFile);\n\t\tMap<String, Map<Integer, Nucleotide>> returnMe = new HashMap<String, Map<Integer, Nucleotide>>();\n\t\tMap<String, Integer> startingPositions = PdbHelper\n\t\t\t\t.getStartingPositions(aFile);\n\t\tBufferedReader in = new BufferedReader(new FileReader(aFile));\n\t\tString extension = PdbHelper.getFileExtension(aFile);\n\t\tif (extension.equals(\"gz\")) {\n\t\t\tin = new BufferedReader(new InputStreamReader(new GZIPInputStream(\n\t\t\t\t\tnew FileInputStream(aFile))));\n\t\t}\n\t\tint residueCounter = 1;\n\t\tString chain = \"\";\n\t\tString line = \"\";\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tline = line.trim();\n\t\t\tif (line.startsWith(\"SEQRES\")) {\n\t\t\t\tString[] values = line.split(\"\\\\s+\");\n\t\t\t\tif (!values[2].equals(chain)) {\n\t\t\t\t\tchain = values[2];\n\t\t\t\t\treturnMe.put(chain, new TreeMap<Integer, Nucleotide>());\n\t\t\t\t\ttry{\n\t\t\t\t\tresidueCounter = startingPositions.get(chain);\n\t\t\t\t\t}catch (NullPointerException e){\n\t\t\t\t\t\tSystem.out.println(\"Check file: \"+ aFile.getAbsolutePath());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 4; i < values.length; i++) {\n\t\t\t\t\tNucleotide an = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tan = new Nucleotide(aPdbId, chain, residueCounter,\n\t\t\t\t\t\t\t\tvalues[i], null, null, null);\n\t\t\t\t\t} catch (InvalidResidueException e) {\n\t\t\t\t\t\tSystem.out.println(\"PLEASE Check File: \"\n\t\t\t\t\t\t\t\t+ aFile.getName());\n\t\t\t\t\t\tSystem.out.println(an);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tif (an != null) {\n\t\t\t\t\t\treturnMe.get(chain).put(residueCounter, an);\n\t\t\t\t\t\tresidueCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t\treturn returnMe;\n\t}", "private void loadNeighbours(String file){\n\t\tString neighbour = null;\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\tString planetName = sc.nextLine();\n\t\t\t\tneighbour = sc.nextLine();\n\t\n\t\t\t\twhile(!(neighbour.equals(\"#\"))){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString split [] = neighbour.split(\",\");\n\t\t\t\t\t\tasignNeighbours(split, planetName);\n\t\t\t\t\t\t\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\tSystem.out.println(\"Data can't be loaded\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\tneighbour = sc.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramNeghbours.txt\");\n\t\t}\n\t}", "private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }", "protected List<HashMap<String,String>> fetchTextFileForDatabase(String filePathString) {\n Object[] fileObject = fetchTextFile(filePathString);\n if(!checkFile(fileObject)){\n System.exit(0);\n }\n\n List<HashMap<String, String>> candidateHashMapList = new ArrayList<HashMap<String, String>>();\n\n for(Object candidateObject: fileObject){\n String[] candidateArray = candidateObject.toString().split(\",\");\n HashMap<String, String> candidateHashMap = new HashMap<String, String>();\n candidateHashMap.put(\"first_name\", candidateArray[0]);\n candidateHashMap.put(\"middle_name\", candidateArray[1]);\n candidateHashMap.put(\"last_name\", candidateArray[2]);\n candidateHashMap.put(\"post_nominal\", candidateArray[3]);\n candidateHashMap.put(\"party_id\", candidateArray[4]);\n candidateHashMap.put(\"votes\", candidateArray[5]);\n candidateHashMap.put(\"percentage\", candidateArray[6]);\n candidateHashMap.put(\"district\", candidateArray[7]);\n candidateHashMap.put(\"result\", candidateArray[8]);\n candidateHashMap.put(\"election_cycle_id\", candidateArray[9]);\n candidateHashMap.put(\"state\", candidateArray[10]);\n candidateHashMapList.add(candidateHashMap);\n }\n\n return candidateHashMapList;\n }", "public static void main(String[] args) {\n Map<Integer, ArrayList<String>> citiesMap = new HashMap<>();\n\n CityDAO cityDAO = new CityDAO();\n CountryDAO countryDAO = new CountryDAO();\n\n ArrayList<City> cities = cityDAO.ReadCitiesFormCSV(\"src/main/resources/cities.csv\");\n Collections.sort(cities, Comparator.comparing(City::getPopulation));\n ArrayList<Country> countries = countryDAO.ReadCountriesFormCSV(\"src/main/resources/countries.csv\");\n\n //Add list of cities to their countries\n for (int countryIdx = 0; countryIdx < countries.size(); countryIdx++) {\n for (int cityIdx = 0; cityIdx < cities.size(); cityIdx++) {\n if (cities.get(cityIdx).getCode() == countries.get(countryIdx).getId())\n countries.get(countryIdx).addCityToCountry(cities.get(cityIdx));\n }\n }\n\n //Print list of cities in each country\n// for(Country country : countries) {\n// ArrayList<City> citiesL = country.getListOfCities();\n// for (City city : citiesL)\n// System.out.print(city.getCityName() + \" \");\n// System.out.println();\n// }\n\n for(City city : cities) {\n if (citiesMap.get(city.getCode()) == null)\n citiesMap.put(city.getCode(), new ArrayList<>());\n citiesMap.get(city.getCode()).add(city.getCityName());\n }\n System.out.println(\"Print List of cities sorted according to population sorted from lowest to highest\");\n citiesMap.forEach((k,v) -> System.out.println(\"Code: \" + k + \", List of cities: \" + v));\n\n System.out.println(\"\\n\");\n }", "public WordMap generateWordMap(String filePath) {\n\n WordMap wm = new WordMap();\n Scanner sc;\n\n try {\n sc = new Scanner(new File(filePath));\n\n while (sc.hasNextLine()) {\n\n String line = sc.nextLine();\n String[] lineData = line.split(\" \");\n\n //Gets a string of the word we are currently parsing\n String word = lineData[colWord].split(\"=\")[1];\n\n wm.put(word, getWordFromLine(line));\n }\n\n } catch (Exception e) {\n System.err.println(\"Error in generateWordMap\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n sc.close();\n return wm;\n }", "private static List<Airport> getAirportsInCountry(String mongoHost, int mongoPort, String mongoDb, String collection, String country) {\n\t\t\n\t\tList<Airport> airports = new ArrayList<Airport>();\t\n\t\tMongoClient mongoClient = new MongoClient( mongoHost , mongoPort );\n\t\tMongoDatabase db = mongoClient.getDatabase( mongoDb );\n\t\tFindIterable<Document> iterable = db.getCollection(collection).find();\n\t\titerable.forEach(new Block<Document>() {\n\t\t\tpublic void apply(final Document doc) {\n\t\t\t\t\n\t\t\t\tString countryName = (String) doc.get( \"countryName\" );\n\t\t\t\tif(countryName.equals(country))\n\t\t\t\t{\n\t\t\t\t\tString airportCode = (String) doc.get(\"_id\");\n\t\t\t\t\tDocument loc = (Document) doc.get(\"loc\");\n\t\t\t\t\tList coord = (List)loc.get(\"coordinates\");\n\t\t\t\t\tdouble lat = (double) coord.get(1);\n\t\t\t\t\tdouble lng = (double) coord.get(0);\n\t\t\t\t\tAirport airport = new Airport(airportCode, new Coordinates(lat, lng));\n\t\t\t\t\tairports.add(airport);\n\t\t\t\t}\n\t\t \n\t\t\t}\n\t\t});\n\t\tmongoClient.close();\n\t\treturn airports;\n\t}", "public static Map<Long, Book> readToMap() throws ApplicationException {\r\n ArrayList<String> bookList = readFile();\r\n Map<Long, Book> books = new HashMap<>();\r\n\r\n for (int i = 0; i < bookList.size(); i++) {\r\n String[] rows = bookList.get(i).split(COMMA_DELIMITER, -1);\r\n Book book = readBookString(rows);\r\n books.put(book.getId(), book);\r\n LOG.debug(String.format(\"%s has been added to the Map\", book.getAuthor()));\r\n\r\n }\r\n\r\n return books;\r\n\r\n }", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "public static void createMap() throws IOException {\n\n int no_of_continents;\n HashMap<String, List<String>> neighborsList = new HashMap<>();\n\n System.out.println(\"Enter the number of Continents\");\n if (sc.hasNextInt()) {\n no_of_continents = sc.nextInt();\n\n for (int i = 0; i < no_of_continents; i++) {\n\n System.out.println(\"Enter continent name\");\n String continent = sc.next();\n\n System.out.println(\"Enter no of countries in continent\");\n\n int no_of_countries = 0;\n if (sc.hasNextInt())\n no_of_countries = sc.nextInt();\n\n continents.put(continent, no_of_countries);\n }\n } else {\n System.out.println(\"Invalid input! Enter again :\");\n sc.next();\n }\n\n System.out.println(\"Enter no of countries\");\n int no_of_countries = sc.nextInt();\n List<String> neighbours = new ArrayList<>();\n\n for (int i = 0; i < no_of_countries; i++) {\n\n System.out.println(\"Enter country name\");\n String country = sc.next();\n\n System.out.println(\"Enter x and y co-ordinate\");\n int x = sc.nextInt();\n int y = sc.nextInt();\n\n System.out.println(\"Enter continent it belongs to\");\n String continent = sc.next();\n\n System.out.println(\"Enter no of adjacent countries\");\n int no_adj_c = sc.nextInt();\n while (no_adj_c != 0) {\n System.out.println(\"Enter adjacent country\");\n neighbours.add(sc.next());\n no_adj_c--;\n }\n\n board.createTile(country, x, y, continent);\n neighborsList.put(country, neighbours);\n }\n\n for (Map.Entry entry : neighborsList.entrySet()) {\n board.setNeighbourTile((List<String>) entry.getValue(), (String) entry.getKey());\n }\n\n System.out.println(\"Risk Map Loaded!\");\n System.out.println(\"Storing to file\");\n storeMap();\n\n }", "public CityList() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\MapOfIreland.csv\"));\n\t\treadNodes(); // Call method to read in all nodes\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) {\n\t\t\tCSVdata = sc.nextLine().split(\",\");\n\t\t\tint link1 = -1, link2 = -1; // Holds index of two nodes to be connected\n\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[2])) // If node data == first node to be connected\n\t\t\t\t\tlink1 = i;\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[3])) // If node data == second node to be connected\n\t\t\t\t\tlink2 = i;\n\t\t\t}\n\t\t\t// If one or both nodes weren't found\n\t\t\tif(link1 < 0 || link2 < 0) {\n\t\t\t\tSystem.out.println(\"ERROR: ONE OR BOTH NODES DO NOT EXIST\");\n\t\t\t\tSystem.out.println(CSVdata[2] + \"|\" + CSVdata[3]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Connect two links\n\t\t\telse\n\t\t\t\tnodes.get(link1).connectToNodeUndirected(nodes.get(link2), Double.parseDouble(CSVdata[1]), CSVdata[0]);\n\t\t}\n\t\tsc.close();\n\t}", "private void getMap(String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getMap\");\r\n\r\n\t\tString fileContent = loadFile(sqlFile);\r\n\t\tString[] querys = getStringArray(fileContent, END_QUERY_PATTERN);\r\n\t\tfillMap(querys);\r\n\r\n\t\tLOG.info(\"END getMap\");\r\n\t\t\r\n\t}", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void insertFromFile() throws IOException {\n File file = new File(Main.DATA_FILE_PATH);\n Scanner sc = new Scanner(file);\n\n dictionary = new Dictionary();\n TreeMap<String, ArrayList<String>> wordList = new TreeMap<>();\n String target = sc.nextLine().substring(1).trim();\n ArrayList<String> explain = new ArrayList<>();\n while (sc.hasNextLine()) {\n String str = sc.nextLine();\n if (str.indexOf(\"@\") == 0) {\n wordList.put(target, explain);\n target = str.substring(1).trim();\n explain = new ArrayList<>();\n } else if (str.indexOf(\"=\") == 0) {\n str = str.replace(\"+\", \" : \");\n String word = \" = \" + str.substring(1);\n explain.add(word);\n } else if (str.indexOf(\"#\") == 0 || str.indexOf(\"*\") == 0) {\n explain.add(str);\n } else {\n explain.add(\" \" + str);\n }\n }\n dictionary.setWordList(wordList);\n sc.close();\n }", "public static void main(String[] args){\n String filename = \"\";\n if (args.length >= 1){\n filename = args[0];\n } else {\n return;\n }\n\n int abs = 0;\n int diectic = 0;\n int timeOfDay = 0;\n\n Pattern absPattern = Pattern.compile(absoluteDateRegex);\n //Pattern absPattern = Pattern.compile(mmddyyyy);\n //Pattern absPattern = Pattern.compile(holidays);\n Pattern diecticPattern = Pattern.compile(diecticDateRegex);\n Pattern timeOfDayPattern = Pattern.compile(timeOfDayRegex);\n\n Matcher absMatcher = null;\n Matcher diecticMatcher = null;\n Matcher timeOfDayMatcher = null;\n\n //System.out.println(absoluteDateRegex + \"\\n\");\n //System.out.println(diecticDateRegex + \"\\n\");\n //System.out.println(timeOfDayRegex + \"\\n\");\n\n HashMap <String, Integer> absMap = new HashMap<>();\n HashMap <String, Integer> diecticMap = new HashMap<>();\n HashMap <String, Integer> timeOfDayMap = new HashMap<>();\n\n String tmp = \"\";\n\n try{\n BufferedReader reader = new BufferedReader(\n new FileReader(filename));\n String line;\n while ((line = reader.readLine()) != null){\n absMatcher = absPattern.matcher(line);\n diecticMatcher = diecticPattern.matcher(line);\n timeOfDayMatcher = timeOfDayPattern.matcher(line);\n\n while (absMatcher.find()){\n abs++;\n tmp = absMatcher.group();\n //System.out.println(tmp);\n\n if (absMap.containsKey(tmp)){\n absMap.put(tmp, absMap.get(tmp) + 1);\n } else {\n absMap.put(tmp, 1);\n }\n }\n while (diecticMatcher.find()){\n diectic++;\n tmp = diecticMatcher.group();\n\n if (diecticMap.containsKey(tmp)){\n diecticMap.put(tmp, diecticMap.get(tmp) + 1);\n } else {\n diecticMap.put(tmp, 1);\n }\n //System.out.println(diecticMatcher.group());\n }\n while (timeOfDayMatcher.find()){\n timeOfDay++;\n tmp = timeOfDayMatcher.group();\n\n if (timeOfDayMap.containsKey(tmp)){\n timeOfDayMap.put(tmp, timeOfDayMap.get(tmp) + 1);\n } else {\n timeOfDayMap.put(tmp, 1);\n }\n //System.out.println(timeOfDayMatcher.group());\n }\n }\n reader.close();\n\n /*\n System.out.println(\"Absolute dates = \" + abs);\n System.out.println(\"Diectic dates = \" + diectic);\n System.out.println(\"Both dates = \" + (abs + diectic));\n System.out.println(\"time-of-day expressions = \" + timeOfDay);\n */\n\n System.out.println(\"2.4: Absolute\");\n printOutMap(absMap, abs);\n\n System.out.println(\"\\n2.5: Absolute && Diectic\");\n HashMap<String, Integer>datesMap = new HashMap<>();\n datesMap.putAll(absMap);\n datesMap.putAll(diecticMap);\n printOutMap(datesMap, diectic+abs);\n\n System.out.println(\"\\n2.6: Time Of Day\");\n printOutMap(timeOfDayMap, timeOfDay);\n\n System.out.println(\"\\nAll RegExs combined\");\n HashMap<String, Integer> allMap = new HashMap<>();\n allMap.putAll(datesMap);\n allMap.putAll(timeOfDayMap);\n printOutMap(allMap, timeOfDay + diectic + abs);\n } catch (Exception e){\n System.err.format(\"Exception occurred trying to read '%s'.\",\n filename);\n e.printStackTrace();\n return;\n }\n }", "public List<Airport> allAirports() {\n\t\ttry {\n\t\t\tList<Airport> airPosrtList = airPortCache.get(FlightConstants.AIRPORT_KEY);\n\t\t\treturn airPosrtList;\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(\"Exception occured while searching AirPorts {}\", exception);\n\t\t\tthrow new AirPortSearchException();\n\t\t}\n\t}", "@Override\n\tpublic List<Airport> searchAirports(String name) {\n\t\tList<Airport> airports = AirportDaoObject.searchAirports(name);\n\t\treturn airports;\n\t}", "public Set<Airport> loadFile(final File csvFile) throws CoreException;", "public NetworkGraph(String flightInfoPath) throws FileNotFoundException {\r\n\t\tString pattern = \",\";\r\n\t\tString line = \"\";\r\n\r\n\t\tallFlightData = new ArrayList<Flight>();\r\n\t\tairportNames = new ArrayList<String>();\r\n\t\tallAirports = new ArrayList<Airport>();\r\n\t\ttry {\r\n\t\t\tFileReader flight = new FileReader(flightInfoPath);\r\n\t\t\tScanner readFlightData = new Scanner(flight);\r\n\t\t\treadFlightData.nextLine();\r\n\t\t\twhile (readFlightData.hasNextLine()) {\r\n\t\t\t\tline = readFlightData.nextLine();\r\n\t\t\t\tString[] values = line.split(pattern);\r\n\t\t\t\t\tif(airportNames.contains(values[0])){\r\n\t\t\t\t\t\tint index = airportNames.indexOf(values[0]);\r\n\t\t\t\t\t\tif(airportNames.contains(values[1])){\r\n\t\t\t\t\t\t\tint destinationIndex = airportNames.indexOf(values[1]);\r\n\t\t\t\t\t\t\tallAirports.get(destinationIndex).setPrevious(allAirports.get(index));\r\n\t\t\t\t\t\t\tflights = new Flight(allAirports.get(destinationIndex), values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\t\tallAirports.get(index).addFilght(flights);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\tairportDestination = new Airport(values[1]);\r\n\t\t\t\t\t\tairportDestination.setPrevious(allAirports.get(index));\r\n\t\t\t\t\t\tflights = new Flight(airportDestination, values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\tallAirports.get(index).addFilght(flights);\r\n\t\t\t\t\t\tallAirports.add(airportDestination);\r\n\t\t\t\t\t\tairportNames.add(values[1]);\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\tairportOrigin = new Airport(values[0]);\r\n\t\t\t\t\t\tif(airportNames.contains(values[1])){\r\n\t\t\t\t\t\t\tint index = airportNames.indexOf(values[1]);\r\n\t\t\t\t\t\t\tallAirports.get(index).setPrevious(airportOrigin);\r\n\t\t\t\t\t\t\tflights = new Flight(allAirports.get(index), values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\t\tairportOrigin.addFilght(flights);\r\n\t\t\t\t\t\t\tallAirports.add(airportOrigin);\r\n\t\t\t\t\t\t\tairportNames.add(values[0]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tairportNames.add(values[0]);\r\n\t\t\t\t\t\t\tairportNames.add(values[1]);\r\n\t\t\t\t\t\t\tairportOrigin = new Airport(values[0]);\r\n\t\t\t\t\t\t\tairportDestination = new Airport(values[1]);\r\n\t\t\t\t\t\t\tflights = new Flight(airportDestination, values[2], Integer.parseInt(values[3]), Integer.parseInt(values[4]), Integer.parseInt(values[5]), Integer.parseInt(values[6]), Double.parseDouble(values[7]));\r\n\t\t\t\t\t\t\tairportOrigin.addFilght(flights);\r\n\t\t\t\t\t\t\tairportDestination.setPrevious(airportOrigin);\r\n\t\t\t\t\t\t\tallAirports.add(airportOrigin);\r\n\t\t\t\t\t\t\tallAirports.add(airportDestination);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treadFlightData.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private Map<String, AirportNode> createAirportGraph(List<String> airports, List<List<String>> routes) {\n Map<String, AirportNode> airportGraph = new HashMap<>();\n // put into graph the airports\n for (String airport : airports) {\n airportGraph.put(airport, new AirportNode(airport));\n }\n\n // add connections to each airport\n for (List<String> route : routes) {\n String airport = route.get(0); // first element is airport\n String connection = route.get(1); // second element is the connection\n airportGraph.get(airport).connections.add(connection);\n }\n return airportGraph;\n }", "public static void main(String args[]) throws Exception{\n Pattern patron = Pattern.compile(\"\\\\s+\");\n\n //leer todas las lineas del archivo\n Stream<String> lineas = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1);\n\n //eliminamos signos de puntuacion\n Stream<String> lineasProcesadas = lineas.map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\"));\n\n //trocear las lineas para tratar con palabras\n\n Stream<String> palabras = lineasProcesadas.flatMap(linea -> patron.splitAsStream(linea));\n\n //filtrar palabras vacias\n\n Stream<String> sinVacias = palabras.filter(palabra -> !palabra.isEmpty());\n\n // generar un diccionario con entradas tipo <palabra, numero de ocurrencias>\n // queremos que el diccionario sea tipo TreeMap\n\n TreeMap<String,Long> mapa = sinVacias.collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n //Ahora todo compactado\n\n TreeMap<String,Long> mapa2 = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1).\n map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\")).\n flatMap(linea -> patron.splitAsStream(linea)).\n filter(palabra -> !palabra.isEmpty()).\n collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n mapa2.forEach(\n (palabra, numero) -> System.out.println(palabra + \" : \" + numero)\n );\n\n //Con esto pedo crear un stream\n //mapa2.entrySet().stream().forEach();\n\n\n //agrupamiento por inicales, todas las palabras con dicha inicial y contadores\n\n TreeMap<Character, List<Map.Entry<String,Long>>> mapa3 = mapa2.\n entrySet().\n stream().\n collect(Collectors.groupingBy(entrada -> entrada.getKey().charAt(0),TreeMap::new,Collectors.toList()));\n\n mapa3.forEach((inicial,listaPalabras) -> {\n System.out.printf(\"%n%c%n\", inicial);\n listaPalabras.stream().forEach( entrada -> {\n System.out.printf(\"%13s: %d%n\", entrada.getKey(), entrada.getValue());\n });\n });\n\n\n\n\n }", "public static HashMap<String, String> processCSVVocabs(String path) throws FileNotFoundException {\n HashMap<String, String> ontoAndTest = new HashMap<>();\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n\n String currentLine;\n int lineN = 0;\n String ontology=\"\";\n String test=\"\";\n String name=\"\";\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n ontology = info[0];\n test = info[1];\n ontoAndTest.put(ontology,test);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return ontoAndTest;\n }", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public Set<Airport> loadFile(final String csvFile) throws CoreException;", "public void buildContinentMappingRelation() throws IOException {\n\t\tMap<String, String> countryContinentMapping = new HashMap<>();\n\t\tStaticDataParser\n\t\t\t\t.parseCsvFile(placeRelationFile, Arrays.asList(\"Place.id\", \"Place.id.2\"))\n\t\t\t\t.map(tuple -> (NTuple2<String, String>) tuple)\n\t\t\t\t.filter(tuple -> Long.valueOf(tuple.get(\"Place.id\")) >= 0\n\t\t\t\t\t\t&& Long.valueOf(tuple.get(\"Place.id.2\")) <= 110)\n\t\t\t\t.forEach(tuple -> {\n\t\t\t\t\tString countryId = Category.place(Long.valueOf(tuple.getField(0)));\n\t\t\t\t\tString continentId = Category.place(Long.valueOf(tuple.getField(1)));\n\t\t\t\t\tcountryContinentMapping.put(countryId, continentId);\n\t\t\t\t});\n\n\t\tthis.countryContinentRelation = countryContinentMapping;\n\t}", "public static Map<String, String> parse(File file) throws IOException {\n List<String> configs = Files.readAllLines(file.toPath());\n return configs.stream()\n .map(it -> it.split(\"\\t\"))\n .collect(toMap(splitted -> splitted[0], splitted -> splitted[1]));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public void loadCityAreaCard(HashMap<Integer, CityAreaCard> CityAreaCard_HASH){\r\n CityAreaCardFactory cityAreaCardFactory = new CityAreaCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"CityAreaCard.csv\"));\r\n \r\n while (scanner.hasNextLine()) {\r\n \r\n String line = scanner.nextLine();\r\n \r\n if(CityAreaCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n CityAreaCard cityAreaCard = cityAreaCardFactory.getCityAreaCard(line);\r\n \r\n CityAreaCard_HASH.put(cityAreaCard.getId(), cityAreaCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadCityAreaCard\");\r\n }\r\n }", "public static Map<String, String> readMap(File inFile, String kColumn, String vColumn) throws IOException {\n Map<String, String> retVal = new HashMap<String, String>();\n try (TabbedLineReader inStream = new TabbedLineReader(inFile)) {\n int kCol = inStream.findField(kColumn);\n int vCol = inStream.findField(vColumn);\n for (Line line : inStream)\n retVal.put(line.get(kCol), line.get(vCol));\n }\n return retVal;\n }", "public static Map<String, List<String>> buildCsvMap(String filePath) {\n\t\tList<String> fileAsList = readFileAsList(filePath);\n\t\tMap<String, List<String>> csv = new LinkedHashMap<String, List<String>>();\n\t\tList<String> headers = Arrays.asList(fileAsList.get(0).split(\",\", -1));\n\n\t\tfor (int i = 1; i < fileAsList.size(); i++) {\n\t\t\tList<String> words = Arrays.asList(fileAsList.get(i).split(\",\", -1));\n\t\t\tfor (int j = 0; j < words.size(); j++) {\n\t\t\t\tif (csv.containsKey(headers.get(j))) {\n\t\t\t\t\tcsv.get(headers.get(j)).add(words.get(j));\n\t\t\t\t} else {\n\t\t\t\t\tList<String> aux = new ArrayList<String>();\n\t\t\t\t\taux.add(words.get(j));\n\t\t\t\t\tcsv.put(headers.get(j), aux);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn csv;\n\t}", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "public static List<StationMap> buildStationMap() throws UrbanRailNetworkException {\n\t\t// Mapping file is already there in cache\n\t\tif (stationMapCache.size() > 0)\n\t\t\treturn stationMapCache;\n\t\ttry (Reader reader = Files.newBufferedReader(Paths.get(SAMPLE_CSV_FILE_PATH));\n\t\t\t\tCSVReader csvReader = new CSVReader(reader);) {\n\t\t\tString[] nextRecord;\n\t\t\tcsvReader.readNext();\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd MMM yyyy\");\n\t\t\twhile ((nextRecord = csvReader.readNext()) != null) {\n\t\t\t\tStationMap stationMap = new StationMap(nextRecord[0], nextRecord[1], format.parse(nextRecord[2]));\n\t\t\t\tstationMapCache.add(stationMap);\n\t\t\t}\n\t\t\treader.close();\n\t\t\tcsvReader.close();\n\t\t} catch (IOException | ParseException e) {\n\t\t\tthrow new UrbanRailNetworkException(\n\t\t\t\t\t\"Got error while parsing StationMap, please enter a valid csv file having format Station Code,Station Name,Opening Date\");\n\t\t}\n\t\tCollections.sort(stationMapCache);\n\t\treturn stationMapCache;\n\t}", "public static HashMap<String,Company> javaHash(File dataFile) \n\t{\n\t\ttry\n\t\t{\n\t\t HashMap<String, Company> hmap = new HashMap<String, Company>();\n\t\t \n\t\t\tCSVReader reader = new CSVReader(new FileReader(dataFile));\n\t\t String [] nextLine;\n\t\t while ((nextLine = reader.readNext()) != null) \n\t\t {\n\t\t \tString currentCompany = nextLine[7];\n\t\t\t\tString complaintId = nextLine[17];\n\t\t\t\tCompany retrievedCompany = hmap.get(currentCompany);\n\t\t\t\tif(retrievedCompany == null)\n\t\t\t\t{\n\t\t\t\t\tCompany companyHolder = new Company(currentCompany, complaintId);\n\t\t\t\t\thmap.put(currentCompany, companyHolder);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tretrievedCompany.addId(complaintId);\n\t\t\t\t}\n\t\t }return hmap;\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File not found, please enter correct file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error\");\n\t\t\tSystem.exit(0);\n\t\t} return null;\n\t}", "private static HashMap<String, String> getUsers(String filename) {\n\t\t// Use hashmap to store the user list, the key is user name and the value is UUID\n\t\tHashMap<String, String> mapUsers = new HashMap<String, String>();\n\t\t// This will reference one line at a time\n\t\tString lineUser = null;\n\n\t\ttry {\n\t\t\t// Check file exists\n\t\t\tFile userfile = new File(filename);\n\t\t\tif(!userfile.exists() || userfile.isDirectory()) {\n\t\t\t\treturn mapUsers;\n\t\t\t}\n\t\t\t// Open the user file\n\t\t\tFileReader fileReader = new FileReader(filename);\n\t\t\t// User bufferedReader to go through the file\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t// Read the file in lines one by one\n\t\t\twhile((lineUser = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] namekey = lineUser.split(\" \"); // Split the name and key\n\t\t\t\tif (namekey.length != 2) { // Validate the data\n\t\t\t\t\tSystem.out.println(\"Invalid line: '\" + lineUser + \"' in '\" + filename + \"'\");\n\t\t\t\t\treturn mapUsers;\n\t\t\t\t}\n\t\t\t\t// Name + Key(UUID)\n\t\t\t\tmapUsers.put(namekey[0], namekey[1]);\n\t\t\t}\n\t\t\t// Always close files.\n\t\t\tbufferedReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\treturn mapUsers;\n\t\t}\n\t}", "private Map<String, ArrayList<Integer>> createModes(String file) throws FileNotFoundException {\n Map<String, ArrayList<Integer>> tempModes = new HashMap<String, ArrayList<Integer>>();\n Scanner modeScan = new Scanner(new File(file));\n while (modeScan.hasNextLine()) {\n Scanner line = new Scanner(modeScan.nextLine());\n String name = line.next();\n ArrayList<Integer> notes = new ArrayList<Integer>();\n while (line.hasNextInt()) {\n notes.add(line.nextInt());\n }\n tempModes.put(name, notes);\n }\n return tempModes;\n }", "public static HashMap<String, IRI> processCSVGoTHash(String path) throws FileNotFoundException {\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n String currentLine;\n int lineN = 0;\n String value=\"\";\n String term=\"\";\n HashMap<String, IRI> got = new HashMap<String, IRI>();\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n if(info.length==2) {\n value = info[0];\n term = info[1];\n }\n got.put(value, IRI.create(term));\n\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return got ;\n }", "private List<User> readFromFile() {\n\n List<String> lines = new ArrayList<>();\n List<User> contactList = new ArrayList<>();\n Map<String, PhoneNumber> phoneNumbersNewUser = new HashMap<>();\n\n try (BufferedReader in = new BufferedReader(new FileReader(contactsFile))) {\n String line;\n while ((line = in.readLine()) != null) {\n lines.add(line);\n }\n\n } catch (IOException ex) {\n System.out.println(\"File not found \\n\" + ex);\n ;\n }\n\n for (String line : lines) {\n String[] userProperties = line.split(\"\\\\|\");\n\n int id = Integer.parseInt(userProperties[0]);\n String fName = userProperties[1];\n String lName = userProperties[2];\n String email = userProperties[3];\n int age = Integer.parseInt(userProperties[4]);\n String[] phones = userProperties[5].split(\"\\\\,\");\n String[] homePhone = phones[0].split(\"\\\\_\");\n String[] mobilePhone = phones[1].split(\"\\\\_\");\n String[] workPhone = phones[2].split(\"\\\\_\");\n phoneNumbersNewUser.put(homePhone[0], new PhoneNumber(homePhone[1], homePhone[2]));\n phoneNumbersNewUser.put(mobilePhone[0], new PhoneNumber(mobilePhone[1], mobilePhone[2]));\n phoneNumbersNewUser.put(workPhone[0], new PhoneNumber(workPhone[1], workPhone[2]));\n String[] homeAdress = userProperties[6].split(\"\\\\,\");\n Address homeAdressNewUser = new Address(homeAdress[0], Integer.parseInt(homeAdress[1]), Integer.parseInt(homeAdress[2]),\n homeAdress[3], homeAdress[4], homeAdress[5], homeAdress[6]);\n String title = userProperties[7];\n String[] companyProperties = userProperties[8].split(\"\\\\_\");\n String[] companyAddress = companyProperties[1].split(\"\\\\,\");\n Address companyAddressNewUser = new Address(companyAddress[0], Integer.parseInt(companyAddress[1]),\n Integer.parseInt(companyAddress[2]), companyAddress[3], companyAddress[4], companyAddress[5],\n companyAddress[6]);\n String companyName = companyProperties[0];\n Company companyNewUser = new Company(companyName, companyAddressNewUser);\n boolean isFav = Boolean.parseBoolean(userProperties[9]);\n User user = new User(id, fName, lName, email, age, phoneNumbersNewUser, homeAdressNewUser, title, companyNewUser, isFav);\n contactList.add(user);\n }\n\n\n return contactList;\n }", "private static ArrayList<CIty> duxushuji(File file) throws IOException {\n\t\tArrayList<CIty>city=new ArrayList<>();\r\n\t\tInputStreamReader isr = new InputStreamReader(new FileInputStream(file), \"GBK\");\r\n\t\tBufferedReader br=new BufferedReader(isr);\r\n\tString str;\r\n\t\twhile((str=br.readLine())!=null){\r\n\t\tString[] strings=str.split(\"[|]\");\r\n\t\tcity.add(new CIty(Integer.parseInt(strings[0]), strings[1],strings[2]));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tisr.close();\r\n\t\treturn city;\r\n\t}", "private static List<Query> readPolygonQueries(String fileName) throws IOException {\n CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder()\n .onMalformedInput(CodingErrorAction.REPORT)\n .onUnmappableCharacter(CodingErrorAction.REPORT);\n int BUFFER_SIZE = 1 << 16; // 64K\n InputStream is = Files.newInputStream(Paths.get(fileName));\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, decoder), BUFFER_SIZE);\n List<Query> result = new ArrayList<>();\n while (true) {\n String line = reader.readLine(); \n if (line == null) {\n break;\n }\n if (line.startsWith(\"count=\") == false) {\n throw new AssertionError();\n }\n // Count is the number of polygons the query has:\n int count = Integer.parseInt(line.substring(6, line.indexOf(' ')));\n List<Polygon> polys = new ArrayList<>();\n for(int i=0;i<count;i++) {\n line = reader.readLine(); \n // How many polygons (if this is > 1, the first poly is the real one, and\n // all others are hole-polys that are subtracted):\n if (line.startsWith(\" poly count=\") == false) {\n throw new AssertionError();\n }\n int polyCount = Integer.parseInt(line.substring(13));\n List<Polygon> polyPlusHoles = new ArrayList<>();\n for(int j=0;j<polyCount;j++) {\n line = reader.readLine(); \n if (line.startsWith(\" vertex count=\") == false) {\n System.out.println(\"GOT: \" + line);\n throw new AssertionError();\n }\n \n int vertexCount = Integer.parseInt(line.substring(17));\n double[] lats = new double[vertexCount];\n double[] lons = new double[vertexCount];\n line = reader.readLine(); \n if (line.startsWith(\" lats \") == false) {\n throw new AssertionError();\n }\n String[] parts = line.substring(11).split(\" \");\n if (parts.length != vertexCount) {\n throw new AssertionError();\n }\n for(int k=0;k<vertexCount;k++) {\n lats[k] = Double.parseDouble(parts[k]);\n }\n \n line = reader.readLine(); \n if (line.startsWith(\" lons \") == false) {\n throw new AssertionError();\n }\n parts = line.substring(11).split(\" \");\n if (parts.length != vertexCount) {\n throw new AssertionError();\n }\n for(int k=0;k<vertexCount;k++) {\n lons[k] = Double.parseDouble(parts[k]);\n }\n polyPlusHoles.add(new Polygon(lats, lons));\n }\n Polygon firstPoly = polyPlusHoles.get(0);\n Polygon[] holes = polyPlusHoles.subList(1, polyPlusHoles.size()).toArray(new Polygon[polyPlusHoles.size()-1]);\n polys.add(new Polygon(firstPoly.getPolyLats(), firstPoly.getPolyLons(), holes));\n }\n Query q;\n if (useLatLonPoint) {\n q = LatLonPoint.newPolygonQuery(\"point\", polys.toArray(new Polygon[polys.size()]));\n } else if (useGeoPoint) {\n q = new GeoPointInPolygonQuery(\"point\", polys.toArray(new Polygon[polys.size()]));\n } else {\n throw new AssertionError();\n }\n result.add(q);\n }\n\n return result;\n }", "public HashMap<String, HashSet<String>> readAnswer(String path)\n\t\t\tthrows FileNotFoundException {\n\t\n\t\tHashMap<String, HashSet<String>> answer = new HashMap<String, HashSet<String>>();\n\n\t\tScanner scan = new Scanner(new File(path));\n\n\t\tString line = null;\n\t\tdo {\n\t\t\tline = scan.nextLine();\n\n\t\t\tHashSet<String> result = new HashSet<>();\n\t\t\tString answers[] = line.substring(line.indexOf(' ') + 1).split(\n\t\t\t\t\t\"[|]\");\n\t\t\tfor (int i = 0; i < answers.length; i++) {\n\t\t\t\t// remove the '-' in the date\n\t\t\t\tString temp = answers[i].replace(\"-\", \" \");\n\t\t\t\tresult.add(temp);\n\t\t\t}\n\t\t\tanswer.put(line.substring(0, line.indexOf(' ')), result);\n\n\t\t} while (scan.hasNext());\n\t\tscan.close();\n\n\t\treturn answer;\n\t}", "public void search(File file) throws IOException {\n Scanner in = new Scanner(new FileInputStream(file));\n int lineNumber = 0;\n while(in.hasNextLine()){\n lineNumber++;\n String line = in.nextLine();\n if(line.contains(keyword)){\n System.out.printf(\"%s [line: %d]: %s%n\", file.getPath(), lineNumber, line);\n }\n }\n in.close();\n }", "public Map<String,Flight> getAllDepartureFlights() {\n\t\tMap<String,Flight> allFlights = new HashMap<String,Flight> ();\n\t\twaitForElementToAppear(departureFlightSection);\n\t\tList<WebElement> flights = departureFlightSection.findElements(By.tagName(\"li\"));\n\t\tif (!flights.isEmpty()) {\n\t\t for (WebElement flight:flights) {\n\t\t \tString flightInformation = flight.getText();\n\t\t \tString[] flightInformationElements = flightInformation.split(\"\\n\");\n\t\t \tfor (int j = 0; j < flightInformationElements.length; j++) {\n\t\t \t\tSystem.out.println(flightInformationElements[j]);\n\t\t \t}\n\t\t \tFlight newFlight = new Flight();\n\t\t \tString flightNumber = flightInformationElements[0].trim();\n\t\t \tnewFlight.setFlightNumber(flightNumber);\n\t\t \tnewFlight.setStop(flightInformationElements[1].trim());\n\t\t \tnewFlight.setDepartureTime(flightInformationElements[2].trim());\n\t\t \tnewFlight.setArrivalTime(flightInformationElements[3].trim());\n\t\t \tnewFlight.setDuration(flightInformationElements[4].trim());\n\t\t \tnewFlight.setDurationTime(flightInformationElements[5].trim());\n\t\t \tnewFlight.setBusinessPrice(flightInformationElements[6].trim());\n\t\t \tnewFlight.setAnytimePrice(flightInformationElements[7].trim());\n\t\t \tnewFlight.setGetAwayPrice(flightInformationElements[8].trim());\n\t\t \tif (!allFlights.containsKey(flightNumber))\n\t\t \t\tallFlights.put(flightNumber , newFlight);\n\t\t }\n\t\t}\n\t\treturn allFlights;\n\t}", "public Map<String, Set<String>> loadDictionary(File dictionaryFile) throws IOException {\n // iterate through the input file lines\n try (Stream<String> lines = Files.lines(dictionaryFile.toPath())) {\n // create resulting map as per javadoc\n Map<String, Set<String>> result = new HashMap<>();\n // for each line in the input file\n lines.forEach(line -> {\n // convert to lower case and remove all non-mappable characters\n String filtered = filter(line);\n // get number that is result of decoding of the word in current line\n String decodedNumber = decode(filtered);\n // create empty set if there are no entries for the current decoded number\n if (!result.containsKey(decodedNumber)) {\n result.put(decodedNumber, new HashSet<>());\n }\n // put original word mapped to the decoded number\n result.get(decodedNumber).add(line);\n });\n return result;\n }\n }", "public static ArrayList<Airport> getAirport() throws DBException {\r\n Connection con = null;\r\n try {\r\n con = DBConnector.getConnection();\r\n Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);\r\n \r\n String sql = \"SELECT airportcode \"\r\n + \"FROM airport\";\r\n \r\n ResultSet srs = stmt.executeQuery(sql);\r\n \r\n ArrayList<Airport> airports = new ArrayList<Airport>();\r\n \r\n while (srs.next())\r\n airports.add(getAirport(srs.getString(\"airportcode\")));\r\n \r\n DBConnector.closeConnection(con);\r\n \r\n return airports;\r\n } \r\n \r\n catch (DBException dbe) {\r\n dbe.printStackTrace();\r\n DBConnector.closeConnection(con);\r\n throw dbe;\r\n } \r\n \r\n catch (Exception ex) {\r\n ex.printStackTrace();\r\n DBConnector.closeConnection(con);\r\n throw new DBException(ex);\r\n }\r\n }", "public List<Country> readCountriesFromCSV(String fileName){\n try {\n Scanner scanner = new Scanner(new File(fileName));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n while(scanner.hasNextLine()){\n lsta.add(createCountry(scanner.nextLine().split(\",\")));\n// System.out.println(pyr.get_pharaoh()+\"|\"+pyr.get_modern_name()+\"|\"+pyr.get_site()+\"|\"+pyr.get_height()+\"|\");\n }\n scanner.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(CityCSVDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return lsta;\n }", "private static ArrayList<Capital> getCapitalsFromFile() {\n\n String txtFile = \"countries_and_capitals.txt\";\n BufferedReader br = null;\n String line = \"\";\n int COUNTRY_COL = 0;\n int CAPITAL_COL = 1;\n ArrayList<Capital> capitals = new ArrayList<Capital>();\n\n try {\n\n br = new BufferedReader(new FileReader(txtFile));\n\n while ((line = br.readLine()) != null) {\n String[] capital = line.split(\" \\\\| \");\n capitals.add(new Capital(capital[CAPITAL_COL], capital[COUNTRY_COL]));\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return capitals;\n }", "public void leituraMapa() throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(caminho+\"/caminho.txt\"));\n String linha = br.readLine();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n dm.addElement(array[1]);\n nomeJanela[contador] = array[0];\n contador++;\n linha = br.readLine();\n }\n br.close();\n }", "public static MapOpenAddressing<String,Company> makeMapOpenAddressing(File dataFile) \n\t{\n\t\ttry\n\t\t{\n\t\t\tMapOpenAddressing<String,Company> b = new MapOpenAddressing<String,Company>(43);\n\t\t\t\n\t\t\tCSVReader reader = new CSVReader(new FileReader(dataFile));\n\t\t String [] nextLine;\n\t\t while ((nextLine = reader.readNext()) != null) \n\t\t {\n\t\t\t\tString currentCompany = nextLine[7];\n\t\t\t\tString complaintId = nextLine[17];\n\t\t\t\tCompany retrievedCompany = b.get(currentCompany);\n\t\t\t\tif(retrievedCompany == null)\n\t\t\t\t{\n\t\t\t\t\tCompany companyHolder = new Company(currentCompany, complaintId);\n\t\t\t\t\tb.put(currentCompany, companyHolder);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tretrievedCompany.addId(complaintId);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\treturn b;\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File not found, please enter correct file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error\");\n\t\t\tSystem.exit(0);\n\t\t} return null;\n\t}", "private static Map<String, ArrayList<String>> getPersonsCityWise() {\n ArrayList<String> cityNames = new ArrayList<String>();\n\n for (String i : bookList.keySet()) {\n contactDetailsCity = bookList.get(i);\n for (int j = 0; j < contactDetailsCity.size(); j++) {\n cityNames.add(contactDetailsCity.get(j).getCity());\n }\n }\n Set<String> duplicateRemoval = new LinkedHashSet<String>();\n duplicateRemoval.addAll(cityNames);\n cityNames.clear();\n cityNames.addAll(duplicateRemoval);\n\n for (int y = 0; y < cityNames.size(); y++) {\n ArrayList<String> personNames = new ArrayList<String>();\n for (String i : bookList.keySet()) {\n contactDetailsCity = bookList.get(i);\n for (int j = 0; j < contactDetailsCity.size(); j++) {\n Contact initial = contactDetailsCity.get(j);\n if (initial.getCity().equals(cityNames.get(y))) {\n personNames.add(initial.getFirstName() + \" \" + initial.getLastName());\n }\n }\n }\n cityList.put(cityNames.get(y), personNames);\n }\n return cityList;\n }", "public static int[][] loadMap(String fileName) throws Exception{\n FileReader fr=new FileReader(fileName);\n int c;\n String str=\"\";\n List<String> strA=new ArrayList<>(); //list of lines\n //process out newlines from midline\n while((c=fr.read())!=-1){\n System.out.print((char)c); //show map\n if(!(((char)c=='\\n') || ((char)c=='\\r'))){str=str+(char)c;}\n else if(((char)c=='\\n' || (char)c=='\\r')){\n if(strA.size()<1) {strA.add(str);str=\"\";}\n else if(strA.size()>0 && strA.get(0).length()>str.length()){} //newline char found midline\n else {strA.add(str);str=\"\";}\n }\n else System.out.println(\"Err: \"+(char)c);\n }\n strA.add(str);\n System.out.println(\"\\nWidth: \"+str.length()+\"\\nHeight: \"+strA.size());\n //now that size is known, fill info array\n int[][] map=fillMap(strA);\n \n return map;\n }", "public Set<String> getAirports() {\n Set<String> airports = new HashSet<>();\n AirportDataHolder.getInstance().\n getAirportDataMap().\n forEach(airport -> airports.add(airport.getIata()));\n return airports;\n }", "String getIPGeolocationCityDatabaseFile();", "private Map<Integer, WorldAirport> getAirportMap(){\n\t\treturn this.airports;\n\t}", "public void importFile(String filename) throws IOException, BadEntryException, ImportFileException{\n try{\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String line;\n line = reader.readLine();\n\n while(line != null){\n String[] fields = line.split(\"\\\\|\");\n int id = Integer.parseInt(fields[1]);\n if(_persons.get(id) != null){\n throw new BadEntryException(fields[0]);\n }\n\n if(fields[0].equals(\"FUNCIONÁRIO\")){\n registerAdministrative(fields);\n line = reader.readLine();\n }else if(fields[0].equals(\"DOCENTE\")){\n Professor _professor = new Professor(id, fields[2], fields[3]);\n _professors.put(id, _professor);\n _persons.put(id, (Person) _professor);\n\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n \n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n\n if(_professor.getDisciplineCourses().get(course) == null){\n _professor.getDisciplineCourses().put(course, new HashMap<String, Discipline>());\n }\n\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline,_course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_professor, id);\n _disciplineCourse.get(course).put(discipline, _discipline);\n\n if(_professor.getDisciplines() != null){\n _professor.getDisciplines().put(discipline, _discipline);\n _professor.getDisciplineCourses().get(course).put(discipline, _discipline); \n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n\n }\n }\n }\n }else if(fields[0].equals(\"DELEGADO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course,_course);\n }\n if(_course.getRepresentatives().size() == 8){\n System.out.println(id);\n throw new BadEntryException(course);\n }else{\n _course.getRepresentatives().put(id,_student);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline,_discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n }else if(fields[0].equals(\"ALUNO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_student, id);\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n\n }else{\n throw new BadEntryException(fields[0]);\n }\n }\n for(Course course: _courses.values()){\n HashMap<Integer,Student> representatives = course.getRepresentatives();\n HashMap<String, Discipline> disciplines = course.getDisciplines();\n for(Discipline discipline: disciplines.values()){\n for(Student representative: representatives.values()){\n discipline.registerObserver(representative, representative.getId());\n }\n }\n \n } \n reader.close();\n }catch(BadEntryException e){\n throw new ImportFileException(e);\n }catch(IOException e){\n throw new ImportFileException(e);\n }\n }", "private void writeAllMatchedAirlineMappings(HttpServletResponse response, String name) throws IOException {\r\n int matches = 0;\r\n PrintWriter pw = response.getWriter();\r\n pw.println(Messages.getMappingCount(data.size()));\r\n\r\n for (Map.Entry<String, Airline> entry : this.data.entrySet()) {\r\n if (entry.getKey().equals(name)) {\r\n pw.println(entry.getKey());\r\n for (Object flight : entry.getValue().getFlights()) {\r\n Flight flight1 = (Flight) flight;\r\n ++matches;\r\n pw.println(\"\\t\" + flight.toString() + \" Duration(minutes) \" + flight1.getDuration());\r\n }\r\n }\r\n }\r\n\r\n if (matches == 0) {\r\n pw.println(\"No airline matches exist for that search\");\r\n }\r\n pw.flush();\r\n\r\n response.setStatus(HttpServletResponse.SC_OK);\r\n }", "private void load(Path fileName) throws IOException {\n try(BufferedReader reader = Files.newBufferedReader(fileName)) {\n String line = \"\";\n\n // Matches lines with the format:\n // key=value\n // where the key is any sequence of lowercase letters. (a to z)\n // where value may be any letters from a to z (case insensitive) 0 to 9 or the letters '-' and '.'.\n Pattern validLine = Pattern.compile(\"^(?<key>[a-z]+)=(?<value>[a-zA-Z0-9-.]+)$\");\n\n // Read the file line by line\n while((line = reader.readLine()) != null) {\n if(line.startsWith(\";\")) { // Ignore lines that start with ;\n continue;\n }\n\n // Remove any whitespace\n line = line.trim();\n\n // Continue if our line is empty\n if(\"\".equals(line)) {\n continue;\n }\n\n Matcher matcher = validLine.matcher(line);\n\n if(!matcher.matches() || matcher.groupCount() != 2) {\n System.err.println(\"Unable to parse line: \" + line);\n continue;\n }\n\n String key = matcher.group(\"key\");\n String value = matcher.group(\"value\");\n\n map.put(key, value);\n }\n }\n }", "public void data() {\n\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\"/Users/macbook_user/Desktop/OOP Project/List.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return;\n }\n\n String[] columnName\n = {\"Id\", \"Name\", \"Amount\", \"Shelf#\", \"Position\"};\n int i, index;\n String line;\n try {\n br.readLine();\n while ((line = br.readLine()) != null) {\n index = 0;\n String[] se = line.split(\" \");\n Map<String, Object> item = new HashMap<>();\n for (i = 0; i < se.length; i++) {\n if (\"\".equals(se[i])) {\n continue;\n }\n if (index >= columnName.length) {\n continue;\n }\n item.put(columnName[index], se[i]);\n index++;\n }\n\n //get the amount of the item from the list\n int amount = Integer.parseInt((String) item\n .get(columnName[2]));\n\n // if amount greater than 0, Existence is Y, else N\n if (amount > 0) {\n item.put(\"Existence\", \"Y\");\n } else {\n item.put(\"Existence\", \"N\");\n }\n\n inventory.add(item);// add item to ArrayList\n }\n br.close();\n\n outPutFile();\n } catch (IOException e) {\n }\n\n }", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {\n\t\tString \tmongoHost \t= \"localhost\";\n\t\tint \tmongoPort\t= 27017;\n\t\tString mongoDb\t\t= \"grits-net-meteor\";\n\t\tString airportsCol\t= \"airports\";\n\t\t\n\t\tList<String> countries = getUniqueCountryList(mongoHost, mongoPort, mongoDb, airportsCol );\n\t\t\n\t\tPrintWriter writer = new PrintWriter(\"./res/output.txt\", \"UTF-8\");\n\t\tfor(String country : countries) {\n\t\t\twriter.println(\" \");\n\t\t\twriter.println(\"Now analyzing country: \" + country);\n\t\t\t\n\t\t\t//Our database has a country that is \"Unknown Country\"\n\t\t\tif(!country.equals(\"Unknown Country\")) {\n\t\t\t\tCoordinates countryCenter = getCountryCenter(country);\n\t\t\t\t\n\t\t\t\tList<Airport> airports = getAirportsInCountry(mongoHost, mongoPort, mongoDb, airportsCol, country);\n\t\t\t\twriter.println(\"Number airports in country: \" + airports.size());\n\t\t\t\t\n\t\t\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\t\t\tfor(Airport airport : airports){\n\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\tstats.addValue(distance);\n\t\t\t\t}\n \n\t\t\t\t// Compute some statistics\n\t\t\t\tdouble mean = stats.getMean();\n\t\t\t\tdouble std \t= stats.getStandardDeviation();\n\t\t\t\t\n\t\t\t\t//Only remove outliers if relatively normal\n\t\t\t\tif(std > 0 && airports.size() > 5) {\n\t\t\t\t\t\n\t\t\t\t\tNormalDistribution normalDistribution = new NormalDistribution(mean, std);\n\t\t\t\t\tfor(Airport airport : airports) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\t\tdouble pValue = normalDistribution.cumulativeProbability(distance);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//Could tighten up RIGHT HERE. TODO Add significance value maybe\n\t\t\t\t\t\tif( (pValue > 0.97) && distance > mean) \n{\n\t\t\t\t\t\t\twriter.println(\"Possible Outlier: \" + airport.getId() + \" distance to country center: \" + distance + \" pValue: \" + pValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\t\t\n\t\twriter.close();\n\t}", "private static Map<String, Map<String, Double>> readWeights(String fileName) throws IOException {\n\t\tMap<String, Map<String, Double>> weightMap = new HashMap<String, Map<String, Double>>();\n\n\t\tString line;\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tMap<String, Double> weight = new HashMap<String, Double>();\n\t\t\tString tempCategory = \"\";\n\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tif (line.isEmpty()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (line.contains(\"------:::::::::::::::::::::::::::::------\")) {\n\t\t\t\t\tString elem[] = line.split(\"------:::::::::::::::::::::::::::::------\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tweight.put(elem[0], Double.parseDouble(elem[1]));\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(line);\n\n\t\t\t\t\t\tSystem.out.println(elem[0] + \"--------\" + elem[1]);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (line.equalsIgnoreCase(\"------------------------------------\")) {\n\t\t\t\t\tweightMap.put(tempCategory, weight);\n\t\t\t\t\tweight = new HashMap<String, Double>();\n\t\t\t\t\ttempCategory = \"\";\n\t\t\t\t} else {\n\t\t\t\t\ttempCategory = line;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn weightMap;\n\n\t}", "public void readDataFromFile() {\n System.out.println(\"Enter address book name: \");\n String addressBookFile = sc.nextLine();\n Path filePath = Paths.get(\"C:\\\\Users\\\\Muthyala Aishwarya\\\\git\" + addressBookFile + \".txt\");\n try {\n Files.lines(filePath).map(line -> line.trim()).forEach(line -> System.out.println(line));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ObservableList<Airline> loadAirlines(Connection conn, HashMap<String, Airline> airlineIATAHashMap) {\n\n ObservableList<Airline> airlines = FXCollections.observableArrayList();\n try {\n //Create a statement and execute the query to get all airlines from the database\n Statement stmt = conn.createStatement();\n ResultSet result = stmt.executeQuery(\"SELECT * FROM airline\");\n while (result.next()) {\n Airline loadedAirline = new Airline();\n loadedAirline.setAirlineID(result.getInt(\"airlineid\"));\n loadedAirline.setName(result.getString(\"name\"));\n loadedAirline.setAlias(result.getString(\"alias\"));\n loadedAirline.setIATA(result.getString(\"iata\"));\n loadedAirline.setICAO(result.getString(\"icao\"));\n loadedAirline.setCallsign(result.getString(\"callsign\"));\n loadedAirline.setCountry(result.getString(\"country\"));\n checkActive(loadedAirline, result.getString(\"active\"));\n airlines.add(loadedAirline);\n if (loadedAirline.getIATA() != null) {\n airlineIATAHashMap.put(loadedAirline.getIATA(), loadedAirline);\n } else if (loadedAirline.getICAO() != null) {\n airlineIATAHashMap.put(loadedAirline.getICAO(), loadedAirline);\n }\n }\n } catch (Exception e) {\n System.out.println(\"ERROR \" + e.getClass().getName() + \": \" + e.getMessage());\n }\n\n return airlines;\n }", "public static Map<String, Integer> getEndingPositions(File aFile)\n\t\t\tthrows IOException, FileNotFoundException {\n\n\t\tMap<String, Integer> endPositions = new HashMap<String, Integer>();\n\n\t\tString line;\n\t\tBufferedReader in;\n\t\tString extension = PdbHelper.getFileExtension(aFile);\n\n\t\tif (extension.equals(\"gz\")) { // PDB files that are gzipped can be used\n\t\t\tin = new BufferedReader(new InputStreamReader(new GZIPInputStream(\n\t\t\t\t\tnew FileInputStream(aFile))));\n\t\t} else {\n\t\t\tin = new BufferedReader(new FileReader(aFile));\n\t\t}\n\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tif (line.startsWith(\"DBREF \") || line.startsWith(\"DBREF1\")) {\n\t\t\t\tString chainLabel = line.substring(13 - 1, 13);\n\n\t\t\t\tint seqEnd = Integer\n\t\t\t\t\t\t.parseInt(line.substring(21 - 1, 24).trim());\n\t\t\t\tendPositions.put(chainLabel, seqEnd);\n\t\t\t}\n\n\t\t\tif (line.startsWith(\"SEQADV \")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tin.close();\n\n\t\treturn endPositions;\n\t}", "public static Map<String, String> readMap() {\n\n\n // take resource from jar file (in the project they are in the \"target\" folder)\n InputStream playlist =\n PlaylistPrepare.class.getClassLoader()\n .getResourceAsStream(\"playlist.txt\");\n\n InputStreamReader reader = new InputStreamReader(playlist);\n BufferedReader br = new BufferedReader(reader);\n\n Map<String, String> map = new HashMap<>();\n\n try {\n String line;\n while ((line = br.readLine()) != null) {\n String[] split = line.split(\"¦\");\n// System.out.println(split[1] + \"; \" + split[2]);\n map.put(split[1], split[2]);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return map;\n }", "public static MobilityMap parseMap( String filename ) throws FileNotFoundException\r\n {\r\n File f = new File( filename );\r\n return parseMap( f );\r\n }", "public static ArrayList readBiblioscapeTagFile(String filename) {\n ArrayList bibitems = new ArrayList();\n File f = new File(filename);\n if (!f.exists() || !f.canRead() || !f.isFile()) {\n System.err.println(\"Error: \" + filename + \" is not a valid file and|or is not readable.\");\n return null;\n }\n \n try {\n BufferedReader in = new BufferedReader(new FileReader(filename));\n String line;\n HashMap hm = new HashMap();\n HashMap lines = new HashMap();\n StringBuffer previousLine = null;\n while ((line = in.readLine()) != null) {\n // entry delimiter -> item complete\n if (line.equals(\"------\")) {\n String[] type = new String[2];\n String[] pages = new String[2];\n String country = null;\n String address = null;\n Vector comments = new Vector();\n // add item\n Object[] l = lines.entrySet().toArray();\n for (int i = 0; i < l.length; ++i) {\n Map.Entry entry = (Map.Entry)l[i];\n if (entry.getKey().equals(\"AU\")) hm.put(\"author\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TI\")) hm.put(\"title\",entry.getValue().toString());\n else if (entry.getKey().equals(\"ST\")) hm.put(\"booktitle\",entry.getValue().toString());\n else if (entry.getKey().equals(\"YP\")) hm.put(\"year\",entry.getValue().toString());\n else if (entry.getKey().equals(\"VL\")) hm.put(\"volume\",entry.getValue().toString());\n else if (entry.getKey().equals(\"NB\")) hm.put(\"number\",entry.getValue().toString());\n else if (entry.getKey().equals(\"PS\")) pages[0] = entry.getValue().toString();\n else if (entry.getKey().equals(\"PE\")) pages[1] = entry.getValue().toString();\n else if (entry.getKey().equals(\"KW\")) hm.put(\"keywords\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RM\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RU\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"RT\")) type[0] = entry.getValue().toString();\n else if (entry.getKey().equals(\"SB\")) comments.add(\"Subject: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"SA\")) comments.add(\"Secondary Authors: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"NT\")) hm.put(\"note\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"PP\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"PB\")) hm.put(\"publisher\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TA\")) comments.add(\"Tertiary Authors: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"TT\")) comments.add(\"Tertiary Title: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"ED\")) hm.put(\"edition\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DP\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TW\")) type[1] = entry.getValue().toString();\n else if (entry.getKey().equals(\"QA\")) comments.add(\"Quaternary Authors: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"QT\")) comments.add(\"Quaternary Title: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"IS\")) hm.put(\"isbn\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"LA\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"AB\")) hm.put(\"abstract\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DI\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DM\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"AV\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"PR\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"LO\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"AD\")) address = entry.getValue().toString();\n else if (entry.getKey().equals(\"LG\")) hm.put(\"language\",entry.getValue().toString());\n else if (entry.getKey().equals(\"CO\")) country = entry.getValue().toString();\n else if (entry.getKey().equals(\"UR\") || entry.getKey().equals(\"AT\")) {\n String s = entry.getValue().toString().trim();\n hm.put(s.startsWith(\"http://\") || s.startsWith(\"ftp://\") ? \"url\" : \"pdf\",\n entry.getValue().toString());\n }\n else if (entry.getKey().equals(\"C1\")) comments.add(\"Custom1: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C2\")) comments.add(\"Custom2: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C3\")) comments.add(\"Custom3: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C4\")) comments.add(\"Custom4: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"RD\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"MB\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"C5\")) comments.add(\"Custom5: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C6\")) comments.add(\"Custom6: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"FA\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"CN\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"DE\")) hm.put(\"annote\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RP\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DF\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RS\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"CA\")) comments.add(\"Categories: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"WP\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TH\")) comments.add(\"Short Title: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"WR\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"EW\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"SE\")) hm.put(\"chapter\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"AC\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"LP\")) hm.put(\"\",entry.getValue().toString());\n }\n \n String bibtexType = \"misc\";\n if (type[1] != null) { // first check TW\n type[1] = type[1].toLowerCase();\n if (type[1].indexOf(\"article\") >= 0) bibtexType = \"article\";\n else if (type[1].indexOf(\"book\") >= 0) bibtexType = \"book\";\n else if (type[1].indexOf(\"conference\") >= 0) bibtexType = \"inproceedings\";\n else if (type[1].indexOf(\"proceedings\") >= 0) bibtexType = \"inproceedings\";\n else if (type[1].indexOf(\"report\") >= 0) bibtexType = \"techreport\";\n else if (type[1].indexOf(\"thesis\") >= 0\n && type[1].indexOf(\"master\") >= 0) bibtexType = \"mastersthesis\";\n else if (type[1].indexOf(\"thesis\") >= 0) bibtexType = \"phdthesis\";\n } else if (type[0] != null) { // check RT\n type[0] = type[0].toLowerCase();\n if (type[0].indexOf(\"article\") >= 0) bibtexType = \"article\";\n else if (type[0].indexOf(\"book\") >= 0) bibtexType = \"book\";\n else if (type[0].indexOf(\"conference\") >= 0) bibtexType = \"inproceedings\";\n else if (type[0].indexOf(\"proceedings\") >= 0) bibtexType = \"inproceedings\";\n else if (type[0].indexOf(\"report\") >= 0) bibtexType = \"techreport\";\n else if (type[0].indexOf(\"thesis\") >= 0\n && type[0].indexOf(\"master\") >= 0) bibtexType = \"mastersthesis\";\n else if (type[0].indexOf(\"thesis\") >= 0) bibtexType = \"phdthesis\";\n }\n \n // concatenate pages\n if (pages[0] != null || pages[1] != null)\n hm.put(\"pages\",(pages[0] != null ? pages[0] : \"\")\n + (pages[1] != null ? \"--\" + pages[1] : \"\"));\n \n // concatenate address and country\n if (address != null)\n hm.put(\"address\",address + (country != null ? \", \" + country : \"\"));\n \n if (comments.size() > 0) { // set comment if present\n StringBuffer s = new StringBuffer();\n for (int i = 0; i < comments.size(); ++i)\n s.append((i > 0 ? \"; \" : \"\")+ comments.elementAt(i).toString());\n hm.put(\"comment\",s.toString());\n }\n BibtexEntry b = new BibtexEntry(\n Globals.DEFAULT_BIBTEXENTRY_ID,\n Globals.getEntryType(bibtexType));\n b.setField(hm);\n bibitems.add(b);\n \n hm.clear();\n lines.clear();\n previousLine = null;\n \n continue;\n }\n // new key\n if (line.startsWith(\"--\") && line.length() >= 7 && line.substring(4,7).equals(\"-- \")) {\n lines.put(line.substring(2,4),previousLine = new StringBuffer(line.substring(7)));\n continue;\n }\n // continuation (folding) of previous line\n if (previousLine == null) // sanity check; should never happen\n return null;\n previousLine.append(line.trim());\n }\n } catch (IOException e) {\n return null;\n }\n \n return bibitems;\n }", "List<Tour> getTourSchedule(String line);" ]
[ "0.583706", "0.56193703", "0.55379367", "0.53961354", "0.5390599", "0.53044575", "0.5265762", "0.52642", "0.52436966", "0.52344674", "0.52336764", "0.51884556", "0.51430285", "0.5091842", "0.5091625", "0.5075073", "0.50723773", "0.50617826", "0.50398576", "0.50239015", "0.5018622", "0.501511", "0.50036067", "0.49990365", "0.49971172", "0.49881536", "0.497442", "0.4948983", "0.49432537", "0.4912896", "0.49040863", "0.4890763", "0.48830494", "0.4858847", "0.48577258", "0.48543626", "0.48501405", "0.4847278", "0.48446238", "0.48438683", "0.48424166", "0.48350796", "0.48350352", "0.4827254", "0.48197642", "0.48127222", "0.48115575", "0.48063716", "0.48009083", "0.4800121", "0.47998473", "0.47978652", "0.47798067", "0.47772872", "0.47762057", "0.47699574", "0.47675294", "0.47671878", "0.47600162", "0.47561035", "0.47474116", "0.47442558", "0.4717085", "0.4707552", "0.47029382", "0.46944353", "0.46918634", "0.46867657", "0.4675056", "0.467467", "0.46745533", "0.46714434", "0.4670158", "0.46630293", "0.4660994", "0.46584514", "0.46442264", "0.46354735", "0.46344978", "0.46239576", "0.4613911", "0.46098173", "0.4604383", "0.4597991", "0.45930263", "0.45786574", "0.45778406", "0.45748714", "0.45737284", "0.45728144", "0.45712137", "0.456684", "0.45564055", "0.45545092", "0.45526925", "0.45496178", "0.45468217", "0.4546207", "0.45440456", "0.45430276" ]
0.73958075
0
Provide airport validation. On case airport city is also part of cities inside database, current airport will be forwarded to resulting HashMap
private boolean isCityAvailable(List<City> cities, String param) { boolean flag = false; for (City city : cities){ if(city.getName().equals(param.trim())){ flag=true; break; } } return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasValidIAta(AirportDTO airportDTO);", "List<AirportDTO> getAirportsByCity(String city);", "@Override\n public HashMap<String, Airport> findAll() {\n\n List<City> cities = cityDao.findAll(0);\n\n airportFile = new File(AirportDao.class.getClassLoader().getResource(\"airports.txt\").getPath());\n try {\n FlightFileReader.consumeNonEmptyLinesFromFile(airportFile, line -> {\n String[] params = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\n String airportID = params[0].replace(\"\\\"\", \"\");\n String airportIATA = params[4].replace(\"\\\"\", \"\");\n String airportICAO = params[5].replace(\"\\\"\", \"\");\n String airportMapKey = (airportIATA.isEmpty() && airportICAO.isEmpty()) ? airportID : (airportIATA.equals(\"\\\\N\") ? airportICAO : airportIATA);\n try {\n if (isCityAvailable(cities, params[2].replace(\"\\\"\", \"\"))) {\n airportsMap.put(airportMapKey, Airport.builder()\n .airportId(Integer.parseInt(params[0]))\n .name(params[1].replace(\"\\\"\", \"\"))\n .city(params[2].replace(\"\\\"\", \"\"))\n .country(params[3].replace(\"\\\"\", \"\"))\n .iata(params[4].replace(\"\\\"\", \"\"))\n .icao(params[5].replace(\"\\\"\", \"\"))\n .latitude(Double.parseDouble(params[6]))\n .longitude(Double.parseDouble(params[7]))\n .altitude(Double.parseDouble(params[8]))\n .timezone(params[9])\n .dst(params[10].replace(\"\\\"\", \"\"))\n .tz(params[11].replace(\"\\\"\", \"\"))\n .type(params[12].replace(\"\\\"\", \"\"))\n .source(params[13].replace(\"\\\"\", \"\"))\n .build());\n }\n } catch (Exception ex) {\n lgr.log(Level.SEVERE, ex.getMessage(), ex);\n }\n });\n } catch (Exception ex) {\n lgr.log(Level.SEVERE, ex.getMessage(), ex);\n }\n return airportsMap;\n }", "protected boolean isAirportValid(String airport) {\n return (airport.length() == 3 || airport.length() == 4) && airport.matches(\"[A-Z]+\");\n }", "public Builder setArrivalAirportCity(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n arrivalAirportCity_ = value;\n onChanged();\n return this;\n }", "private Set<WorldAirport> getAirportSet(){\n\t\treturn new HashSet<WorldAirport>(this.getAirportMap().values());\n\t}", "public void setCountryDTO(Airport airport, CityDTO cityDTO) {\n Country country = countryDAO.findCountryByName(airport.getCity().getCountry().getName());\n CountryDTO countryDTO = new CountryDTO();\n countryDTO.setName(country.getName());\n setContinentDTO(airport, countryDTO);\n cityDTO.setCountryDTO(countryDTO);\n }", "private boolean isAirportCodenameValid(String airportCodename) {\n\n\t\t// return airport database content through given list\n\t\tArrayList<Airport> listOfAirports = (ArrayList<Airport>) airportdb.fetchDatabaseContent();\n\n\t\tfor (int i = 0; i < listOfAirports.size(); i++) {\n\t\t\tString airportCodenameFromList = listOfAirports.get(i).getAirportCodename();\n\n\t\t\tif (airportCodenameFromList.equals(airportCodename)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Airport codename is not in database.\");\n\t\treturn false;\n\t}", "java.lang.String getArrivalAirportCity();", "java.lang.String getDepartureAirportCity();", "public Builder setDepartureAirportCity(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n departureAirportCity_ = value;\n onChanged();\n return this;\n }", "private Map<Integer, WorldAirport> getAirportMap(){\n\t\treturn this.airports;\n\t}", "List<AirportDTO> getAirportsByCountry(String country);", "private static List<Airport> getAirportsInCountry(String mongoHost, int mongoPort, String mongoDb, String collection, String country) {\n\t\t\n\t\tList<Airport> airports = new ArrayList<Airport>();\t\n\t\tMongoClient mongoClient = new MongoClient( mongoHost , mongoPort );\n\t\tMongoDatabase db = mongoClient.getDatabase( mongoDb );\n\t\tFindIterable<Document> iterable = db.getCollection(collection).find();\n\t\titerable.forEach(new Block<Document>() {\n\t\t\tpublic void apply(final Document doc) {\n\t\t\t\t\n\t\t\t\tString countryName = (String) doc.get( \"countryName\" );\n\t\t\t\tif(countryName.equals(country))\n\t\t\t\t{\n\t\t\t\t\tString airportCode = (String) doc.get(\"_id\");\n\t\t\t\t\tDocument loc = (Document) doc.get(\"loc\");\n\t\t\t\t\tList coord = (List)loc.get(\"coordinates\");\n\t\t\t\t\tdouble lat = (double) coord.get(1);\n\t\t\t\t\tdouble lng = (double) coord.get(0);\n\t\t\t\t\tAirport airport = new Airport(airportCode, new Coordinates(lat, lng));\n\t\t\t\t\tairports.add(airport);\n\t\t\t\t}\n\t\t \n\t\t\t}\n\t\t});\n\t\tmongoClient.close();\n\t\treturn airports;\n\t}", "public void setCountry(AirportDTO airportDTO, City city) {\n Country countryFound = countryDAO.findCountryByName(airportDTO.getCityDTO().getCountryDTO().getName());\n if (countryFound != null) {\n city.setCountry(countryFound);\n } else {\n Country country = new Country();\n country.setName(airportDTO.getCityDTO().getCountryDTO().getName());\n setContinent(airportDTO,country);\n city.setCountry(country);\n }\n }", "private void verifyAirportCodes(String[] sDepartingAirports, String[] sArrivalAirports) throws Exception {\n\t\tString[] sAirportCodes = new String[6]; // 3 pairs of airport codes means a total of 6 codes\n\t\tint i = 0, j = 0;\n\n\t\t// Build an array of string objects containing the departure/arrival airport codes for the 3 legs of the trip \n\t\t// as listed on the Payment Page. Need to perform string manipulation to isolate the airport codes.\n\t\tList <WebElement> allDeparturesAndArrivalsList = getElements(allDeparturesAndArrivals, \"XPATH\");\n\t\tfor (WebElement legElement : allDeparturesAndArrivalsList) { \n\t\t\tString sLegDescription = legElement.getText().trim(); // string example: \"Boston (BOS) to Miami (MIA)\"\n\n\t\t\tint parenthesis = sLegDescription.indexOf('('); // index of first open parenthesis\n\t\t\tsAirportCodes[i++] = sLegDescription.substring(parenthesis + 1, parenthesis + 4); // avoid both parentheses, retrieve the first 3 letter airport code \n\n\t\t\tparenthesis = sLegDescription.lastIndexOf('('); // index of last open parenthesis\n\t\t\tsAirportCodes[i++] = sLegDescription.substring(parenthesis + 1, parenthesis + 4); // avoid both parentheses, retrieve the second 3 letter airport code\n\t\t}\n\n\t\t// Compare the sAirportCodes array with the departure/arrival airport codes from the Search Results Page\n\t\t// The i and j variables are used to index into the 3 String arrays to compare the codes.\n\t\tfor (i = 0, j = 0; j < sArrivalAirports.length; j++) {\n\t\t\tif (!sAirportCodes[i++].equals(sDepartingAirports[j])) {\n\t\t\t\tlog.debug(\"Departure airport mismatch on Leg #\" + (j + 1));\n\t\t\t}\n\t\t\tif (!sAirportCodes[i++].equals(sArrivalAirports[j])) {\n\t\t\t\tlog.debug(\"Arrival airport mismatch on Leg #\" + (j + 1));\n\t\t\t}\n\t\t}\n\t\tlog.info(\"verifyAirportCodes() completed\");\n\t}", "public void setCity(AirportDTO airportDTO, Airport airport) {\n City cityFound = cityDAO.findCityByName(airportDTO.getCityDTO().getName());\n if (cityFound != null) {\n airport.setCity(cityFound);\n } else {\n City city = new City();\n city.setName(airportDTO.getCityDTO().getName());\n setCountry(airportDTO, city);\n airport.setCity(city);\n }\n }", "@Override\n public List<AirportRecord> from(final List<List<String>> airports) {\n final List<AirportRecord> airportRecords = new ArrayList<>();\n\n for (final List<String> airport : airports) {\n\n final String iataCode = airport.get(4);\n final String icaoCode = airport.get(5);\n\n final String latitude = airport.get(6);\n final String longitude = airport.get(7);\n\n if (NumberUtils.isCreatable(latitude) &&\n NumberUtils.isCreatable(longitude)) {\n\n final AirportRecord airportRecord = AirportRecord.builder()\n .name(airport.get(1))\n .cityName(airport.get(2))\n .countryName(airport.get(3))\n .iataCode(iataCode)\n .icaoCode(icaoCode)\n .latitude(Double.parseDouble(latitude))\n .longitude(Double.parseDouble(longitude))\n .build();\n\n if (StringUtils.isNotBlank(airportRecord.getIataCode()) && iataPattern.matcher(airportRecord.getIataCode()).matches() &&\n StringUtils.isNotBlank(airportRecord.getIcaoCode()) && icaoPattern.matcher(airportRecord.getIcaoCode()).matches()\n &&\n StringUtils.isNotBlank(airportRecord.getName()) &&\n StringUtils.isNotBlank(airportRecord.getCityName()) &&\n StringUtils.isNotBlank(airportRecord.getCountryName())) {\n\n airportRecords.add(airportRecord);\n }\n }\n\n }\n\n return airportRecords;\n }", "@Test\n public void cityNotNull()\n {\n assertNotNull(_city);\n }", "java.lang.String getTransitAirportCity();", "public java.lang.String getArrivalAirportCity() {\n java.lang.Object ref = arrivalAirportCity_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n arrivalAirportCity_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setCityDTO(Airport airport, AirportDTO airportDTO) {\n City city = cityDAO.findCityByName(airport.getCity().getName());\n CityDTO cityDTO = new CityDTO();\n cityDTO.setName(city.getName());\n setCountryDTO(airport, cityDTO);\n airportDTO.setCityDTO(cityDTO);\n }", "public com.google.protobuf.ByteString\n getArrivalAirportCityBytes() {\n java.lang.Object ref = arrivalAirportCity_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n arrivalAirportCity_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static void save(Airport a) throws DBException {\r\n Connection con = null;\r\n try {\r\n con = DBConnector.getConnection();\r\n Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);\r\n \r\n String sql = \"SELECT airportcode \"\r\n + \"FROM airport \"\r\n + \"WHERE number = \" + a.getAirportCode();\r\n ResultSet srs = stmt.executeQuery(sql);\r\n \r\n // UPDATE\r\n \r\n if (srs.next()) {\r\n //Getters moeten worden aangemaakt bij logic?\r\n\tsql = \"UPDATE airport \"\r\n + \"SET airportname = '\" + a.getAirportname() + \"'\"\r\n + \", timezone = '\" + a.getTimezone() + \"'\"\r\n + \"WHERE number = \" + a.getAirportCode();\r\n stmt.executeUpdate(sql);\r\n } \r\n \r\n // INSERT\r\n \r\n else {\r\n\tsql = \"INSERT into airport \"\r\n + \"(airportcode, airportname, timezone) \"\r\n\t\t+ \"VALUES (\" + a.getAirportCode()\r\n\t\t+ \", '\" + a.getAirportname() + \"'\"\r\n\t\t+ \", '\" + a.getTimezone() + \"')\";\r\n stmt.executeUpdate(sql);\r\n }\r\n \r\n DBConnector.closeConnection(con);\r\n } \r\n \r\n catch (Exception ex) {\r\n ex.printStackTrace();\r\n DBConnector.closeConnection(con);\r\n throw new DBException(ex);\r\n }\r\n }", "public Airport(String cityName, String airportName) {\n\t\tsuper();\n\t\tthis.cityName = cityName;\n\t\tthis.airportName = airportName;\n\t}", "private static void checkCityInput(String cityName) {\n if (!cityName.matches(RegexPattern.CITY_PATTERN)) {\n throw new DaoException(ExceptionMessage.getMessage(ExceptionMessage.CITY_PATTERN_ERROR));\n }\n }", "public Builder setArrivalAirportCityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n arrivalAirportCity_ = value;\n onChanged();\n return this;\n }", "private static boolean validateCity(String city) {\n return !city.isEmpty();\n }", "@Test(priority = 1, dataProvider = \"wrongcityinput\", dataProviderClass = TestDataProvider.class)\n\tpublic void correctCityValidation(String fromCity, String toCity) throws InterruptedException {\n\t\tlogger = extent.startTest(\"City Validaton\");\n\t\tlog.info(\"Starting wrong City Input validation\");\n\t\tHomePageFlow.cityInput(fromCity, toCity);\n\t\thome.isMessageDisplayed();\n\t\tCommonUtility.clickElement(YatraFlightBookingLocators.getLocators(\"loc.inputbox.goingTo\"));\n\t\tCommonUtility.isDisplayed(YatraFlightBookingLocators.getLocators(\"loc.selectDepartCity.txt\"));\n\n\t\tCommonUtility.clickAndSendText(YatraFlightBookingLocators.getLocators(\"loc.inputbox.goingTo\"), 2, \"BLR\");\n\t\tCommonUtility.action();\n\t}", "public Builder setTransitAirportCity(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n transitAirportCity_ = value;\n onChanged();\n return this;\n }", "boolean hasHasCity();", "boolean validateFlight(Flight flight);", "public java.lang.String getArrivalAirportCity() {\n java.lang.Object ref = arrivalAirportCity_;\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 arrivalAirportCity_ = s;\n return s;\n }\n }", "public com.google.protobuf.ByteString\n getArrivalAirportCityBytes() {\n java.lang.Object ref = arrivalAirportCity_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n arrivalAirportCity_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean cityIsValid() {\n return city.length() > 0 && city.length() < MAX_CITY_LENGTH && city.indexOf(',') == -1;\n }", "public String validateMap() {\n\n String returnString = \"SUCCESS\";\n if(validator.hasSingleCountryContinent(new ArrayList<>(gameMap.getContinentHashMap().values()))) {\n return \"One of the continents have only one country or less\";\n }\n if(validator.containsLoop(new ArrayList<>(gameMap.getCountryHashMap().values()))) {\n return \"One of the country is connected to itself\";\n }\n for(GameCountry country : gameMap.getCountryHashMap().values()) {\n if(!validator.hasNeighbor(country)) {\n returnString = \"ONE OR MORE COUNTRIES HAVE NO NEIGHBOURS\";\n break;\n }\n if(!validator.hasValidNumberOfNeighbors(country)) {\n returnString = \"INVALID NUMBER OF NEIGHBOURS\";\n break;\n }\n }\n if(!validator.hasValidNumberOfContinents(new ArrayList<>(gameMap.getContinentHashMap().values()))) {\n returnString = \"NUMBER OF CONTINENTS IS NOT VALID\";\n }\n if(!validator.hasValidNumberOfCountries(new ArrayList<>(gameMap.getCountryHashMap().values()))) {\n returnString = \"INVALID NUMBER OF COUNTRIES\";\n }\n graphUtilObject = this.buildGraph();\n if(!validator.isWholeMapConnected(graphUtilObject)) {\n returnString = \"THE WHOLE MAP IS NOT CONNECTED\";\n }\n for(GameContinent continent : gameMap.getContinentHashMap().values()) {\n if(!(validator.isContinentFullyLinked(continent,graphUtilObject))) {\n returnString = \"ONE OR MORE CONTINENTS ARE NOT CONNECTED WITHIN THEMSELVES\";\n }\n }\n return returnString;\n }", "public Builder setDepartureAirportCityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n departureAirportCity_ = value;\n onChanged();\n return this;\n }", "private void validate() throws FlightCreationException {\n validateNotNull(\"number\", number);\n validateNotNull(\"company name\", companyName);\n validateNotNull(\"aircraft\", aircraft);\n validateNotNull(\"pilot\", pilot);\n validateNotNull(\"origin\", origin);\n validateNotNull(\"destination\", destination);\n validateNotNull(\"departure time\", scheduledDepartureTime);\n\n if (scheduledDepartureTime.isPast()) {\n throw new FlightCreationException(\"The departure time cannot be in the past\");\n }\n\n if (origin.equals(destination)) {\n throw new FlightCreationException(\"The origin and destination cannot be the same\");\n }\n }", "Flight(String airline, String flightNumber, String src, String departDate, String departTime, String dest, String arriveDate, String arriveTime) {\n this.airline = airline;\n this.flightNumber = flightNumber;\n\n // src should be 3 characters! (no numbers or special characters)\n if(src.length() != 3 || Pattern.compile(\"[^a-zA-Z]\").matcher(src).find()) {\n throw new IllegalArgumentException(\"Airport code is not a 3 character letter-only code.\");\n }\n this.src = src;\n\n // Date should be in ##/##/#### format\n if(!departDate.matches(\"([0-9]{2})/([0-9]{2})/([0-9]{4})\")) {\n throw new IllegalArgumentException(\"Depart date is not in correct format. (##/##/####)\");\n }\n this.departDate = departDate;\n\n // Time should be in ##:## format\n if(!departTime.matches(\"([0-9]{2}):([0-9]{2})\")) {\n throw new IllegalArgumentException(\"Depart time is not in correct format. (##:##)\");\n }\n this.departTime = departTime;\n\n // src should be 3 characters! (no numbers or special characters)\n if(dest.length() != 3 || Pattern.compile(\"[^a-zA-Z]\").matcher(dest).find()) {\n throw new IllegalArgumentException(\"Airport code is not a 3 character letter-only code.\");\n }\n this.dest = dest;\n\n // Date should be in ##/##/#### format\n if(!arriveDate.matches(\"([0-9]{2})/([0-9]{2})/([0-9]{4})\")) {\n throw new IllegalArgumentException(\"Arrive date is not in correct format. (##/##/####)\");\n }\n this.arriveDate = arriveDate;\n\n // Time should be in ##:## format\n if(!arriveTime.matches(\"([0-9]{2}):([0-9]{2})\")) {\n throw new IllegalArgumentException(\"Arrive time is not in correct format. (##:##)\");\n }\n this.arriveTime = arriveTime;\n }", "@Override\n protected boolean validater(String[] line) {\n if (line.length != 9) {\n errorCounter(0);\n return false;\n }\n\n changeNulls(line);\n\n if (!isAirlineValid(line[airline])) {\n errorCounter(1);\n return false;\n }\n\n if (!isAirlineIDValid(line[airlineID])) {\n errorCounter(2);\n return false;\n }\n\n if (!isAirportValid(line[sourceAirport])) {\n errorCounter(3);\n return false;\n }\n\n if (!isAirportIDValid(line[sourceAirportID])) {\n errorCounter(4);\n return false;\n }\n\n if (!isAirportValid(line[destinationAirport])) {\n errorCounter(5);\n return false;\n }\n\n if (!isAirportIDValid(line[destinationAirportID])) {\n errorCounter(6);\n return false;\n }\n\n if (!isCodeshareValid(line[codeshare])) {\n errorCounter(7);\n return false;\n }\n\n if (!isStopsValid(line[stops])) {\n errorCounter(8);\n return false;\n }\n\n if (!isEquipmentValid(line[equipment])) {\n errorCounter(9);\n return false;\n }\n\n return true;\n }", "public Builder setDepartureAirport(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n departureAirport_ = value;\n onChanged();\n return this;\n }", "@Test(priority = 5)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_City_StateCodeAndCountryCode() {\n\t\tWeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"Noida_City_State_Country\"),\n\t\t\t\tConfigFileReader.getProperty(\"appid\"), 200);\n\n\t}", "public void validate_the_Town_City_of_Billing_Address_in_Customer_Tab(String TownCity)throws Exception {\n\t\tif(VerifyElementPresent(Desktop_XPATH_Verify_Customer_Page_CorrespondenceAddress.replaceAll(\"M_Header\", \"Billing Address\").replaceAll(\"M_Category\", \"Town/City\").replaceAll(\"M_InnerText\", TownCity), \"Town/City of Billing Address - \"+TownCity, false))\n\t\t{\n\t\t\tVerifyElementPresentAndClick(Desktop_XPATH_Verify_Customer_Page_CorrespondenceAddress.replaceAll(\"M_Header\", \"Billing Address\").replaceAll(\"M_Category\", \"Town/City\").replaceAll(\"M_InnerText\", TownCity), \"Town/City of Billing Address - \"+TownCity);\n\t\t}\n\t\t\n\t}", "@Test\r\n\tpublic void testMapValidation() {\r\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getContinents()));\r\n\t\t\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getTerritories()));\r\n\t}", "public Builder setArrivalAirport(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n arrivalAirport_ = value;\n onChanged();\n return this;\n }", "public void setApsCityKey( Long apsCityKey ) {\n this.apsCityKey = apsCityKey;\n }", "@Test\n\tpublic void validateCountry() {\n\t\tRequestSpecification requestSpecification = new base().getRequestSpecification();\n\t\tgiven().get(Endpoint.GET_COUNTRY).then().statusCode(200).\n\t\tand().contentType(ContentType.JSON).\n\t\tand().body(\"name\", hasItem(\"India\")).\n\t\tand().body(\"find { d -> d.name == 'India' }.borders\", hasItem(\"CHN\"));\n\n\t}", "public void setContinentDTO(Airport airport, CountryDTO countryDTO) {\n Continent continent = continentDAO.findContinentByName(airport.getCity().getCountry().getContinent().getName());\n ContinentDTO continentDTO = new ContinentDTO();\n continentDTO.setName(continent.getName());\n countryDTO.setContinentDTO(continentDTO);\n }", "List<AirportDTO> getAirportsByIata(String iata);", "public boolean validData(String[] data) {\n\t\tboolean validData = true;\n\t\tint year, quarter, month;\n\t\ttry {\n\t\t\tyear = Integer.valueOf(data[0]);\n\t\t\tquarter = Integer.valueOf(data[1]);\n\t\t\tmonth = Integer.valueOf(data[2]);\n\t\t\tint CRSArrTime = Integer.valueOf(data[40]);\n\t\t\tint CRSDepTime = Integer.valueOf(data[29]);\n\t\t\tint timeZone = timeToMinute(Integer.valueOf(data[40])) - timeToMinute(Integer.valueOf(data[29])) - Integer.valueOf(data[50]);\n\t\t\tint origin_AirportID = Integer.valueOf(data[11]);\n\t\t\tint dest_AirportID = Integer.valueOf(data[20]);\n\t\t\tint origin_AirportSeqID = Integer.valueOf(data[12]);\n\t\t\tint dest_AirportSeqID = Integer.valueOf(data[21]);\n\t\t\tint origin_CityMarketID = Integer.valueOf(data[13]);\n\t\t\tint dest_CityMarketID = Integer.valueOf(data[22]);\n\t\t\tint origin_StateFips = Integer.valueOf(data[17]);\n\t\t\tint dest_StateFips = Integer.valueOf(data[26]);\n\t\t\tint origin_wac = Integer.valueOf(data[19]);\n\t\t\tint dest_wac = Integer.valueOf(data[28]);\n\t\t\tint cancelled = Integer.valueOf(data[47]);\n\t\t\tString origin = data[14];\n\t\t\tString dest = data[23];\n\t\t\tString origin_cityname = data[15];\n\t\t\tString dest_cityname = data[24];\n\t\t\tString origin_state = data[18];\n\t\t\tString dest_state = data[27];\n\t\t\tString origin_state_abr = data[16];\n\t\t\tString dest_state_abr = data[25];\n\t\t\t\n\t\t\tif ((CRSArrTime != 0 && CRSDepTime != 0) &&\n\t\t\t\t(timeZone%60 == 0) &&\t\n\t\t\t\t(origin_AirportID >0 && dest_AirportID > 0 && origin_AirportSeqID > 0 && dest_AirportSeqID > 0 \n\t\t\t\t\t\t&& origin_CityMarketID > 0 && dest_CityMarketID > 0 && origin_StateFips > 0 && dest_StateFips > 0 \n\t\t\t\t\t\t&& origin_wac > 0 && dest_wac > 0)\t&&\n\t\t\t\t(!origin.isEmpty() && !dest.isEmpty() && !origin_cityname.isEmpty() && !dest_cityname.isEmpty()\n\t\t\t\t\t\t&& !origin_state.isEmpty() && !dest_state.isEmpty() && !origin_state_abr.isEmpty() && !dest_state_abr.isEmpty())) {\n\t\t\t\t\n\t\t\t\t// for flights which are not cancelled\n\t\t\t\tif (cancelled != 1) {\n\t\t\t\t\tif (((timeToMinute(Integer.valueOf(data[41])) - timeToMinute(Integer.valueOf(data[30])) - Integer.valueOf(data[51]) - timeZone)/60)%24 == 0) {\n\t\t\t\t\t\tif (Float.valueOf(data[42]) > 0) {\n\t\t\t\t\t\t\tif (Float.valueOf(data[42]).equals(Float.valueOf(data[43])))\n\t\t\t\t\t\t\t\tvalidData = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Float.valueOf(data[42]) < 0) {\n\t\t\t\t\t\t\tif (Float.valueOf(data[43]) == 0)\n\t\t\t\t\t\t\t\tvalidData = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Float.valueOf(data[43]) >= 15) {\n\t\t\t\t\t\t\tif (Float.valueOf(data[44]) == 1)\n\t\t\t\t\t\t\t\tvalidData = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// fill map\n\t\tif ((year == 2015) && (quarter == 1) && (month == 1)) {\n\t\t\ttry {\n\t\t\t\tString carrier = data[8];\n\t\t\t\tfloat price = Float.valueOf(data[109]);\n\t\t\t\t\n\t\t\t\tif (map_t.containsKey(carrier)) {\n\t\t\t\t\tArrayList<Float> list = map_t.get(carrier);\n\t\t\t\t\tlist.add(price);\n\t\t\t\t\tmap_t.put(carrier, list);\n\t\t\t\t} else {\n\t\t\t\t\tArrayList<Float> list = new ArrayList<Float>();\n\t\t\t\t\tlist.add(price);\n\t\t\t\t\tmap_t.put(carrier, list);\n\t\t\t\t}\t\t\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t}\n\t\t}\t\t\t\n\t\treturn validData;\n\t}", "@Override\n\tpublic boolean IsDeliveryaddressValid(String name, String street, String city, String province, String postalcode) {\n\t\t\n\t\tData data = new Data();\n\t\tList<Deliveryaddress> deliveryaddress = data.getDeliveryaddressData();\n\t\t\n\t\tfor(Deliveryaddress d: deliveryaddress) {\n\t\t\tif(name.equals(d.name) && street.equals(d.street) && city.equals(d.city) && province.equals(d.province) && postalcode.equals(d.postalcode)) {\n\t\t\t\treturn true;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "@Test(priority = 3)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_City() {\n\t\tweatherResponse_city = WeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"Noida_City\"),\n\t\t\t\tConfigFileReader.getProperty(\"appid\"), 200);\n\n\t}", "boolean isSetRegisteredOfficeCity();", "public java.lang.String getDepartureAirportCity() {\n java.lang.Object ref = departureAirportCity_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n departureAirportCity_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setAreaCityCode(String areaCityCode) {\n this.areaCityCode = areaCityCode;\n }", "public void validate_the_Town_City_of_Correspondence_Address_in_Customer_Tab(String TownCity)throws Exception {\n\t\tVerifyElementPresent(Desktop_XPATH_Verify_Customer_Page_CorrespondenceAddress.replaceAll(\"M_Header\", \"Correspondence Address\").replaceAll(\"M_Category\", \"Town/City\").replaceAll(\"M_InnerText\", TownCity), \"Town/City of Correspondence Address - \"+TownCity, false);\n\t}", "public String getDepartureAirport();", "private static boolean isValidateRecord(Map<String, Object> m)\n throws Exception{\n float crsArrTime = (float) m.get(\"CRS_ARR_TIME\");\n float crsDeptTime = (float) m.get(\"CRS_DEP_TIME\");\n float crsElapsedTime = (float) m.get(\"CRS_ELAPSED_TIME\");\n float actElapsedTime = (float) m.get(\"ACTUAL_ELAPSED_TIME\");\n float arrDelay = (float) m.get(\"ARR_DELAY\");\n float arrDelayMin = (float) m.get(\"ARR_DELAY_NEW\");\n float timeZone = crsArrTime - crsDeptTime - crsElapsedTime;\n float cancelledCheck = timeZone - actElapsedTime;\n float timeModulo = timeZone % 60;\n\n // CRSArrTime and CRSDepTime should not be zero\n // timeZone = CRSArrTime - CRSDepTime - CRSElapsedTime and timeZone % 60 should be 0\n if (crsArrTime == 0 || crsDeptTime == 0 || timeModulo != 0) return false;\n\n // AirportID, AirportSeqID, CityMarketID, StateFips, Wac should be larger than 0\n if ((float) m.get(\"ORIGIN_AIRPORT_ID\") <= 0) return false;\n if ((float) m.get(\"ORIGIN_AIRPORT_SEQ_ID\") <= 0) return false;\n if ((float) m.get(\"ORIGIN_CITY_MARKET_ID\") <= 0) return false;\n if ((float) m.get(\"ORIGIN_STATE_FIPS\") <= 0) return false;\n if ((float) m.get(\"ORIGIN_WAC\") <= 0) return false;\n\n if ((float) m.get(\"DEST_AIRPORT_ID\") <= 0) return false;\n if ((float) m.get(\"DEST_AIRPORT_SEQ_ID\") <= 0) return false;\n if ((float) m.get(\"DEST_CITY_MARKET_ID\") <= 0) return false;\n if ((float) m.get(\"DEST_STATE_FIPS\") <= 0) return false;\n if ((float) m.get(\"DEST_WAC\") <= 0) return false;\n\n // Origin, Destination, CityName, State, StateName should not be empty\n if (m.get(\"ORIGIN\").toString().equals(\"\")) return false;\n if (m.get(\"ORIGIN_CITY_NAME\").toString().equals(\"\")) return false;\n if (m.get(\"ORIGIN_STATE_ABR\").toString().equals(\"\")) return false;\n if (m.get(\"ORIGIN_STATE_NM\").toString().equals(\"\")) return false;\n if (m.get(\"DEST\").toString().equals(\"\")) return false;\n if (m.get(\"DEST_CITY_NAME\").toString().equals(\"\")) return false;\n if (m.get(\"DEST_STATE_ABR\").toString().equals(\"\")) return false;\n if (m.get(\"DEST_STATE_NM\").toString().equals(\"\")) return false;\n\n // For flights that are not Cancelled: ArrTime - DepTime - ActualElapsedTime - timeZone should be zero\n if ((boolean)m.get(\"CANCELLED\") && cancelledCheck != 0) return false;\n\n // if ArrDelay > 0 then ArrDelay should equal to ArrDelayMinutes if ArrDelay < 0 then ArrDelayMinutes should be zero\n // if ArrDelayMinutes >= 15 then ArrDel15 should be true\n if (arrDelay > 0 && arrDelay != arrDelayMin) return false;\n if (arrDelay < 0 && arrDelayMin != 0) return false;\n if (arrDelayMin >= 15 && !(boolean)m.get(\"ARR_DEL15\")) return false;\n\n return true;\n }", "AirportDTO getAirportById(Long id);", "public String getArrivalAirport();", "private boolean isAirlineCodenameValid(String airlineCodename) {\n\n\t\t// return airline database content through given list\n\t\tArrayList<Airline> listOfAirlines = (ArrayList<Airline>) airlinedb.fetchDatabaseContent();\n\n\t\tfor (int i = 0; i < listOfAirlines.size(); i++) {\n\t\t\tString airlineCodenameFromList = listOfAirlines.get(i).getAirlineCodename();\n\t\t\tif (airlineCodenameFromList.equals(airlineCodename)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Airline codename is not in database.\");\n\t\treturn false;\n\t}", "public void validate_the_Town_City_of_Installation_Address_in_Customer_Tab(String TownCity)throws Exception {\n\t\tVerifyElementPresentAndClick(Desktop_XPATH_Verify_Customer_Page_CorrespondenceAddress.replaceAll(\"M_Header\", \"Installation Address\").replaceAll(\"M_Category\", \"Town/City\").replaceAll(\"M_InnerText\", TownCity), \"Town/City of Installation Address - \"+TownCity);\n\t\t\t\n\t\t\t\n\t\t\n\t}", "public final void c() throws AMapException {\n if (this.f != null) {\n at atVar = new at(this.i, \"\");\n atVar.a(this.i);\n List list = (List) atVar.c();\n if (this.c != null) {\n this.f.a((List<OfflineMapProvince>) list);\n }\n synchronized (this.c) {\n Iterator<OfflineMapProvince> it = this.f.a().iterator();\n while (it.hasNext()) {\n Iterator<OfflineMapCity> it2 = it.next().getCityList().iterator();\n while (it2.hasNext()) {\n OfflineMapCity next = it2.next();\n for (al next2 : this.c) {\n if (next.getPinyin().equals(next2.getPinyin())) {\n String version = next2.getVersion();\n if (next2.getState() != 4 || d.length() <= 0 || !b(d, version)) {\n next2.setCity(next.getCity());\n next2.setUrl(next.getUrl());\n next2.setAdcode(next.getAdcode());\n next2.setVersion(next.getVersion());\n next2.setSize(next.getSize());\n next2.setCode(next.getCode());\n next2.setJianpin(next.getJianpin());\n next2.setPinyin(next.getPinyin());\n } else {\n next2.j();\n next2.setUrl(next.getUrl());\n }\n }\n }\n }\n }\n }\n }\n }", "java.lang.String getDepartureAirportCode();", "private void fillCity() {\n \n if(postalCodeTF.getText().length() == 4){\n City city = memberConnection.getCity(postalCodeTF.getText());\n cityTF.setText(city.getCity().replaceAll(\"_\", \" \"));\n municipalTF.setText(city.getMunicipal().replaceAll(\"_\", \" \"));\n }\n }", "java.lang.String getDepartureAirport();", "public void setOriginAirport(java.lang.String originAirport) {\r\n this.originAirport = originAirport;\r\n }", "@Test(priority = 4)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_CityAndStateCode() {\n\t\tWeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"London_City_State\"), ConfigFileReader.getProperty(\"appid\"),\n\t\t\t\t200);\n\n\t}", "public com.google.protobuf.ByteString\n getTransitAirportCityBytes() {\n java.lang.Object ref = transitAirportCity_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n transitAirportCity_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private boolean isExists(City c){\r\n\t\tfor(City i:map.getVerteices()){\r\n\t\t\tif (i.equals(c)){\r\n\t\t\t\treturn true;\r\n\t\t\t}}\r\n\t\treturn false;\r\n\r\n\t}", "com.google.protobuf.ByteString\n getDepartureAirportCityBytes();", "@Test\n public void testAvailableAirportsNumber() {\n assertThat(Airport.values()).hasSize(9);\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "@JsonIgnore public Collection<Airport> getDepartureAirports() {\n final Object current = myData.get(\"departureAirport\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Airport>) current;\n }\n return Arrays.asList((Airport) current);\n }", "public Builder setTransitAirportCityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n transitAirportCity_ = value;\n onChanged();\n return this;\n }", "java.lang.String getArrivalAirport();", "public java.lang.String getTransitAirportCity() {\n java.lang.Object ref = transitAirportCity_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n transitAirportCity_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getDepartureAirportCityBytes() {\n java.lang.Object ref = departureAirportCity_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n departureAirportCity_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getArrivalAirportCityBytes();", "public static ArrayList<Airport> getAirport() throws DBException {\r\n Connection con = null;\r\n try {\r\n con = DBConnector.getConnection();\r\n Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);\r\n \r\n String sql = \"SELECT airportcode \"\r\n + \"FROM airport\";\r\n \r\n ResultSet srs = stmt.executeQuery(sql);\r\n \r\n ArrayList<Airport> airports = new ArrayList<Airport>();\r\n \r\n while (srs.next())\r\n airports.add(getAirport(srs.getString(\"airportcode\")));\r\n \r\n DBConnector.closeConnection(con);\r\n \r\n return airports;\r\n } \r\n \r\n catch (DBException dbe) {\r\n dbe.printStackTrace();\r\n DBConnector.closeConnection(con);\r\n throw dbe;\r\n } \r\n \r\n catch (Exception ex) {\r\n ex.printStackTrace();\r\n DBConnector.closeConnection(con);\r\n throw new DBException(ex);\r\n }\r\n }", "public Builder clearDepartureAirportCity() {\n \n departureAirportCity_ = getDefaultInstance().getDepartureAirportCity();\n onChanged();\n return this;\n }", "public void setFlightSet(AirportDTO airportDTO, Airport airport) {\n Set<Flight> flightSet = new HashSet<>();\n for (FlightDTO flightDTO : airportDTO.getFlightDTOSet()) {\n Flight flight = new Flight();\n flight.setFlightDepartureDate(flightDTO.getFlightDepartureDate());\n flight.setFlightDepartureTime(flightDTO.getFlightReturnTime());\n flight.setFlightReturnDate(flightDTO.getFlightReturnDate());\n flight.setFlightReturnTime(flightDTO.getFlightReturnTime());\n flight.setFlightTo(flightDTO.getFlightTo());\n flight.setPrice(flightDTO.getPrice());\n flight.setAvailableSeats(flightDTO.getAvailableSeats());\n flight.setAirport(airport);\n flightSet.add(flight);\n }\n airport.setFlightSet(flightSet);\n }", "public boolean isCityValid() throws BusinessRuleException {\n\t\tif ((\"EUR\".equalsIgnoreCase(Version.CURRENT_REGION))) {\n\t\t\tif (txtCity.getText().trim().length() > 0)\n\t\t return true;\n\t\t} else if (!addressPanelType.trim().equalsIgnoreCase(SHIPPING_ADDRESS_PANEL) \n\t\t\t\t|| txtCity.getText().trim().length() > 0) {\n\t\t\treturn true;\n\t\t}\n\t\ttxtCity.requestFocus();\n\t\tthrow new BusinessRuleException(RESOURCE.getString(\"Town / City: This field is required.\"));\n\t}", "public java.lang.String getDepartureAirportCity() {\n java.lang.Object ref = departureAirportCity_;\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 departureAirportCity_ = s;\n return s;\n }\n }", "@Test\n\tpublic void validateAll() {\n\n\t\tgiven()\n\t\t.when()\n\t\t.get(\"https://restcountries.eu/rest/v2/all\")\n\t\t.then()\n\t\t.and().body(\"name\", hasItem(\"India\"))\n\t\t.and().body(\"find { d -> d.name == 'India' }.borders\", hasItem(\"CHN\"));\n\n\t\tString name = returnValueByKeys(\"India\", \"name\");\n\t\tString capital = returnValueByKeys(\"India\", \"capital\");\n\t\tString region = returnValueByKeys(\"India\", \"region\");\n\t\tString population = returnValueByKeys(\"India\", \"population\");\n\t\tList borders = returnValuesByKeys(\"India\", \"borders\");\n\n\t\tSystem.out.println(name + \" \" + capital + \" \" + region + \" \" + population);\n\t\tfor (Object border : borders) {\n\t\t\tSystem.out.print(border + \" \");\n\t\t}\n\n\t}", "public static Location getLocationByAirportCode(String airportCode){\n\ttry (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(\"SELECT * from Location \"\n + \"WHERE AirportCode = '\" + airportCode + \"'\")){\n \n while (resultSet.next()) {\n \tLocation location = new Location();\n \tlocation.setCity(resultSet.getString(\"City\"));\n \tlocation.setAirportCode(resultSet.getString(\"AirportCode\"));\n \treturn location;\n }\n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n return null;\n }", "public String getAirportCode(){\n\t\treturn this.airportCode;\n\t}", "boolean canPlaceCity(VertexLocation vertLoc);", "public com.google.protobuf.ByteString\n getTransitAirportCityBytes() {\n java.lang.Object ref = transitAirportCity_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n transitAirportCity_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setFlightDTOSet(Airport airport, AirportDTO airportDTO) {\n Set<FlightDTO> flightDTOSet = new HashSet<>();\n for (Flight flight : airport.getFlightSet()) {\n FlightDTO flightDTO = new FlightDTO();\n flightDTO.setFlightDepartureDate(flight.getFlightDepartureDate());\n flightDTO.setFlightDepartureTime(flight.getFlightDepartureTime());\n flightDTO.setFlightReturnDate(flight.getFlightReturnDate());\n flightDTO.setFlightReturnTime(flight.getFlightReturnTime());\n flightDTO.setFlightTo(flight.getFlightTo());\n flightDTO.setPrice(flight.getPrice());\n flightDTO.setAvailableSeats(flight.getAvailableSeats());\n flightDTOSet.add(flightDTO);\n }\n airportDTO.setFlightDTOSet(flightDTOSet);\n }", "@JsonIgnore public Collection<Airport> getArrivalAirports() {\n final Object current = myData.get(\"arrivalAirport\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Airport>) current;\n }\n return Arrays.asList((Airport) current);\n }", "private void fillCitiesTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(INIT.GET_CITY.toString())) {\n if (!rs.next()) {\n try (PreparedStatement ps = connection.prepareStatement(INIT.FILL_CITIES.toString())) {\n connection.setAutoCommit(false);\n ParseSiteForCities parse = new ParseSiteForCities();\n for (City city : parse.parsePlanetologDotRu()) {\n ps.setString(1, city.getCountry());\n ps.setString(2, city.getCity());\n ps.addBatch();\n }\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n }\n\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "public City() {\n connects = new HashMap<String, ArrayList<Flight>>();\n }", "public Airport(int X, int Y, int Fees) {\r\n\t\tthis.X=X;\r\n\t\tthis.Y=Y;\r\n\t\tthis.AirportFees=Fees;\r\n\t}", "private void assignCapitals() {\n City bestCity = null;\n int mostLandTilesSurrounding = 0;\n int landTilesSurrounding = 0;\n int minRow = 0;\n int maxRow = 0;\n int minColumn = 0;\n int maxColumn = 0;\n if (numPlayers == 2) {\n for (int i = 0; i < 2; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n } else if (numPlayers == 3) {\n\n for (int i = 0; i < 3; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = MAP_LENGTH / 2;\n maxColumn = MAP_LENGTH - 1;\n } else if (i == 2) {\n minRow = MAP_LENGTH / 2;\n maxRow = MAP_LENGTH - 1;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n System.out.println(\"Capital city of player \" + i + \" is at \" + bestCity.getCol() + \", \" + bestCity.getRow()); //For checking capital city determination\n }\n } else if (numPlayers == 4) {\n for (int i = 0; i < 4; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n } else if (i == 2) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 3) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n }\n }", "public void setDestinationAirport(java.lang.String destinationAirport) {\r\n this.destinationAirport = destinationAirport;\r\n }", "public void setContinent(AirportDTO airportDTO, Country country) {\n Continent continentFound = continentDAO.findContinentByName(airportDTO.getCityDTO().getCountryDTO().getContinentDTO().getName());\n if (continentFound != null) {\n country.setContinent(continentFound);\n } else {\n Continent continent = new Continent();\n continent.setName(airportDTO.getCityDTO().getCountryDTO().getContinentDTO().getName());\n country.setContinent(continent);\n }\n }", "boolean isCitySelected();", "public List<Airport> allAirports() {\n\t\ttry {\n\t\t\tList<Airport> airPosrtList = airPortCache.get(FlightConstants.AIRPORT_KEY);\n\t\t\treturn airPosrtList;\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(\"Exception occured while searching AirPorts {}\", exception);\n\t\t\tthrow new AirPortSearchException();\n\t\t}\n\t}", "@Test\n\t@Title(\"TC_010:Verify that the daily forecast data is returned correctly for the searched City Name\")\n\t \n\tpublic void TC_010_Verify_DailyForCast_Is_Returned_For_ValidCity() {\n\t\t\n\t\tLocation city = new Location();\n\t\t\n\t\tcity = DataReader.RetrieveLocationFromFile(\"data.json\").get(0);\n\t\t\n\t\tcity.weather = new Weather(\"C\");\n\t\t\n\t\t\t\t\n\t\t//Steps:\n\t\t//1. Access to the site\n\t\tendUser.access_Site();\n\t\t\n\t\t//Search Weather by CityName\n\t\tendUser.SearchWeatherbyCityName(city);\n\t\t\n\t\t//Assume that the test application is triggering the correct API as expectation: OncCall\n\t\tcity = endUser.getWeatherInfoViaAPIResponse(city);\n\t\t\n\t\tendUser.Validate_DailyForcastList(7,city);\n\t\t\n\t\tendUser.Validate_DailyForcastDetail_AllDay(city);\n\t\t\n\t\tAssert.assertTrue(TestConfigs.glb_TCFailedMessage, TestConfigs.glb_TCStatus);\n\t}", "public void validarTareasDepartamento(){\r\n\t\tif ((this.equipo != null) && !(this.equipo.isEmpty()) ){\r\n\t\t\tthis.equipo = gerente.validarTareasEquipo(this.equipo);\r\n\t\t}\r\n\t}" ]
[ "0.65867203", "0.6076825", "0.6016574", "0.57935095", "0.5765777", "0.5633724", "0.5630206", "0.5609411", "0.55999273", "0.5597356", "0.5577616", "0.5567426", "0.55157536", "0.5494862", "0.5476031", "0.54100716", "0.53995126", "0.5382538", "0.5363256", "0.5308594", "0.530185", "0.5289938", "0.5288846", "0.52786756", "0.52726406", "0.5269743", "0.5257124", "0.52564824", "0.52523375", "0.5239996", "0.5227698", "0.5217037", "0.5217", "0.52116466", "0.52104664", "0.5199576", "0.51963156", "0.51796937", "0.5156288", "0.51360255", "0.5123381", "0.51158905", "0.5091667", "0.50673586", "0.50651467", "0.50618994", "0.5054341", "0.5053403", "0.50415194", "0.50401443", "0.5036833", "0.5031471", "0.50164163", "0.50146186", "0.5012246", "0.50090075", "0.5006386", "0.500077", "0.50003254", "0.49940562", "0.4990548", "0.49886632", "0.49881357", "0.49855998", "0.49836534", "0.49774283", "0.49693638", "0.49660212", "0.49544135", "0.49473336", "0.49427608", "0.4930347", "0.4921704", "0.4918373", "0.4916717", "0.49017355", "0.49013814", "0.49008814", "0.48953772", "0.48946396", "0.4894073", "0.48914963", "0.48907125", "0.48884356", "0.48867172", "0.48836005", "0.48762578", "0.487017", "0.48656103", "0.48621464", "0.48580858", "0.48567453", "0.4847207", "0.4844638", "0.48402345", "0.4838456", "0.48378825", "0.48376465", "0.48262483", "0.48182517", "0.48079953" ]
0.0
-1
own transaction handling because of
@Test(expected = NotFoundException.class) public void testDeleteEntityFromGDC() { Transaction tx = graphDatabaseContext.beginTx(); Person p = new Person("Michael", 35); Person spouse = new Person("Tina", 36); p.setSpouse(spouse); long id = spouse.getId(); graphDatabaseContext.removeNodeEntity(spouse); tx.success(); tx.finish(); Assert.assertNull("spouse removed " + p.getSpouse(), p.getSpouse()); NodeFinder<Person> finder = finderFactory.createNodeEntityFinder(Person.class); Person spouseFromIndex = finder.findByPropertyValue(Person.NAME_INDEX, "name", "Tina"); Assert.assertNull("spouse not found in index",spouseFromIndex); Assert.assertNull("node deleted " + id, graphDatabaseContext.getNodeById(id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void commitTx() {\n \n }", "@Override\n public void rollbackTx() {\n \n }", "public void beginTransaction() {\n\r\n\t}", "public void beginTransaction() throws Exception;", "Transaction getCurrentTransaction();", "Transaction beginTx();", "IDbTransaction beginTransaction();", "@Override\r\n\t\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\r\n\t\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\t\tsqlLogInspetor.enable();\r\n\r\n\t\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t\tmasterAEnt.setBlobLazyB(null);\r\n\t\t\t\t\targ0.flush();\r\n\t\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}", "public void commitTransaction() {\n\r\n\t}", "void beginTransaction();", "@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\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsInJhd0tleVZhbHVlcyI6WyIxIiwiMSJdLCJyYXdLZXlUeXBlTmFtZXMiOlsiamF2YS5sYW5nLkludGVnZXIiLCJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tMasterBEnt masterBEnt = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29tcCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAiLCJyYXdLZXlWYWx1ZXMiOlsiMSIsIjEiXSwicmF3S2V5VHlwZU5hbWVzIjpbImphdmEubGFuZy5JbnRlZ2VyIiwiamF2YS5sYW5nLkludGVnZXIiXX0\");\r\n\t\t\t\tMasterBComp masterBComp = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAuZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIiwiMSJdLCJyYXdLZXlUeXBlTmFtZXMiOlsiamF2YS5sYW5nLkludGVnZXIiLCJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> compDetailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29tcCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAubWFzdGVyQkNvbXBDb21wIiwicmF3S2V5VmFsdWVzIjpbIjEiLCIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciIsImphdmEubGFuZy5JbnRlZ2VyIl19\");\r\n\t\t\t\tMasterBCompComp masterBCompComp = PlayerManagerTest.this.manager.getBySignature(signatureBean);\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAubWFzdGVyQkNvbXBDb21wLmRldGFpbEFFbnRDb2wiLCJyYXdLZXlWYWx1ZXMiOlsiMSIsIjEiXSwicmF3S2V5VHlwZU5hbWVzIjpbImphdmEubGFuZy5JbnRlZ2VyIiwiamF2YS5sYW5nLkludGVnZXIiXX0\");\r\n\t\t\t\tCollection<DetailAEnt> compCompDetailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tAssert.assertThat(\"masterBEnt.getMasterBComp(), sameInstance(masterBComp)\", masterBEnt.getMasterBComp(), sameInstance(masterBComp));\r\n\t\t\t\tAssert.assertThat(\"masterBEnt.getMasterBComp().getMasterBCompComp(), sameInstance(masterBCompComp)\", masterBEnt.getMasterBComp().getMasterBCompComp(), sameInstance(masterBCompComp));\r\n\t\t\t\t\r\n\t\t\t\tAssert.assertThat(\"masterBComp.getMasterBCompComp(), sameInstance(masterBCompComp)\", masterBComp.getMasterBCompComp(), sameInstance(masterBCompComp));\r\n\t\t\t\tAssert.assertThat(\"detailAEntCol, not(sameInstance(compDetailAEntCol))\", detailAEntCol, not(sameInstance(compDetailAEntCol)));\r\n\t\t\t\tAssert.assertThat(\"detailAEntCol, not(sameInstance(compCompDetailAEntCol))\", detailAEntCol, not(sameInstance(compCompDetailAEntCol)));\r\n\t\t\t\tAssert.assertThat(\"compDetailAEntCol, not(sameInstance(compCompDetailAEntCol))\", compDetailAEntCol, not(sameInstance(compCompDetailAEntCol)));\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}", "protected abstract Transaction createAndAdd();", "@Override\n\tpublic void onTransactionStart() {}", "public void rollbackTx()\n\n{\n\n}", "Transaction createTransaction();", "@Override\n public void startTx() {\n \n }", "@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}", "@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}", "protected abstract Object getTransactionObject() throws TransactionInfrastructureException;", "public void forceCommitTx()\n{\n}", "@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\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCol);\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\n public void doAfterTransaction(int result) {\n\n }", "void commitTransaction();", "@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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<DetailAEnt> detailAEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, DetailAEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.masterA.id\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.subId\")).list();\r\n\t\t\t\t\r\n\t\t\t\tList<DetailACompId> detailACompIdList = new ArrayList<>();\r\n\t\t\t\tfor (DetailAEnt detailAEnt : detailAEntList) {\r\n\t\t\t\t\tdetailACompIdList.add(detailAEnt.getCompId());\r\n\t\t\t\t\tPlayerManagerTest.this.manager.registerComponentOwner(DetailAEnt.class, detailAEnt.getCompId(), d -> d.getCompId());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<DetailACompId>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailACompIdList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterAEnt> masterAEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterAEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"id\")).list();\r\n\t\t\t\tList<MasterAWrapper> masterAWrapperList = new ArrayList<>();\r\n\t\t\t\tfor (MasterAEnt masterAEnt : masterAEntList) {\r\n\t\t\t\t\tMasterAWrapper masterAWrapper = new MasterAWrapper();\r\n\t\t\t\t\tmasterAWrapper.setMasterA(masterAEnt);\r\n\t\t\t\t\tmasterAWrapper.setDetailAWrapperList(new ArrayList<>());\r\n\t\t\t\t\tmasterAWrapper.setDetailAEntCol(new ArrayList<>(masterAEnt.getDetailAEntCol()));\r\n\t\t\t\t\tfor (DetailAEnt detailAEnt : masterAEnt.getDetailAEntCol()) {\r\n\t\t\t\t\t\tDetailAWrapper detailAWrapper = new DetailAWrapper();\r\n\t\t\t\t\t\tdetailAWrapper.setDetailA(detailAEnt);\r\n\t\t\t\t\t\tmasterAWrapper.getDetailAWrapperList().add(detailAWrapper);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmasterAWrapperList.add(masterAWrapper);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAWrapper>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAWrapperList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "public Object doInTransaction(TransactionStatus status) {\n sendEvent();\n sendEvent();\n sendEvent();\n sendEvent();\n status.setRollbackOnly();\n return null;\n }", "@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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<DetailAEnt> detailAEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, DetailAEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.masterA.id\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.subId\")).list();\r\n\t\t\t\t\r\n\t\t\t\tList<DetailACompId> detailACompIdList = new ArrayList<>();\r\n\t\t\t\tfor (DetailAEnt detailAEnt : detailAEntList) {\r\n\t\t\t\t\tdetailACompIdList.add(detailAEnt.getCompId());\r\n\t\t\t\t\tPlayerManagerTest.this.manager.registerComponentOwner(detailAEnt, d -> d.getCompId());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<DetailACompId>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailACompIdList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<DetailAEnt> detailAEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, DetailAEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.masterA.id\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.subId\")).list();\r\n\t\t\t\t\r\n\t\t\t\tList<DetailACompComp> detailACompIdList = new ArrayList<>();\r\n\t\t\t\tfor (DetailAEnt detailAEnt : detailAEntList) {\r\n\t\t\t\t\tdetailACompIdList.add(detailAEnt.getDetailAComp().getDetailACompComp());\r\n\t\t\t\t\tPlayerManagerTest.this.manager.registerComponentOwner(\r\n\t\t\t\t\t\t\tDetailAEnt.class, \r\n\t\t\t\t\t\t\tdetailAEnt.getDetailAComp().getDetailACompComp(),\r\n\t\t\t\t\t\t\td -> d.getDetailAComp().getDetailACompComp());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<DetailACompComp>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailACompIdList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "void startTransaction();", "@Override\n public void commit() {\n }", "IDbTransaction beginTransaction(IsolationLevel il);", "@Override\n\tpublic void joinTransaction() {\n\t\t\n\t}", "@Override\n public Object doInTransaction(TransactionStatus transactionStatus) {\n transactionStatus.setRollbackOnly();\n return null;\n }", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "void readOnlyTransaction();", "@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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<DetailAEnt> detailAEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, DetailAEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.masterA.id\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.subId\")).list();\r\n\t\t\t\t\r\n\t\t\t\tList<DetailACompComp> detailACompIdList = new ArrayList<>();\r\n\t\t\t\tfor (DetailAEnt detailAEnt : detailAEntList) {\r\n\t\t\t\t\tdetailACompIdList.add(detailAEnt.getDetailAComp().getDetailACompComp());\r\n\t\t\t\t\tPlayerManagerTest.this.manager.registerComponentOwner(detailAEnt, d -> d.getDetailAComp());\r\n\t\t\t\t\tPlayerManagerTest.this.manager.registerComponentOwner(detailAEnt.getDetailAComp(), dc -> dc.getDetailACompComp());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<DetailACompComp>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailACompIdList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "protected abstract void commitIndividualTrx();", "public Object doInTransaction(TransactionStatus status) {\n\t\t\t\tlog.debug(\"Start Transaction\");\n\t\t\t\tquery_insertStudent.update(param);\n\n\t\t\t\t/*\n\t\t\t\t * activate the following error line to create an Error which\n\t\t\t\t * terminates this method. One will see, that the complete\n\t\t\t\t * transaction is rolled back, hence the insert statement above\n\t\t\t\t * is not executed, alternatively the second rollback statement\n\t\t\t\t * can be activated with the same result which in that case is a\n\t\t\t\t * manual rollback of the transaction\n\t\t\t\t */\n\n\t\t\t\t// if (true) throw new Error(\"Test Exception\");\n\t\t\t\t// or\n\t\t\t\t// status.setRollbackOnly();\n\t\t\t\t/*\n\t\t\t\t * result from query is a list, actually containing only one row\n\t\t\t\t * and one column\n\t\t\t\t */\n\t\t\t\tList<?> results = query_getStudentId.execute();\n\t\t\t\tInteger id = (Integer) results.get(0);\n\t\t\t\tlog.debug(\"End Transaction\");\n\t\t\t\treturn id;\n\t\t\t\t/*\n\t\t\t\t * and the transaction ends here! if no error occurs the\n\t\t\t\t * transaction is committed by Spring otherwise it is rolled\n\t\t\t\t * back\n\t\t\t\t */\n\t\t\t}", "@Override\n\tpublic void commit() {\n\n\t}", "@Test\n public void processTransactionManagerCaseD()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n acc_db.addAccount(acc3);\n\n trans_mang.processTransaction(acc.get_Account_Number(), acc2.get_Account_Number(), 30);\n\n Assert.assertEquals(false,trans_mang.processTransaction(acc.get_Account_Number(),acc3.get_Account_Number(),30));\n }", "@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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "protected abstract boolean commitTxn(Txn txn) throws PersistException;", "public int startTransaction();", "Transaction getTransaction() { \r\n return tx;\r\n }", "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 }", "@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\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterAEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\t\r\n\t\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\t\r\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\t\tList<MasterAEnt> masterAEntList = hbSupport.createCriteria(ss, MasterAEnt.class)\r\n\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"id\")).list();\r\n\t\t\t\t\t\r\n\t\t\t\t\tPlayerManagerTest.this.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest.this.manager.getConfig().clone()\r\n\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\t\r\n\t\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\t\r\n\t\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}", "public void openTheTransaction() {\n openTransaction();\n }", "@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 }", "@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}", "@Test\n public void processTransactionManagerCaseC()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n acc_db.addAccount(acc3);\n\n\n trans_mang.processTransaction(acc.get_Account_Number(), acc2.get_Account_Number(), 30);\n\n Assert.assertEquals(false,trans_mang.processTransaction(acc3.get_Account_Number(),acc2.get_Account_Number(),30));\n }", "@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\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "void rollback() {\r\n tx.rollback();\r\n tx = new Transaction();\r\n }", "protected void reuseTxn(Txn txn) throws Exception {\r\n }", "public int orderCountByUser(int userId)throws ApplicationEXContainer.ApplicationCanNotChangeException{\n int count;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n count = orderDao.orderCountByUser(connection,userId);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return count;\n}", "private void doRollback() throws TransactionInfrastructureException {\n\t\t// DO WE WANT TO ROLL\n\t\t//\t\tif (isTransactionalMethod(m))\n\t\tObject txObject = getTransactionObject();\n\t\tif (txObject == null)\n\t\t\tthrow new TransactionInfrastructureException(\"Cannot rollback transaction: don't have a transaction\");\n\t\trollback(txObject);\n\t}", "protected abstract Object newTransaction(int isolationLevel) throws TransactionInfrastructureException;", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\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\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "public void createTransaction(Transaction trans);", "@Override\r\n\t\tpublic void rollback() throws SQLException {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\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 }", "protected Transaction getTransaction() {\n return sessionFactory.getCurrentSession().getTransaction();\n }", "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}", "public void authorizeTransaction() {}", "@Override\n\tpublic void rollBack() {\n\n\t}", "public void commit(){\n \n }", "private void switchRelations() throws TransactionAbortedException, DbException {\n // IMPLEMENT ME\n }", "@Override\r\n\t\tpublic void setTransactionIsolation(int level) throws SQLException {\n\t\t\t\r\n\t\t}", "public abstract void commit();", "@Override\n public void rollback() throws SQLException {\n if (isTransActionAlive()) {\n getTransaction().rollback();\n }\n }", "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "private MetaSparqlRequest createRollbackPreInsered() {\n\t\treturn createRollbackMT1();\n\t}", "void rollbackTransaction();", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }", "@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 }", "@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}", "@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\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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}", "public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }", "public void beginTransaction() throws TransactionException {\n\t\t\r\n\t}", "public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }", "void commit(Transaction transaction);", "T handle(Tx tx) throws Exception;", "@Test\n public void existingTransaction() {\n Transaction t1 = startTransaction();\n IntRef intValue = new IntRef(10);\n t1.commit();\n\n Transaction t2 = startTransaction();\n assertEquals(10, intValue.get());\n\n intValue.inc();\n assertEquals(11, intValue.get());\n t2.commit();\n }", "@Override\r\n\t\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\r\n\t\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\t\tsqlLogInspetor.enable();\r\n\r\n\t\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t\tSystem.out.println(\"$$$$: \" + masterAEnt.getDatetimeA());\r\n\t\t\t\t\tSystem.out.println(\"$$$$: \" + masterAEnt.getDatetimeA().getTime());\r\n\r\n\t\t\t\t\tPlayerManagerTest.this.manager.overwriteConfigurationTemporarily(PlayerManagerTest.this.manager\r\n\t\t\t\t\t\t\t.getConfig().clone().configSerialiseBySignatureAllRelationship(true));\r\n\r\n\t\t\t\t\tPlayerSnapshot<MasterAEnt> playerSnapshot = PlayerManagerTest.this.manager\r\n\t\t\t\t\t\t\t.createPlayerSnapshot(masterAEnt);\r\n\r\n\t\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\t\tPlayerManagerTest.this.manager.getConfig().getObjectMapper().writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsqlLogInspetor.disable();\r\n\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}", "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 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 }", "private void restoreAndRelease() {\n try (Connection c = connection) {\n c.setAutoCommit(autoCommit);\n } catch (SQLException e) {\n throw new UncheckedSQLException(e);\n }\n }", "public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "public void updateTransaction(Transaction trans);", "@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 }", "protected abstract void rollbackIndividualTrx();", "public void testCommitOrRollback() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n startService();\n Connection conn = sqlDbManager.getConnection();\n Logger logger = Logger.getLogger(\"testCommitOrRollback\");\n SqlDbManager.commitOrRollback(conn, logger);\n SqlDbManager.safeCloseConnection(conn);\n\n conn = null;\n try {\n SqlDbManager.commitOrRollback(conn, logger);\n } catch (NullPointerException sqle) {\n }\n }", "void beginTransaction(ConnectionContext context) throws IOException;", "@Override\r\n\t\tpublic int getTransactionIsolation() throws SQLException {\n\t\t\treturn 0;\r\n\t\t}", "private static synchronized void writeTransaction( StmTransaction transaction ) {\n\n // Check for conflicts.\n for ( AbstractVersionedItem versionedItem : transaction.versionedItemsRead ) {\n versionedItem.ensureNotWrittenByOtherTransaction();\n }\n\n // Set the revision number to a committed value.\n transaction.targetRevisionNumber.set( lastCommittedRevisionNumber.incrementAndGet() );\n\n }", "void endTransaction();", "@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\tSystem.out.println(\"$$$$: \" + masterAEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterAEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterAEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\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\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 }" ]
[ "0.7084265", "0.69228685", "0.6856873", "0.6844814", "0.68447196", "0.67623", "0.67584676", "0.66778517", "0.6677601", "0.66648364", "0.66596025", "0.6573303", "0.6560272", "0.655164", "0.6544688", "0.65387106", "0.65360296", "0.6535951", "0.65321064", "0.6493491", "0.64903015", "0.6453687", "0.64160824", "0.64151746", "0.640964", "0.64077646", "0.6400467", "0.63977444", "0.6395676", "0.6388242", "0.6384941", "0.6380449", "0.6371027", "0.6369542", "0.6363889", "0.6355311", "0.63305354", "0.6317283", "0.63128495", "0.63108486", "0.62942743", "0.62942344", "0.629119", "0.62909657", "0.6283512", "0.6250193", "0.62498444", "0.6246901", "0.6244472", "0.62441957", "0.6232612", "0.62312955", "0.62303835", "0.6225777", "0.6216177", "0.6199972", "0.6196762", "0.6194659", "0.6193828", "0.6191597", "0.61858547", "0.6182511", "0.6178624", "0.61730266", "0.61605436", "0.6159696", "0.6153734", "0.6151367", "0.61473435", "0.61453366", "0.6139363", "0.6138008", "0.61188585", "0.6115496", "0.6113896", "0.6103386", "0.6100366", "0.60966617", "0.60933334", "0.6086605", "0.6062111", "0.60509545", "0.6042574", "0.604049", "0.603959", "0.6036157", "0.59949905", "0.59877825", "0.59856564", "0.5975786", "0.59745306", "0.59735817", "0.59718585", "0.595925", "0.59588325", "0.59545594", "0.59536654", "0.5951664", "0.59430885", "0.5942813", "0.5925741" ]
0.0
-1