query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Set number to adapter. | private void setNumber(final int pos, final String number) {
if (pos < 0 || pos >= this.objects.size()) {
Preferences.this.objects.add(number);
} else {
Preferences.this.objects.set(pos, number);
}
Preferences.this.adapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}",
"public void setNumber(int number)\n {\n this.number = number;\n }",
"public void setNumber(int number) {\r\n\t\tthis.num = number;\r\n\t}",
"public void setNumber(String name, int value) {\n itemNumbers.put(name, value);\n }",
"public void setNumber(int number)\n {\n Number = number;\n }",
"public void setNumber(int number) {\n this.number = number;\n }",
"public void setNumber(int number) {\r\n\t\tthis.number = number;\r\n\t}",
"public void setNumber(Integer number) {\r\n this.number = number;\r\n }",
"public void setNumber(String newValue);",
"public void setNumber(int number) {\n\t\tthis.number = number;\n\t}",
"public void setNumber(int number) {\n\t\tthis.number = number;\n\t}",
"public void setNumber(int number) {\n\t\tthis.number = number;\n\t}",
"public void setNumber(Integer number) {\n this.number = number;\n }",
"@Override\r\npublic void setNumber(int number) {\n\tsuper.setNumber(number);\r\n}",
"void SetItemNumber(int ItemNumber);",
"public void setNum(int num) {\r\n this.num = num;\r\n }",
"public void setNumber(String number) {\n this.number = number;\n }",
"public void setNumero(int index, int value){\r\n\t\tnumeros.set(index, value);\r\n\t}",
"public void setNumber(String number) {\r\n\t\tthis.number = number;\r\n\t}",
"public Builder setNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n number_ = value;\n onChanged();\n return this;\n }",
"public void setValue(Number value) {\n\t\tspinner.setValue(value);\n\t\tintegerTextField.setValue(value.longValue());\n\n\t\tfireStateChanged();\n\t}",
"public Builder setNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n number_ = value;\n onChanged();\n return this;\n }",
"private void setCardNumber() {\n String temp = \"\";\n temp = \"\" + (curIndex + 1) + \"/\" + deckOfCards.size();\n cardNumberString.setText(temp);\n }",
"public void setNum(int num) {\n\t\tthis.num = num;\n\t}",
"@Override\n public void onAmountChange(View view, int amount) {\n item.num = amount;\n }",
"public Series setNumber(IntegerDt theValue) {\n\t\tmyNumber = theValue;\n\t\treturn this;\n\t}",
"public void setDigit(int position, int value) {\r\n array[position] = value;\r\n }",
"public SeriesInstance setNumber(IntegerDt theValue) {\n\t\tmyNumber = theValue;\n\t\treturn this;\n\t}",
"public void setNum(Integer num) {\n this.num = num;\n }",
"public void setNum(Integer num) {\n this.num = num;\n }",
"public Series setNumber( int theInteger) {\n\t\tmyNumber = new IntegerDt(theInteger); \n\t\treturn this; \n\t}",
"void setIdNumber(String idNumber);",
"public void setNum (java.lang.Integer num) {\r\n\t\tthis.num = num;\r\n\t}",
"public void setNumber(int number){\n \t\n int max = (int)Math.pow(10, DIGIT_COUNT)-1;\n if (number < 0 && number > max)\n throw new IllegalArgumentException(\"The number needs to be in range <0, \" + max + \">\");\n \t\n int[] digits = getDigitArray(number);\n \t\n removeAll();\n for (int i = 0; i < digits.length; i++) {\n //labels[i].setIcon(numbers[digits[i]]);\n //Instead seting an icon just create & add new JLabel. As setting\n //an icon invokes repaint and the digits in display might not change at once but one after another.\n //TODO look at better solutions (other than custom painting).\n add(new JLabel(numbers[digits[i]]));\n }\n \t\n revalidate();\n repaint();\n }",
"public SeriesInstance setNumber( int theInteger) {\n\t\tmyNumber = new IntegerDt(theInteger); \n\t\treturn this; \n\t}",
"public void setValue(Number value) {\n this.value = value;\n }",
"public static void setNum(Object holder, Object index, Object value) {\n\n\t\tsetObj(holder, index, new RubyFixnum(getRunTime(holder, index), Long.valueOf(value.toString())));\n\t}",
"public void setNumber(java.lang.String number) {\n this.number = number;\n }",
"public void setInstanceNumber(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(INSTANCENUMBER_PROP.get(), value);\n }",
"public void setInstanceNumber(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(INSTANCENUMBER_PROP.get(), value);\n }",
"public Builder setNumber(java.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\tnumber_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}",
"public void setDrawerNumber(int nr) {\r\n\t\ttxtNumber.setText(\"\" + nr);\r\n\t}",
"public void setData(int data) {\n this.data = data;\n }",
"public void setData(int data) {\n this.data = data;\n }",
"public void setItemNo(int value) {\n this.itemNo = value;\n }",
"public void setData(int data) {\n\t\tthis.data = data;\n\t}",
"@JsonSetter(\"number\")\r\n public void setNumber (String value) { \r\n this.number = value;\r\n }",
"private void setQuestion(int number){\n tv_question.setText(questionsList.get(number).getQuestion());\n\n }",
"public void setNumer(int numer)\n\t{\n\t\tthis.numer = numer;\n\t}",
"void setPhone(int phone);",
"public void setID(Number numID);",
"public void setIdNumber(String idNumber) {\n this.idNumber = idNumber;\n }",
"public void setData(int data)\n\t {\n\t this.data = data;\n\t }",
"public Builder setPostNum(int value) {\n \n postNum_ = value;\n onChanged();\n return this;\n }",
"public void setCounter(int number){\n this.counter = number;\n }",
"public void setNumero(int numero) { this.numero = numero; }",
"public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }",
"private static void setValues( String name, Integer number, Item item ) {\n\t\titem.getItemProperty( \"name\" ).setValue( name );\n\t\titem.getItemProperty( \"number\" ).setValue( number );\n\t\titem.getItemProperty( \"id\" ).setValue( itemId );\n\t\titem.getItemProperty( \"id\" ).setReadOnly( true );\n\t\titemId++;\n\t}",
"public void setValue(Number i) {\n setText(i.toString());\n }",
"@Override // androidx.lifecycle.Observer\n public void onChanged(Integer num) {\n Integer num2 = num;\n if (num2 != null) {\n this.a.c.scrollToPosition(num2.intValue());\n }\n }",
"public void setNumDigits(int digits) {\r\n \r\n //Set Value\r\n numDigits = digits;\r\n \r\n }",
"void setNumber (int col, int row, int number) {\n\t\tboardArray[col][row] = number;\n\t}",
"protected void setNumbertoZero() {\n\t\tnumber = 0;\n\t}",
"public void setSlotNumber(int value) {\n this.slotNumber = value;\n }",
"public void onPressNumber(View view) {\r\n CallHelper.callNumber(this, event.contactNumber);\r\n }",
"public Numbers(int number) {\r\n\t\tthis.number = number;\r\n\t}",
"public void setCardNo(int cardNumber);",
"void bind(int listIndex) {\n\n //listItemNumberView.setText(String.valueOf(listIndex));\n }",
"public synchronized void setTbApWtEntryNumber(Integer value){\n\t\t// Fill up with necessary processing\n\n\t\ttbApWtEntryNumber = value;\n\t}",
"public Builder setNumberBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n number_ = value;\n onChanged();\n return this;\n }",
"public static void setBondNumber(int num)\n {\n \tbondNumber = num;\n }",
"public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }",
"void setQuantity(int quantity) {\n mQuantityTextView.setText(String.valueOf(quantity));\n }",
"public void setTel(Integer tel) {\n this.tel = tel;\n }",
"public void setITEM(int value) {\r\n this.item = value;\r\n }",
"public static void setTrackNumber( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, TRACKNUMBER, value);\r\n\t}",
"public void setInteger(int value){}",
"public void setValue(int value) {\r\n this.value = value;\r\n }",
"public void setID(int number) {\n this.clientNumber = number;\n }",
"public static void setIdNumber(int idNumber) {\n catalogue.idNumber = idNumber;\n }",
"@Override\r\n\tpublic void changeNumber(String name, String newNumber) {\n\t\tfor (Entry e : array[name.toUpperCase().charAt(0) - 'A']) {\r\n\t\t\tif (e.name == name) {\r\n\t\t\t\te.setNumber(newNumber);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setFromNumber(java.lang.String fromNumber)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMNUMBER$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FROMNUMBER$2);\n }\n target.setStringValue(fromNumber);\n }\n }",
"public static void m(int number, int[] numbers){\n number = 1001;\n numbers[0] = 5005;\n }",
"public void setInumber(final String value)\n\t{\n\t\tsetInumber( getSession().getSessionContext(), value );\n\t}",
"public void setAdapter(Adapter adapter) {\n this.adapter = adapter;\n }",
"public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}",
"public void setValue(int value);",
"public void updatedNumber(String key, Number val) {}",
"public Builder setNumberBytes(com.google.protobuf.ByteString value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\t\t\t\t\tcheckByteStringIsUtf8(value);\n\n\t\t\t\t\tnumber_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}",
"public void setValue(int value){\n selectedValue = value;\n currentValue.setText(String.valueOf(value));\n }",
"public void setValue(int n) {\n\t\t\tthis.value = n;\n\t}",
"public void setPhoneNuber(int value) {\r\n this.phoneNuber = value;\r\n }",
"public void setInteger(int value);",
"public void setBikeNum(int NewValue){\n bike = NewValue;\n }",
"public void setAmount(int to) {\n\n if(to>99){\n bankView.setTextSize(100);\n }\n\n bankView.setText(Integer.toString(to));\n // This will never be called when getView() is null\n //noinspection ConstantConditions\n getView().findViewById(R.id.btnArm).setEnabled(to != 0);\n }",
"public void setidnumber(int id) {\r\n idnumber = id;\r\n }",
"public void setValue(int value)\n {\n this.value = value;\n }",
"void setNumber(int row, int col, int num){\n board[row][col].setNumber(num);\n }",
"@Override\n public void setAtomicNumber(int atomicNumber) {\n }",
"public Builder setNumberBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n number_ = value;\n onChanged();\n return this;\n }"
] | [
"0.6909254",
"0.68034095",
"0.6791689",
"0.6770674",
"0.675652",
"0.6753719",
"0.672215",
"0.66374177",
"0.6621348",
"0.6605304",
"0.6605304",
"0.6605304",
"0.65497255",
"0.64965963",
"0.64202344",
"0.6316056",
"0.6302861",
"0.627217",
"0.62647384",
"0.6241831",
"0.6182982",
"0.61402994",
"0.6140147",
"0.6097825",
"0.6096634",
"0.60752517",
"0.60246193",
"0.60189533",
"0.60080945",
"0.60080945",
"0.59952366",
"0.59690106",
"0.5956088",
"0.59495604",
"0.5948881",
"0.5948818",
"0.58953047",
"0.58850574",
"0.58828294",
"0.58774424",
"0.58666146",
"0.58420086",
"0.5819669",
"0.5819669",
"0.579606",
"0.57514644",
"0.57444465",
"0.5708811",
"0.57054436",
"0.5690192",
"0.56826323",
"0.56734514",
"0.56324565",
"0.56085193",
"0.5582705",
"0.55784947",
"0.5576995",
"0.5558174",
"0.5557448",
"0.5538826",
"0.5535844",
"0.5534536",
"0.55325484",
"0.5532041",
"0.5525021",
"0.5521447",
"0.55169255",
"0.5516675",
"0.5500098",
"0.54910713",
"0.54659617",
"0.5458629",
"0.54548466",
"0.5454569",
"0.54341894",
"0.54335946",
"0.543194",
"0.542911",
"0.54260194",
"0.54254895",
"0.54245526",
"0.54214364",
"0.5420357",
"0.54119146",
"0.5409063",
"0.540867",
"0.5403049",
"0.53997874",
"0.53947574",
"0.53941613",
"0.5393835",
"0.5387978",
"0.5385434",
"0.53849494",
"0.53821254",
"0.5374903",
"0.5372064",
"0.5370403",
"0.5370147",
"0.53685087"
] | 0.6601253 | 12 |
Add or edit an item. | private void addEdit(final int pos) {
final AlertDialog.Builder b = new AlertDialog.Builder(this);
b.setTitle(R.string.add_number);
b.setCancelable(true);
final EditText et = new EditText(this);
if (pos >= 0) {
et.setText(this.objects.get(pos));
}
b.setView(et);
b.setNegativeButton(android.R.string.cancel, null);
b.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog,
final int which) {
final String number = et.getText().toString();
if (number == null || number.length() == 0) {
return;
}
Preferences.this.setNumber(pos, number);
Preferences.this.findViewById(R.id.add_hint)
.setVisibility(View.GONE);
}
});
b.setNeutralButton(R.string.contacts,
new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog,
final int which) {
final Intent intent = ContactsWrapper.getInstance()
.getPickPhoneIntent();
Preferences.this
.startActivityForResult(intent, pos + 1);
}
});
b.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void editItem();",
"void add(Item item);",
"public abstract void addItem(AbstractItemAPI item);",
"public void setEditedItem(Object item) {editedItem = item;}",
"Item update(Item item);",
"@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}",
"public final void editItem(Item i) {\n if (i == null) {\n setVisible(false);\n return;\n }\n final boolean persisted = i.getId() != null;\n if (persisted) {\n // Find fresh entity for editing\n item = itemRepository.findById(i.getId()).get();\n } else {\n item = i;\n }\n cancel.setVisible(persisted);\n\n // Bind customer properties to similarly named fields\n // Could also use annotation or \"manual binding\" or programmatically\n // moving values from fields to entities before saving\n binder.setBean(item);\n\n setVisible(true);\n\n // Focus first name initially\n name.focus();\n }",
"public int addItem(Item i);",
"public boolean add(Type item);",
"public void store(Item item) {\n this.items.add(item);\n }",
"public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }",
"@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}",
"public void addItem(Item item) {\n items.add(item);\n }",
"public void addItem(Item item) {\n items.add(item);\n }",
"public void updateItem(Item item) {\n\t\taddItem(item);\n\t}",
"public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}",
"@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}",
"public void addItem(View view) {\n mainActivityPresenter.startEventEditActivity( this);\n }",
"public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}",
"public Object putItem (String key, Object item);",
"@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}",
"@Override\n\tItem save(Item item);",
"@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }",
"public void setItem(Item item) {\n this.item = item;\n }",
"@Override\n public Item vendItem(Item item) {\n allItems.put(item.getItemId(), item);\n return item;\n }",
"void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}",
"public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}",
"public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }",
"public void addItem(Item item) {\n _items.add(item);\n }",
"public void addItem(Item i) {\n this.items.add(i);\n }",
"public boolean putItem(@NonNull Item item) {\n return items.add(item);\n }",
"public @NotNull Item newItem();",
"public void clickOpenEditDialog(Item item){\n /** Store as public reference */\n this.item = item;\n dialogNewItem.show();\n }",
"public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}",
"void updateItem(IDAOSession session, Item item);",
"public abstract void add(T item) throws RepositoryException;",
"private void insertOrUpdateItem(){\n Toaster toaster = new Toaster(getContext());\n DBManager dbManager = new DBManager(getContext());\n if((Afegir.getText() == getText(R.string.actualitza) && updateItem(dbManager)) ||\n (Afegir.getText() == getText(R.string.afegir) && insertItem(dbManager))){\n\n ((MainActivity) getActivity()).swapFrameLayoutVisibility(true);\n ((MainActivity) getActivity()).refreshListView();\n toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.commit_insert).toString(), null);\n reset(true);\n }\n\n else toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.reboke_action).toString(), getContext().getDrawable(R.drawable.ic_error_vector));\n }",
"public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }",
"public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}",
"void addCpItem(ICpItem item);",
"public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}",
"public void insert(KeyedItem newItem);",
"public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }",
"public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}",
"public ModifyItem() {\n initComponents();\n }",
"public void add(E item);",
"public void updateItem(){\n\n System.out.println(\"Update item with ID: \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n System.out.println(\"Enter new characteristics: \");\n System.out.println(\"Name: \");\n String newName = bufferRead.readLine();\n System.out.println(\"Designer: \");\n String newDesigner = bufferRead.readLine();\n System.out.println(\"Price: \");\n int newPrice = Integer.parseInt(bufferRead.readLine());\n ClothingItem newCI = new ClothingItem(newName, newDesigner, newPrice);\n newCI.setId(id);\n this.ctrl.updateItem(newCI);\n\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}",
"public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"public void addItem(Item item) {\n\t\titems.add(item);\n\t}",
"public void addItem(Object obj) {\n items.add(obj);\n }",
"public void addProduct(Product item){\n inventory.add(item);\n }",
"void onEditItem(E itemElementView);",
"public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}",
"void updateItem(E itemElementView);",
"public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}",
"public void setItem(Item item) {\n\t\tthis.item = item;\n\t}",
"public void setItem(Item item) {\n\t\tthis.item = item;\n\t}",
"void insertItem(Position position, IItem item);",
"public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}",
"public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }",
"void add(T item);",
"void setItemId(String itemId);",
"public Item update(Item item) {\n Item existing = getItem(item.getItemId());\n if (existing != null) {\n return existing.setQuantity(item.getQuantity());\n }\n else {\n items.add(item.setCart(this));\n return item;\n }\n }",
"void add(E item);",
"void add(E item);",
"void add(E item);",
"public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}",
"public void saveItem(Items item) {\n\t\tItems item1 = itemDao.getItemByName(item.getItems1());\r\n\t\tif (item1 == null) {\r\n\t\t\titemDao.saveItem(item);\r\n\t\t} else if (item1.getItems1().equalsIgnoreCase(item.getItems1())) {\r\n\t\t\tSystem.out.println(\"Item already exists\");\r\n\t\t}\r\n\t}",
"Product editProduct(Product product);",
"public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }",
"public void add() {\n\t\tcart.add(item.createCopy());\n\t}",
"public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}",
"public void setItem(ItemType item) {\n\t this.item = item;\n\t}",
"public void setItem(ItemType item) {\n\t this.item = item;\n\t}",
"public boolean addPlayerItem(PlayerItem playerItem);",
"public void putItemByKey(String key, Item value) {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an object.\");\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tListSelectionModel lsm = list.getSelectionModel();\r\n\t\t\tint selected = lsm.getMinSelectionIndex();\r\n\r\n\t\t\tItemView itemView = (ItemView) list.getModel().getElementAt(selected);\r\n\r\n\t\t\t// change item\r\n\t\t\tJOptionPane options = new JOptionPane();\r\n\t\t\tObject[] addFields = { \"Name: \", nameTextField, \"Price: \", priceTextField, \"URL: \", urlTextField, };\r\n\t\t\tint option = JOptionPane.showConfirmDialog(null, addFields, \"Edit item\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\t\tString name = nameTextField.getText();\r\n\t\t\t\tString price = priceTextField.getText();\r\n\t\t\t\tString url = urlTextField.getText();\r\n\r\n\t\t\t\tdouble doublePrice = Double.parseDouble(price);\r\n\r\n\t\t\t\titemView.getItem().setName(name);\r\n\t\t\t\titemView.getItem().setCurrentPrice(doublePrice);\r\n\t\t\t\titemView.getItem().setUrl(url);\r\n\t\t\t\t// clear text fields\r\n\t\t\t\tnameTextField.setText(\"\");\r\n\t\t\t\tpriceTextField.setText(\"\");\r\n\t\t\t\turlTextField.setText(\"\");\r\n\t\t\t}\r\n\t\t}",
"public void addItem( Item anItem) {\n currentItems.add(anItem);\n }",
"private void updateItemInStoreList(Item item, String operation) {\n if (item != null) {\n String storeId = item.getItemStoreId();\n if (!TextUtils.isEmpty(storeId)) {\n int storeObjIndex = getIndexIfStoreObjWithIdAlreadyExists(storeId, storeList);\n if (storeObjIndex != -1) {\n Store storeObj = storeList.get(storeObjIndex);\n List<Item> itemList = storeObj.getItems();\n int itemObjIndex = getIndexIfItemObjAlreadyExists(item.getItemId(), itemList);\n if (itemObjIndex != -1) {\n if (operation.equals(EDIT_ITEM_OP))\n itemList.set(itemObjIndex, item);\n else {\n // Delete item\n itemList.remove(itemObjIndex);\n // If itemList gets empty, remove store from the store-list\n if (itemList.isEmpty())\n storeList.remove(storeObjIndex);\n }\n }\n }\n }\n }\n }",
"@Override\n public Item updateItem(Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item updatedItem = itemMap.put(item.getItemID(), item);\n writeItemFile();\n return itemMap.get(updatedItem.getItemID());\n }",
"public EditItemDialog(MenuItem item) throws InvalidInputException {\n\t\tsetModalityType(ModalityType.APPLICATION_MODAL);\n\t\t\n\t\tthis.item = item;\n\t\t\n\t\t// Set ui to native\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException\n\t\t\t\t| UnsupportedLookAndFeelException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\t// Check that item is not null\n\t\tif(item == null) {\n\t\t\tJOptionPane.showMessageDialog(this, \"You must select an item to edit!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tthrow new InvalidInputException(\"The give menu item is invalid!\");\n\t\t}\n\t\t\n\t\t// Start generated code\n\t\tsetBounds(100, 100, 450, 323);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"Item info\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"View/Edit ingredients\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tGroupLayout gl_contentPanel = new GroupLayout(contentPanel);\n\t\tgl_contentPanel.setHorizontalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(panel, GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 425, Short.MAX_VALUE))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_contentPanel.setVerticalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 186, Short.MAX_VALUE))\n\t\t);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\t\n\t\tingredientsComboBox = new JComboBox<String>();\n\t\tingredientsComboBox.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>) arg0.getSource();\n\t\t\t\tselectedSupply = cb.getSelectedIndex();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJLabel lblQuantity = new JLabel(\"Quantity:\");\n\t\t\n\t\tqtyTextField = new JTextField();\n\t\tqtyTextField.setColumns(10);\n\t\t\n\t\tJButton btnAdd = new JButton(\"Add\");\n\t\tbtnAdd.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddButtonActionPerformed();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnRemoveSelected = new JButton(\"Remove Selected Item\");\n\t\tbtnRemoveSelected.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tremoveButtonActionPerformed();\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_1 = new GroupLayout(panel_1);\n\t\tgl_panel_1.setHorizontalGroup(\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t.addGap(2)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(btnRemoveSelected, GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(ingredientsComboBox, GroupLayout.PREFERRED_SIZE, 173, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t.addComponent(lblQuantity)\n\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t.addComponent(qtyTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(btnAdd, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_panel_1.setVerticalGroup(\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(ingredientsComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(lblQuantity)\n\t\t\t\t\t\t.addComponent(qtyTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(btnAdd))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnRemoveSelected)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\t\n\t\tsupplyList = new JList<String>();\n\t\tsupplyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tscrollPane.setViewportView(supplyList);\n\t\tpanel_1.setLayout(gl_panel_1);\n\t\t\n\t\tJLabel lblName = new JLabel(\"Name: \");\n\t\t\n\t\tlblItemname = new JLabel(\"itemName\");\n\t\t\n\t\tJLabel lblPrice = new JLabel(\"Price:\");\n\t\t\n\t\tlblItemPrice = new JLabel(\"itemPrice\");\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n\t\tpanel.add(lblName);\n\t\tpanel.add(lblItemname);\n\t\tpanel.add(lblPrice);\n\t\tpanel.add(lblItemPrice);\n\t\tcontentPanel.setLayout(gl_contentPanel);\n\t\t{\n\t\t\tJPanel buttonPane = new JPanel();\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\terrorLabel.setForeground(Color.RED);\n\t\t\t{\n\t\t\t\tokButton = new JButton(\"OK\");\n\t\t\t\tokButton.addActionListener(new ActionListener() {\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tokButton.setActionCommand(\"OK\");\n\t\t\t\tgetRootPane().setDefaultButton(okButton);\n\t\t\t}\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));\n\t\t\tbuttonPane.add(errorLabel);\n\t\t\tbuttonPane.add(okButton);\n\t\t}\n\t\t// End generated code\n\t\t\n\t\t// Prepare list\n\t\tlistModel = new DefaultListModel<String>();\n\t\tsupplyList.setModel(listModel);\n\t\t\n\t\trefreshData();\n\t}",
"public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}",
"public int updateItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n // updating record\n return db.update(TABLE_NAME, values, KEY_ID + \" = ?\", // update query to make changes to the existing record\n new String[]{String.valueOf(item.getId())});\n }",
"public String addItem(Item item){\n EntityManager em = emf.createEntityManager();\n try{\n utx.begin();\n em.joinTransaction();\n for(Tag tag : item.getTags()) {\n tag.incrementRefCount();\n tag.getItems().add(item);\n em.merge(tag);\n }\n em.persist(item);\n utx.commit();\n // index item\n if(bDebug) System.out.println(\"\\n***Item id of new item is : \" + item.getItemID());\n indexItem(new IndexDocument(item));\n \n } catch(Exception exe){\n try {\n utx.rollback();\n } catch (Exception e) {}\n throw new RuntimeException(\"Error persisting item\", exe);\n } finally {\n em.close();\n }\n return item.getItemID();\n }",
"public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}",
"public void setItem(T item) {\n this.item = item;\n }",
"public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}",
"public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }",
"private void addItemScreen() {\n \tIntent intent = new Intent(this, ItemEditor.class);\n \tstartActivity(intent);\n }",
"public void insert(Object item);",
"public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}",
"public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }",
"@PutMapping(\"/items/{item_id}\")\n\tpublic ResponseEntity<Item> updateItem(@PathVariable(value=\"item_id\") Long item_id, @Valid @RequestBody Item itemDetails){ \n\t\tItem item = itemDAO.findOne(item_id);\n\t\tif(item == null) {\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\titem.setItem_id(itemDetails.getItem_id());\n\t\titem.setItem_name(itemDetails.getItem_name());\n\t\titem.setItem_discription(itemDetails.getItem_discription());\n\t\titem.setCategory(itemDetails.getCategory());\n\t\titem.setPrice(itemDetails.getPrice());\n\t\t\n\t\tItem upItem = itemDAO.save(item);\n\t\t\n\t\treturn ResponseEntity.ok().body(upItem);\n\t\t\n\t}",
"public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }",
"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 }",
"@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\t\t }\r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t }\t\r\n\t}",
"public void insertItem(Item item) {\n SQLiteDatabase db = DataBaseManager.getInstance().openDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, item.getName());\n values.put(KEY_ARRAY_ID, item.getArrayId());\n values.put(KEY_DESCRIPTION, item.getDescription());\n\n // Inserting Row\n db.insert(TABLE_ITEMS, null, values);\n DataBaseManager.getInstance().closeDatabase();\n }",
"public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }",
"@Override\n\tpublic ThematicItem changeItem(ThematicItem item) {\n\t\treturn repository.changeItem(item);\n\t}",
"public int addItem(Itemset i);"
] | [
"0.7420294",
"0.72789234",
"0.69057184",
"0.6886352",
"0.6876168",
"0.6724139",
"0.65786666",
"0.6551235",
"0.6545374",
"0.6541552",
"0.6491439",
"0.648827",
"0.64581114",
"0.64581114",
"0.64224887",
"0.6384609",
"0.6384481",
"0.6379958",
"0.637201",
"0.63693637",
"0.63522774",
"0.6349805",
"0.6323791",
"0.6309239",
"0.6308921",
"0.6303339",
"0.6302498",
"0.62943184",
"0.62798625",
"0.6261419",
"0.62486416",
"0.62428266",
"0.6230464",
"0.6187383",
"0.61736965",
"0.61736035",
"0.6163263",
"0.61621314",
"0.61571425",
"0.6155703",
"0.61540455",
"0.6153305",
"0.61484927",
"0.6146186",
"0.6142182",
"0.6141026",
"0.613815",
"0.61283886",
"0.61214197",
"0.6090457",
"0.60866606",
"0.6079624",
"0.60762185",
"0.60750145",
"0.6060827",
"0.6055534",
"0.60465634",
"0.60465634",
"0.6029804",
"0.6027612",
"0.60264593",
"0.6023738",
"0.6017417",
"0.6017296",
"0.60144395",
"0.60144395",
"0.60144395",
"0.6006096",
"0.6000087",
"0.59852654",
"0.59839725",
"0.5973886",
"0.59563875",
"0.59536034",
"0.59536034",
"0.5952347",
"0.59404284",
"0.59371316",
"0.5933705",
"0.5928473",
"0.59239024",
"0.5923652",
"0.59199244",
"0.5908059",
"0.58818614",
"0.5880924",
"0.5880151",
"0.5877883",
"0.5877187",
"0.5874201",
"0.5874177",
"0.5869965",
"0.5860521",
"0.585901",
"0.58582336",
"0.5856265",
"0.585415",
"0.58505106",
"0.5845197",
"0.5839424",
"0.5839287"
] | 0.0 | -1 |
Export un fichier SRT sous forme de flux. | public byte[] export() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
for (Ligne ligne : lignes) {
if (ligne.getTraduit() != null) {
bos.write(ligne.getTraduit().getBytes());
} else {
bos.write(ligne.getOriginal().getBytes());
}
bos.write("\r\n".getBytes());
}
} catch (IOException ex) {
ex.printStackTrace();
}
return bos.toByteArray();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"void saveAs() {\n writeFile.Export();\n }",
"public void exportMedia(){\r\n \r\n }",
"public void exportFxwl(File dir) {\n File f = new File(dir,getName() + \".fxwl\");\n try {\n X.toXML(this, new BufferedWriter(new FileWriter(f)));\n } catch (IOException ex) {\n LOGGER.error(\"Unable to export component launcher for {} into {}\", getName(),f);\n }\n }",
"static void escribir(Planeta planeta_a_escribir) {\n if (escritor != null) {\n try {\n escritor.writeObject(planeta_a_escribir);\n \n } catch (IOException ex) {\n System.out.println(\"Error al escribir el archivo\");\n }\n }\n }",
"void export(String path, TimeSeries<?> series);",
"abstract void outputAsSAL() throws IsabelleException, FileException;",
"@FXML\n void exportFile(ActionEvent event) {\n \tFileChooser chooser = new FileChooser();\n\t\tchooser.setTitle(\"Open Target File for the Export\");\n\t\tchooser.getExtensionFilters().addAll(new ExtensionFilter(\"Text Files\", \"*.txt\"),\n\t\t\t\tnew ExtensionFilter(\"All Files\", \"*.*\"));\n\t\tStage stage = new Stage();\n\t\t\n\t\t//get the reference of the target file\n\t\tFile targeFile = chooser.showSaveDialog(stage); \n\t\t\n\t\t\n\t\t//writes accounts to text file and exports\n\t\ttry {\n\t\t\t\n\t\t\tBufferedWriter bf = new BufferedWriter(new FileWriter(targeFile));\n\t\t\tbf.write(db.printFormattedAccounts());\n\t\t\tbf.flush();\n\t\t\tbf.close();\n\t\t\t\n\t\t\tmessageArea.appendText(\"File successfully exported.\\n\");\n\t\t\t\n\t\t} catch (IOException e) {\n \t\tmessageArea.appendText(\"Unable to export transactions to file.\\n\");\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\tmessageArea.appendText(\"File not selected, unable to export transactions to file.\\n\");\n\t\t}\n\t\t\n\t\t\n }",
"public ActionSaveAs() {\r\n putValue(SMALL_ICON, IconFactory.get().create(\"fa:floppy-o\"));\r\n Messages.get().message(\"saveAs\").subscribe((msg) -> {\r\n putValue(NAME, msg);\r\n });\r\n }",
"public SaveSTF(STFFile file, File output, FileType type) {\n\t\tfile_ = file;\n\t\toutput_ = output;\n\t\ttype_ = type;\n\t}",
"public static void saveStudRecsToFile(File file) {\r\n\t\ttry {\r\n\t\t\tJAXBContext context = JAXBContext\r\n\t\t\t\t\t.newInstance(StudRecsWrapper.class);\r\n\t\t\tMarshaller m = context.createMarshaller();\r\n\t\t\tm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\r\n\t\t\t\r\n\t\t\tStudRecsWrapper wrapper = new StudRecsWrapper();\r\n\t\t\twrapper.setStudRecs(studRecs);\r\n\t\t\t\r\n\t\t\tm.marshal(wrapper, file);\r\n\t\t\tSystem.out.println(\"File saved!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Cannot save file, check write permissions!\");\r\n\t\t}\r\n\t}",
"public void Save() {\n try {\n ObjectOutputStream objUt = new ObjectOutputStream(\n new FileOutputStream(\"sparfil.txt\"));\n objUt.writeObject(this);\n } catch(Exception e) {\n System.out.println(e);}\n }",
"public static void exportToFile() throws Exception {\n String fileName = \"Prova.txt\";\n try (PrintWriter outputStream = new PrintWriter(new FileWriter(fileName))) {\n List<Libro> libroList = Biblioteca.getRepo().getListaLibri();\n Iterator<Libro> libri = libroList.iterator();\n\n while (libri.hasNext()) {\n String sLibro = convertToString(libri.next());\n outputStream.println(sLibro);\n }\n }\n }",
"private void export() {\n print(\"Outputting Instructions to file ... \");\n\n // Generate instructions right now\n List<Instruction> instructions = new ArrayList<Instruction>();\n convertToInstructions(instructions, shape);\n\n // Verify Instructions\n if (instructions == null || instructions.size() == 0) {\n println(\"failed\\nNo instructions!\");\n return;\n }\n\n // Prepare the output file\n output = createWriter(\"output/instructions.txt\");\n \n // TODO: Write configuration information to the file\n \n\n // Write all the Instructions to the file\n for (int i = 0; i < instructions.size(); i++) {\n Instruction instruction = instructions.get(i);\n output.println(instruction.toString());\n }\n\n // Finish the file\n output.flush();\n output.close();\n\n println(\"done\");\n }",
"private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }",
"public static void save(String fn, AllSTLsToBuild allSTL)\n\t{\n\t\tif(!fn.endsWith(\".rfo\"))\n\t\t\tfn += \".rfo\";\n\t\tRFO rfo = new RFO(fn, allSTL);\n\t\trfo.copySTLs();\n\t\trfo.createLegend();\n\t\trfo.compress();\n\t\tFile t = new File(rfo.tempDir);\n\t\trecursiveDelete(t);\n\t}",
"void toFile (String fileName);",
"public String ToFile() {\n\t\tif (ismonitored) {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",1;\");\r\n\t\t} else {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",0;\");\r\n\t\t}\r\n\r\n\t}",
"File getSaveFile();",
"public void exportTMX(String path, String extention) throws IOException {\r\n\t\tStringBuilder seg1 = new StringBuilder();\r\n\t\tStringBuilder seg2 = new StringBuilder();\r\n\r\n\t\tpath = checkPath(path, extention);\r\n\r\n\t\ttry {\r\n\t\t\tOutputStream fout = new FileOutputStream(path);\r\n\t\t\tOutputStream bout = new BufferedOutputStream(fout);\r\n\t\t\tOutputStreamWriter output = new OutputStreamWriter(bout, \"UTF-8\");\r\n\r\n\t\t\toutput.write(\"<tmx version=\\\"1.4\\\">\\r\\n\\r\\n\");\r\n\r\n\t\t\t// ispis headera\r\n\t\t\ttemp = \"<header\\t\" + \"creationtool=\" + \"\\\"\" + \"Coral\" + \"\\\"\\r\\n\"\r\n\t\t\t\t\t+ \"\\t\" + \"creationtoolversion=\" + \"\\\"\" + \"v1.0\" + \"\\\"\\r\\n\"\r\n\t\t\t\t\t+ \"\\t\" + \"datatype=\" + \"\\\"\" + \"plaintext\" + \"\\\"\\r\\n\" + \"\\t\"\r\n\t\t\t\t\t+ \"segtype=\" + \"\\\"\" + \"block\" + \"\\\"\\r\\n\" + \"\\t\"\r\n\t\t\t\t\t+ \"adminlang=\" + \"\\\"\" + System.getProperty(\"user.language\")\r\n\t\t\t\t\t+ \"\\\"\\r\\n\" + \"\\t\" + \"srclang=\" + \"\\\"\"\r\n\t\t\t\t\t+ dataModel.getProperty(\"language1\") + \"\\\"\\r\\n\" + \"\\t\"\r\n\t\t\t\t\t+ \"o-tmf=\" + \"\\\"\" + \"xml\" + \"\\\">\\r\\n\" + \"</header>\\r\\n\\r\\n\";\r\n\t\t\toutput.write(temp);\r\n\r\n\t\t\t// body\r\n\t\t\toutput.write(\"<body>\\r\\n\");\r\n\r\n\t\t\tfor (int i = 0; i < idList1.size(); i++) {\r\n\r\n\t\t\t\tif (dataModel.getConnections(idList1.get(i)).isEmpty()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// prolazi se kroz lijevu listu\r\n\t\t\t\tif (!visited.contains(idList1.get(i))) {\r\n\t\t\t\t\t// traze se parovi od trenutnog elementa iz lijeve liste\r\n\t\t\t\t\tgoDeep(idList1.get(i));\r\n\r\n\t\t\t\t\t// vrsi se sortiranje dohvacenih parova ovisno o tome kojoj\r\n\t\t\t\t\t// listi izvorno pripadaju\r\n\t\t\t\t\t// takoder, ako se radi o visestrukim vezama elementi se\r\n\t\t\t\t\t// spajaju\r\n\t\t\t\t\tfor (int j = 0; j < tuvPair.size(); j++) {\r\n\t\t\t\t\t\tif (idList1.contains(tuvPair.get(j))) {\r\n\t\t\t\t\t\t\tseg1.append(dataModel.getElement(tuvPair.get(j))\r\n\t\t\t\t\t\t\t\t\t+ \" \");\r\n\t\t\t\t\t\t} else if (idList2.contains(tuvPair.get(j))) {\r\n\t\t\t\t\t\t\tseg2.append(dataModel.getElement(tuvPair.get(j))\r\n\t\t\t\t\t\t\t\t\t+ \" \");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// stvara se novi translation unit\r\n\t\t\t\t\toutput.write(\"\\t\" + \"<tu>\\r\\n\");\r\n\r\n\t\t\t\t\t// prethodno spojeni elementi ispisuju se u translation unit\r\n\t\t\t\t\t// variant\r\n\t\t\t\t\toutput.write(\"\\t\" + \"<tuv xml:lang=\" + \"\\\"\"\r\n\t\t\t\t\t\t\t+ dataModel.getProperty(\"language1\") + \"\\\"\"\r\n\t\t\t\t\t\t\t+ \"><seg>\" + seg1.toString().trim()\r\n\t\t\t\t\t\t\t+ \"</seg></tuv>\\r\\n\");\r\n\t\t\t\t\toutput.write(\"\\t\" + \"<tuv xml:lang=\" + \"\\\"\"\r\n\t\t\t\t\t\t\t+ dataModel.getProperty(\"language2\") + \"\\\"\"\r\n\t\t\t\t\t\t\t+ \"><seg>\" + seg2.toString().trim()\r\n\t\t\t\t\t\t\t+ \"</seg></tuv>\\r\\n\");\r\n\r\n\t\t\t\t\toutput.write(\"\\t\" + \"</tu>\\r\\n\\r\\n\");\r\n\r\n\t\t\t\t\ttuvPair.clear();\r\n\t\t\t\t\tseg1.delete(0, seg1.length());\r\n\t\t\t\t\tseg2.delete(0, seg2.length());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\toutput.write(\"</body>\");\r\n\t\t\toutput.write(\"</tmx>\");\r\n\r\n\t\t\toutput.close();\r\n\t\t\tvisited.clear();\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new FileNotFoundException(\r\n\t\t\t\t\t\"File could not be found!\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Verify that the file exists in the specified location.\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Check the spelling of the name of the document.\\r\\n\\r\\n\"\r\n\t\t\t\t\t\t\t+ path);\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tthrow new UnsupportedEncodingException(\"Selected encoding is not supported.\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IOException(\"I/O exception has occurred.\");\r\n\t\t}\r\n\t}",
"private final void exportAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tserializeToFile(file);\n\t }\t\n\t}",
"private void exportFiles()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\t\t\n\t\t// Report String\n\t\t//----------------\n\t\tString reportString = \"Date,Location Latitude, Location Longitude,Vehicle,Description\\n\";\t\n\t\t\n\t\tStringBuilder reportBuilder = new StringBuilder();\n\t\treportBuilder.append(reportString);\n\t\t\n\t\tString objectString = \"\"+ \n\t\t\t\tincident.getDate()+\",\" +\n\t\t\t\tincident.getLatitude() + \",\" +\n\t\t\t\tincident.getLongitude()+\",\" +\n\t\t\t\tincident.getVehicleReg()+\",\" +\n\t\t\t\tincident.getDescription()+\",\" + \"\\n\";\n\t\t\n\t\treportBuilder.append(objectString);\n\t\t\n\t\t// Witnesses String\n\t\t//----------------\n\t\tString witnessString = \"witnessName,witnessEmail,witnessNumber,witnessStatement\\n\";\n\t\t\n\t\tStringBuilder witnessesBuilder = new StringBuilder();\n\t\twitnessesBuilder.append(witnessString);\n\t\t\n\t\tfor(int i=0; i<incident.getWitnesses().size(); i++)\n\t\t{\n\t\t\tobjectString = \"\"+ \n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessName\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessEmail\") + \",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessNumber\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessStatement\")+\",\" + \"\\n\";\n\t\t\t\n\t\t\twitnessesBuilder.append(objectString);\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Create file\n\t\t//===========================================\n\t\t// Incident Report\n\t\t//-------------------------------------------------\n\t\tfinal File reportFile = new File(getFilesDir() + \"/\" + \"incident_report.csv\");\n\t\treportFile.setReadable(true,false);\n\t\t\n\t\tif( reportFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"incident_report.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(reportBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Witnesses file\n\t\t//-------------------------------------------------\n\t\tfinal File witnessesFile = new File(getFilesDir() + \"/\" + \"witnesses.csv\");\n\t\twitnessesFile.setReadable(true,false);\n\t\t\n\t\tif( witnessesFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"witnesses.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(witnessesBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Media files\n\t\t//-------------------------------------------------\t\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(),new GetCallback<ParseObject>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void done(final ParseObject parseIncident, ParseException e) \n\t\t\t{\n\t\t\t\tif(e == null)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// Get number of photos attached\n\t\t\t\t\tParseQuery<ParseObject> queryPhotos = parseIncident.getRelation(\"incidentPhotos\").getQuery();\n\t\t\t\t\tqueryPhotos.findInBackground(new FindCallback<ParseObject>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(List<ParseObject> parsePhotos, ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tArrayList<byte[]> bytes = new ArrayList<byte[]>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i=0; i<parsePhotos.size(); i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\t\t\tParseFile photo = (ParseFile) parsePhotos.get(i).get(\"photoFile\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbytes.add(photo.getData());\n\t\t\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tphotoFiles = AssetsUtilities.saveIncidentPhoto(ReviewReportActivity.this, bytes);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Video\n\t\t\t\t\t\t\tParseFile parseVideo = (ParseFile) parseIncident.get(\"incidentVideo\");\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(parseVideo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparseVideo.getDataInBackground(new GetDataCallback()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void done(byte[] data, ParseException e) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(e == null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Save file\n\t\t\t\t\t\t\t\t\t\t\tvideoFile = AssetsUtilities.saveIncidentVideo(ReviewReportActivity.this,data);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\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 void testExportToStream() throws FileNotFoundException {\n List<SheetDataDto> data = new ArrayList<SheetDataDto>();\n RowDataDto headerRow = new RowDataDto();\n headerRow.getCells().add(new CellDataDto(\"Col 1\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 2\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 3\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 4\", CellDataTypeEnum.TEXT));\n\n SheetDataDto sheet1 = new SheetDataDto();\n sheet1.setName(\"First sheet\");\n sheet1.setHeaderRow(headerRow);\n\n RowDataDto row1 = new RowDataDto();\n row1.getCells().add(new CellDataDto(1d, CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(\"IF(A2 > 0, \\\"1\\\", \\\"0\\\")\", CellDataTypeEnum.FORMULAR));\n row1.getCells().add(new CellDataDto(\"123456789\", CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(new Date(), CellDataTypeEnum.DATE));\n\n sheet1.getRows().add(row1);\n data.add(sheet1);\n\n OutputStream out1 = new FileOutputStream(new File(\"t2-out.xls\"));\n excelExportingService.exportToExcel(null, out1, data, ExcelFormatTypeEnum.XLS);\n\n InputStream in2 = getClass().getResourceAsStream(\"/exportData/t2-in.xlsx\");\n OutputStream out2 = new FileOutputStream(new File(\"t2-out.xlsx\"));\n sheet1.setName(\"Append Sheet\");\n sheet1.setSheetIndex(0);\n excelExportingService.exportToExcel(in2, out2, data, ExcelFormatTypeEnum.XLSX);\n }",
"private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"private void exportFile()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdrinkListFileOutput = new BufferedWriter(new FileWriter(drinkListFile));\n\t\t\tdrinkListFileOutput.write(exportDrinkList);//insert string of drinks\n\t\t\tdrinkListFileOutput.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Successfully saved drinks\");\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.toString();//change this\n\t\t\tJOptionPane.showMessageDialog(null, \"Drink save error: \" + e.toString());//change this);\n\t\t}\n\n\n\n\t}",
"void exportGame();",
"@Override\r\n\tprotected File generateReportFile() {\r\n\r\n\t\tFile tempFile = null;\r\n\r\n\t\tFileOutputStream fileOut = null;\r\n\t\ttry {\r\n\t\t\ttempFile = File.createTempFile(\"tmp\", \".\" + this.exportType.getExtension());\r\n\t\t\tfileOut = new FileOutputStream(tempFile);\r\n\t\t\tthis.workbook.write(fileOut);\r\n\t\t} catch (final IOException e) {\r\n\t\t\tLOGGER.warn(\"Converting to XLS failed with IOException \" + e);\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tif (tempFile != null) {\r\n\t\t\t\ttempFile.deleteOnExit();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (fileOut != null) {\r\n\t\t\t\t\tfileOut.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t\tLOGGER.warn(\"Closing file to XLS failed with IOException \" + e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tempFile;\r\n\t}",
"private Step exportSerial() {\n return stepBuilderFactory.get(STEP_CREATE_SCENARIO_METER_FILE)\n .tasklet(savingsPotentialExportMeterSerialTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n // Scenario key\n String jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialExportMeterSerialTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n\n // Set output filename\n jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialExportMeterSerialTask.EnumInParameter.OUTPUT_FILENAME.getValue();\n jobContext.put(jobContextKey, METER_SERIAL_FILENAME);\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_EXPORT_METER_DATA +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.METER_FILTER_FILENAME.getValue();\n jobContext.put(jobContextKey, METER_SERIAL_FILENAME);\n\n return null;\n }\n\n })\n .build();\n }",
"public FileData export() {\n\t\ttry(Workbook workbook = createWorkbook();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();) {\n\t\t\tsheet = workbook.createSheet();\n\t\t\tcreateRows();\n\t\t\tworkbook.write(outputStream);\n\t\t\treturn getExportedFileData(outputStream.toByteArray());\n\t\t} catch (IOException ex) {\n\t\t\tthrow new RuntimeException(\"error while exporting file\",ex);\n\t\t}\n\t}",
"@Override\n\tpublic void doSaveAs() {\n\n\t}",
"String saveFile(FileStoreDto dto);",
"public void writeSHFP(Path outPath, OpenOption... options) throws IOException {\n // if(true)return;\n try (PrintWriter pw = new PrintWriter(Files.newBufferedWriter(outPath))) {\n // header\n String[] header = outputDSMHeader();\n Arrays.stream(header).forEach(pw::println);\n\n // structure\n String[] structurePart = STRUCTURE.toSHlines();\n Arrays.stream(structurePart).forEach(pw::println);\n\n // source\n pw.println(EVENT.getCmtLocation().getR() + \" \" + EVENT.getCmtLocation().getLatitude() + \" \" +\n EVENT.getCmtLocation().getLongitude());\n double[] mt = EVENT.getCmt().getDSMmt();\n pw.println(Arrays.stream(mt).mapToObj(Double::toString).collect(Collectors.joining(\" \")) +\n \" Moment Tensor (1.e25 dyne cm)\");\n\n // output info\n pw.println(\"c output directory\");\n pw.println(OUTPUT + \"/\");\n pw.println(EVENT);\n pw.println(\"c events and stations\");\n\n // horizontal positions for perturbation points\n pw.println(POSITIONS.length + \" nsta\");\n Arrays.stream(POSITIONS).forEach(pp -> pw.println(pp.getLatitude() + \" \" + pp.getLongitude()));\n\n // radii for perturbation points\n pw.println(RADII.length + \" nr\");\n Arrays.stream(RADII).forEach(pw::println);\n pw.println(\"end\");\n }\n }",
"public static void RDStockePEntrpot(Destination entrepot){\n File file = new File(\"src/StockeParEntrpot.txt\");\n try {\n if(!file.exists())\n file.createNewFile();\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\n for(int i = 0; i < entrepot.getSize(); i++){\n if(entrepot.getDon(i).getEtat() == Etat.STOCKE) {\n System.out.println(entrepot.getDon(i));\n writer.write(entrepot.getDon(i).toString() + \"\\r\\n\");\n }\n }\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public abstract void saveToFile(PrintWriter out);",
"public void saveTemplate(String filename){\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"savingTemplate\");\n blueprint = currentTemplate.createBlueprint();\n //make sure we have correct extension\n filename = FileManager.removeExtension(filename);\n if (isInspecting){\n filename = filename + \".in\";\n } else {\n filename = filename + \".bp\";\n }\n boolean hasSaved = FileManager.createTemplate(filename, blueprint);\n if (hasSaved){\n Toast.makeText(this, \"Saved\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(this, \"Did not save\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n\tpublic void doSaveAs() {\n\t}",
"public boolean saveSaucers(){\r\n try{\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileOutputStream fos = new FileOutputStream(file);\r\n ObjectOutputStream output = new ObjectOutputStream(fos);\r\n output.writeObject(new ArrayList<Saucer>(this.saucers));\r\n output.close();\r\n\r\n return true;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return false;\r\n }\r\n }",
"public void exportPuzzle () {\r\n fileManager.exportPuzzle (puzzle);\r\n }",
"private void writeFile(TimerEntity entity) {\n final File file = fileName(entity.getTimedObjectId(), entity.getId());\n\n FileOutputStream fileOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file, false);\n final Marshaller marshaller = factory.createMarshaller(configuration);\n marshaller.start(new OutputStreamByteOutput(fileOutputStream));\n marshaller.writeObject(entity);\n marshaller.finish();\n fileOutputStream.flush();\n fileOutputStream.getFD().sync();\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n if (fileOutputStream != null) {\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n logger.error(\"IOException closing file \", e);\n }\n }\n }\n }",
"public static void save(String vxlFileName) {\n\t\ttry {\n\t\t\t// PrintStream file = new PrintStream(new FileOutputStream(vxlFileName, false));\n\t\t\t// file.print(vxl.toString());\n\t\t\t// file.close();\n\t\t\tOutputStream file = new FileOutputStream(vxlFileName);\n\t\t\tOutputStreamWriter bufferedWriter = new OutputStreamWriter(file, \"UTF8\");\n\t\t\tbufferedWriter.write(vxl.toString());\n\t\t\tbufferedWriter.close();\n\t\t\tclear();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }",
"private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}",
"void save(String filename);",
"public void Sauvegarder(Partie p) {\n if (SaveNum > 0 && SaveNum < 10) {\n //System.out.println(\"index ok\");\n try {\n if (erase) {\n slot[SaveNum - 1].delete();\n }\n //System.out.println(\"Try start\");\n //File f = new File(i + \".\" + p.getJoueur1().getNom() + \"-vs-\" + p.getJoueur2().getNom() + \".ser\");\n SaveName = (SaveNum - 1 + \"-\" + SaveName + \".ser\");\n File fichier = new File(SavePath + SaveName);\n FileOutputStream fos = new FileOutputStream(fichier);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //System.out.println(\"ok\");\n oos.writeObject(p);\n //System.out.println(\"ok\");\n oos.close();\n //slot[i] = fichier;\n SaveName = \"Sauvegarde\";\n //System.out.println(\"Save Done\" + SaveNum);\n SaveNum = 20;\n } catch (IOException | NullPointerException e) {\n System.out.println(\"Erreur lors de la sauvegarde du fichier\");\n }\n }\n }",
"String ser(LockssSerializable o) throws Exception {\n File tf = getTempFile(\"ser\", \".xml\");\n new XStreamSerializer().serialize(tf, o);\n return StringUtil.fromFile(tf);\n }",
"public void save () {\n // Make sure the workspace folder exist\n createFolder(this.pathToWorkspaceFolder);\n\n // Write the serialized Flow object\n System.out.println(\"Saving\");\n try (FileWriter file = new FileWriter(this.pathToWorkspaceFolder.toString() + \"/\" + FLOW_FILE_NAME)) {\n file.write(flow.serialize());\n System.out.println(\"Successfully Copied Flow \" + flow.getId() + \" to File :)\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }",
"public String toFile(){\n return String.format(\"%s:%s:%s:%s:%s:%s:%s\",hashIndex,id,super.toFile(), \r\n facultyAbbr.getAbbreviation(), courseName.getCourseName(),tutorialGroup,session);\r\n }",
"void downloadSavi(File file, int id) throws IOException, SQLException;",
"@FXML\n public void handleExport() throws Exception{\n \n Writer writer = null;\n String filename = file.getText();\n file.clear();\n \n try {\n File file = new File(filename+\".csv\");\n writer = new BufferedWriter(new FileWriter(file));\n for (MarkLayer1 mark : data) {\n\n String text = mark.getStunum()+\";\" + mark.getCoursename() + \";\" + mark.getClassM()\n + \";\"+ mark.getExam()+\";\"+mark.getFinalM()+\"\\n\";\n\n writer.write(text);\n msg.setText(\"Export Success\");\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n msg.setText(\"Error with export\");\n }\n finally {\n\n writer.flush();\n writer.close();\n } \n \n }",
"public void writePSVFP(Path outPath, OpenOption... options) throws IOException {\n // if(true)return;\n try (PrintWriter pw = new PrintWriter(Files.newBufferedWriter(outPath))) {\n // header\n String[] header = outputDSMHeader();\n Arrays.stream(header).forEach(pw::println);\n\n // structure\n String[] structurePart = STRUCTURE.toPSVlines();\n Arrays.stream(structurePart).forEach(pw::println);\n\n // source\n pw.println(EVENT.getCmtLocation().getR() + \" \" + EVENT.getCmtLocation().getLatitude() + \" \" +\n EVENT.getCmtLocation().getLongitude());\n double[] mt = EVENT.getCmt().getDSMmt();\n pw.println(Arrays.stream(mt).mapToObj(Double::toString).collect(Collectors.joining(\" \")) +\n \" Moment Tensor (1.e25 dyne cm)\");\n\n // output info\n pw.println(\"c output directory\");\n pw.println(OUTPUT + \"/\");\n pw.println(EVENT);\n pw.println(\"c events and stations\");\n\n // horizontal positions for perturbation points\n pw.println(POSITIONS.length + \" nsta\");\n Arrays.stream(POSITIONS).forEach(pp -> pw.println(pp.getLatitude() + \" \" + pp.getLongitude()));\n\n // radii for perturbation points\n pw.println(RADII.length + \" nr\");\n Arrays.stream(RADII).forEach(pw::println);\n pw.println(\"end\");\n }\n }",
"public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void generateTts() {\n File mediaStorageDir = new File(\n Environment.getExternalStorageDirectory(),\n resources.getTtsStorageFolder());\n \n if (!mediaStorageDir.exists())\n {\n if (!mediaStorageDir.mkdirs())\n {\n Log.w(TAG, \"Failed to create mediadir\");\n }\n else\n {\n Log.d(TAG, \"Created mediadir\" + mediaStorageDir.getAbsolutePath());\n }\n }\n\n File mediaFile = new File(mediaStorageDir.getPath() + File.separator + resources.getTtsFileName());\n Log.d(TAG, \"TTS path : \" + mediaFile.getAbsolutePath());\n\n HashMap<String, String> hashTts = new HashMap<>();\n hashTts.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, \"ttsToFile\");\n t1.setSpeechRate(Float.parseFloat(resources.getTtsSpeechRate()));\n t1.synthesizeToFile(message, hashTts, mediaFile.getAbsolutePath());\n\n }",
"private void backup(SubscriptionDto sDto) throws IOException {\n\t\tSystem.out.println(\"Gaurav\");\n\t\tString routePath = this.getClass().getClassLoader()\n\t\t\t\t.getResource(File.separator).getPath();\n\t\tSystem.out.println(routePath);\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(routePath+File.separator+\"..\"+File.separator+\"backup.txt\"), true));\n\t\tbw.write(\"Suscription Details\" + newLine);\n\t\tbw.write(\"**************************************\" + newLine);\n\t\tbw.write(\"SUBSCRIPTION ID \" + sDto.getSubscriptionId() + newLine);\n\t\tbw.write(\"CUSTOMER NAME \" + sDto.getCustomerName() + newLine);\n\t\tbw.write(\"Total Cost :\" + sDto.getTotalCost() + newLine);\n\t\tbw.write(\"-----------------------------------------------------------------------\"\n\t\t\t\t+ newLine);\n\n\t\tbw.write(\"Channel Suscribed Details\" + newLine);\n\t\tbw.write(\"**************************************\\n\" + newLine);\n\t\tbw.write(\" CHANNEL NAME | COST_PER MONTH \"\n\t\t\t\t+ newLine);\n\t\tbw.write(\"+--------------------------------------------------------------+\"\n\t\t\t\t+ newLine);\n\t\tfor (Channel c : sDto.getSubscribedChannel()) {\n\t\t\tbw.write(\"|\" + c.getChannelName() + \"\\t\\t\\t\\t | \\t\\t\\t \"\n\t\t\t\t\t+ c.getCostPerMonth() + \"\\t\\t\\t\\t\\t | \" + newLine);\n\t\t}\n\n\t\tbw.write(newLine);\n\t\tbw.write(\"-------------End---------------------\" + newLine);\n\t\tbw.close();\n\n\t}",
"public void toFile(String filename) {\n\t\tString serialized = Serializer.serializeLevelPack(this);\n\t\tSerializer.writeToFile(filename, serialized.getBytes());\n\t}",
"private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override public void outputAsSAL() throws IsabelleException, FileException { \r\n outputSAL(value.useAsSAL());\r\n }",
"public void writeToServiceFile()\r\n {\r\n\ttry(ObjectOutputStream toServiceFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/servicelist.dta\")))\r\n\t{\r\n toServiceFile.writeObject(serviceList);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Service objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }",
"@Override\r\n\tpublic void exportar(ActionEvent actionEvent) {\n\t\t\r\n\t}",
"public static void saveAs(){\n\t\tFile saveFile;\n\t\tJFileChooser saveChooser = new JFileChooser();\n\t\tFileNameExtensionFilter saveFilter = new FileNameExtensionFilter(\"Sensormap Files (.stuff)\", \"stuff\");\n\t\tFileNameExtensionFilter saveFilter2 = new FileNameExtensionFilter(\"Gzipped Sensormap Files (.stuff.gz)\", \"stuff.gz\");\n\t\tsaveChooser.setFileFilter(saveFilter);\n\t\tsaveChooser.setFileFilter(saveFilter2);\n\t\tint saveReturnVal = saveChooser.showSaveDialog(ControlPanelFrame.getFrame());\n\t\tif(saveReturnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tif(saveChooser.getFileFilter() == saveFilter && saveChooser.getSelectedFile().getName().endsWith(\".stuff\")==false){\n\t\t\t\tsaveFile = new File(saveChooser.getSelectedFile().getAbsolutePath()+\".stuff\");\n\t\t\t} else if(saveChooser.getFileFilter() == saveFilter2 && saveChooser.getSelectedFile().getName().endsWith(\".stuff.gz\")==false){\n\t\t\t\tsaveFile = new File(saveChooser.getSelectedFile().getAbsolutePath()+\".stuff.gz\");\n\t\t\t} else {\n\t\t\t\tsaveFile = saveChooser.getSelectedFile();\n\t\t\t}\n\t\t\tXMLSaver.saveSensorList(saveFile);\n\t\t\tGUIReferences.viewPort.halfTitle = saveFile.getName();\n\t\t\tGUIReferences.viewPort.setTitle(saveFile.getName());\n\t\t\tGUIReferences.currentFile = saveFile;\n\t\t\tGUIReferences.saveMenuItem.setEnabled(false);\n\t\t}\n\t}",
"public RTS_Outbytefile(final RTS_RTObject SL, final RTS_TXT FN) {\n\t\tsuper(SL, FN);\n\t}",
"public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"private void actionTimelapseExport ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser saveFileChooser = new JFileChooser();\r\n\r\n\t\t\tFileNameExtensionFilter typeCSV = new FileNameExtensionFilter(\"CSV\", \"csv\", \"CSV\");\r\n\t\t\tsaveFileChooser.addChoosableFileFilter(typeCSV);\r\n\r\n\t\t\tFileNameExtensionFilter typeTXT = new FileNameExtensionFilter(\"TXT\", \"txt\", \"TXT\");\r\n\t\t\tsaveFileChooser.addChoosableFileFilter(typeTXT);\r\n\r\n\t\t\tsaveFileChooser.setAcceptAllFileFilterUsed(false);\r\n\t\t\tsaveFileChooser.setFileFilter(typeCSV);\r\n\r\n\t\t\tint isOpen = saveFileChooser.showOpenDialog(saveFileChooser);\r\n\r\n\t\t\tif (isOpen == JFileChooser.APPROVE_OPTION) \r\n\t\t\t{\r\n\t\t\t\tString folderPath = saveFileChooser.getSelectedFile().getPath();\r\n\t\t\t\t\r\n\t\t\t\tOutputController.exportTimelapseImage(folderPath, DataController.getTable());\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}",
"@Override\n public String toFile() {\n String isDoneString = (isDone) ? \"1\" : \"0\";\n return getDescription() + \" | \" + getGrade() + \" | \" + getMc() + \" | \" + getSemester() + \" | \" + isDoneString;\n }",
"public void exportResultsToFile(){\r\n\t\t\t\t\r\n\t\t// This if clause shouldn't fire as the icon is grayed out if there is no tab open\r\n\t\tif(currentView == null \r\n\t\t\t\t|| currentView.getDynamicModelView() == null \r\n\t\t\t\t|| currentView.getDynamicModelView().getModel() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open, and a model and table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(currentView.getDynamicModelView().getModel().getDefaultHistory() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tDynamicModelHistory history = currentView.getDynamicModelView().getModel().getDefaultHistory();\r\n\r\n\t\tStringBuffer buffer = new StringBuffer(30000);\r\n\r\n\t\tif(history != null && history.getTimePointCount() > 0 && history.getSnapshot(0) != null){\r\n\t\t\r\n\t\t\t// Get the filename\r\n\t\t\tYorkGUIUtils guiUtils = new YorkGUIUtils();\r\n\t\t\tString selectedFile = guiUtils.getUserToDefineFilename(this, propertiesMemento.getBaseDir(), \"txt csv\", \"Results files (.txt, .csv)\", JFileChooser.SAVE_DIALOG);\r\n\r\n\t\t\tif(selectedFile == null || guiUtils.wasCancelled()){\r\n\t\t\t\trequestFocusInWindow();\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\t\r\n\t\t\tlogger.info(\"Selected file for exporting results:\" + selectedFile);\r\n\t\t\r\n\t\t\tbuffer.append(\"time point\").append(\"\\t\");\r\n\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\tbuffer.append(t).append(\"\\t\");\r\n\t\t\t}\r\n\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(Iterator<String> it = history.getSnapshot(0).keySet().iterator(); it.hasNext();){\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\tbuffer.append(name).append(\"\\t\");\r\n\t\t\t\t// For all time points\r\n\t\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\t\tbuffer.append(history.getSnapshot(t).get(name).getOutputValue()).append(\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t}\r\n\t\t\tFileLoader.save(selectedFile, buffer.toString());\r\n\t\t}\r\n\t\telse{\r\n\t\t\tJOptionPane.showMessageDialog(this, \"No results available in the selected tab. Run the model first.\", \"Warning\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Action(semantics = SemanticsOf.SAFE)\n public Blob download() {\n final String fileName = \"TurnoverRentBulkUpdate-\" + getProperty().getReference() + \"@\" + getYear() + \".xlsx\";\n final List<LeaseTermForTurnOverRentFixedImport> lineItems = getTurnoverRentLines();\n return excelService.toExcel(lineItems, LeaseTermForTurnOverRentFixedImport.class,\n LEASE_TERM_FOR_TURNOVER_RENT_SHEET_NAME, fileName);\n }",
"void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}",
"void save(String fileName);",
"public void export(String ZUGFeRDfilename) throws IOException {\n\t\tif (!documentPrepared) {\n\t\t\tprepareDocument();\n\t\t}\n\t\tif ((!fileAttached) && (attachZUGFeRDHeaders)) {\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"File must be attached (usually with setTransaction) before perfoming this operation\");\n\t\t}\n\t\tdoc.save(ZUGFeRDfilename);\n\t\tif (!disableAutoClose) {\n\t\t\tclose();\n\t\t}\n\t}",
"private void export(ActionEvent actionEvent) {\n if (this.totalCycles == -1) {\n var result = JOptionPane.showConfirmDialog(this, \"The run is not finished yet. Are you sure you want to proceed?\",\n \"Unfinished run\", JOptionPane.YES_NO_CANCEL_OPTION);\n\n if (result == JOptionPane.NO_OPTION) {\n return;\n }\n }\n\n // File dialog to save the history\n var fileChooser = new JFileChooser();\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getName().endsWith(\".json\");\n }\n\n @Override\n public String getDescription() {\n return \"*.json\";\n }\n });\n\n fileChooser.setAcceptAllFileFilterUsed(false);\n fileChooser.setCurrentDirectory(new File(Variables.OUTPUT_PATH));\n var resultDialog = fileChooser.showSaveDialog(this);\n\n if (resultDialog == JFileChooser.APPROVE_OPTION) {\n var file = fileChooser.getSelectedFile();\n\n if (!file.getName().endsWith(\".json\")) {\n file = new File(file.getAbsolutePath() + \".json\");\n }\n if (file.exists()) {\n var sure = JOptionPane.showConfirmDialog(this, \"File already exists. Overwrite?\",\n \"Overwrite file?\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\n if (sure != JOptionPane.YES_OPTION) {\n return;\n }\n }\n\n this.saveHistoryToFile(file);\n }\n }",
"public static void savewtg() throws FileNotFoundException {\n String fileName = \"./outputFiles/wtgVector.txt\";\n PrintWriter pw = new PrintWriter(new FileOutputStream(fileName));\n for (Map.Entry<String,List<Double>> entry : wtgMap.entrySet()){\n pw.println(entry.getKey() + \"-> \" + entry.getValue());\n }\n pw.close();\n }",
"private void save()\n\t{\n\t\t//get the text\n\t\tString spssTxt = spssText.getText();\n\t\t//save it to a JS place where Java can find it\n\t\tsaveToJS(spssTxt);\n\t\t//make up a file name\n\t\tString fileName = form.getText().replace(\" \", \"_\").replace(\"\\\\\", \"\").replace(\"/\",\"\").replace(\"*\", \"\").replace(\"\\\"\", \"\")\n\t\t\t\t.replace(\"<\", \"\").replace(\">\", \"\").replace(\"#\", \"\").replace(\"'\", \"\") + \".spss\";\t\t\n\t\t\n\t\t\n\t\t\n\t\tappletHtml.setHTML(\"<APPLET codebase=\\\"fileioapplets/\\\"+\" +\n\t\t\t\t\" archive=\\\"kobo_fileIOApplets.jar, plugin.jar\\\" \"+\n\t\t\t\t\" code=\\\"org.oyrm.kobo.fileIOApplets.ui.FileSaveApplet.class\\\" \"+\n\t\t\t\t\" width=\\\"5\\\" HEIGHT=\\\"5\\\" MAYSCRIPT> \"+\n\t\t\t\t\"<param name=\\\"formName\\\" value=\\\"\"+fileName+\"\\\"/>\"+\n\t\t\t\t\"<param name=\\\"save\\\" value=\\\"\"+LocaleText.get(\"SaveSPSSFile\")+\"\\\"/>\"+\n\t\t\t\t\"</APPLET>\");\n\t}",
"@FXML\n private void saveFile() {\n FileHandler.saveFileData(stage, dRegister);\n }",
"@Override\n protected String getExportFileType() {\n return null;\n }",
"@Override\n protected String getExportFileType() {\n return null;\n }",
"@Override\n protected String getExportFileType() {\n return null;\n }",
"public void outputToFile(String filemame)\n {\n }",
"public void saveToFile(File outputFile) throws IOException {\n PrintWriter writer = new PrintWriter(outputFile);\n\n writer.write(\"# Exported by FrogLord\" + Constants.NEWLINE);\n for (Tuple3<Float, Float, Float> vertex : this.vertices)\n writer.write(\"v \" + vertex.getA() + \" \" + vertex.getB() + \" \" + vertex.getC() + Constants.NEWLINE);\n\n for (Tuple2<Float, Float> normal : this.normals)\n writer.write(\"vt \" + normal.getA() + \" \" + normal.getB() + Constants.NEWLINE);\n\n writer.close();\n }",
"private void batchExport(){\r\n \t \t\r\n \t// Retrieve all the rsml files\r\n \tFile f = new File(batchSourceFolder.getText());\r\n \tFile[] rsml = f.listFiles(new FilenameFilter() {\r\n \t\tpublic boolean accept(File directory, String fileName) {\r\n \t\t\treturn fileName.endsWith(\".rsml\");\r\n \t\t}\r\n \t});\r\n \t \t\r\n \tif(rsml.length < 100){\r\n\t \tSR.write(\"Batch export started for \"+rsml.length+\" files\");\r\n\t\r\n\t \t// Open the different RSML files, retriev their data and get their size.\r\n\t \tRootModel[] models = new RootModel[rsml.length];\r\n\t \tint w = 0; int h = 0;\r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\tmodels[i] = new RootModel(rsml[i].getAbsolutePath());\r\n\t \t \t\tif(models[i].getWidth(true) > w) w = models[i].getWidth(true);\r\n\t \t \t\tif(models[i].getHeight(true) > h) h = models[i].getHeight(true);\r\n\t \t \t}\r\n\t \t \t\r\n\t \t \tResultsTable rt = new ResultsTable();\r\n\t \t \tImageStack is= new ImageStack(w, h);\r\n\t \t \r\n\t \t \r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\t// Send the imagr to the stack\r\n\t \t \t\tif(batchImage.isSelected()) {\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),models[i].createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), w, h, batchConvex.isSelected())); \r\n\t \t \t\t\tis.addSlice(ip.getProcessor());\r\n\t \t \t \t\t// Save a single image\r\n\t \t \t \t\tif(batchSave.isSelected()){\r\n\t \t \t \t\t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\r\n\t \t \t \t\t}\r\n\t \t \t\t}\r\n\t\t \t \tif(!batchImage.isSelected() && batchSave.isSelected()){\r\n\t\t \t \t\tSR.write(rsml[i].getName());\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),models[i].createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), batchConvex.isSelected())); \r\n\t\t \t \t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\t \t \t}\t \t \t\t\r\n\t \t \t\t\r\n\t \t \t\t// Send the results to the Result Table\r\n\t \t \t\tif(batchResults.isSelected()){\r\n\t \t \t\t\tint sel = batchJCB.getSelectedIndex();\r\n\t \t \t\t\tswitch (sel) { \r\n\t \t \t\t\t\tcase 0: models[i].sendImageData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 1: models[i].sendRootData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 2: models[i].sendNodeData(rt, rsml[i].getName()); break;\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 \tif(batchResults.isSelected()) rt.show(batchJCB.getSelectedItem().toString()+\" data\");\r\n\t \t \tif(batchImage.isSelected()){\r\n\t \t \t\tImagePlus ip = new ImagePlus(\"RSML images\");\r\n\t \t \t\tip.setStack(is);\r\n\t \t \t\tip.show();\r\n\t \t \t}\t\t\t\r\n \t}\r\n \telse{\r\n\t \tSR.write(\"Batch export started for \"+rsml.length+\" files\");\r\n\t \t \tResultsTable rt = new ResultsTable();\r\n\t \t// Open the different RSML files, retriev their data and get their size.\r\n\t \tRootModel model;\r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\tmodel = new RootModel(rsml[i].getAbsolutePath());\r\n\t\t \t \tif(batchSave.isSelected()){\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),model.createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), batchConvex.isSelected())); \r\n\t\t \t \t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\t \t \t}\t \t \t\t\r\n\t \t \t\t\r\n\t \t \t\t// Send the results to the Result Table\r\n\t \t \t\tif(batchResults.isSelected()){\r\n\t \t \t\t\tint sel = batchJCB.getSelectedIndex();\r\n\t \t \t\t\tswitch (sel) { \r\n\t \t \t\t\t\tcase 0: model.sendImageData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 1: model.sendRootData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 2: model.sendNodeData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t}\r\n\t \t \t\t}\r\n\t \t \t}\r\n \t\trt.show(batchJCB.getSelectedItem().toString());\r\n \t}\r\n \t\r\n \t \tSR.write(\"Export done for \"+rsml.length+\" files\"); \r\n }",
"@FXML\r\n\tpublic void save() {\r\n\t\ttry {\r\n\t\t\tFile copy = new File(fileName.getText());\r\n\t\t\tScanner fileIn = new Scanner(result.getText());\r\n\t\t\tPrintStream fileOut = new PrintStream(copy);\r\n\r\n\t\t\twhile (fileIn.hasNextLine()) {\r\n\t\t\t\tfileOut.print(fileIn.nextLine());\r\n\t\t\t}\r\n\r\n\t\t\tfileIn.close();\r\n\t\t\tfileOut.close();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void export(URNspec urn, HashMap mapDiagrams, FileOutputStream fos) throws InvocationTargetException {\n\t}",
"@Override\n\t\t\tpublic Result createOutput(String ns, String file)\n\t\t\t\t\tthrows IOException {\n\t\t\t\tStreamResult res = new StreamResult(writer);\n\t\t\t\tres.setSystemId(\"no-id\");\n\t\t\t\treturn res;\n\t\t\t}",
"public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }",
"void export(String path, Events<?> events);",
"private static void writeFile(String name, Trajectory t) {\n\t\ttry {\n\t\t\tFile directory = new File(cacheDirectory);\n\t\t\tif (!directory.exists()) {\n\t\t\t\tconsole.log(\"missing dir, making\");\n\t\t\t\tdirectory.mkdir();\n\t\t\t}\n\t\t\t\n\t\t\tFileOutputStream fos = new FileOutputStream(cacheDirectory + name);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t oos.writeObject(t);\n\t\t oos.close();\n\t\t fos.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t}",
"public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }",
"public String getExportMimeType(){\n return \"text/plain\";\n }",
"private void exportarDatos() {\r\n // Cabecera\r\n System.out.println(\"Exportación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (PrintWriter pr = new PrintWriter(DEF_NOMBRE_FICHERO)) {\r\n // Bucle de Escritura\r\n for (Item item : CARRITO) {\r\n // Generar Linea de Texto\r\n String linea = String.format(Locale.ENGLISH, \"%d%s%s%s%.2f%s%s\",\r\n item.getId(), REG_CSV_ESCR,\r\n item.getNombre(), REG_CSV_ESCR,\r\n item.getPrecio(), REG_CSV_ESCR,\r\n UtilesGraficos.obtenerNombreColor(item.getColor()));\r\n\r\n // Item > Fichero\r\n pr.println(linea);\r\n }\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos exportados correctamente\");\r\n } catch (NumberFormatException | NullPointerException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Formato de datos incorrecto\");\r\n\r\n // Vaciado Carrito\r\n CARRITO.clear();\r\n } catch (IOException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Acceso al fichero\");\r\n }\r\n }",
"public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }",
"static void saveMeta() {\n File dir = new File(\"./plugins/SkyblockShop/\");\n if (!dir.exists()) {if (!dir.mkdir()) { System.out.println(\"Failed to create SkyblockShop directory!\");}}\n\n //save 'money' to .meta file\n try {\n PrintWriter writer = new PrintWriter(\"./plugins/SkyblockShop/.meta\", \"UTF-8\");\n writer.println(Main.money);\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"Something went wrong while creating the .meta file!\");\n }\n }",
"public abstract String FileOutput();",
"private void saveUCSC() throws FileNotFoundException, IOException {\n\t\tString name = Misc.removeExtension(bedFile.getName());\n\t\tFile ucscFile = new File (bedFile.getParentFile(), name+\".ucsc.gz\");\n\t\tGzipper out = new Gzipper( ucscFile);\n\t\tfor (String chr: chromGenes.keySet()) {\n\t\t\tfor (UCSCGeneLine ugl: chromGenes.get(chr)) {\n\t\t\t\tout.println(ugl.toUCSC());\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t\tIO.pl(\"\\nSaved \"+ucscFile);\n\t\t\n\t}",
"@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"client-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}",
"public void exportToFile(Grid grid, String filePath) throws IOException {\n\n File file = new File(filePath);\n FileOutputStream fileOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file);\n writeGridAndCloseStream(grid, fileOutputStream);\n \n if (this instanceof EsriASCIIGridExporter) {\n WKTProjectionFile.write(grid.getPrjFileContent(), filePath);\n }\n } catch (Exception exc) {\n // Delete the file if an exception is thrown. Before the file can be \n // deleted, the output stream needs to be closed.\n closeQuietly(fileOutputStream);\n fileOutputStream = null;\n if (file.exists()) {\n file.delete();\n }\n throw exc;\n } finally {\n closeQuietly(fileOutputStream);\n\n // delete the file if the user cancelled the operation\n if (progressIndicator != null\n && progressIndicator.isCancelled()) {\n if (file.exists()) {\n file.delete();\n }\n }\n }\n }",
"void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;",
"public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }",
"private void printFile(Products print, String ufilename) {\n\t\tFile file = new File(\"output\"+File.separator+ufilename+fileId+\".xml\"); \n\t\tSystem.out.println(\"Exporting : \"+ file);\n\t\tJAXBContext jaxbContext;\n\t\ttry {\n\t\t\tjaxbContext = JAXBContext.newInstance(Products.class); \n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);\n\t\t\tjaxbMarshaller.setProperty(\"com.sun.xml.internal.bind.xmlHeaders\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);\n\t\t\tjaxbMarshaller.marshal(print, file); // prints the file\n\t\t\t// \t\t jaxbMarshaller.marshal(products, System.out);\n\t\t} catch (JAXBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void export(Tensor tensor, String filterType, int index, int radius, SmoothingKernel smoothingKernel) throws IOException {\n try (FileWriter writer = new FileWriter(\"030619_\" + filterType + \"_\" + smoothingKernel.toString() + \"_\" + radius + \"_\" + index + \".csv\")) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < tensor.length(); i++) {\n sb.append(tensor.get(i).Get(0).toString());\n sb.append(\",\");\n sb.append(tensor.get(i).Get(1).toString());\n sb.append(\",\");\n sb.append(tensor.get(i).Get(2).toString());\n sb.append(\"\\n\");\n }\n writer.write(sb.toString());\n }\n }",
"public void recevoirDossier() {\n try {\n fileInfo = (FileInfo) ois.readObject(); //lire les informations du fichier\n //chemin du fichier en sortie\n String outputFile = fileInfo.getDestinationDirectory() + fileInfo.getFilename();\n dstFile = new File(outputFile);\n if (!new File(fileInfo.getDestinationDirectory()).exists()) { //si le fichier n'existe pas\n new File(fileInfo.getDestinationDirectory()).mkdirs(); //creation du fichier\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData()); //ecrire les données dans le fichier\n fos.flush();\n fileInfo.setFileData(null);\n System.gc();\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n\n } else if (dstFile.lastModified() < fileInfo.getModifier()) { //si le fichier existe et que c'est une nouvelle version alors\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData());\n fos.flush();\n fileInfo.setFileData(null);\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(RecevoirFichier.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
] | [
"0.61432517",
"0.59426624",
"0.56408376",
"0.5593061",
"0.5550418",
"0.5460113",
"0.54494035",
"0.5405103",
"0.5370357",
"0.5366678",
"0.53499836",
"0.53424656",
"0.53193134",
"0.5318653",
"0.5314959",
"0.53107893",
"0.5308951",
"0.5292381",
"0.5274626",
"0.525102",
"0.5239812",
"0.5233039",
"0.52325773",
"0.5230517",
"0.52270865",
"0.5217358",
"0.5216199",
"0.52002424",
"0.51980567",
"0.5192385",
"0.5187456",
"0.51859045",
"0.5171369",
"0.51682097",
"0.51658636",
"0.51501036",
"0.5147774",
"0.51472735",
"0.51325446",
"0.5132176",
"0.512354",
"0.5117788",
"0.5114227",
"0.5109788",
"0.5109301",
"0.5107137",
"0.5106493",
"0.51025295",
"0.5089781",
"0.5086663",
"0.50772893",
"0.5072549",
"0.50682485",
"0.50669277",
"0.5063304",
"0.50596786",
"0.50543845",
"0.5054111",
"0.5049468",
"0.50489837",
"0.50414765",
"0.5039681",
"0.50354195",
"0.5030669",
"0.50304747",
"0.50287443",
"0.50281084",
"0.50251794",
"0.50221115",
"0.5013774",
"0.50132227",
"0.501316",
"0.5010179",
"0.5009341",
"0.50091434",
"0.50091434",
"0.50091434",
"0.5004644",
"0.5003279",
"0.49979877",
"0.49976915",
"0.4997648",
"0.4993072",
"0.49862665",
"0.4985796",
"0.49849308",
"0.49770132",
"0.49744564",
"0.49744523",
"0.49712342",
"0.496198",
"0.4958152",
"0.4957976",
"0.49548474",
"0.4954721",
"0.49543262",
"0.49539444",
"0.4952671",
"0.49491027",
"0.49402854"
] | 0.525263 | 19 |
base case: verify that a word, a whitespace token, and a punctuation mark each count as one token | @Test
public void testParse() {
Sentence s = new Sentence();
s.parseSentence(BASE_STRING);
assertEquals(19, s.getSentenceComponents().size());
// verify that a string of whitespace count as one token
s = new Sentence();
s.parseSentence(WHITESPACE_STRING);
assertEquals(1, s.getSentenceComponents().size());
// verify that leading and trailing space is kept
s = new Sentence();
s.parseSentence(ENDSPACE_STRING);
assertEquals(7, s.getSentenceComponents().size());
// verify parsing works as expected
s = new Sentence();
s.parseSentence(PARSE_VALIDATION_STRING);
List<SentenceComponent> tokens = s.getSentenceComponents();
assertEquals(5, tokens.size());
assertEquals("hello", tokens.get(0).getValue());
assertEquals(",", tokens.get(1).getValue());
assertEquals(" ", tokens.get(2).getValue());
assertEquals("world", tokens.get(3).getValue());
assertEquals("!", tokens.get(4).getValue());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void checkPunctuation(List<Token> token) {\r\n\t\tfor (Token tk : token) {\r\n\t\t\t//if (tk.getName().matches(\"[!\\\"#$%&'()*+,-./:;<=>?@\\\\[]^_`\\\\{|\\\\}~]\")) {\r\n\t\t\tif (tk.getName().matches(\"[\\\\W]\")) {\r\n\t\t\t\ttk.getFeatures().setLexicalType(String.valueOf(Lexical.PUNCTUATION));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n public void testWhitespace() throws TokenizerException {\n assertTokenizes(\" \", new Token[0]);\n }",
"public void analyzer(){\n i = 0;\n while (i<temp.length()){\n if(temp.charAt(i)=='p' || temp.charAt(i)=='q' || temp.charAt(i)=='r' || temp.charAt(i)=='s'){\n i++;\n if(i !=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(1);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(1);\n }\n } else if (temp.charAt(i)=='n') {\n i++;\n if(temp.charAt(i)=='o'){\n i++;\n if(temp.charAt(i)=='t'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(2);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(2); i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if (temp.charAt(i)=='a'){\n i++;\n if(temp.charAt(i)=='n'){\n i++;\n if(temp.charAt(i)=='d'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(3);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(3);\n break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(temp.charAt(i)=='x' && i!=temp.length()){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='o'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='r'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(5);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(3); i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(temp.charAt(i)=='o' & i!=temp.length()){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='r'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(4);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(4);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(i!=temp.length()&&temp.charAt(i)=='i'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='f'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)=='f'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(8);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(8);\n i++;\n }\n } else if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(6);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(6);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(i!=temp.length()&&temp.charAt(i)=='t'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='h'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='e'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='n'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(7);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(7);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(i!=temp.length()&&temp.charAt(i)=='('){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(9);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(9);\n i++;\n }\n } else if(i!=temp.length()&&temp.charAt(i)==')'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i) == ' '){\n token.add(10);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(10);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n }\n \n //menyimpan data input dan array token kedalam class biasa\n Tahap1 a = new Tahap1(temp,token);\n lex.add(a);\n \n //reset untuk next use\n a = null;\n temp = \"\";\n }",
"@Test\r\n\tpublic void testTokenizeSpace() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\");\r\n\r\n\t\t// Look for the \"Tokenize\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(0).click();\r\n\r\n\t\t// Check that there is corresponding quantity of the word \":on_sp\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint count = 0;\r\n\t\t\tfor (int i = 0; i <= res.length() - 6; i++) {\r\n\t\t\t\tString sub = res.substring(i, i + 6);\r\n\t\t\t\tif (sub.equals(\":on_sp\"))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(count, 2);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"void isToken(String p) {\r\n\t\tint n = 0;\r\n\t\t// switch statement that finds lexemes and tokens and add them to an arrayList\r\n\t\tString x = p;\r\n\t\tswitch (x) {\r\n\r\n\t\tcase \"int\":\r\n\t\t\tlexemes.add(\"int\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"double\":\r\n\t\t\tlexemes.add(\"double\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"<\":\r\n\t\t\tlexemes.add(\"<\");\r\n\t\t\ttokens.add(\"LESS_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"{\":\r\n\t\t\tlexemes.add(\"{\");\r\n\t\t\ttokens.add(\"OPEN_CURLB\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"String\":\r\n\t\t\tlexemes.add(\"String\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"char\":\r\n\t\t\tlexemes.add(\"char\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"=\":\r\n\t\t\tlexemes.add(\"=\");\r\n\t\t\ttokens.add(\"ASSIGN_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"float\":\r\n\t\t\tlexemes.add(\"float\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"-\":\r\n\t\t\tlexemes.add(\"-\");\r\n\t\t\ttokens.add(\"SUB_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"+\":\r\n\t\t\tlexemes.add(\"+\");\r\n\t\t\ttokens.add(\"ADD_OPP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"*\":\r\n\t\t\tlexemes.add(\"*\");\r\n\t\t\ttokens.add(\"MUL_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"/\":\r\n\t\t\tlexemes.add(\"/\");\r\n\t\t\ttokens.add(\"DIV_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"%\":\r\n\t\t\tlexemes.add(\"%\");\r\n\t\t\ttokens.add(\"MOD_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \">\":\r\n\t\t\tlexemes.add(\">\");\r\n\t\t\ttokens.add(\"GREAT_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"}\":\r\n\t\t\tlexemes.add(\"}\");\r\n\t\t\ttokens.add(\"CLOSE_CULRB\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"[\":\r\n\t\t\tlexemes.add(\"[\");\r\n\t\t\ttokens.add(\"OPEN_BRACK\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \":\":\r\n\t\t\tlexemes.add(\":\");\r\n\t\t\ttokens.add(\"COLON\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"]\":\r\n\t\t\tlexemes.add(\"]\");\r\n\t\t\ttokens.add(\"CLOSED_BRACK\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"(\":\r\n\t\t\tlexemes.add(\"(\");\r\n\t\t\ttokens.add(\"OPEN_PAR\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \",\":\r\n\t\t\tlexemes.add(\",\");\r\n\t\t\ttokens.add(\"COMMA\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \")\":\r\n\t\t\tlexemes.add(\")\");\r\n\t\t\ttokens.add(\"CLOSED_PAR\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \";\":\r\n\t\t\tlexemes.add(\";\");\r\n\t\t\ttokens.add(\"SEMICOLON\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tlexemes.add(x);\r\n\t\t\ttokens.add(\"IDENT\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"List<String> tokenize1(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }",
"public static LinkedList<Token> lexical_analysis(String input){\r\n\t\tinput = input.trim();\r\n\t\tint startOfWord = 0, counter = 0;\r\n\t\tchar current_char, next_char ;\r\n\t\tLinkedList<Token> linkedList = new LinkedList<Token>();\r\n\t Token token;\r\n\t String substring;\r\n\t\t/**\r\n\t\t * The input here must be formal\r\n\t\t * i.e all the several white spaces is compacted to one white space.\r\n\t\t */\r\n\t int size = input.length();\r\n\t \r\n\t\tfor(int i = 0; i < size; i++){\r\n\t\t\tcurrent_char = input.charAt(i);\r\n\t\t\tif(i < size-1) next_char = input.charAt(i+1);\r\n\t\t\telse next_char = 0;\r\n\t\t\t\r\n\t\t\tif(is_extra(current_char, next_char) == null && !current_str.equals(\" \")\r\n\t\t\t\t\t&&is_operation(current_char) == null){\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\tsubstring = input.substring(startOfWord, startOfWord+counter);\r\n\t\t\t\tif((token = checker(substring)) != null) linkedList.add(token);\r\n\t\t\t\tif(is_operation(current_char) != null && is_extra(current_char, next_char) == null) {\r\n\t\t\t\t\tlinkedList.add(new Token(\"operation\", String.valueOf(input.charAt(startOfWord+counter))));\r\n//\t\t\t\t\tSystem.out.println(\"operation\"+input.charAt(startOfWord+counter));\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * ADD THE SPECIAL TOKEN.\r\n\t\t\t\t */\r\n//\t\t\t\tSystem.out.println(\"current_char= \"+current_char+\" next_char= \"+next_char);\r\n\t\t\t\tif((value = is_extra(current_char, next_char)) != null) {\r\n\t\t\t\t\t linkedList.add(new Token(\"special\", value));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(value.equals(\"==\") || value.equals(\">=\") || value.equals(\"<=\")\r\n\t\t\t\t\t || value.equals(\"++\") || value.equals(\"--\") || value.equals(\"+=\")\r\n\t\t\t\t\t || value.equals(\"-=\") || value.equals(\"*=\") || value.equals(\"%=\")) i++;\r\n\t\t\t\t} \r\n\t\t\t\tcounter = 0;\r\n\t\t\t\tstartOfWord = i+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\treturn linkedList;\r\n\t}",
"boolean hasPunctuationToAppend();",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n // System.out.println(s);\n s = s.replace(\"!\", \" \");\n s = s.replace(\".\", \" \");\n s = s.replace(\"'\", \" \");\n s = s.replace(\"_\", \" \");\n s = s.replace(\"@\", \" \");\n s = s.replace(\"?\", \" \");\n s = s.replace(\",\", \" \");\n s = s.replace(\" \", \" \");\n s = s.replace(\" \", \" \");\n while(s.contains(\" \")) {\n \ts = s.replace(\" \", \" \");\n }\n \n \n while(s.charAt(0)==' '&&s.length()>1) {\n \tif(s.charAt(0)!=' ') {\n \t//\tSystem.out.println(s.length() +\"s \"+s);\n \t\tbreak;\n \t}else {\n \t\t//System.out.println(s.length() +\"s (\"+s+\")\");\n \t\ts = s.trim();\n \t}\n }\n \n if(!s.equals(\" \")) {\n s = s.trim();\n String [] allToken = s.split(\" \");\n System.out.println(allToken.length);\n for(int y=0;y<allToken.length;y++) {\n System.out.println(allToken[y]);\t\n }\n // System.out.println(allToken.length);\n }else {\n \t System.out.println(0);\n }\n scan.close();\n }",
"private void verifySingleTokens(String token){\n\t\t//verify normal codes\n\t\tif (token.equals(\"\")) {\n\t\t\treturn;\n\t\t}\n\t\tif (codingTable.hasCode(token)) {\n\t\t\tSystem.out.println(\"Keyword: \" + token);\n\t\t\tprogramInternalForm.addValues(codingTable.getValueForCode(token), null);\n\t\t\treturn;\n\t\t}\n\t\tif (isConstantToken(token)) {\n\t\t\tSystem.out.println(\"Constant: \" + token);\n\t\t\tsymbolTable.addValue(token);\n\t\t\tprogramInternalForm.addValues(codingTable.getValueForCode(CONSTANT), symbolTable.getPosition(token));\n\t\t\treturn;\n\t\t}\n\t\tif (isIdentifierToken(token)) {\n\t\t\tSystem.out.println(\"Identifier: \" + token);\n\t\t\tsymbolTable.addValue(token);\n\t\t\tprogramInternalForm.addValues(codingTable.getValueForCode(IDENTIFIER), symbolTable.getPosition(token));\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new RuntimeException(\"Couldn't find a category for string '\" + token + \"'\");\n\t}",
"private void tokenize() {\n\t\t//Checks char-by-char\n\t\tcharLoop:\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\t//Check if there's a new line\n\t\t\tif (input.charAt(i) == '\\n') {\n\t\t\t\ttokens.add(LINE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Iterate through the tokens and find if any matches\n\t\t\tfor (Token st : Token.values()) {\n\t\t\t\t//Do not test for these because they have separate cases below\n\t\t\t\tif (st.equals(NUMBER) || st.equals(VARIABLE_NAME) || st.equals(STRING) || st.equals(LINE)) continue;\n\t\t\t\t//Skip whitespace & newlines\n\t\t\t\tif (Character.isWhitespace(input.charAt(i))) continue;\n\t\t\t\t\n\t\t\t\t//Checks for multi-character identifiers\n\t\t\t\ttry {\n\t\t\t\t\tif (input.substring(i, i + st.getValue().length()).equals(st.getValue())) {\n\t\t\t\t\t\ttokens.add(st);\n\t\t\t\t\t\ti += st.getValue().length()-1;\n\t\t\t\t\t\tcontinue charLoop;\n\t\t\t\t\t}\n\t\t\t\t} catch(StringIndexOutOfBoundsException e) {}\n\t\t\t\t//Ignore this exception because the identifiers might be larger than the input string.\n\t\t\t\t\n\t\t\t\t//Checks for mono-character identifiers\n\t\t\t\tif (st.isOneChar() && input.charAt(i) == st.getValue().toCharArray()[0]) {\n\t\t\t\t\ttokens.add(st);\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a string\n\t\t\tif (input.charAt(i) == '\"') {\n\t\t\t\ti++;\n\t\t\t\tif (i >= input.length()) break;\n\t\t\t\tStringBuilder string = new StringBuilder();\n\t\t\t\twhile (input.charAt(i) != '\"') {\n\t\t\t\t\tstring.append(input.charAt(i));\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tstring.insert(0, \"\\\"\");\n\t\t\t\tstring.append(\"\\\"\");\n\t\t\t\ttokens.add(STRING);\n\t\t\t\tmetadata.put(tokens.size()-1, string.toString());\n\t\t\t\tcontinue charLoop;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a number\n\t\t\tif (Character.isDigit(input.charAt(i))) {\n\t\t\t\tStringBuilder digits = new StringBuilder();\n\t\t\t\twhile (Character.isDigit(input.charAt(i)) || input.charAt(i) == '.') {\n\t\t\t\t\tdigits.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (digits.length() != 0) {\n\t\t\t\t\ttokens.add(NUMBER);\n\t\t\t\t\tmetadata.put(tokens.size()-1, digits.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a variable reference/creation\n\t\t\tif (Character.isAlphabetic(input.charAt(i)) && !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\tStringBuilder varName = new StringBuilder();\n\t\t\t\twhile ( ( Character.isAlphabetic(input.charAt(i)) || Character.isDigit(input.charAt(i)) )\n\t\t\t\t\t\t&& !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\t\tvarName.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (varName.length() != 0) {\n\t\t\t\t\ttokens.add(VARIABLE_NAME);\n\t\t\t\t\tmetadata.put(tokens.size()-1, varName.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static boolean containToken(String word) {\r\n\t\tfor (int i = 0; i < word.length(); i++) {\r\n\t\t\tif (!Character.isLetter(word.charAt(i))) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Test\r\n\t\tpublic void testTokenizeWhitespace() {\r\n\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.name(\"commit\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\":on_sp\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}",
"@org.junit.Test\n public void tokenize()\n {\n List<String> tokens = Encodings.tokenize(\"\", \"(\\\\$|#|%)\\\\{(.*?)\\\\}\");\n\n assertEquals(\"empty\", 0, tokens.size());\n\n tokens = Encodings.tokenize(\"just a simple string\",\n \"(\\\\$|#|%)(?:\\\\{(.*?)\\\\}|(\\\\w+))\");\n\n assertEquals(\"string only\", \"just a simple string\", tokens.get(0));\n assertEquals(\"string only\", 1, tokens.size());\n\n tokens = Encodings.tokenize\n (\"a $first template with some %{real values} to parse\",\n \"(\\\\$|#|%)(?:\\\\{(.*?)\\\\}|(\\\\w+))\");\n\n assertEquals(\"real\", \"a \", tokens.get(0));\n assertEquals(\"real\", \"$first\", tokens.get(1));\n assertEquals(\"real\", \" template with some \", tokens.get(2));\n assertEquals(\"real\", \"%real values\", tokens.get(3));\n assertEquals(\"real\", \" to parse\", tokens.get(4));\n assertEquals(\"real\", 5, tokens.size());\n\n tokens = Encodings.tokenize(\"${test}\", \"(\\\\$|#|%)\\\\{(.*?)\\\\}\");\n\n assertEquals(\"value only\", \"$test\", tokens.get(0));\n assertEquals(\"value only\", 1, tokens.size());\n }",
"@Test\n\tpublic void testJustEmptyChars() {\n\t\tSmartScriptLexer lexer = new SmartScriptLexer(\" \\r\\n\\t \");\n\t\t\n\t\tSmartScriptToken expected = new SmartScriptToken(SmartScriptTokenType.TEXT, \" \\r\\n\\t \");\n\t\tassertEquals(lexer.nextToken().getType(), SmartScriptTokenType.TEXT);\n\t\tassertEquals(lexer.getToken().getValue(), expected.getValue());\n\t}",
"public void testNUMWORDS1() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 246, \"one\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public static void getToken(String result)\n \t{ \n \t\t\n \t\tFileWriter outputfile = null;\n \t try {\n \t outputfile = new FileWriter(\"outputfile.txt\");\n \t BufferedWriter writer = new BufferedWriter(outputfile);\n \t \n \t \n \t\t\n \t\tint i=0;\n \t\t\n \t\twhile(i<result.length())\n \t\t{\n \t\t\t\n \t\t\tif(result.charAt(i)!=' ')\n \t\t\t{\n \t\t\t\t\n \t\t\t\tStringBuffer buff=new StringBuffer(\"\");\n \t\t\t\t\n \t\t\t\t//To find Words\n \t\t\t\tif(Character.toString(result.charAt(i)).matches(\"[A-Za-z]+\")) \t\t\t\t\t\n \t\t\t\t{\n \t\t\t\t\t\n \t\t\t\t\twhile(result.charAt(i)!=' '&& Character.toString(result.charAt(i)).matches(\"[A-Za-z0-9]+\"))\n \t\t\t\t\t{\n \t\t\t\t\t\tbuff.append(Character.toString(result.charAt(i)));\n \t\t\t\t\t\ti++;\n \t\t\t\t\t}\n \t\t\t\t\twriter.write(buff + \"\\t\" + \"TOKWORD\" + \"\\n\");\n \t\t\t\t\twriter.newLine();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//To find Numbers\n \t\t\t\telse if(Character.toString(result.charAt(i)).matches(\"[0-9]+\"))\n \t\t\t\t{\n \t\t\t\t\t\n \t\t\t\t\twhile(result.charAt(i)!=' ' && Character.toString(result.charAt(i)).matches(\"[0-9]+\") )\n \t\t\t\t\t{\n \t\t\t\t\t\tbuff.append(Character.toString(result.charAt(i)));\n \t\t\t\t\t\ti++;\n \t\t\t\t\t\t\n \t\t\t\t\t\t//To find Decimal Numbers\n \t\t\t\t\t\tif (result.charAt(i)=='.' && Character.toString(result.charAt(i+1)).matches(\"[0-9]+\"))\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\twhile(Character.toString(result.charAt(i+1)).matches(\"[0-9]+\"))\n \t\t\t\t\t\t\t{\t\n \t\t\t\t\t\t\tbuff.append(Character.toString(result.charAt(i)));\n \t\t\t\t\t\t\ti++;\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\twriter.write(buff + \"\\t\" + \"TOKNUMBER\"+ \"\\n\");\n \t\t\t\t\twriter.newLine();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//To find Operators\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\t\n \t\t\t\t\twriter.write(result.charAt(i) + \"\\t\" + \"TOKOP\" + \"\\n\");\n \t\t\t\t\twriter.newLine();\n \t\t\t\t\ti++;\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (result.charAt(i)== ' ')\n \t\t\ti++;\n \t\t\t\t\n \t\t}\n \t\twriter.close();\n \t }\n \t\tcatch (Exception e) {\n \t throw new RuntimeException(e);\n \t } finally {\n \t if (outputfile != null) {\n \t try {\n \t outputfile.close();\n \t } catch (IOException e) {\n \t \n \t }\n \t }\n \t }\n \t}",
"private Token extendedNextWordToken() {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t \n\t\t while(currentIndex < data.length) {\n\t\t\t char c = data[currentIndex];\n\t\t\t \n\t\t\t if(c == '#') break;\n\t\t\t if(c == ' ' || c == '\\n' || c== '\\t' || c == '\\r') break;\n\t\t\t \n\t\t\t sb.append(c);\n\t\t\t currentIndex++;\n\t\t }\n\t\t return new Token(TokenType.WORD, sb.toString());\n\t }",
"public GenToken scan(ParseString ps, GenToken token) throws ParserException {\n if (token != null) {\n //a token is already found, so handle it here\n GenToken result = token;\n if (token.getType().equals(\"id\")) {\n //token is an identifier\n String name = (String)token.get(\"name\");\n if ((name.equals(\"true\")) || (name.equals(\"false\"))) {\n //token is a boolean constant\n result = new GenToken(\"const\");\n result.add(\"value\", new Boolean(name));\n }\n if (name.equals(\"hash\")) {\n //token is a hash operator\n result = opToken(\"~\");\n }\n }\n return result;\n }\n //no token is found yet\n char ch = ps.nextChar();\n GenToken result = null;\n if (ch == ';') {\n result = new GenToken(\"semicol\");\n } else if (ch == ',') {\n result = new GenToken(\"comma\");\n } else if (ch == '(') {\n result = new GenToken(\"lbrack\");\n } else if (ch == ')') {\n result = new GenToken(\"rbrack\");\n } else if (ch == '{') {\n result = new GenToken(\"lacc\");\n } else if (ch == '}') {\n result = new GenToken(\"racc\");\n } else if (ch == '+') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"plusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"+\");\n }\n } else if (ch == '-') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"minusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"-\");\n }\n } else if (ch == '*') {\n result = opToken(\"*\");\n } else if (ch == '/') {\n result = opToken(\"/\");\n } else if (ch == '%') {\n result = opToken(\"%\");\n } else if (ch == '~') {\n result = opToken(\"~\");\n } else if (ch == '|') {\n char ach = ps.nextChar();\n if (ach == '|') result = opToken(\"||\"); else ps.returnChar(ach);\n } else if (ch == '&') {\n char ach = ps.nextChar();\n if (ach == '&') result = opToken(\"&&\"); else ps.returnChar(ach);\n } else if (ch == '=') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"==\"); else\n if (ach == '>') result = opToken(\"=>\"); else {\n ps.returnChar(ach);\n result = new GenToken(\"assign\");\n }\n } else if (ch == '!') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"!=\"); else {\n ps.returnChar(ach);\n result = opToken(\"!\");\n }\n } else if (ch == '<') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"<=\"); else {\n ps.returnChar(ach);\n result = opToken(\"<\");\n }\n } else if (ch == '>') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\">=\"); else {\n ps.returnChar(ach);\n result = opToken(\">\");\n }\n } else if (ch == '\"') {\n StringBuffer aconst = new StringBuffer();\n char ach = ps.nextChar();\n while ( ach != '\"' ) {aconst.append(ach); ach = ps.nextChar();}\n result = new GenToken(\"const\");\n result.add(\"value\", aconst.toString());\n } else if (Character.isDigit(ch)) {\n StringBuffer aconst = new StringBuffer();\n aconst.append(ch);\n char ach = ps.nextChar();\n while ( (Character.isDigit(ach)) || (ch == '.') ) {aconst.append(ach); ach = ps.nextChar();}\n ps.returnChar(ach);\n\n float f = Float.parseFloat(aconst.toString());\n result = new GenToken(\"const\");\n result.add(\"value\", new Float(f));\n } else {\n ps.returnChar(ch);\n }\n return result;\n }",
"public int numPunctuation(Sentence sent) {\n int punctuationMarks = 0;\n for (Token token : selectCovered(Token.class, sent)) {\n if (token.getPos().getCoarseValue().toLowerCase().contains(\"punct\")) {\n ++punctuationMarks;\n }\n }\n return punctuationMarks;\n }",
"private Token basicNextWordToken() {\n\t\t \n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\twhile(currentIndex < data.length) {\n\t\t\t\t\n\t\t\tif( Character.isLetter(data[currentIndex]) ) {\n\t\t\t\tsb.append(data[currentIndex]);\n\t\t\t\t\n\t\t\t} else if (data[currentIndex] == '\\\\') {\n\t\t\t\t\t\n\t\t\t\t//the following condition is here to ensure that the '\\' char is\n\t\t\t\t//not the last element in the data array, or that the char after\n\t\t\t\t//the '\\' is not a letter because that is the invalid escape\n\t\t\t\tif(currentIndex + 1 >= data.length || \n\t\t\t\t\t\tCharacter.isLetter(data[currentIndex + 1])) {\n\t\t\t\t\t\n\t\t\t\t\tthrow new LexerException(\"Invalid escape sequence!\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentIndex++;\n\t\t\t\tsb.append(data[currentIndex]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t\tcurrentIndex++;\n\t\t}\n\t\t\n\t\treturn new Token(TokenType.WORD, sb.toString());\n\t }",
"private void createTokens(String text) {\n int i;\n StringTokenizer sTokenizer = new StringTokenizer(text, \" \\n\", true);\n String tok;\n TokenNode node;\n String grWord = \"\\\\p{InGreek}*\";\n String enWord = \"[a-zA-Z]*\";\n String number = \"[0-9]*\";\n String prevChar = \"\";\n // The values of prevCharsType and currCharType are:\n // 0. nothing\n // 1. greek character\n // 2. english character\n // 3. digit\n // 4. dot\n // 5. other\n int prevCharsType, currCharType;\n String prevChars;\n char currChar;\n\n while (sTokenizer.hasMoreTokens()) {\n tok = sTokenizer.nextToken();\n if ((tok.compareTo(\" \") == 0) || (tok.compareTo(\"\\n\") == 0)) {\n prevChar = tok;\n } // if\n else {\n // If tok contains only one token, that is if tok is greek word or\n // english word or a number.\n if (Pattern.matches(grWord, tok) || Pattern.matches(enWord, tok) ||\n Pattern.matches(number, tok)) {\n node = new TokenNode(tok, false, prevChar);\n tokens.add(node);\n } // if\n else {\n prevCharsType = 0;\n prevChars = \"\";\n // For each characer of tok.\n for (i = 0; i < tok.length(); i++) {\n currChar = tok.charAt(i);\n // The type of currChar is...\n if (isGrLetter(currChar)) {\n currCharType = 1;\n } // if\n else if (isEnLetter(currChar)) {\n currCharType = 2;\n } // else if\n else if (isDigit(currChar)) {\n currCharType = 3;\n } // else if\n else if (currChar == '.') {\n currCharType = 4;\n } // else\n else {\n currCharType = 5;\n } // else\n\n // If currCharType is same as previousCharsType, add currChar to\n // prevChars. This is the case where prevCharsType is:\n // 1. Greek character\n // 2. English character\n // 3. Digit\n if (currCharType == prevCharsType) {\n prevChars = prevChars.concat(String.valueOf(currChar));\n } // if\n else {\n if (prevCharsType != 0) {\n node = new TokenNode(prevChars, false, prevChar);\n prevChar = \"\";\n tokens.add(node);\n } // if\n if (currCharType == 5) {\n node = new TokenNode(String.valueOf(currChar), false, prevChar);\n prevChar = \"\";\n tokens.add(node);\n prevChars = \"\";\n prevCharsType = 0;\n } // if\n else if (currCharType == 4) {\n if ( (i == (tok.length() - 1)) || (i == (tok.length() - 2))) {\n node = new TokenNode(String.valueOf(currChar), false, prevChar);\n } // if\n else {\n char ch1 = tok.charAt(i + 1);\n char ch2 = tok.charAt(i + 2);\n if ( (ch1 == '\\\\') && (ch2 == 'y')) {\n node = new TokenNode(String.valueOf(currChar), true, prevChar);\n i += 2;\n } // if\n else {\n if ( (ch1 == '\\\\') && (ch2 == 'n')) {\n i += 2;\n } // if\n node = new TokenNode(String.valueOf(currChar), false, prevChar);\n } // else\n } // else if\n\n prevChar = \"\";\n tokens.add(node);\n prevChars = \"\";\n prevCharsType = 0;\n } // else if\n // If currCharType is:\n // 1. Greek character\n // 2. English character\n // 3. Digit\n else {\n prevChars = String.valueOf(currChar);\n prevCharsType = currCharType;\n } // else\n } // else\n } // for\n if (prevCharsType != 0) {\n node = new TokenNode(prevChars, false, \"\");\n tokens.add(node);\n } // if\n } // else\n } // else\n } // while\n }",
"@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }",
"@Test\n\tpublic void testRemoveWhiteSpacesAndPunctuation() {\n\t\tString input = \"2$2?5 5!63\";\n\t\tString actual = GeneralUtility.removeWhiteSpacesAndPunctuation(input);\n\t\tString expected = \"225563\";\n\t\tAssert.assertEquals(expected, actual);\n\t}",
"boolean hasWord();",
"long tokenCount();",
"String getPunctuation();",
"private void createWord() {\n\t\tString value = \"\";\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t}\n\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\tvalue += data[currentIndex++];\n\t\t\tvalue += data[currentIndex++];\n\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\treturn;\n\t\t}\n\t\t// no escaping!\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& !Character.isWhitespace(data[currentIndex])) {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tthrow new LexerException(\"No exceping alowed.\");\n\t\t\t}\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\t\ttoken = new Token(TokenType.WORD, value);\n\n\t}",
"public static boolean isPunctuation(CharSequence name) {\n int len = name.length();\n if (len == 0) {\n return false;\n }\n if (len == 1) {\n return isPunctuation(name.charAt(0));\n }\n return is(name, Strings::isPunctuation);\n }",
"private void extendedNext() {\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t\tcontinue;\n\t\t} // we arw now on first non wmpty space\n\t\tif (data.length <= currentIndex) {\n\t\t\ttoken = new Token(TokenType.EOF, null); // null reference\n\t\t\treturn;\n\t\t}\n\t\tstart = currentIndex;\n\t\t// System.out.print(data);\n\t\t// System.out.println(\" \"+data[start]);;\n\t\tswitch (data[currentIndex]) {\n\t\tcase '@':\n\t\t\tcurrentIndex++;\n\t\t\tcreateFunctName();\n\t\t\treturn;\n\t\tcase '\"':// string\n\t\t\tcreateString();// \"\" are left\n\t\t\treturn;\n\t\tcase '*':\n\t\tcase '+':\n\t\tcase '/':\n\t\tcase '^':\n\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\tbreak;\n\t\tcase '$':\n\t\t\tString value = \"\";\n\t\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\ttoken = new Token(TokenType.Name,\n\t\t\t\t\tString.valueOf(data[currentIndex++]));\n\t\t\treturn;\n\t\tcase '-':\n\t\t\tif (currentIndex + 1 >= data.length\n\t\t\t\t\t|| !Character.isDigit(data[currentIndex + 1])) {\n\t\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\t// if we get here,after - is definitely a number\n\t\t\tif (data[currentIndex] == '-'\n\t\t\t\t\t|| Character.isDigit(data[currentIndex])) {\n\t\t\t\t// if its decimal number ,it must starts with 0\n\t\t\t\tcreateNumber();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Character.isLetter(data[currentIndex])) {\n\t\t\t\tvalue = name();\n\t\t\t\ttoken = new Token(TokenType.Name, value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrow new LexerException(\n\t\t\t\t\t\"No miningful tag starts with \" + data[currentIndex]);\n\t\t\t// createWord();\n\n\t\t}\n\t}",
"public void testNUMWORDS12() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 257, \"sixteen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"private static boolean noWhiteSpace(String password) {\n\t\tint whitespaces = 0;\n\t\tfor (int i = 0; i < password.length(); i++) {\n\t\t char c = password.charAt(i);\n\t\t if ( Character.isWhitespace(c) ) {\n\t\t \t whitespaces++;\n\t\t }\n\t\t}\n\t\tif (whitespaces >= 1) {\n\t\t\tSystem.out.println(\"no whitespaces!\");\n\t\t\treturn false;\n\t\t} else return true;\n\t}",
"static void analyze (String s) {\r\n // Assigns the given string to the global lexeme variable\r\n lexeme = s;\r\n\r\n //Ensures all lexemes are under 100 characters long\r\n if (lexeme.length() >= 100) {\r\n System.out.println(\"\\nERROR: Lexeme too long - \" + s);\r\n System.exit(0);\r\n }\r\n\r\n int length = lexeme.length(); // Length of the lexeme\r\n int i = 0;\r\n\r\n //Check the character class of the first character\r\n updateClass(lexeme.charAt(i));\r\n\r\n //First character is a digit\r\n if (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Followed by any number of digits\r\n while (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n }\r\n System.out.print(\"\\nERROR - Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n // First character is a letter\r\n else if (charClass == 2){\r\n\r\n if (lexeme.equals(\"true\")) {\r\n token = \"TRUE\";\r\n return;\r\n }\r\n\r\n if (lexeme.equals(\"false\")) {\r\n token = \"FALSE\";\r\n return;\r\n }\r\n\r\n if (lexeme.equals(\"if\")) {\r\n token = \"IF\";\r\n return;\r\n }\r\n\r\n if (i == length - 1){\r\n token = \"IDENTIFIER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Next characters are any number of letters and numbers\r\n while (charClass == 1 || charClass == 2 || lexeme.charAt(i) == '_'){\r\n\r\n if (i == length - 1){\r\n token = \"IDENTIFIER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n }\r\n System.out.print(\"\\nERROR: Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n // First character is a digit\r\n else if (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Followed by any number of digits\r\n while (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n }\r\n System.out.print(\"\\nERROR - Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n //First character is a sign\r\n else if (lexeme.charAt(i) == '+' || lexeme.charAt(i) == '-'){\r\n\r\n if (i == length - 1){\r\n if (lexeme.charAt(i) == '+'){\r\n token = \"PLUS\";\r\n return;\r\n }\r\n if (lexeme.charAt(i) == '-'){\r\n token = \"MINUS\";\r\n return;\r\n }\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Followed by any number of digits\r\n while (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"SIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n }\r\n System.out.print(\"\\nERROR - Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n else {\r\n lookUp();\r\n if(token == \"ILLEGAL\") {\r\n System.out.print(\"\\nERROR: Illegal token - \" + lexeme);\r\n System.exit(0);\r\n }\r\n }\r\n }",
"List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }",
"private static List<String> simpleTokenize (String text) {\r\n\r\n // Do the no-brainers first\r\n String splitPunctText = splitEdgePunct(text);\r\n\r\n int textLength = splitPunctText.length();\r\n \r\n // BTO: the logic here got quite convoluted via the Scala porting detour\r\n // It would be good to switch back to a nice simple procedural style like in the Python version\r\n // ... Scala is such a pain. Never again.\r\n\r\n // Find the matches for subsequences that should be protected,\r\n // e.g. URLs, 1.0, U.N.K.L.E., 12:53\r\n Matcher matches = Protected.matcher(splitPunctText);\r\n //Storing as List[List[String]] to make zip easier later on \r\n List<List<String>> bads = new ArrayList<List<String>>();\t//linked list?\r\n List<Pair<Integer,Integer>> badSpans = new ArrayList<Pair<Integer,Integer>>();\r\n while(matches.find()){\r\n // The spans of the \"bads\" should not be split.\r\n if (matches.start() != matches.end()){ //unnecessary?\r\n List<String> bad = new ArrayList<String>(1);\r\n bad.add(splitPunctText.substring(matches.start(),matches.end()));\r\n bads.add(bad);\r\n badSpans.add(new Pair<Integer, Integer>(matches.start(),matches.end()));\r\n }\r\n }\r\n\r\n // Create a list of indices to create the \"goods\", which can be\r\n // split. We are taking \"bad\" spans like \r\n // List((2,5), (8,10)) \r\n // to create \r\n /// List(0, 2, 5, 8, 10, 12)\r\n // where, e.g., \"12\" here would be the textLength\r\n // has an even length and no indices are the same\r\n List<Integer> indices = new ArrayList<Integer>(2+2*badSpans.size());\r\n indices.add(0);\r\n for(Pair<Integer,Integer> p:badSpans){\r\n indices.add(p.first);\r\n indices.add(p.second);\r\n }\r\n indices.add(textLength);\r\n\r\n // Group the indices and map them to their respective portion of the string\r\n List<List<String>> splitGoods = new ArrayList<List<String>>(indices.size()/2);\r\n for (int i=0; i<indices.size(); i+=2) {\r\n String goodstr = splitPunctText.substring(indices.get(i),indices.get(i+1));\r\n List<String> splitstr = Arrays.asList(goodstr.trim().split(\" \"));\r\n splitGoods.add(splitstr);\r\n }\r\n\r\n // Reinterpolate the 'good' and 'bad' Lists, ensuring that\r\n // additonal tokens from last good item get included\r\n List<String> zippedStr= new ArrayList<String>();\r\n int i;\r\n for(i=0; i < bads.size(); i++) {\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n zippedStr = addAllnonempty(zippedStr,bads.get(i), false);\r\n }\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n \r\n // BTO: our POS tagger wants \"ur\" and \"you're\" to both be one token.\r\n // Uncomment to get \"you 're\"\r\n /*ArrayList<String> splitStr = new ArrayList<String>(zippedStr.size());\r\n for(String tok:zippedStr)\r\n \tsplitStr.addAll(splitToken(tok));\r\n zippedStr=splitStr;*/\r\n \r\n return zippedStr;\r\n }",
"public void testNUMWORDS35() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 280, \"seventyeen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"private void obtieneToken(){\n tipoToken = NINGUNO;\n token = \"\";\n //Busca el final de la expresion\n if(expIndice == exp.length()){\n token = FINEXP;\n return;\n }\n //Omite el espacio en blanco\n while(expIndice < exp.length() && Character.isWhitespace(exp.charAt(expIndice))){\n ++expIndice;\n }\n //Espacio en blanco termina la expresion\n if(expIndice == exp.length()){\n token = FINEXP;\n return; \n }\n if(esDelimitador(exp.charAt(expIndice))){ // es operador\n token += exp.charAt(expIndice);\n expIndice++;\n tipoToken = DELIMITADOR;\n }else if(Character.isLetter(exp.charAt(expIndice))) { // es variable\n while(!esDelimitador(exp.charAt(expIndice))){\n token += exp.charAt(expIndice);\n expIndice++;\n if(expIndice >= exp.length()){\n break;\n }\n }\n tipoToken = VARIABLE;\n }else if(Character.isDigit(exp.charAt(expIndice))){ // es numero\n while(!esDelimitador(exp.charAt(expIndice))){\n token += exp.charAt(expIndice);\n expIndice++;\n if(expIndice >= exp.length()){\n break;\n }\n }\n tipoToken = NUMERO;\n }else{ //caracter desconocido termina la expresion\n token = FINEXP;\n return;\n }\n\n}",
"public void testNUMWORDS31() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 276, \"oneteen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"@Test\r\n\tpublic void testTokenizeOperator() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\"))\r\n\t\t\t\t.sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\\nputs \\\"The best cat is: \\\" + the_best_cat\");\r\n\r\n\t\t// Look for the \"Tokenize\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(0).click();\r\n\r\n\t\t// Check that there is corresponding quantity of the word \":on_op\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint count = 0;\r\n\t\t\tfor (int i = 0; i <= res.length() - 6; i++) {\r\n\t\t\t\tString sub = res.substring(i, i + 6);\r\n\t\t\t\tif (sub.equals(\":on_op\"))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(count, 2);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public void testNUMWORDS3() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 248, \"two\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public static int countWords(final List<String> tokens) {\n\tint nWords = 0;\n\n\tfor (final String token : tokens) {\n\t if (!StringUtils.isComposedOf(token, ALL_DELIMS)) {\n\t\tnWords++;\n\t }\n\t}\n\n\treturn nWords;\n }",
"public void testNUMWORDS33() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 278, \"zero\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public static String getPunctuation( String word )\n { \n String punc = \"\";\n for(int i=word.length()-1; i >= 0; i--){\n if(!Character.isLetterOrDigit(word.charAt(i))){\n punc = punc + word.charAt(i);\n } else {\n return punc;\n }\n }\n return punc;\n }",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"boolean hasToken();",
"protected ArrayList<String> tokenize(String text)\r\n\t{\r\n\t\ttext = text.replaceAll(\"\\\\p{Punct}\", \"\");\r\n\t\tArrayList<String> tokens = new ArrayList<>();\r\n\t\tStringTokenizer tokenizer = new StringTokenizer(text);\r\n\r\n\t\t// P2\r\n\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\ttokens.add(tokenizer.nextToken());\r\n\t\t}\r\n\t\treturn tokens;\r\n\t}",
"private boolean checkWord() {\n \tboolean bl = false;\n \tfor (int i = 0; i < word.length(); i++) {\n \t\tif (letter == word.charAt(i) && list[i] != true) {\n \t\t\tlist[i] = true;\n \t\t\tnumberOfSymbols++;\n \t\t\tbl = true;\n \t\t}\n \t}\n \treturn bl;\n }",
"public static List<Token> tokenize(String source) {\n List<Token> tokens = new ArrayList<>();\n\n String token = \"\";\n TokenizeState state = TokenizeState.DEFAULT;\n\n // Many tokens are a single character, like operators and ().\n String charTokens = \"\\n=+-*/<>(),\";\n TokenType[] tokenTypes = {LINE, EQUALS,\n OPERATOR, OPERATOR, OPERATOR,\n OPERATOR, OPERATOR, OPERATOR,\n LEFT_PAREN, RIGHT_PAREN,COMMA\n };\n\n // Scan through the code one character at a time, building up the list\n // of tokens.\n for (int i = 0; i < source.length(); i++) {\n char c = source.charAt(i);\n switch (state) {\n case DEFAULT:\n // Our comment is two -- tokens so we need to check before\n // assuming its a minus sign\n if ( c == '-' && source.charAt(i+1 ) == '-') {\n state = TokenizeState.COMMENT;\n } else if (charTokens.indexOf(c) != -1) {\n tokens.add(new Token(Character.toString(c),\n tokenTypes[charTokens.indexOf(c)]));\n } else if (Character.isLetter(c) || c=='_') { // We support underbars as WORD start.\n token += c;\n state = TokenizeState.WORD;\n } else if (Character.isDigit(c)) {\n token += c;\n state = TokenizeState.NUMBER;\n } else if (c == '\"') {\n state = TokenizeState.STRING;\n } else if (c == '\\'') {\n state = TokenizeState.COMMENT; // TODO Depricated. Delete me.\n }\n break;\n\n case WORD:\n if (Character.isLetterOrDigit(c) || c=='_' ) { // We allow underbars\n token += c;\n } else if (c == ':') {\n tokens.add(new Token(token, TokenType.LABEL));\n token = \"\";\n state = TokenizeState.DEFAULT;\n } else {\n tokens.add(new Token(token, TokenType.WORD));\n token = \"\";\n state = TokenizeState.DEFAULT;\n i--; // Reprocess this character in the default state.\n }\n break;\n\n case NUMBER:\n // HACK: Negative numbers and floating points aren't supported.\n // To get a negative number, just do 0 - <your number>.\n // To get a floating point, divide.\n if (Character.isDigit(c)) {\n token += c;\n } else {\n tokens.add(new Token(token, TokenType.NUMBER));\n token = \"\";\n state = TokenizeState.DEFAULT;\n i--; // Reprocess this character in the default state.\n }\n break;\n\n case STRING:\n if (c == '\"') {\n tokens.add(new Token(token, TokenType.STRING));\n token = \"\";\n state = TokenizeState.DEFAULT;\n } else {\n token += c;\n }\n break;\n\n case COMMENT:\n if (c == '\\n') {\n state = TokenizeState.DEFAULT;\n }\n break;\n }\n }\n\n // HACK: Silently ignore any in-progress token when we run out of\n // characters. This means that, for example, if a script has a string\n // that's missing the closing \", it will just ditch it.\n return tokens;\n }",
"@Override\n\tpublic boolean increment() throws TokenizerException {\n\t\t\n\t\t StringBuffer res = new StringBuffer();\n\n\t\t\tToken current_token=t_stream.next();\n\t\t\tif(current_token==null)\n\t\t\t\treturn false;\n\t\t\tString str=current_token.getTermText();\n\t\t\tchar [] buf=current_token.getTermBuffer();\n\t\t\t\n\t\t\tfor(char a:buf)\n\t\t\t{\n\t\t\t\tif(Character.isLetterOrDigit(a) || a=='.')\n\t\t\t\t\tres.append(a);\n\t\t\t\telse if(a=='-')\n\t\t\t\t{\n\t\t\t\t\tif(matcher==null)\n\t\t\t\t\t\tmatcher = intpattern.matcher(str);\n\t\t\t\t\telse\n\t\t\t\t\t\tmatcher.reset(str);\n\t\t\t boolean isMatched = matcher.matches();\n\t\t\t \n\t\t\t if(isMatched)\n\t\t\t \t res=res.append(a);\n\t\t\t\t}\n\t\t\t\telse if(a==' ')\n\t\t\t\t\tres=res.append(a);\n\t\t\t}\n\t\t\t\n\t\t\tif(!(str.equals(res.toString())))\n\t\t\t{\n\t\t\t\tcurrent_token.setTermText(res.toString());\n\t\t\t\tt_stream.replace(current_token);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(t_stream.hasNext())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t\t\n\t}",
"@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }",
"boolean hasFirstToken();",
"@Test\n public void shouldMatchDigitsWithSpace() {\n Assert.assertThat(\"match any digits with space\",CharMatcher.DIGIT.matchesAllOf(\"123T TT4\"),is(false));\n Assert.assertThat(\"match any digits with space\",CharMatcher.DIGIT.matchesAnyOf(\"123 TTT4\"),is(true));\n }",
"public void testNUMWORDS2() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 247, \"eleven\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"@Test\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017\" };\n // WHEN tokenizing the string\n String[] result = getParser().tokenize(code);\n // THEN the visibility part is 1 1/2SM\n assertNotNull(result);\n assertArrayEquals(tokens, result);\n\n }",
"@Test\r\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\r\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017=\" };\r\n // WHEN tokenizing the string\r\n String[] result = getSut().tokenize(code);\r\n // THEN the visibility part is 1 1/2SM\r\n assertNotNull(result);\r\n assertArrayEquals(tokens, result);\r\n\r\n }",
"public static boolean isToken(String value) {\n\tif( value==null) return true;\n\tint len = value.length();\n\n\tfor (int i = 0; i < len; i++) {\n\t char c = value.charAt(i);\n\n\t if (c < 0x20 || c >= 0x7f || tspecials.indexOf(c) != -1)\n\t\treturn false;\n\t}\n\treturn true;\n }",
"@Test\n public void paragraphIsWordThenComma() throws RecognitionException {\n PARSERMETHOD_PARAGRAPH.checkTreeAfterSeparatorRemoval( \"w0,\", tree(\n NodeKind.PARAGRAPH_REGULAR,\n tree( WORD_, \"w0\" ),\n tree( PUNCTUATION_SIGN, tree( SIGN_COMMA, \",\" ) )\n ) ) ;\n }",
"public static void main(String[] args) {\n\t\tString s = \"Sharma is a good player and he is so punctual\"; \n String words[] = s.split(\" \"); \n System.out.println(\"The Number of words present in the string are : \"+words.length);\n\n\t}",
"private Token nextTokenBasic() throws LexerException {\n \n if( Character.isLetter( data[currentIndex] ) || data[currentIndex] == '\\\\' ) {\n if(data[currentIndex] == '\\\\' ) {\n backslash();\n }\n stringToken.append( data[ currentIndex++ ] );\n \n type = TokenType.WORD;\n \n while( currentIndex < dataLength \n && ( Character.isLetter( data[currentIndex] ) || data[currentIndex] == '\\\\' ) ) {\n if(data[currentIndex] == '\\\\' ) {\n backslash();\n }\n \n stringToken.append( data[ currentIndex++ ] );\n\n }\n \n token = new Token(type, stringToken.toString());\n stringToken = new StringBuilder();\n \n \n return token;\n \n } else if( Character.isDigit( data[currentIndex] ) ) {\n\n stringToken.append( data[ currentIndex++ ] );\n type = TokenType.NUMBER;\n\n while( currentIndex < dataLength && Character.isDigit( data[currentIndex] ) ) {\n \n stringToken.append( data[ currentIndex++ ] );\n\n }\n \n try {\n token = new Token( type, Long.parseLong( stringToken.toString() ) );\n stringToken = new StringBuilder();\n return token;\n } catch(NumberFormatException e) {\n throw new LexerException(\"Too big Long type.\");\n }\n } else {\n token = new Token(TokenType.SYMBOL, data[ currentIndex++ ]);\n stringToken = new StringBuilder();\n return token;\n }\n }",
"public void testNUMWORDS30() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 275, \"billion\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public void countWords(String source) {\n Scanner wordScanner = new Scanner(source);\n// wordScanner.useDelimiter(\"[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume(2033);\n Token token0 = xPathLexer0.whitespace();\n assertEquals((-2), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n }",
"public static boolean isFirstWordInSentence(String word) {\n return word.matches(\"\\\\p{Punct}*\\\\p{Lu}[\\\\p{L}&&[^\\\\p{Lu}]]*\");\n }",
"protected abstract String[] tokenizeImpl(String text);",
"public void testNUMWORDS26() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 271, \"ninety\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"private Token nextTokenExtended() throws LexerException {\n while(currentIndex < dataLength \n && !Character.isWhitespace( data[currentIndex] ) \n && data[currentIndex]!='#') {\n \n stringToken.append( data[ currentIndex++ ] );\n }\n \n token = new Token(TokenType.WORD, stringToken.toString());\n stringToken = new StringBuilder();\n \n return token;\n }",
"public void testNUMWORDS17() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 262, \"nine\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public boolean isPunctuator() /*const*/{\n\t\treturn Tkn==TipeToken.Kurungbuka || Tkn==TipeToken.Kurungtutup;\n\t}",
"public void testNUMWORDS10() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 255, \"fifteen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"@Test\n public void shouldReturnFirstIndexOfFirstWhitespace() {\n Assert.assertThat(\"match any digits\",CharMatcher.DIGIT\n .indexIn(\"123TT T4\"),is(0));\n }",
"public int countTokens()\n {\n\n int count = 0;\n int currpos = currentPosition;\n\n while (currpos < maxPosition)\n {\n int start = currpos;\n\n while ((currpos < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currpos)))\n {\n currpos++;\n }\n\n if ((start == currpos)\n && (Character.isLetterOrDigit(str.charAt(currpos)) == false))\n {\n currpos++;\n }\n\n count++;\n }\n\n return count;\n }",
"public void testNUMWORDS11() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 256, \"six\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"static boolean checkTerm() {\r\n // Checks if this is a complete term\r\n boolean complete = false;\r\n\r\n // simple_term (base case)\r\n if (token.equals(\"IDENTIFIER\") || token.equals(\"SIGNED_INTEGER\") || token.equals(\"UNSIGNED_INTEGER\")) {\r\n complete = true;\r\n lex();\r\n\r\n // simple_term op\r\n if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n complete = false;\r\n lex();\r\n\r\n // simple_term op term\r\n if(checkTerm()) {\r\n complete = true;\r\n }\r\n }\r\n }\r\n\r\n // (\r\n else if (token.equals(\"LEFT_PAREN\")) {\r\n lex();\r\n\r\n // ( term\r\n if(checkTerm()) {\r\n\r\n // ( term )\r\n if (token.equals(\"RIGHT_PAREN\")) {\r\n complete = true;\r\n lex();\r\n\r\n // ( term ) op\r\n if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n complete = false;\r\n lex();\r\n\r\n // ( term ) op term\r\n if (checkTerm()) {\r\n complete = true;\r\n }\r\n }\r\n }\r\n\r\n // ( term op\r\n else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n complete = false;\r\n lex();\r\n\r\n // ( term op term\r\n if(checkTerm()) {\r\n\r\n // ( term op term )\r\n if (token.equals(\"RIGHT_PAREN\")) {\r\n complete = true;\r\n lex();\r\n\r\n // ( term op term ) op\r\n if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n complete = false;\r\n lex();\r\n\r\n // ( term op term ) op term\r\n if (checkTerm()) {\r\n complete = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return complete;\r\n }",
"private boolean isSingleCharSentence(List<String> tokenlist) {\n\n return ((tokenlist.size() == 1)\n &&\n (tokenlist.get(0).equals(\"\\\"\")\n ||\n tokenlist.get(0).equals(\"'\"))\n &&\n !this.sentenceList.isEmpty());\n }",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"public void testTokenTypeStringStringLengthConstructor(){\r\n //Testing throwing of exception for violation of precondition\r\n // type != null\r\n try{\r\n token = new Token(null, \"\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type != EOF => value != null\r\n try{\r\n token = new Token(TokenType.STRING, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.SCHEMES, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.FACTS, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RULES, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.QUERIES, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON_DASH, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COMMA, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.PERIOD, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.LEFT_PAREN, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RIGHT_PAREN, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.Q_MARK, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type != EOF and type != STRING => |value| > 0\r\n\r\n try{\r\n token = new Token(TokenType.SCHEMES, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.FACTS, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RULES, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.QUERIES, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON_DASH, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COMMA, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.PERIOD, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.LEFT_PAREN, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RIGHT_PAREN, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.Q_MARK, null, 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n //Testing throwing of exception for violation of precondition\r\n // type == SCHEMES => value == \"Schemes\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.SCHEMES, \"scheme\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == FACTS => value == \"Facts\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.FACTS, \"Fact\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == RULES => value == \"Rules\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.RULES, \"Rule\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == QUERIES => value == \"Queries\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.QUERIES, \"Query\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == COLON_DASH => value == \":-\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.COLON_DASH, \":\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON_DASH, \"-\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON_DASH, \"::-\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == COLON => value == \":\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.COLON, \"a\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.COLON, \"::\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == COMMA => value == \",\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.COMMA, \";\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == PERIOD => value == \".\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.PERIOD, \",\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == LEFT_PAREN => value == \"(\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.LEFT_PAREN, \")\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.LEFT_PAREN, \"[\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.LEFT_PAREN, \"{\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.LEFT_PAREN, \"9\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == RIGHT_PAREN => value == \")\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.RIGHT_PAREN, \"(\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RIGHT_PAREN, \"]\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RIGHT_PAREN, \"}\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.RIGHT_PAREN, \"0\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type == Q_MARK => value == \"?\" -- ignoring case\r\n try{\r\n token = new Token(TokenType.Q_MARK, \"!\", 1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // lineNunmber >= 1\r\n try{\r\n token = new Token(TokenType.Q_MARK, \"?\", 0);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.Q_MARK, \"?\", -1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n //Testing throwing of exception for violation of precondition\r\n // type = ID => the length is > 0, the first character must be a\r\n // letter and all of the rest must be letters or digits.\r\n try{\r\n token = new Token(TokenType.ID, \"\", -1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"1\", -1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"a?\", -1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"a1b2.\", -1);\r\n assertTrue(false);\r\n }catch(ParserException e){\r\n assertTrue(true);\r\n };\r\n\r\n\r\n try{ //all of the follow can but should not throw exceptions.\r\n //Thus we wrap them in a try block, but, shoud never use it.\r\n\r\n //Testing EOF constructor\r\n token = new Token(TokenType.EOF, null, 2);\r\n assertTrue(token.getTokenType() == TokenType.EOF);\r\n assertTrue(token.getValue().equals(\"\"));\r\n assertTrue(token.getLineNumber() == 2);\r\n\r\n token = new Token(TokenType.EOF, \"cat\", 50);\r\n assertTrue(token.getTokenType() == TokenType.EOF);\r\n assertTrue(token.getValue().equals(\"\"));\r\n assertTrue(token.getLineNumber() == 50);\r\n\r\n //Testing the STRING constructor\r\n token = new Token(TokenType.STRING, \"\", 30);\r\n assertTrue(token.getTokenType() == TokenType.STRING);\r\n assertTrue(token.getValue().equals(\"''\"));\r\n assertTrue(token.getLineNumber() == 30);\r\n\r\n token = new Token(TokenType.STRING, \"'a'\", 30);\r\n assertTrue(token.getTokenType() == TokenType.STRING);\r\n assertTrue(token.getValue().equals(\"''a''\"));\r\n assertTrue(token.getLineNumber() == 30);\r\n\r\n //Testing the ID constructor\r\n token = new Token(TokenType.ID, \"a\", 3);\r\n assertTrue(token.getTokenType() == TokenType.ID);\r\n assertTrue(token.getValue().equals(\"a\"));\r\n assertTrue(token.getLineNumber() == 3);\r\n\r\n token = new Token(TokenType.ID, \"A123456789\", 3);\r\n assertTrue(token.getTokenType() == TokenType.ID);\r\n assertTrue(token.getValue().equals(\"A123456789\"));\r\n assertTrue(token.getLineNumber() == 3);\r\n\r\n token = new Token(TokenType.ID, \"z2\", 3);\r\n assertTrue(token.getTokenType() == TokenType.ID);\r\n assertTrue(token.getValue().equals(\"z2\"));\r\n assertTrue(token.getLineNumber() == 3);\r\n\r\n //Testing SCHEMES constructor\r\n token = new Token(TokenType.SCHEMES, \"schemes\", 1);\r\n assertTrue(token.getTokenType() == TokenType.SCHEMES);\r\n assertTrue(token.getValue().equals(\"schemes\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.SCHEMES, \"SCHEMES\", 1);\r\n assertTrue(token.getTokenType() == TokenType.SCHEMES);\r\n assertTrue(token.getValue().equals(\"SCHEMES\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.SCHEMES, \"Schemes\", 1);\r\n assertTrue(token.getTokenType() == TokenType.SCHEMES);\r\n assertTrue(token.getValue().equals(\"Schemes\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing FACTS constructor\r\n token = new Token(TokenType.FACTS, \"facts\", 1);\r\n assertTrue(token.getTokenType() == TokenType.FACTS);\r\n assertTrue(token.getValue().equals(\"facts\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.FACTS, \"FACTS\", 1);\r\n assertTrue(token.getTokenType() == TokenType.FACTS);\r\n assertTrue(token.getValue().equals(\"FACTS\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.FACTS, \"Facts\", 1);\r\n assertTrue(token.getTokenType() == TokenType.FACTS);\r\n assertTrue(token.getValue().equals(\"Facts\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing RULES constructor\r\n token = new Token(TokenType.RULES, \"rules\", 1);\r\n assertTrue(token.getTokenType() == TokenType.RULES);\r\n assertTrue(token.getValue().equals(\"rules\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.RULES, \"RULES\", 1);\r\n assertTrue(token.getTokenType() == TokenType.RULES);\r\n assertTrue(token.getValue().equals(\"RULES\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.RULES, \"RULEs\", 1);\r\n assertTrue(token.getTokenType() == TokenType.RULES);\r\n assertTrue(token.getValue().equals(\"RULEs\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing QUERIES constructor\r\n token = new Token(TokenType.QUERIES, \"queries\", 1);\r\n assertTrue(token.getTokenType() == TokenType.QUERIES);\r\n assertTrue(token.getValue().equals(\"queries\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.QUERIES, \"QUERIES\", 1);\r\n assertTrue(token.getTokenType() == TokenType.QUERIES);\r\n assertTrue(token.getValue().equals(\"QUERIES\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n token = new Token(TokenType.QUERIES, \"Queries\", 1);\r\n assertTrue(token.getTokenType() == TokenType.QUERIES);\r\n assertTrue(token.getValue().equals(\"Queries\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing COLON_DASH constructor\r\n token = new Token(TokenType.COLON_DASH, \":-\", 1);\r\n assertTrue(token.getTokenType() == TokenType.COLON_DASH);\r\n assertTrue(token.getValue().equals(\":-\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing COLON constructor\r\n token = new Token(TokenType.COLON, \":\", 1);\r\n assertTrue(token.getTokenType() == TokenType.COLON);\r\n assertTrue(token.getValue().equals(\":\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing COMMA constructor\r\n token = new Token(TokenType.COMMA, \",\", 1);\r\n assertTrue(token.getTokenType() == TokenType.COMMA);\r\n assertTrue(token.getValue().equals(\",\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing PERIOD constructor\r\n token = new Token(TokenType.PERIOD, \".\", 1);\r\n assertTrue(token.getTokenType() == TokenType.PERIOD);\r\n assertTrue(token.getValue().equals(\".\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing LEFT_PAREN constructor\r\n token = new Token(TokenType.LEFT_PAREN, \"(\", 1);\r\n assertTrue(token.getTokenType() == TokenType.LEFT_PAREN);\r\n assertTrue(token.getValue().equals(\"(\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing RIGHT_PAREN constructor\r\n token = new Token(TokenType.RIGHT_PAREN, \")\", 1);\r\n assertTrue(token.getTokenType() == TokenType.RIGHT_PAREN);\r\n assertTrue(token.getValue().equals(\")\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n //Testing Q_MARK constructor\r\n token = new Token(TokenType.Q_MARK, \"?\", 1);\r\n assertTrue(token.getTokenType() == TokenType.Q_MARK);\r\n assertTrue(token.getValue().equals(\"?\"));\r\n assertTrue(token.getLineNumber() == 1);\r\n\r\n }catch(ParserException e){\r\n System.err.println(\"ERROR in TokenTest::\" +\r\n \"testTokenTypeStringStringLengthConstructor(\" +\r\n \"TokenType,String,int)\\n\" +\r\n \"Should NOT be able to get here\");\r\n };\r\n }",
"public boolean nextToken() {\n\n while (!isEndOfCode()) { // while loop is to fetch nextToken, if a skipWS occurs.\n\n previousToken = currentToken; // in case you need the previous token\n\n final char currentChar = code.charAt(currentIndex);\n\n if (Arrays.asList(' ', '\\r', '\\t', '\\n').contains(currentChar)) { // 1. WS\n skipWhiteSpace();\n continue;\n } else if (currentChar == '=') { // 2. LET\n currentToken = new Token(TokenType.EQUALS_OPERATOR);\n currentIndex++;\n } else if (Character.isDigit(currentChar)) { // 3. INT\n currentToken = new Token(TokenType.NUMBER, readNumber());\n } else if (Character.isLetter(currentChar)) {\n String variableName = readVariable();\n if (variableName.equalsIgnoreCase(\"show\")) { // 4. SHOW\n currentToken = new Token(TokenType.SHOW);\n } else { // 5. VAR\n currentToken = new Token(TokenType.VARIABLE, variableName);\n }\n } else {\n throw new LexerException(\"Token not defined.\");\n }\n return true;\n }\n return false;\n }",
"@Test \r\n\tpublic void testConvertForTokenization()\r\n\t{\r\n\t\tArrayList<String> testArrayList = new ArrayList<String>();\r\n\t\ttestArrayList.add(\"This\");\r\n\t\ttestArrayList.add(\"is\");\r\n\t\ttestArrayList.add(\"a\");\r\n\t\ttestArrayList.add(\"test\");\r\n\t\t\r\n\t\tString testSentence = UtilService.convertForTokenization(testArrayList);\r\n\t\t\r\n\t\tassertNotNull(testSentence);\r\n\t\t//note the method adds a space after each word\r\n\t\tassertEquals(\"This is a test \", testSentence.toString());\r\n\t}",
"private void tokenizar(){\r\n String patron = \"(?<token>[\\\\(]|\\\\d+|[-+\\\\*/%^]|[\\\\)])\";\r\n Pattern pattern = Pattern.compile(patron);\r\n Matcher matcher = pattern.matcher(this.operacion);\r\n \r\n String token;\r\n \r\n while(matcher.find()){\r\n token = matcher.group(\"token\");\r\n tokens.add(token);\r\n \r\n }\r\n \r\n }",
"public void testNUMWORDS22() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 267, \"fifty\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"private static List<TokenInfo> parsePara(String args) {\n\t\tList<TokenInfo> tokens = new ArrayList<TokenInfo>();\n\t\tStringBuffer token = new StringBuffer();\n\t\tint status = 0;\n\t\tfor_bp: for (int i = 0; i < args.length(); i++) {\n\t\t\tchar c = args.charAt(i);\n\t\t\tswitch (c) {\n\t\t\tcase ' ': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\ttokenIn(tokens, token, status);\n\t\t\t\t\tstatus = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\ttokenIn(tokens, token, status);\n\t\t\t\t\tstatus = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase '-': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\tstatus = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\tcase 'h':\n\t\t\tcase 'i':\n\t\t\tcase 'j':\n\t\t\tcase 'k':\n\t\t\tcase 'l':\n\t\t\tcase 'm':\n\t\t\tcase 'n':\n\t\t\tcase 'o':\n\t\t\tcase 'p':\n\t\t\tcase 'q':\n\t\t\tcase 'r':\n\t\t\tcase 's':\n\t\t\tcase 't':\n\t\t\tcase 'u':\n\t\t\tcase 'v':\n\t\t\tcase 'w':\n\t\t\tcase 'x':\n\t\t\tcase 'y':\n\t\t\tcase 'z':\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\tcase 'H':\n\t\t\tcase 'I':\n\t\t\tcase 'J':\n\t\t\tcase 'K':\n\t\t\tcase 'L':\n\t\t\tcase 'M':\n\t\t\tcase 'N':\n\t\t\tcase 'O':\n\t\t\tcase 'P':\n\t\t\tcase 'Q':\n\t\t\tcase 'R':\n\t\t\tcase 'S':\n\t\t\tcase 'T':\n\t\t\tcase 'U':\n\t\t\tcase 'V':\n\t\t\tcase 'W':\n\t\t\tcase 'X':\n\t\t\tcase 'Y':\n\t\t\tcase 'Z': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\tcase 3:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase '0':\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9': {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\ttoken.append('-');\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase 0:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tstatus = 3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\t\ttoken.append(c);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatus = -1;\n\t\t\t\t\tbreak for_bp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttokenIn(tokens, token, status);\n\n\t\treturn tokens;\n\t}",
"private Token makeOneToken(String word) {\n Tokenizer tokenizer = new Tokenizer(new StringReader(word), keywords);;\n return tokenizer.next();\n }",
"public void testNUMWORDS14() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 259, \"seventeen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public int getWordLength(String word) {\n char[] notValidChars = {',', '-', '\"', '.', '\\''};\n int wordLength = 0;\n for(int i = 0, n = word.length(); i < n; i++) {\n char currentChar = word.charAt(i);\n boolean isCharFirstOrLast = word.indexOf(currentChar) == 0 || word.indexOf(currentChar) == n-1;\n boolean isNotChar = arrayContainsChar(notValidChars, currentChar);\n \n // if char is valid char, or an invalid char that's not the starting or ending of the word\n if(Character.isLetter(currentChar) || (isNotChar && !isCharFirstOrLast) ) {\n wordLength++;\n }\n }\n return wordLength;\n }",
"@Override\n\tprotected void handleSpace() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}",
"public void testNUMWORDS13() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 258, \"seven\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"@Test\n\tpublic void removePunctTest() {\n\t\tString test1 = \"hello.\";\n\t\tString test2 = \"hello,\";\n String test3 = \"(hello!)\";\n String test4 = \"hello...\";\n String test5 = \"!?,hel;lo\";\n String test6 = \"hel-lo\";\n String test7 = \"hello; !hel(lo\";\n String test8 = \"hel\\rlo\\n\\n\";\n String test9 = \"(hello')\";\n \n assertEquals(\"hello\", removePunct(test1));\n assertEquals(\"hello\", removePunct(test2));\n assertEquals(\"hello\", removePunct(test3));\n assertEquals(\"hello\", removePunct(test4));\n assertEquals(\"hello\", removePunct(test5));\n assertEquals(\"hello\", removePunct(test6));\n assertEquals(\"hello hello\", removePunct(test7));\n assertEquals(\"hel lo \", removePunct(test8));\n assertEquals(\"hello'\", removePunct(test9));\n\n\t}",
"@Test\n public void parseToken() {\n }",
"private static boolean tokensOK(String fString){\n String middle = fString;\n int i;\n middle= FunctionStringReplacers.removeString(\"ABS\",middle);\n middle= FunctionStringReplacers.removeString(\"ARCSIN\",middle);\n middle= FunctionStringReplacers.removeString(\"ARCTAB\",middle);\n middle= FunctionStringReplacers.removeString(\"ARCCOS\",middle);\n middle= FunctionStringReplacers.removeString(\"COS\",middle);\n middle= FunctionStringReplacers.removeString(\"COT\",middle);\n middle= FunctionStringReplacers.removeString(\"CSC\",middle);\n middle= FunctionStringReplacers.removeString(\"DTOR\",middle);\n middle= FunctionStringReplacers.removeString(\"EXP\",middle);\n middle= FunctionStringReplacers.removeString(\"frac\",middle);\n middle= FunctionStringReplacers.removeString(\"INT\",middle);\n middle= FunctionStringReplacers.removeString(\"LN\",middle);\n middle= FunctionStringReplacers.removeString(\"LOG\",middle);\n middle= FunctionStringReplacers.removeString(\"PI\",middle);\n middle= FunctionStringReplacers.removeString(\"RTOD\",middle);\n middle= FunctionStringReplacers.removeString(\"ROUND\",middle);\n middle= FunctionStringReplacers.removeString(\"SIN\",middle);\n middle= FunctionStringReplacers.removeString(\"SEC\",middle);\n middle= FunctionStringReplacers.removeString(\"SQRT\",middle);\n middle= FunctionStringReplacers.removeString(\"TAN\",middle);\n middle= FunctionStringReplacers.removeString(\"TRUNC\",middle);\n i = 0;\n if (middle.equals(\"\")) return true;\n do{\n switch (middle.charAt(i)){\n case '+': break;\n case '*': break;\n case '/': break;\n case '^': break;\n case '.': break;\n case '-': break;\n //case '{': break;\n //case '}': break;\n case '(': break;\n case ')': break;\n case '0': break;\n case '1': break;\n case '2': break;\n case '3': break;\n case '4': break;\n case '5': break;\n case '6': break;\n case '7': break;\n case '8': break;\n case '9': break;\n case 'E': break;\n default : return false;\n }\n i = i+1;\n } while (i < middle.length());\n return true;\n }",
"public void tokenizeAll() {\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tgetNextValidToken();\n\t\t\t}\n\t\t} catch (NoSuchElementException done) {\n\t\t\t// Fully Tokenized\n\t\t}\n\t}",
"private void getToken(){\n\t\tboolean primaryFirst=false;\t\t\t// determines whether the current token is a primary (true) or an operator (false)\n\t\tboolean primaryIsReal=false;\t\t// determines whether the current primary is a numerical number (true) or a name (false)\n\t\tboolean checkedPrimaryType=false;\t// determine whether the primary type has already been checked (true) or not (false)\n\t\t\n\t\twhile(true){\n\t\t\tcurr_pos++;\n\t\t\tif(curr_pos>input.length()-1){\n\t\t\t\tcurr_tok=token_value.END;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(\n\t\t\t\tinput.charAt(curr_pos)=='+' ||\n\t\t\t\tinput.charAt(curr_pos)=='-' ||\n\t\t\t\tinput.charAt(curr_pos)=='*'\t||\t\n\t\t\t\tinput.charAt(curr_pos)=='/'\t||\n\t\t\t\tinput.charAt(curr_pos)=='('\t||\n\t\t\t\tinput.charAt(curr_pos)==')'\t||\n\t\t\t\tinput.charAt(curr_pos)=='^'\t||\n\t\t\t\tinput.charAt(curr_pos)=='_'\t||\n\t\t\t\tinput.charAt(curr_pos)=='='\n\t\t\t){\n\t\t\t\tif(!primaryFirst){\n\t\t\t\t\tfor(int i=0; i<charToEnum.length; i++){\n\t\t\t\t\t\tif(input.charAt(curr_pos) == charToEnum[i]){\n\t\t\t\t\t\t\tcurr_tok=token_value.values()[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurr_pos--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(!checkedPrimaryType){\n\t\t\t\t\tcheckedPrimaryType=true;\n\t\t\t\t\tint num = (int)input.charAt(curr_pos);\n\t\t\t\t\tif(num > 47 && num < 58){ // number case\n\t\t\t\t\t\tprimaryIsReal=true;\n\t\t\t\t\t}\n\t\t\t\t\tstring_value=\"\";\n\t\t\t\t}\n\t\t\t\tprimaryFirst=true;\n\t\t\t\tstring_value+=input.charAt(curr_pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(primaryFirst){\n\t\t\tif(primaryIsReal){\n\t\t\t\tnumber_value = Double.parseDouble(string_value);\n\t\t\t\tcurr_tok=token_value.NUMBER;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurr_tok=token_value.NAME;\n\t\t\t}\n\t\t}\n\t}",
"public void testNUMWORDS32() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 277, \"fiveteen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public void testNUMWORDS21() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 266, \"fourty\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"public void testNUMWORDS16() throws Exception {\n\t\tObject retval = execLexer(\"NUMWORDS\", 261, \"eighteen\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"NUMWORDS\", expecting, actual);\n\t}",
"boolean isValid(String word);",
"private String getLowerToken(char[] characters) \n\t{\n\t\t//current token to be returned.\n\t\tString currentToken = \"\";\n\t\t\n\t\t//look at each character\n\t\tfor (char ch: characters)\n\t\t{\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\t\t\t//check if token is valid\n\t\t\tboolean currIsValid = core.containsKey(currentToken);\n\t\t\t\n\t\t\t//not whitespace and new ch is lowercase.\n\t\t\tif (!ws && Objects.equals(type, \"lowercase\"))\n\t\t\t{\n\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t}\n\t\t\t//not whitespace and special ch, token found, must be valid token\n\t\t\telse if (!ws && Objects.equals(type, \"special\") && currIsValid )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\t//whitespace found, and token is a valid token\n\t\t\telse if ( ws && currIsValid )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse if ( ws )// token was not valid \n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n\"+currentToken+\"is not a valid reserved word!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n lower: \"+currentToken+ch+\": does not have a valid ending\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process (end of line)\n\t\treturn currentToken;\n\t}"
] | [
"0.69662774",
"0.6747211",
"0.6424397",
"0.640992",
"0.6175242",
"0.5913263",
"0.5903798",
"0.5858258",
"0.58542925",
"0.5854047",
"0.5838127",
"0.58379126",
"0.57913333",
"0.5780976",
"0.57765955",
"0.57206637",
"0.5689542",
"0.5651498",
"0.5620796",
"0.56176484",
"0.56008726",
"0.5598522",
"0.5596939",
"0.559639",
"0.55743766",
"0.55698013",
"0.556307",
"0.55603546",
"0.55388623",
"0.5537911",
"0.55087173",
"0.549934",
"0.5497918",
"0.5491991",
"0.54630315",
"0.545015",
"0.5446797",
"0.54327935",
"0.542894",
"0.5428092",
"0.5408724",
"0.5387804",
"0.5384313",
"0.5372026",
"0.5372026",
"0.5372026",
"0.5372026",
"0.5372026",
"0.5372026",
"0.53704816",
"0.5362884",
"0.5362261",
"0.53570586",
"0.5340186",
"0.533352",
"0.53260267",
"0.53187823",
"0.5311389",
"0.52959615",
"0.52939993",
"0.5281815",
"0.52742803",
"0.5273637",
"0.5272821",
"0.52727026",
"0.52592194",
"0.52581996",
"0.52566946",
"0.52441895",
"0.5232676",
"0.5231707",
"0.523106",
"0.52223855",
"0.5221717",
"0.5209149",
"0.52014214",
"0.51990455",
"0.51912",
"0.51842654",
"0.51828486",
"0.5180476",
"0.5178265",
"0.51709133",
"0.516921",
"0.51682603",
"0.516679",
"0.5160393",
"0.51603675",
"0.51484746",
"0.51455986",
"0.5142465",
"0.5140533",
"0.51397896",
"0.5139068",
"0.5138088",
"0.5134145",
"0.5131603",
"0.5131591",
"0.51284635",
"0.5127913",
"0.5124285"
] | 0.0 | -1 |
Interface to be used while getting the section type of the item | public interface Item {
boolean isSection();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSectionType() {\n\treturn sectionType;\n }",
"SectionType createSectionType();",
"public interface Item {\n\n public boolean isSection();\n\n}",
"public ItemType getType();",
"@Override\n public int getItemType() {\n return ITEM_TYPE;\n }",
"SectionsType createSectionsType();",
"public String getPartString() { return \"Type\"; }",
"public ItemType getType()\n {\n\treturn type;\n }",
"public String getItemType() {\n\t\treturn itemType;\n\t}",
"public Class<? extends SugarHolder<?>> dispatch(Section section) {\n C32569u.m150519b(section, C6969H.m41409d(\"G6D82C11B\"));\n String str = section.templateType;\n if (str != null) {\n int hashCode = str.hashCode();\n if (hashCode != -1568793824) {\n if (hashCode != -1040315323) {\n if (hashCode == 1718750091 && str.equals(C6969H.m41409d(\"G6586D30E8039A62E\"))) {\n return SectionLeftImgViewHolder.class;\n }\n } else if (str.equals(C6969H.m41409d(\"G678CEA13B237\"))) {\n return SectionNoImgViewHolder.class;\n }\n } else if (str.equals(C6969H.m41409d(\"G7B8AD212AB0FA224E1\"))) {\n return SectionRightImgViewHolder.class;\n }\n }\n return SectionNoImgViewHolder.class;\n }",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"protected abstract String getType();",
"public ItemType getType() {\n return type;\n }",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public int getType() { return type; }",
"public int getType() { return type; }",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public String getType() { return type; }",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public String getType() {return type;}",
"public int getType () {\r\n return type;\r\n }",
"@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\t}",
"private String getType(){\r\n return type;\r\n }",
"abstract public String getType();",
"public int getType(){\r\n\t\treturn type;\r\n\t}",
"public int getType() { \n return type; \n }",
"String getViewType();",
"public ConfigurationItemType getType() {\r\n\t\treturn type;\r\n\t}",
"protected String getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n return type_;\n }",
"public int getType(){\n\t\treturn type;\n\t}",
"public String getType(){\r\n return type;\r\n }",
"public int getType () {\n return type;\n }",
"public int getType () {\n return type;\n }",
"public String getType()\n \t{\n \t\treturn this.type;\n \t}",
"public int getType()\r\n\t{\r\n\t\treturn type;\r\n\t}",
"@Override\r\n\tpublic int getType() {\n\t\treturn getTag();\r\n\t}",
"public String getType(){\r\n\t\treturn this.type;\r\n\t}",
"public int getType() {\n return type;\n }",
"public int getType(){\n return type;\n }"
] | [
"0.73157513",
"0.6732766",
"0.66432995",
"0.6617953",
"0.64287835",
"0.63825434",
"0.6362256",
"0.6280955",
"0.62804425",
"0.6255422",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.6186087",
"0.61345273",
"0.61256033",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.60805494",
"0.6075468",
"0.6075468",
"0.6022975",
"0.6022975",
"0.6022975",
"0.6022975",
"0.6022975",
"0.6022975",
"0.6022975",
"0.6022975",
"0.6020874",
"0.6020771",
"0.6020771",
"0.6020771",
"0.6020771",
"0.6020771",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.60129774",
"0.6009236",
"0.60035634",
"0.5996678",
"0.5993931",
"0.59870434",
"0.59756",
"0.59647983",
"0.59604824",
"0.59586114",
"0.595081",
"0.5947899",
"0.594774",
"0.5936604",
"0.59362465",
"0.59362465",
"0.5933573",
"0.59334517",
"0.5922903",
"0.5922013",
"0.5914221",
"0.591332"
] | 0.67849755 | 1 |
private void signSetter(String[] lines, Player p, Block s) | private void signSetter(Block b, Player p, String[] lines)
{
//TODO: virer debug
//p.sendMessage("dbg1");
if(b==null)
return;
BoutiqueSign bs = new BoutiqueSign();
bs.setOwner(p);
bs.setLocation(b.getLocation());
bs.setLines(lines);
//TODO: virer debug
/*
p.sendMessage("dbg1 : line1 = " + bs.getLine1());
p.sendMessage("dbg1 : line2 = " + bs.getLine2());
p.sendMessage("dbg1 : line3 = " + bs.getLine3());
p.sendMessage("dbg1 : line4 = " + bs.getLine4());
p.sendMessage("dbg2 : type = " + bs.getType());
*/
if(bs.isSignServer())
{
if (!PermissionsHandler.canSetGlobalSign(p))
{
p.sendMessage(PermissionsHandler.permissionErr);
return;
}
if(!bs.checkLines(p))
{
return;
}
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.SERVERSIGNADDED")); //$NON-NLS-1$
}
else if(bs.isSignChest())
{
if (!PermissionsHandler.canSetPersonalSign(p))
{
p.sendMessage(plugin.chatPrefix + PermissionsHandler.permissionErr);
return;
}
if(!bs.checkLines(p))
{
//TODO: virer debug
//p.sendMessage("erreur checkline");
return;
}
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHESTSIGNADDED")); //$NON-NLS-1$
}
else if(bs.isSignWebAuction())
{
if (!PermissionsHandler.canSetWebAuctionSign(p))
{
p.sendMessage(PermissionsHandler.permissionErr);
return;
}
if(!bs.checkLines(p))
{
//TODO: virer debug
//p.sendMessage("erreur checkline");
return;
}
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.WEBAUCTIONSIGNADDED")); //$NON-NLS-1$
}
else
{
return;
}
bs.setLine4("ok"); //$NON-NLS-1$
bs.Render();
this.put(bs);
plugin.signmanager.saveGlobalSigns();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateSignToPlayer(Player player, Location location, String[] lines);",
"public void setChest(Block sign, Chest chest, Player p)\n\t{\n\t\tBoutiqueSign bs = this.getBoutiqueSign(sign);\n\t\t\n\t\t\n\t\tif(bs == null)\n\t\t{\n\t\t\t// TODO: message \"Impossible de trouver le panneau en question\"\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHOOSESIGNBEFORE\")); //$NON-NLS-1$\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString newChestLoc = \"\"; //$NON-NLS-1$\n\t\t\tString oldChestLoc = \"\"; //$NON-NLS-1$\n\t\t\t\n\t\t\tChest bsc = bs.getChest();\n\t\t\t\n\t\t\t\n\t\t\toldChestLoc = bs.getChestString();\n\t\t\tnewChestLoc = BoutiqueSign.getLocationString(chest.getBlock().getLocation());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//verifie que le panneau n'etait pas deja relié au coffre\t\t\t\n\t\t\tif (oldChestLoc == newChestLoc)\n\t\t\t{\n\t\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.SIGNALREADYBINDED\")); //$NON-NLS-1$\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tint distX = sign.getX() - chest.getBlock().getX();\n\t\t\tint distZ = sign.getZ() - chest.getBlock().getZ();\n\t\t\n\t\t\t\n\t\t\tint maxDist = 15;\n\t\t\tif (distX > maxDist || distZ > maxDist ) \n\t\t\t{\n\t\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHESTTOOFARAWAY\") + maxDist + Messages.getString(\"Sign.MAXBLOCKS\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//DEBUG\n\t\t\t//p.sendMessage(plugin.chatPrefix + \"Enregistrement coffre\");\n\t\t\t\t\t\t\n\t\t\tbs.setChest(chest);\t\t\t\n\t\t\t\n\t\t\tupdateSignDb(bs);\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHESTBINDED\")); //$NON-NLS-1$\n\t\t\t\t\t\n\t\t\t//DEBUG\n\t\t\t//p.sendMessage(plugin.chatPrefix + \"panneau: \" + bs.getChestString());\n\t\t\t\n\t\t}\t\t\n\t}",
"public void setSign(String sign) {\n\n this.sign = sign;\n }",
"public void addSign(Vector3D location, String world, String[] lines) {\n dirty = true;\n if (!getSignAt(location, world).isPresent()) {\n signLocations.add(new SignLocation(location, world, server, lines));\n }\n }",
"void sendSignChangeToPlayer(Player player, Location location, byte data);",
"public interface SignReflection {\n /**\n * Reads an input packet of sign being updated\n *\n * @param packet The input packet of the sign being updated\n * @return The lines stored in the input packet\n */\n String[] readLines(Object packet);\n\n /**\n * Generates the sign editor packet\n *\n * @param location The location of the sign for the player's world or the game world\n * @return The output packet that includes the required information to open the sign editor\n */\n Object openSignEditor(Location location);\n\n /**\n * Update sign lines to the player\n *\n * @param player The player that you aim to update the sign for\n * @param location The location of the sign in the player's world\n * @param lines The new values of the lines of the sign\n */\n void updateSignToPlayer(Player player, Location location, String[] lines);\n\n /**\n * Send a block change that sets a certain block to be a sign.\n * Legacy and latest versions of Bukkit API includes different type of sign Material\n *\n * @param player The player to send the block change to\n * @param location The location of the block\n * @param data Raw data in bytes about the block\n */\n void sendSignChangeToPlayer(Player player, Location location, byte data);\n\n /**\n * Sends a packet to the player using NMS\n *\n * @param player The player that you are going to send the packet to\n * @param packet The object of the output packet\n */\n void sendPacketToPlayer(Player player, Object packet);\n}",
"public void setSign(int row, int col, Sign sign){\r\n board[row][col] = sign;\r\n moves++;\r\n }",
"public void displaySignInfo(Block b, Player p) \n\t{\n\t\t\n\t\tBoutiqueSign bs = getBoutiqueSign(b);\n\t\t\n\t\tString signOwnerString = bs.getOwnerString();\n\t\tString signTypeStr = bs.getType();\n\t\tString separator = Messages.getString(\"Sign.SIGNINFOSEPARATOR\"); //$NON-NLS-1$\n\t\t\n\n\t\t//debut texte\n\t\tp.sendMessage(separator);\n\t\t\n\t\tif (!bs.isEnabled())\n\t\t{\n\t\t\t//TODO: formatter le chat ailleurs ? \n\t\t\tp.sendMessage(ChatColor.YELLOW + Messages.getString(\"Sign.INACTIVESIGN\")); //$NON-NLS-1$\n\t\t\tp.sendMessage(ChatColor.YELLOW + Messages.getString(\"Sign.MAKEANOTHERONE\")); //$NON-NLS-1$\n\t\t\treturn;\n\t\t}\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t/* Affiche le type de panneau et le propriétaire */\n\t\t\n\t\t//TODO virer debug\n\t\t//p.sendMessage(\"dbg1: Type=\" + bs.getType());\n\t\t\n\t\tif(bs.isSignServer())\n\t\t{\n\t\t\t//Type BoutiqueSignServer\n\t\t\tp.sendMessage(Messages.getString(\"Sign.SIGNISSERVER\")); //$NON-NLS-1$\n\t\t}\n\t\telse if(bs.isSignChest())\n\t\t{\t\n\t\t\t//Type BoutiqueSignChest\n\t\t\t\n\t\t\tp.sendMessage(Messages.getString(\"Sign.SIGNISPLAYER\") + ChatColor.RED + signOwnerString + ChatColor.WHITE + \".\");\t\t\t //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\n\t\t\tString signchest = bs.getChestString();\t\t\t\n\t\t\tif(signchest.isEmpty()) \n\t\t\t{\n\t\t\t\tp.sendMessage(ChatColor.RED + Messages.getString(\"Sign.SIGNCHESTNOTBIND\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(bs.isSignWebAuction())\n\t\t{\n\t\t\t//Type BoutiqueSignWebAuction\n\t\t\tp.sendMessage(Messages.getString(\"Sign.SIGNISWEB\") + ChatColor.RED + signOwnerString + ChatColor.WHITE + \".\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Type inconnu\n\t\t\tp.sendMessage(ChatColor.RED + Messages.getString(\"Sign.SIGNISUNKNOWTYPE\") + ChatColor.WHITE + signOwnerString + ChatColor.RED + Messages.getString(\"Sign.ISTHEOWNER\") ); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\t\n\t\tInteger qtyFrom = bs.getQtyFrom();\n\t\tInteger qtyTo = bs.getQtyTo();\n\t\tBoutiqueItem itemTo = bs.getItemTo();\n\t\tBoutiqueItem itemFrom = bs.getItemFrom();\n\t\tDouble moneyFrom = bs.getMoneyFrom();\n\t\tDouble moneyTo = bs.getMoneyTo();\n\t\t\n\t\t\n\t\t/* Test iconomy */\n\t\tif(!EconomyHandler.currencyEnabled)\n\t\t{\n\t\t\tp.sendMessage(Messages.getString(\"Sign.NOECONERR\")); //$NON-NLS-1$\n\t\t\tp.sendMessage(separator);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tif(!bs.checkLines(p))\n\t\t{\n\t\t\t//TODO virer debug\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Détermine le message en fonction du type de panneau */\n\t\t\n\t\t//Freebies\n\t\tif(bs.isFreebiesSign())\n\t\t{\n\t\t\tif(itemTo == null)\n\t\t\t{\n\t\t\t\t//TODO: message && currencystring\n\t\t\t\tp.sendMessage\n\t\t\t\t(\n\t\t\t\t\tMessages.getString(\"Sign.RIGHTCLICKWILLGETYOU\") + //$NON-NLS-1$\n\t\t\t\t\tChatColor.RED + moneyTo + Messages.getString(\"Sign.22\") + ChatColor.WHITE //$NON-NLS-1$\n\t\t\t\t);\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//TODO: message\n\t\t\t\tp.sendMessage\n\t\t\t\t(\n\t\t\t\t\tMessages.getString(\"Sign.RIGHTCLICKWILLGETYOU\") + //$NON-NLS-1$\n\t\t\t\t\tChatColor.RED + qtyTo + ChatColor.WHITE + \t\" \"\t+ //$NON-NLS-1$\n\t\t\t\t\tChatColor.RED + itemTo.itemName + ChatColor.WHITE + \n\t\t\t\t\tMessages.getString(\"Sign.FORFREE\") //$NON-NLS-1$\n\t\t\t\t);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t//Donation (item ou $ => rien)\n\t\telse if(bs.isDonationSign())\n\t\t{\n\t\t\tif(itemFrom == null)\n\t\t\t{\n\t\t\t\t//TODO: message && currencystring\n\t\t\t\tp.sendMessage\n\t\t\t\t(\n\t\t\t\t\tMessages.getString(\"Sign.SIGNGETDONATIONS\") + //$NON-NLS-1$\n\t\t\t\t\tChatColor.RED + moneyFrom + Messages.getString(\"Sign.27\") + ChatColor.WHITE //$NON-NLS-1$\n\t\t\t\t);\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//TODO: message\n\t\t\t\tp.sendMessage\n\t\t\t\t(\n\t\t\t\t\tMessages.getString(\"Sign.SIGNGETDONATIONS\") + //$NON-NLS-1$\n\t\t\t\t\tChatColor.RED + qtyFrom + ChatColor.WHITE + \" \"\t+ //$NON-NLS-1$\n\t\t\t\t\tChatColor.RED + itemFrom.itemName + ChatColor.WHITE\n\t\t\t\t);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if(bs.isSellSign())\n\t\t{\n\t\t\tp.sendMessage(\n\t\t\t\tMessages.getString(\"Sign.RIGHTCLICKWILLGETYOU\") + //$NON-NLS-1$\n\t\t\t\tChatColor.RED + qtyTo + ChatColor.WHITE + \" \" + //$NON-NLS-1$\n\t\t\t\tChatColor.RED + itemTo.itemName + ChatColor.WHITE + \n\t\t\t\tMessages.getString(\"Sign.FORMONEY\") + //$NON-NLS-1$\n\t\t\t\tChatColor.RED + moneyFrom + \" Eus\" + ChatColor.WHITE + //$NON-NLS-1$\n\t\t\t\t\".\" //$NON-NLS-1$\n\t\t\t);\n\t\t}\n\t\telse if(bs.isBuySign())\n\t\t{\n\t\t\tp.sendMessage\n\t\t\t(\n\t\t\t\tMessages.getString(\"Sign.SIGNGIVEYOUFORMONEY\") + ChatColor.RED + moneyTo + \"Eus \" + //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\tChatColor.WHITE + Messages.getString(\"Sign.FOREACHSTACKOF\") + //$NON-NLS-1$\n\t\t\t\tChatColor.RED + qtyFrom + Messages.getString(\"Sign.QTY1\") + itemFrom.itemName + //$NON-NLS-1$\n\t\t\t\tChatColor.WHITE + Messages.getString(\"Sign.YOUWILLGIVEHIM\") //$NON-NLS-1$\n\t\t\t);\n\t\t}\n\t\telse if(bs.isTradeSign())\n\t\t{\n\t\t\tp.sendMessage\n\t\t\t(\n\t\t\t\tMessages.getString(\"Sign.SIGNISTRADING\") + //$NON-NLS-1$\n\t\t\t\tChatColor.RED + qtyFrom + Messages.getString(\"Sign.QTY\") + ChatColor.WHITE + \" \" + //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\tChatColor.RED + itemFrom.itemName + ChatColor.WHITE + Messages.getString(\"Sign.VERSUS1\") + //$NON-NLS-1$\n\t\t\t\tChatColor.RED + qtyTo + Messages.getString(\"Sign.QTY\") + ChatColor.WHITE + \" \" + //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\tChatColor.RED + itemTo.itemName + ChatColor.WHITE + \".\" //$NON-NLS-1$\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tp.sendMessage\n\t\t\t(\n\t\t\t\tMessages.getString(\"Sign.VROUMVROUMERR\") //$NON-NLS-1$\n\t\t\t);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tbs.Render();\n\t\t\n\t\tp.sendMessage(separator);\n\t}",
"public void setSign(String sign) {\n this.sign = sign == null ? null : sign.trim();\n }",
"void swapSign();",
"public void setLoSign(int loSign) {\n this.loSign = loSign;\n }",
"@EventHandler(ignoreCancelled = true)\n\tpublic void onSignChange(SignChangeEvent event) {\n\n\t\t// Automatically flag players with bypass as posting non-empty signs to skip empty checks\n\t\tboolean empty = !event.getPlayer().hasPermission(\"sblock.sign.unlogged\");\n\n\t\tfor (int i = 0; i < event.getLines().length; i++) {\n\t\t\tevent.setLine(i, ChatColor.translateAlternateColorCodes('&', event.getLine(i)));\n\t\t\tif (empty && !TextUtils.appearsEmpty(event.getLine(i))) {\n\t\t\t\tempty = false;\n\t\t\t}\n\t\t}\n\n\t\tif (empty || event.getPlayer().hasPermission(\"sblock.sign.unlogged\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tBlock block = event.getBlock();\n\n\t\tStringBuilder msg = new StringBuilder().append(ChatColor.GRAY)\n\t\t\t\t.append(block.getWorld().getName()).append(' ').append(block.getX()).append(\"x, \")\n\t\t\t\t.append(block.getY()).append(\"y, \").append(block.getZ()).append(\"z\\n\");\n\t\tfor (String line : event.getLines()) {\n\t\t\tif (!TextUtils.appearsEmpty(line)) {\n\t\t\t\tmsg.append(line).append(ChatColor.GRAY).append('\\n');\n\t\t\t}\n\t\t}\n\t\tmsg.delete(msg.length() - 3, msg.length());\n\n\t\tif (chat.testForMute(event.getPlayer(), msg.toString(), \"#sign\")) {\n\t\t\tevent.setCancelled(true);\n\t\t}\n\t}",
"public void AssegnaSlot(Slot S)\r\n {\r\n position = S;\r\n }",
"String getSign();",
"public ScoreboardSign(Player player) {\n this(player, TITLE);\n }",
"public void skystonePos3() {\n }",
"public SignLine(final String type) {\n\t\tthis.type = type;\n\t\tthis.signers = new ArrayList<SignLineElement>();\n\t}",
"public void setLaSign(int laSign) {\n this.laSign = laSign;\n }",
"public void skystonePos4() {\n }",
"private void setSteine() {\n\t\tfor(int i = 0; i<mulden.length; i++) {\n\t\t\tmulden[i] = 5;\n\t\t}\n\t}",
"public String getSign() {\n return sign;\n }",
"public void setSign(int number, String sign) {\n int[] pos = boardMapper.get(number);\n boardArray[pos[0]][pos[1]] = sign;\n }",
"@EventHandler\n\tvoid signWriter(SignChangeEvent event) {\n\t\tString[] lines = event.getLines();\n\t\tif (ChatColor.stripColor(lines[0]).equalsIgnoreCase(\"[MarioKart]\")) {\n\t\t\tlines[0] = MarioKart.colors.getTitle() + \"[MarioKart]\";\n\t\t\tBoolean text = true;\n\t\t\tString cmd = ChatColor.stripColor(lines[1]);\n\t\t\tif (cmd.equalsIgnoreCase(\"list\")) {\n\t\t\t\tlines[1] = MarioKart.colors.getInfo() + \"List\";\n\t\t\t\tif (!(lines[2].length() < 1)) {\n\t\t\t\t\ttext = false;\n\t\t\t\t}\n\t\t\t\tlines[2] = MarioKart.colors.getSuccess()\n\t\t\t\t\t\t+ ChatColor.stripColor(lines[2]);\n\t\t\t} else if (cmd.equalsIgnoreCase(\"join\")) {\n\t\t\t\tlines[1] = MarioKart.colors.getInfo() + \"Join\";\n\t\t\t\tlines[2] = MarioKart.colors.getSuccess()\n\t\t\t\t\t\t+ ChatColor.stripColor(lines[2]);\n\t\t\t\tif (lines[2].equalsIgnoreCase(\"auto\")) {\n\t\t\t\t\tlines[2] = MarioKart.colors.getTp() + \"Auto\";\n\t\t\t\t}\n\t\t\t\tlines[3] = MarioKart.colors.getInfo() + lines[3];\n\t\t\t\ttext = false;\n\t\t\t} else if (cmd.equalsIgnoreCase(\"shop\")) {\n\t\t\t\tlines[1] = MarioKart.colors.getInfo() + \"Shop\";\n\n\t\t\t} else if (cmd.equalsIgnoreCase(\"leave\")\n\t\t\t\t\t|| cmd.equalsIgnoreCase(\"exit\")\n\t\t\t\t\t|| cmd.equalsIgnoreCase(\"quit\")) {\n\t\t\t\tchar[] raw = cmd.toCharArray();\n\t\t\t\tif (raw.length > 1) {\n\t\t\t\t\tString start = \"\" + raw[0];\n\t\t\t\t\tstart = start.toUpperCase();\n\t\t\t\t\tString body = \"\";\n\t\t\t\t\tfor (int i = 1; i < raw.length; i++) {\n\t\t\t\t\t\tbody = body + raw[i];\n\t\t\t\t\t}\n\t\t\t\t\tbody = body.toLowerCase();\n\t\t\t\t\tcmd = start + body;\n\t\t\t\t}\n\t\t\t\tlines[1] = MarioKart.colors.getInfo() + cmd;\n\t\t\t} else if (cmd.toLowerCase().contains(\"items\")) {\n\t\t\t\tlines[1] = \"items\";\n\t\t\t\t/*\n\t\t\t\tLocation above = event.getBlock().getLocation().add(0, 1.4, 0);\n\t\t\t\tEnderCrystal crystal = (EnderCrystal) above.getWorld()\n\t\t\t\t\t\t.spawnEntity(above, EntityType.ENDER_CRYSTAL);\n\t\t\t\tabove.getBlock().setType(Material.COAL_BLOCK);\n\t\t\t\tabove.getBlock().getRelative(BlockFace.WEST)\n\t\t\t\t\t\t.setType(Material.COAL_BLOCK);\n\t\t\t\tabove.getBlock().getRelative(BlockFace.NORTH)\n\t\t\t\t\t\t.setType(Material.COAL_BLOCK);\n\t\t\t\tabove.getBlock().getRelative(BlockFace.NORTH_WEST)\n\t\t\t\t\t\t.setType(Material.COAL_BLOCK);\n\t\t\t\tcrystal.setFireTicks(0);\n\t\t\t\tcrystal.setMetadata(\"race.pickup\", new StatValue(true, plugin));\n\t\t\t\t\n\t\t\t\t*/\n\t\t\t\ttext = false;\n\t\t\t\tevent.getPlayer().sendMessage(\"Creating item box...\");\n\t\t\t\tMarioKart.powerupManager.spawnItemPickupBox(event.getBlock().getLocation());\n\t\t\t} else if(cmd.equalsIgnoreCase(\"queues\")){ \n\t\t\t\tString track = ChatColor.stripColor(lines[2]);\n\t\t\t\tif(track.length() < 1){\n\t\t\t\t\treturn; //No track\n\t\t\t\t}\n\t\t\t\ttrack = plugin.signManager.getCorrectName(track);\n\t\t\t\tif(!plugin.trackManager.raceTrackExists(track)){\n\t\t\t\t\tevent.getPlayer().sendMessage(MarioKart.colors.getSuccess()+MarioKart.msgs.get(\"setup.fail.queueSign\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//Register sign\n\t\t\t\tplugin.signManager.addQueueSign(track, event.getBlock().getLocation());\n\t\t\t\t//Tell the player it was registered successfully\n\t\t\t\tevent.getPlayer().sendMessage(MarioKart.colors.getSuccess()+MarioKart.msgs.get(\"setup.create.queueSign\"));\n\t\t\t\tfinal String t = track;\n\t\t\t\tMarioKart.plugin.getServer().getScheduler().runTaskLater(plugin, new BukkitRunnable(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tplugin.signManager.updateSigns(t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}}, 2l);\n\t\t\t\t\n\t\t\t\ttext = false;\n\t\t\t} else {\n\t\t\t\ttext = false;\n\t\t\t}\n\t\t\tif (text) {\n\t\t\t\tlines[2] = ChatColor.ITALIC + \"Right click\";\n\t\t\t\tlines[3] = ChatColor.ITALIC + \"to use\";\n\t\t\t}\n\t\t}\n\t}",
"private void paintSign(Graphics g) {\n point = getPoint(endPoint);\n int[] maxWH = new int[2];\n int x = (FCanvas.canvasWidth - maxWH[0]) >> 1;\n int y = (FCanvas.canvasHeight - maxWH[1]) >> 1;\n if (ruteData[RUTE_SOURCE].equals(ruteData[RUTE_DESTINATION])) {\n auxsb = new StringBuffer(\"Encontrada baliza de '\");\n auxsb.append(FInteractionUtils.destinationHotspotName);\n auxsb.append(\"'. Llegó a su destino\");\n //auxsb.append(FInteractionUtils.sourceHotspotName);\n } else {\n auxsb = new StringBuffer(\"Ha llegado a '\");\n auxsb.append(ruteData[RUTE_DESTINATION]);\n auxsb.append(\"' desde '\");\n //TODO i don't like FMap to FRutePlanner communication\n if (FRutePlanner.rutes.length - 1 == FRutePlanner.currentRute) {\n auxsb.append(FInteractionUtils.sourceHotspotName);\n } else {\n auxsb.append(ruteData[RUTE_SOURCE]);\n }\n auxsb.append(\"'\");\n }\n maxWH = Utils.getWrappedTextWidthHeigh(auxsb.toString(), FCanvas.bigFont,\n 0, FCanvas.canvasWidth, false, null, y);\n x = (FCanvas.canvasWidth - maxWH[0]) >> 1;\n //y = (FCanvas.canvasHeight - maxWH[1]) >> 1;\n y = 5;\n g.setColor(Utils.COLOR_TANGO_BUTTER1);\n g.fillRoundRect(x - 3, y - 3, maxWH[0] + 6, maxWH[1] + 6, 6, 6);\n g.setColor(Utils.COLOR_TANGO_SKYBLUE1);\n g.fillRoundRect(x, y, maxWH[0], maxWH[1], 6, 6);\n g.setColor(Utils.COLOR_TANGO_ALUMINIUM1);\n Utils.getWrappedTextWidthHeigh(auxsb.toString(), FCanvas.bigFont,\n x, FCanvas.canvasWidth, true, g, y);\n }",
"public void skystonePos2() {\n }",
"public void skystonePos5() {\n }",
"public String getSign() {\n\n return this.sign;\n }",
"public Sign() {\n if (this.x == 0) {\n this.sign = \"+\";\n } else if (this.x == 1) {\n this.sign = \"-\";\n } else if (this.x == 2) {\n this.sign = \"*\";\n } else if (this.x == 3) {\n this.sign = \"^\";\n }\n }",
"public void setSignMastered(String sign, boolean value){\n mUsersRef.child(getUsername()).child(\"myDeck\").child(sign).child(\"mastered\").setValue(value);\n }",
"private boolean checkSign(Block block, BlockFace face) {\n for(int i = 1; true; i++) {\n Block relative = block.getRelative(face, i);\n if(!plugin.allowedBlocks.contains(relative.getType()) || (block instanceof Stairs && ((Stairs)relative.getState().getData()).getDescendingDirection() != ((Stairs)block.getState().getData()).getDescendingDirection())) {\n if(relative.getType() == Material.SIGN || relative.getType() == Material.WALL_SIGN || relative.getType() == Material.SIGN_POST)\n return true;\n else\n return false;\n }\n }\n }",
"public SignLine(final String type, final ArrayList<SignLineElement> signers) {\n\t\tthis.type = type;\n\t\tthis.signers = signers;\n\t}",
"public void updateSign(boolean activated) {\n if (!ChunkLocation.fromLocation(activationBlock).isChunkLoaded()) return;\n\n try {\n BlockState state = activationBlock.getBlock().getState();\n if (state == null || !(state instanceof Sign)) return;\n\n final Sign sign = (Sign) state;\n\n String line;\n if (activated) {\n String signColor;\n if (isDisabled()) signColor = \"8\";\n else signColor = RCPrefs.getSignColor();\n line = (char) 167 + signColor + type;\n } else {\n line = type;\n }\n\n if (!line.equals(sign.getLine(0))) {\n sign.setLine(0, line);\n\n RedstoneChips.inst().getServer().getScheduler().scheduleSyncDelayedTask(RedstoneChips.inst(), () -> sign.update());\n }\n } catch (NullPointerException ne) {\n }\n }",
"private org.bukkit.material.Sign getSignMaterial() {\r\n if (this.getBlock() == null) return null;\r\n \r\n org.bukkit.material.Sign material = new org.bukkit.material.Sign(this.getBlock().getType());\r\n material.setData(this.getBlock().getData());\r\n return material;\r\n }",
"protected org.bukkit.block.Sign getSignBlock() {\r\n if (this.getBlock() == null) return null;\r\n \r\n return (org.bukkit.block.Sign) this.getBlock().getState();\r\n }",
"public void setLine (int Line);",
"@Override\r\n\tpublic void init() {\r\n\t\tif(pos.getBlock().getState() instanceof Sign)\r\n\t\t\tthis.items = getItem(((Sign)pos.getBlock().getState() ).getLines(), plugin.getLevel());\r\n\t\telse\r\n\t\t\tplugin.LogWarning(\"Missing sign !\");\r\n\t\t// TODO:Fix it, it should just \"display\" the item but make it not\r\n\t\t// lootable. We can loot it\r\n\t\t/*\r\n\t\t * if (!items.getItemStacks().isEmpty() && (droppedItem==null ||\r\n\t\t * droppedItem.isDead()) &&\r\n\t\t * plugin.getConfig().getBoolean(\"Signs.ShopSign.DropItem\", true)) {\r\n\t\t * for(ItemStack n : items.getItemStacks()) { droppedItem =\r\n\t\t * pos.getWorld().dropItem(pos, new ItemStack(item));\r\n\t\t * droppedItem.setVelocity(new Vector(0, 0, 0)); } }\r\n\t\t */\r\n\t}",
"@EventHandler\n\tvoid signClicker(final PlayerInteractEvent event) {\n\t\tMarioKart.powerupManager.calculate(event.getPlayer(), event);\n\t\tif(MarioKart.fullServer){\n\t\t\treturn;\n\t\t}\n\t\tif (event.getAction() != Action.RIGHT_CLICK_BLOCK) {\n\t\t\treturn;\n\t\t}\n\t\tif (!(event.getClickedBlock().getState() instanceof Sign)) {\n\t\t\treturn;\n\t\t}\n\t\tfinal Sign sign = (Sign) event.getClickedBlock().getState();\n\t\tString[] lines = sign.getLines();\n\t\tMarioKart.plugin.getServer().getScheduler().runTaskAsynchronously(MarioKart.plugin, new BukkitRunnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(plugin.signManager.isQueueSign(sign)){\n\t\t\t\t\tString trackName = ChatColor.stripColor(sign.getLine(0));\n\t\t\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] {\n\t\t\t\t\t\t\"join\", trackName, \"auto\" },\n\t\t\t\t\t\tevent.getPlayer());\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}});\n\t\tif (!ChatColor.stripColor(lines[0]).equalsIgnoreCase(\"[MarioKart]\")) {\n\t\t\treturn;\n\t\t}\n\t\tString cmd = ChatColor.stripColor(lines[1]);\n\t\tif (cmd.equalsIgnoreCase(\"list\")) {\n\t\t\tint page = 1;\n\t\t\ttry {\n\t\t\t\tpage = Integer.parseInt(ChatColor.stripColor(lines[2]));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t}\n\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] { \"list\",\n\t\t\t\t\t\"\" + page }, event.getPlayer());\n\t\t} else if (cmd.equalsIgnoreCase(\"leave\")\n\t\t\t\t|| cmd.equalsIgnoreCase(\"quit\") || cmd.equalsIgnoreCase(\"exit\")) {\n\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] { \"leave\" },\n\t\t\t\t\tevent.getPlayer());\n\t\t} else if (cmd.equalsIgnoreCase(\"join\")) {\n\t\t\tString mode = ChatColor.stripColor(lines[3]);\n\t\t\tif (mode.length() > 0) {\n\t\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] {\n\t\t\t\t\t\t\"join\", ChatColor.stripColor(lines[2]).toLowerCase(),\n\t\t\t\t\t\tmode }, event.getPlayer());\n\t\t\t} else {\n\t\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] {\n\t\t\t\t\t\t\"join\", ChatColor.stripColor(lines[2]).toLowerCase() },\n\t\t\t\t\t\tevent.getPlayer());\n\t\t\t}\n\t\t} else if (cmd.equalsIgnoreCase(\"shop\")) {\n\t\t\tMarioKart.plugin.raceCommandExecutor.urace(event.getPlayer(), new String[] { \"shop\" },\n\t\t\t\t\tevent.getPlayer());\n\t\t}\n\t\treturn;\n\t}",
"@EventHandler(priority = EventPriority.MONITOR)\r\n\tpublic void onSignChange(SignChangeEvent event) {\r\n\t\t\r\n\t\tfinal Player creator = (Player)event.getPlayer();\r\n\t\tfinal InputPlayer iplayer = bSignModule.GUI_API.getPlayer(creator);\r\n\t\tfinal Location signLocation = event.getBlock().getLocation();\r\n\t\t\r\n\t\tSign newSign = null;\r\n\t\t\r\n\t\tif (event.getLine(0).equalsIgnoreCase(\"--weblink--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.web\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new WebSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the web link to link to\"));\r\n\t\t}\r\n\t\telse if (event.getLine(0).equalsIgnoreCase(\"--command--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.command\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new CommandSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the command for this sign to execute\"));\r\n\t\t}\r\n\t\telse if (event.getLine(0).equalsIgnoreCase(\"--info--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.info\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new InfoSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the info message for this sign\"));\r\n\t\t}\r\n\t\t\r\n\t\tbSignModule.SIGNS.add(newSign);\r\n\t\t\r\n\t}",
"public void change_sword_pos() {\n\t\tif (!heroi.isArmado())\n\t\t\tlabirinto.setLabCell(espada.getX_coord(), espada.getY_coord(), 'E');\n\t}",
"private void swapSign() {\n isPositive = !isPositive;\n }",
"public void playerNextMove(int row, int col){\r\n setSign(row,col,playerSign);\r\n }",
"public SignLine(final ArrayList<SignLineElement> signers) {\n\t\tthis.type = \"FIRMA\";\n\t\tthis.signers = signers;\n\t}",
"public void readSign()\n\t{\n\t\tboolean[][] boolTable = getTable();\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t public void run()\n\t\t {\n\t\t \tview.sPanel.updateTable(boolTable); // aktualizacja tablicy wypełenień w panelu do wyświetlania interpretacji znaku\n\t\t }\n\t\t});\n\t\t\n\t\tArrayList<Double> table = new ArrayList<Double>();\n\t\t\n\t\tfor(int i=0; i<10; ++i) // przygotowanie tablicy wejść dla sieci neuronowej\n\t\t\tfor(int j=0; j<7; ++j)\n\t\t\t\tif(boolTable[i][j])\n\t\t\t\t\ttable.add(1.0d);\n\t\t\t\telse\n\t\t\t\t\ttable.add(0.0d);\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t public void run()\n\t\t {\n\t\t \tview.label.setLabelText(model.getOutput(table)); // ustawienie zawartości pola tekstowego\n\t\t }\n\t\t});\n\t\t\n\t}",
"public void set(int s, long value) {\n\t\t\tif (sign * s < 0) {\n\t\t\t\tdc.setStart(value);\n\t\t\t} else {\n\t\t\t\tdc.setEnd(value);\n\t\t\t}\n\t\t}",
"void block(Directions dir);",
"private void signMessage() {\n\n String messageText = messageTextArea.getText();\n SecureCharSequence secureCharSequence = new SecureCharSequence(currentPassword.getPassword());\n String signMessage = this.address.signMessage(messageText, secureCharSequence);\n signature.setText(signMessage);\n\n }",
"private void setBlock(Block block) {\r\n this.block = block;\r\n }",
"@EventHandler\n void onSignChange(SignChangeEvent e){\n Player player = e.getPlayer();\n if (player.hasPermission(\"guildmc.createRaid\")){\n if (e.getLine(0).equalsIgnoreCase(\"[RAID]\")) {\n e.setLine(0,ChatColor.WHITE + \"[\" + ChatColor.GOLD + \"RAID\" + ChatColor.WHITE + \"]\");\n e.setLine(1, ChatColor.WHITE + e.getLine(1));\n e.setLine(2, ChatColor.WHITE + e.getLine(2));\n e.setLine(3, ChatColor.WHITE + e.getLine(3));\n GuildMCFunctions functions = new GuildMCFunctions();\n functions.displayRaidInfos(player);\n }\n } else {\n e.setCancelled(true);\n }\n }",
"@EventHandler\n\tpublic void onSignHit (BlockDamageEvent event){\n\t\tdebugOut(\"BlockDamageEvent\");\n\t\t//getLogger().info(\"MEEP\");\n\t\tif(event.getBlock().getType()==Material.SIGN_POST || event.getBlock().getType()==Material.WALL_SIGN){\n\t\t\tdebugOut(\"A sign was done damage.\");\n\t\t\t//Credit: https://bukkit.org/threads/how-to-convert-block-class-to-sign-class.102313/\n\t\t\tBlockState blockState = event.getBlock().getState();\n\t\t\tSign sign = (Sign) blockState;\n\t\t\tif(isMakingShop(event.getPlayer())){\n\t\t\t\t//Do this if the player hits a shop while making one\n\t\t\t\tdebugOut(event.getPlayer()+\" is making a shop\");\n\t\t\t\tString[] playerHashInfo = PlayerMakingShop.get(event.getPlayer().getName() ).split(\",\");\n\t\t\t\tInteger shopX = event.getBlock().getX();\n\t\t\t\tInteger shopY = event.getBlock().getY();\n\t\t\t\tInteger shopZ = event.getBlock().getZ();\n\t\t\t\tInteger playerX = Integer.valueOf(playerHashInfo[0]);\n\t\t\t\tInteger playerY = Integer.valueOf(playerHashInfo[1]);\n\t\t\t\tInteger playerZ = Integer.valueOf(playerHashInfo[2]);\n\t\t\t\tString shopWorld = event.getBlock().getWorld().getName();\n\t\t\t\tString playerWorld = playerHashInfo[3];\n\t\t\t\tdebugOut(\"Shop: \"+shopX+shopY+shopZ+shopWorld);\n\t\t\t\tdebugOut(\"Play: \"+playerX+playerY+playerZ+playerWorld);\n\t\t\t\tif(shopX.intValue()==playerX.intValue() && shopY.intValue()==playerY.intValue() && shopZ.intValue() == playerZ.intValue() && shopWorld.equals(playerWorld)){\n\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" hit the shop that (s)he was creating\");\n\t\t\t\t\tItemStack equipped = event.getPlayer().getItemInHand();\n\t\t\t\t\tif(equipped.getType()!=Material.AIR && equipped.getType()!=Material.WRITTEN_BOOK){\n\t\t\t\t\t\tdebugOut(\"Begin establishing Shop at xyz (\"+shopX+\",\"+shopY+\",\"+shopZ+\") in \"+shopWorld);\n\t\t\t\t\t\tString ownerUUID = playerHashInfo[4];\n\t\t\t\t\t\tString establisherUUID = playerHashInfo[5];\n\t\t\t\t\t\tplayerSuccess(event.getPlayer(), \"Success!\");\n\t\t\t\t\t\tString[] buyLine = sign.getLine(2).split(\" \");\n\t\t\t\t\t\tFloat buy = Float.valueOf(buyLine[1]);\n\t\t\t\t\t\tFloat sell = Float.valueOf(buyLine[3]);\n\t\t\t\t\t\testablishShop(ownerUUID, establisherUUID, event.getPlayer().getName(),shopX, shopY, shopZ, event.getBlock().getWorld(), equipped, buy, sell);\n\t\t\t\t\t}else if(equipped.getType()==Material.AIR){\n\t\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" hit the shop with Air, which cannot be sold\");\n\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"cant-sell-air\") );\n\t\t\t\t\t}else if(equipped.getType()==Material.WRITTEN_BOOK) {\n\t\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" hit the shop with a written book, which cannot be sold\");\n\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"cant-sell-book\") );\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tdebugOut(event.getPlayer().getName()+\" did not hit the shop the shop (s)he was creating\");\n\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"click-wrong-shop\"));\n\t\t\t\t\tif(shopX.intValue()==playerX.intValue()){\n\t\t\t\t\t\tdebugOut(\"X matches\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerX + \" does not equal \" + shopX);\n\t\t\t\t\t}\n\t\t\t\t\tif(shopY.intValue()==playerY.intValue()){\n\t\t\t\t\t\tdebugOut(\"Y matches\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerY + \" does not equal \" + shopY);\n\t\t\t\t\t}\n\t\t\t\t\tif(shopZ.intValue() == playerZ.intValue()){\n\t\t\t\t\t\tdebugOut(\"Z matches\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerZ + \" does not equal \" + shopZ);\n\t\t\t\t\t}\n\t\t\t\t\tif(shopWorld.equals(playerWorld)){\n\t\t\t\t\t\tdebugOut(\"Worlds match\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(playerWorld + \" does not equal \" + shopWorld);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(sign.getLine(0).equals(getConfig().getString(\"sign-header\"))){\n\t\t\t\t//Do this if the player hit a shop, when he wasn't making one.\n\t\t\t\tInteger thisShopID = getShopID(event.getBlock().getX(), event.getBlock().getY(), event.getBlock().getZ(), event.getBlock().getWorld() );//GET FROM DATABASE\n\t\t\t\tdebugOut(event.getPlayer()+\" is not making a shop, but did click on a shop sign\");\n\t\t\t\tif(ActivePlayerShop.containsKey(event.getPlayer().getName())){\n\t\t\t\t\tInteger currentValue = ActivePlayerShop.get(event.getPlayer().getName());\n\t\t\t\t\tif(Integer.valueOf(currentValue)==Integer.valueOf(thisShopID) && Integer.valueOf(currentValue)!=0 ){\n\t\t\t\t\t\t//BUY FROM THE SHOP OR WITHDRAW\n\t\t\t\t\t\tdebugOut(\"Checking to see if the selected shop is owned\");\n\t\t\t\t\t\tString shopOwner = getShopOwner(thisShopID);\n\t\t\t\t\t\tif(shopOwner!=\"null\"){\n\t\t\t\t\t\t\tInteger currentStock = getStock(thisShopID);\n\t\t\t\t\t\t\tif(shopOwner.equals(event.getPlayer().getUniqueId().toString()) ){\n\t\t\t\t\t\t\t\tdebugOut(\"Shop is owned\");\n\t\t\t\t\t\t\t\t//Do shop owner stuff\n\t\t\t\t\t\t\t\tif(event.getPlayer().isSneaking()){\n\t\t\t\t\t\t\t\t\t//withdraw a stack\n\t\t\t\t\t\t\t\t\tdebugOut(\"withdrawing one stack -- attempt\");\n\t\t\t\t\t\t\t\t\tItemStack currentItem = getShopItem(thisShopID, true, sign.getLine(3) );\n\t\t\t\t\t\t\t\t\tInteger stackSize = currentItem.getMaxStackSize();\n\t\t\t\t\t\t\t\t\tif(Integer.valueOf(currentStock)>=stackSize){\n\t\t\t\t\t\t\t\t\t\t//Withdraw a stack\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"There are enough items in stock\");\n\t\t\t\t\t\t\t\t\t\tif(canAddItem(currentItem, event.getPlayer()) ){\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"The player can fit all of the items in inventory\");\n\t\t\t\t\t\t\t\t\t\t\tevent.getPlayer().getInventory().addItem(currentItem);\n\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-stackSize);\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"The player cannot fit all items in inventory\");\n\t\t\t\t\t\t\t\t\t\t\tif(getConfig().getString(\"buy-when-full\").matches(\"true\")){\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is true -- dropping extra items on floor\");\n\t\t\t\t\t\t\t\t\t\t\t\t//Drop extra items on floor\n\t\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-stackSize);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is false -- cancelling trade\");\n\t\t\t\t\t\t\t\t\t\t\t\t//Do not sell\n\t\t\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"full-inventory-error\"));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t//Not enough in stock\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"There are not enough items in stock to withdraw a stack\");\n\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"not-enough-items\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t//withdraw one item\n\t\t\t\t\t\t\t\t\tdebugOut(\"withdrawing one item -- attempt\");\n\t\t\t\t\t\t\t\t\tif(Integer.valueOf(currentStock)>0){\n\t\t\t\t\t\t\t\t\t\t//Add one to player\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"In Stock\");\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Retrieving the item\");\n\t\t\t\t\t\t\t\t\t\tItemStack currentItem = getShopItem(thisShopID, false, sign.getLine(3) );\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Item retrieved\");\n\t\t\t\t\t\t\t\t\t\tif(canAddItem(currentItem, event.getPlayer()) ){\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player can fit item -- adding\");\n\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock by one...\");\n\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-1);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player cannot fit item\");\n\t\t\t\t\t\t\t\t\t\t\tif(getConfig().getString(\"buy-when-full\").matches(\"true\")){\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is true -- dropping extra items on floor\");\n\t\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock by one...\");\n\t\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-1);\n\t\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is false -- cancelling trade\");\n\t\t\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"full-inventory-error\"));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Transaction Completed\");\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Out of Stock\");\n\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"out-of-stock\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tdebugOut(\"Shop is not owned\");\n\t\t\t\t\t\t\t\t//Do consumer stuff\n\t\t\t\t\t\t\t\tdebugOut(\"getShopBuyPrice\");\n\t\t\t\t\t\t\t\tfloat buyPrice = getShopBuyPrice(thisShopID);\n\t\t\t\t\t\t\t\tdebugOut(\"getVaultbalance\");\n\t\t\t\t\t\t\t\tfloat customerBalance = (float) getVaultBalance(event.getPlayer().getUniqueId());\n\t\t\t\t\t\t\t\tdebugOut(\"Creating 'currentItem'\");\n\t\t\t\t\t\t\t\tItemStack currentItem;\n\t\t\t\t\t\t\t\tif(event.getPlayer().isSneaking()){\n\t\t\t\t\t\t\t\t\t//buy a stack\n\t\t\t\t\t\t\t\t\tdebugOut(\"attempting to buy a stack\");\n\t\t\t\t\t\t\t\t\tcurrentItem = getShopItem(thisShopID, true, sign.getLine(3));\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t//buy one item\n\t\t\t\t\t\t\t\t\tdebugOut(\"attempting to buy one item\");\n\t\t\t\t\t\t\t\t\tcurrentItem = getShopItem(thisShopID, false, sign.getLine(3));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(currentStock>=currentItem.getAmount()){\n\t\t\t\t\t\t\t\t\tdebugOut(\"Item has sufficient stock\");\n\t\t\t\t\t\t\t\t\tif(customerBalance < (buyPrice*currentItem.getAmount()) ){\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Insufficient Funds -- player has: \"+customerBalance+\" | the shop needs: \"+(buyPrice*currentItem.getAmount() ));\n\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"insufficient-funds\"));\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player has sufficient funds: \"+customerBalance);\n\t\t\t\t\t\t\t\t\t\tUUID ownerUUID = UUID.fromString(getShopOwner(thisShopID));\n\t\t\t\t\t\t\t\t\t\tif(canAddItem(currentItem, event.getPlayer()) ){\n\t\t\t\t\t\t\t\t\t\t\t//Do transaction\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player can fit item -- adding\");\n\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock\");\n\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Changing funds...\");\n\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(ownerUUID, buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(event.getPlayer().getUniqueId(), -buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\tevent.getPlayer().sendMessage(ChatColor.GREEN + \"You have bought \"+ChatColor.YELLOW+currentItem.getAmount()+\" \"+ChatColor.GREEN+\" item(s) for \"+ChatColor.YELLOW+buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Player cannot fit item\");\n\t\t\t\t\t\t\t\t\t\t\tif(getConfig().getString(\"buy-when-full\").matches(\"true\")){\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is enabled -- continuing transaction\");\n\t\t\t\t\t\t\t\t\t\t\t\tsoftAddItem(currentItem, event.getPlayer());\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Decreasing stock\");\n\t\t\t\t\t\t\t\t\t\t\t\tsetStock(thisShopID, currentStock-currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Changing funds...\");\n\t\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(ownerUUID, buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\tchangeVaultBalance(event.getPlayer().getUniqueId(), -buyPrice*currentItem.getAmount()) ;\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"Notifying Player...\");\n\t\t\t\t\t\t\t\t\t\t\t\tevent.getPlayer().sendMessage(ChatColor.GREEN + \"You have bought \"+ChatColor.YELLOW+currentItem.getAmount()+\" \"+ChatColor.GREEN+\" item(s) for \"+ChatColor.YELLOW+buyPrice*currentItem.getAmount());\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\tdebugOut(\"buy-when-full is not enabled -- cancelling transaction\");\n\t\t\t\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"full-inventory-error\"));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tdebugOut(\"Not enough in stock\");\n\t\t\t\t\t\t\t\t\tplayerError(event.getPlayer(), getConfig().getString(\"not-enough-items\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tdebugOut(\"This shop does not exist; is it finished being created?\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdebugOut(\"A shop was activated, but it was not this one; changing to this shop\");\n\t\t\t\t\t\tActivePlayerShop.put(event.getPlayer().getName(), thisShopID);\n\t\t\t\t\t\tshowShopInfo(thisShopID, event.getPlayer());\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdebugOut(\"No shop activated, activating it\");\n\t\t\t\t\tActivePlayerShop.put(event.getPlayer().getName(), thisShopID);\n\t\t\t\t\tshowShopInfo(thisShopID, event.getPlayer());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setmarks(int s1, int s2) {\n\t\tm1=s1;\n\t\tm2=s2;\n\t}",
"@Override\n \t\t\t\t\tpublic void run() {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tRedstoneControlSign.getControlSign(block.getLocation());\n \t\t\t\t\t\t} catch (SMSException e) {\n \t\t\t\t\t\t\tMiscUtil.errorMessage(player, e.getMessage());\n \t\t\t\t\t\t}\n \t\t\t\t\t}",
"public void skystonePos6() {\n }",
"public void setMasterSigned(int masterSigned) {\n\t\t_tempNoTiceShipMessage.setMasterSigned(masterSigned);\n\t}",
"public ScoreboardSign(Player player, String objectiveName) {\n this.player = player;\n this.objectiveName = objectiveName;\n }",
"public void setKey(String s){\n this.key = s;\n this.blockLen = s.length();\n }",
"public void addElement(final SignLineElement sle) {\n\t\tthis.signers.add(sle);\n\t}",
"public static void initSignList()\n\t{\n\t\tlistOfSigns.add(SIGN_PLUS);\n\t\tlistOfSigns.add(SIGN_MINUS);\n\t}",
"public void line(String line) {\n\t\t}",
"public LinearConstraint setSign(Sign sign) {\n this.sign = sign;\n return this;\n }",
"public void setLine(int line);",
"public String setSign() {\r\n\r\n\t\tif (getOperand().length() == Config.MAX_SIZE) {\r\n\t\t\treturn getOperand().toString();\r\n\t\t}\r\n\r\n\t\tif (getOperand().length() == 0) {\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\r\n\t\tif (sign) {\r\n\t\t\tsign = false;\r\n\t\t\treturn getOperand().deleteCharAt(0).toString();\r\n\t\t} else {\r\n\t\t\tsign = true;\r\n\t\t\treturn getOperand().insert(0, \"-\").toString();\r\n\t\t}\r\n\t}",
"public void\nsetHirBody( BlockStmt pHirBody );",
"public static void printSigthBlockade() {\n for (int i = 0; i < 60; i++) {\n System.out.println(\"*\");\n }\n }",
"public Sign getSign() {\n return sign;\n }",
"public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {}",
"@Command(command=\"thisisimpossibletowriteonasign\", permission=\"rs.sign.shop\")\n public static void shop(SignChangeEvent event) {\n Inventory chest = ChestFinder.findChest(event.getBlock());\n Block chestBlock = ChestFinder.findChestBlock(event.getBlock());\n \n if(chest == null) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_NoChest);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Get all lines and try to parse the amount\n String[] lines = event.getLines();\n Integer amount;\n \n try {\n amount = Integer.parseInt(lines[1]);\n } catch(NumberFormatException e) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_InvalidAmount);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Parse the third line (<sell>:<buy>)\n Matcher matcher = pattern.matcher(lines[2]);\n Float buy = 0.0F, sell = 0.0F;\n if(matcher.find()) {\n try {\n sell = Float.parseFloat(matcher.group(1));\n buy = Float.parseFloat(matcher.group(2));\n } catch(NumberFormatException e) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_InvalidBuySell);\n event.getBlock().breakNaturally();\n return;\n }\n } else {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_NoValidBuySellLine);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Check if Chest has items in it\n Boolean hasItem = false;\n ListIterator<ItemStack> itemStackListIterator = chest.iterator();\n \n while(itemStackListIterator.hasNext()) {\n ItemStack itemStack = itemStackListIterator.next();\n if(itemStack == null) continue;\n hasItem = true;\n break;\n }\n \n if(!hasItem) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_ChestIsEmpty);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Store the Chest\n com.geNAZt.RegionShop.Database.Model.Chest.store(event.getPlayer(), event.getBlock(), chestBlock, event.getPlayer().getWorld());\n com.geNAZt.RegionShop.Database.Table.Chest chest1 = com.geNAZt.RegionShop.Database.Model.Chest.get(chestBlock, event.getPlayer().getWorld(), false);\n \n //Store the Items\n itemStackListIterator = chest.iterator();\n Integer firstID = null;\n Byte firstData = null;\n Integer itemAmount = 0;\n ItemStack firstItemStack = null;\n while(itemStackListIterator.hasNext()) {\n ItemStack itemStack = itemStackListIterator.next();\n \n if(itemStack == null) continue;\n \n if(firstID == null) {\n firstID = itemStack.getTypeId();\n firstData = itemStack.getData().getData();\n firstItemStack = itemStack;\n \n if(Add.add(itemStack, event.getPlayer(), chest1, sell, buy, amount) == -1) {\n event.getBlock().breakNaturally();\n return;\n }\n \n itemAmount += itemStack.getAmount();\n \n continue;\n }\n \n if(itemStack.getTypeId() == firstID && itemStack.getData().getData() == firstData) {\n itemAmount += itemStack.getAmount();\n }\n }\n \n Items item = chest1.getItemStorage().getItems().iterator().next();\n item.setCurrentAmount(itemAmount);\n Database.getServer().update(item);\n \n item.getItemStorage().setItemAmount(itemAmount);\n Database.getServer().update(item.getItemStorage());\n \n //Create an itemdrop over the chest\n ItemStack itemStack = firstItemStack.clone();\n itemStack.setAmount(1);\n org.bukkit.entity.Item droppedItem = event.getPlayer().getWorld().dropItem(new Location(event.getPlayer().getWorld(), (double) chest1.getChestX() + 0.5, (double)chest1.getChestY() + 1.2, (double)chest1.getChestZ() + 0.5), itemStack);\n droppedItem.setVelocity(new Vector(0, 0.1, 0));\n NMS.safeGuard(droppedItem);\n \n //Change the Sign\n //Get the nice name\n String itemName = ItemName.getDataName(firstItemStack) + firstItemStack.getType().toString();\n if (firstItemStack.getItemMeta().hasDisplayName()) {\n itemName = \"(\" + firstItemStack.getItemMeta().getDisplayName() + \")\";\n }\n \n for(Integer line = 0; line < 4; line++) {\n event.setLine(line, ConfigManager.language.Sign_Shop_SignText.get(line).\n replace(\"%player\", event.getPlayer().getName()).\n replace(\"%itemname\", ItemName.nicer(itemName)).\n replace(\"%amount\", amount.toString()).\n replace(\"%sell\", sell.toString()).\n replace(\"%buy\", buy.toString()));\n }\n }",
"void setBlock(int x, int y, int z, byte[][] chunk, Material material) {\r\n\t\tif (chunk[y >> 4] == null)\r\n\t\t\tchunk[y >> 4] = new byte[16 * 16 * 16];\r\n\t\tif (!(y <= 256 && y >= 0 && x <= 16 && x >= 0 && z <= 16 && z >= 0))\r\n\t\t\treturn; // Out of bounds\r\n\t\ttry {\r\n\t\t\tchunk[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = (byte) material\r\n\t\t\t\t\t.getId();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"protected void\nsetTranspTypeElt( int type) \n\n{\n coinstate.transptype = type;\n}",
"public void setMark\n (int r, int c,\n Mark mark);",
"public void updateScoreSign(String updatedString){\n scoreSign.setText(updatedString);\n }",
"void setBlock(int x, int y, int z, byte[][] chunk, Material material) {\n\t\tif (chunk[y>>4] == null)\n\t\t\tchunk[y>>4] = new byte[16*16*16];\n\t\tif (!(y<=256 && y >= 0 && x <= 16 && x >= 0 && z <= 16 && z >= 0))\n\t\t\treturn; //Out of bounds\n\t\ttry {\n\t\t\tchunk[y>>4][((y & 0xF) << 8) | (z << 4) | x] = (byte)material.getId();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void setBlocks(int[][] blockLines) {\n\t\tthis.blockLines = blockLines;\n\t\trepaint(new Rectangle(getPreferredSize()));\n\t}",
"public void removeSign(Block block) {\n dirty = true;\n ListIterator<SignLocation> iterator = signLocations.listIterator();\n while (iterator.hasNext()) {\n SignLocation loc = iterator.next();\n if (loc.getWorld().equals(block.getWorld()) && loc.getLocation().equals(block.getLocation())) {\n iterator.remove();\n markedForRemoval.add(loc);\n }\n }\n }",
"@Override\r\n\tpublic String toSPIN(List<Cluster> clusters) {\n String ret = \"' \"+codeLine.text+\"\\r\\n\"; \t\t\r\n ret = ret + \"byte %0_\"+Command.toBinaryString(commandInfo,3)+\r\n \"_\"+Command.toBinaryString(voice,4)+\", %\"+Command.toBinaryString(note,8); \r\n \r\n return ret;\r\n \r\n\t}",
"public void mo5074b(short s) {\n this.f3707a = s;\n }",
"public Bishop(Player player, int x, int y) {\n\t\tsuper(Type.BISHOP, player, x, y);\n\t\t\n\t\tthis.displayText += \"B\";\n\t}",
"public void setSignature( String pSignature )\r\n {\r\n this.signature = pSignature;\r\n }",
"private String insertarCartaHealingSign() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 0,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 2,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 0,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n false,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n true,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }",
"private void setShipModifiers(ShipType ship, int... mods) {\n\t\tfor (int i = 0; i < mods.length; i++) {\n\t\t\tshipModifiers[ship.ordinal()][i] = mods[i];\n\t\t}\n\t}",
"public void openGUISounds(Player p){\n //gui.setItem(0, new ItemStack(Material.GRASS));\n //ItemStack grass = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);\n //SkullMeta skullMeta = (SkullMeta) grass.getItemMeta();\n //skullMeta.setDisplayName(ChatColor.GRAY + \"Player: \" + ChatColor.YELLOW + p.getName());\n //skullMeta.setOwner(p.getName());\n //grass.setItemMeta(skullMeta);\n //gui.setItem(1, grass);\n //p.openInventory(gui);\n }",
"public void encrypt(String s)\n\t{\n\t\tconvertToNum(s);\n\t\tfor(int i = 0; i < myMessage.length; i++)\n\t\t{\n\t\t\tmyView.setEncryptText((myMessage[i].modPow(E, publicKey)).toString() + \" \");\n\t\t}\n\t}",
"public void SetRhs(IStatement s) {args[1] = s;}",
"public void set(int sx,int sy, int ax, int ay)\n {\n shipX = sx;\n shipY = sy;\n astX = ax;\n astY = ay;\n }",
"public void a(MinecraftKey var0) {\n/* 98 */ this.a = var0;\n/* */ }",
"public static void reSign() {\n\t\t//System.out.println(\"Data before resign: \" + dataList);\n\t\tfor(int i = 0 ; i < dataList.size() ; i++) {\n\t\t\t//there is char '-$'\n\t\t\tif(dataList.get(i).name.charAt(0)=='-') {\n\t\t\t\tData n = new Data(\"\"+dataList.get(i).name.charAt(1),dataList.get(i).value*(-1));\n\t\t\t\tdataList.remove(i);\n\t\t\t\tif(hasToken(n.name)) {\n\t\t\t\t\tint ind = getIndex(n.name);\n\t\t\t\t\tdataList.remove(ind);\n\t\t\t\t}\n\t\t\t\tdataList.add(n);\n\t\t\t}\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saved data: \" + dataList);\n\t}",
"public Velocity changeSigns(Side side) {\n Velocity v;\n switch (side) {\n case TOP:\n case BOTTOM:\n v = this.changeDirection(1, -1);\n break;\n case LEFT:\n case RIGHT:\n v = this.changeDirection(-1, 1);\n break;\n case CORNER:\n v = this.changeDirection(-1, -1);\n break;\n case NONE:\n default:\n v = this.changeDirection(1, 1);\n break;\n }\n return v;\n }",
"public MilStd2525PointGraphic(String sidc)\n {\n this.symbol = this.createSymbol(sidc);\n }",
"@Override\n\tpublic void setMontant(double s) {\n\t\t\n\t}",
"public StreetSign(StreetSign streetSign) {\n super(streetSign.getDeviceId(), streetSign.getBlockchainAddress(), streetSign.getEnabled(), streetSign.getLocation());\n this.text = streetSign.getText();\n }",
"public void set(String s) {\n if(content.equals(\"EX\") || content.equals(\"OH\")){\n content = s;\n }\n else{\n content = \"EMPTY\";\n }\n }",
"public static void printboardInstructions() {\n System.out.println(\"This is the playboard. Please enter the number where you want to set your sign.\");\n }",
"private void setSignature(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000010;\n signature_ = value;\n }",
"public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)\n {\n int var7 = ((MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) + 2) % 4;\n p_149689_1_.setBlock(p_149689_2_, p_149689_3_ + 1, p_149689_4_, this, 8 | var7, 2);\n }",
"public static void enable( DynamicSign sign ) {\n\t\tif ( sign.text.equalsIgnoreCase( \"[delete]\" ) ) {\n\t\t\tdisable( sign.loc, sign.line );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tHashMap<Integer, DynamicSign> lines = signs.get( sign.loc );\n\t\tif ( lines == null )\n\t\t\tsigns.put( sign.loc, lines = new HashMap<Integer, DynamicSigns.DynamicSign>( 2 ) );\n\t\tlines.put( sign.line, sign );\n\t}",
"BlsPoint sign(BigInteger privateKey, byte[] data);",
"ISModifySignature createISModifySignature();",
"public BalaEnemiga(int x, int y, String s) {\r\n super(x, y,\"BalaEnemiga.png\");\r\n this.hit=true;\r\n }",
"private void markbases(Set<GdlSentence> contents){\r\n\t\tMap<GdlSentence, Proposition> props = propNet.getBasePropositions();\r\n\t\tfor (GdlSentence p : contents) {\r\n\t\t\tprops.get(p).setValue(true);\r\n\t\t}\r\n }",
"Object openSignEditor(Location location);",
"public void setSignName(String signName) {\n this.signName = signName;\n }"
] | [
"0.75891334",
"0.63917273",
"0.61865866",
"0.6100723",
"0.60475695",
"0.58892536",
"0.58086187",
"0.5749838",
"0.56241107",
"0.56138283",
"0.5519456",
"0.5459967",
"0.5420116",
"0.54068977",
"0.5397919",
"0.5396268",
"0.53902274",
"0.5349478",
"0.5323539",
"0.53016675",
"0.53011847",
"0.52923346",
"0.5279381",
"0.5261789",
"0.523072",
"0.5203079",
"0.5196724",
"0.517689",
"0.5162796",
"0.5155854",
"0.5152906",
"0.51222014",
"0.5112373",
"0.5110593",
"0.50942254",
"0.50939643",
"0.50768614",
"0.50748694",
"0.5071265",
"0.50672406",
"0.5067202",
"0.50548416",
"0.5052919",
"0.5052482",
"0.50194097",
"0.50074637",
"0.50073755",
"0.5007273",
"0.5003804",
"0.5003559",
"0.49675086",
"0.49585718",
"0.49574906",
"0.4956414",
"0.4952655",
"0.49468946",
"0.49467418",
"0.49383545",
"0.4933469",
"0.49333817",
"0.49287334",
"0.4928015",
"0.4922743",
"0.49147147",
"0.49064785",
"0.48993242",
"0.4886676",
"0.48852292",
"0.48771587",
"0.48722145",
"0.48688295",
"0.4868689",
"0.48418933",
"0.48370504",
"0.4834176",
"0.48328745",
"0.48317164",
"0.48264804",
"0.48259988",
"0.48219347",
"0.48216063",
"0.48204002",
"0.48200554",
"0.48149794",
"0.48092666",
"0.4803925",
"0.48014712",
"0.4795395",
"0.47827563",
"0.4782412",
"0.4779017",
"0.4769823",
"0.4749341",
"0.4738429",
"0.4728558",
"0.4727981",
"0.4724141",
"0.47240287",
"0.47128808",
"0.47126672"
] | 0.83206785 | 0 |
TODO virer debug p.sendMessage(plugin.chatPrefix + "displaySignInfo"); | public void displaySignInfo(Block b, Player p)
{
BoutiqueSign bs = getBoutiqueSign(b);
String signOwnerString = bs.getOwnerString();
String signTypeStr = bs.getType();
String separator = Messages.getString("Sign.SIGNINFOSEPARATOR"); //$NON-NLS-1$
//debut texte
p.sendMessage(separator);
if (!bs.isEnabled())
{
//TODO: formatter le chat ailleurs ?
p.sendMessage(ChatColor.YELLOW + Messages.getString("Sign.INACTIVESIGN")); //$NON-NLS-1$
p.sendMessage(ChatColor.YELLOW + Messages.getString("Sign.MAKEANOTHERONE")); //$NON-NLS-1$
return;
}
/* Affiche le type de panneau et le propriétaire */
//TODO virer debug
//p.sendMessage("dbg1: Type=" + bs.getType());
if(bs.isSignServer())
{
//Type BoutiqueSignServer
p.sendMessage(Messages.getString("Sign.SIGNISSERVER")); //$NON-NLS-1$
}
else if(bs.isSignChest())
{
//Type BoutiqueSignChest
p.sendMessage(Messages.getString("Sign.SIGNISPLAYER") + ChatColor.RED + signOwnerString + ChatColor.WHITE + "."); //$NON-NLS-1$ //$NON-NLS-2$
String signchest = bs.getChestString();
if(signchest.isEmpty())
{
p.sendMessage(ChatColor.RED + Messages.getString("Sign.SIGNCHESTNOTBIND")); //$NON-NLS-1$
}
}
else if(bs.isSignWebAuction())
{
//Type BoutiqueSignWebAuction
p.sendMessage(Messages.getString("Sign.SIGNISWEB") + ChatColor.RED + signOwnerString + ChatColor.WHITE + "."); //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
//Type inconnu
p.sendMessage(ChatColor.RED + Messages.getString("Sign.SIGNISUNKNOWTYPE") + ChatColor.WHITE + signOwnerString + ChatColor.RED + Messages.getString("Sign.ISTHEOWNER") ); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
Integer qtyFrom = bs.getQtyFrom();
Integer qtyTo = bs.getQtyTo();
BoutiqueItem itemTo = bs.getItemTo();
BoutiqueItem itemFrom = bs.getItemFrom();
Double moneyFrom = bs.getMoneyFrom();
Double moneyTo = bs.getMoneyTo();
/* Test iconomy */
if(!EconomyHandler.currencyEnabled)
{
p.sendMessage(Messages.getString("Sign.NOECONERR")); //$NON-NLS-1$
p.sendMessage(separator);
return;
}
if(!bs.checkLines(p))
{
//TODO virer debug
return;
}
/* Détermine le message en fonction du type de panneau */
//Freebies
if(bs.isFreebiesSign())
{
if(itemTo == null)
{
//TODO: message && currencystring
p.sendMessage
(
Messages.getString("Sign.RIGHTCLICKWILLGETYOU") + //$NON-NLS-1$
ChatColor.RED + moneyTo + Messages.getString("Sign.22") + ChatColor.WHITE //$NON-NLS-1$
);
}
else
{
//TODO: message
p.sendMessage
(
Messages.getString("Sign.RIGHTCLICKWILLGETYOU") + //$NON-NLS-1$
ChatColor.RED + qtyTo + ChatColor.WHITE + " " + //$NON-NLS-1$
ChatColor.RED + itemTo.itemName + ChatColor.WHITE +
Messages.getString("Sign.FORFREE") //$NON-NLS-1$
);
}
}
//Donation (item ou $ => rien)
else if(bs.isDonationSign())
{
if(itemFrom == null)
{
//TODO: message && currencystring
p.sendMessage
(
Messages.getString("Sign.SIGNGETDONATIONS") + //$NON-NLS-1$
ChatColor.RED + moneyFrom + Messages.getString("Sign.27") + ChatColor.WHITE //$NON-NLS-1$
);
}
else
{
//TODO: message
p.sendMessage
(
Messages.getString("Sign.SIGNGETDONATIONS") + //$NON-NLS-1$
ChatColor.RED + qtyFrom + ChatColor.WHITE + " " + //$NON-NLS-1$
ChatColor.RED + itemFrom.itemName + ChatColor.WHITE
);
}
}
else if(bs.isSellSign())
{
p.sendMessage(
Messages.getString("Sign.RIGHTCLICKWILLGETYOU") + //$NON-NLS-1$
ChatColor.RED + qtyTo + ChatColor.WHITE + " " + //$NON-NLS-1$
ChatColor.RED + itemTo.itemName + ChatColor.WHITE +
Messages.getString("Sign.FORMONEY") + //$NON-NLS-1$
ChatColor.RED + moneyFrom + " Eus" + ChatColor.WHITE + //$NON-NLS-1$
"." //$NON-NLS-1$
);
}
else if(bs.isBuySign())
{
p.sendMessage
(
Messages.getString("Sign.SIGNGIVEYOUFORMONEY") + ChatColor.RED + moneyTo + "Eus " + //$NON-NLS-1$ //$NON-NLS-2$
ChatColor.WHITE + Messages.getString("Sign.FOREACHSTACKOF") + //$NON-NLS-1$
ChatColor.RED + qtyFrom + Messages.getString("Sign.QTY1") + itemFrom.itemName + //$NON-NLS-1$
ChatColor.WHITE + Messages.getString("Sign.YOUWILLGIVEHIM") //$NON-NLS-1$
);
}
else if(bs.isTradeSign())
{
p.sendMessage
(
Messages.getString("Sign.SIGNISTRADING") + //$NON-NLS-1$
ChatColor.RED + qtyFrom + Messages.getString("Sign.QTY") + ChatColor.WHITE + " " + //$NON-NLS-1$ //$NON-NLS-2$
ChatColor.RED + itemFrom.itemName + ChatColor.WHITE + Messages.getString("Sign.VERSUS1") + //$NON-NLS-1$
ChatColor.RED + qtyTo + Messages.getString("Sign.QTY") + ChatColor.WHITE + " " + //$NON-NLS-1$ //$NON-NLS-2$
ChatColor.RED + itemTo.itemName + ChatColor.WHITE + "." //$NON-NLS-1$
);
}
else
{
p.sendMessage
(
Messages.getString("Sign.VROUMVROUMERR") //$NON-NLS-1$
);
return;
}
bs.Render();
p.sendMessage(separator);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showSignature() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> signList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tsignList=jdbcTemplate.query(FiinfraConstants.SP_GET_SYSTEM_RECEPIENT_CHANNEL,new Object[]{FiinfraConstants.SIGNATURE_ID} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(signList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t} \n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t} \n\t\tfinally\n\t\t{\n\t\t\treturn response;\n\t\t\t\t} \n\t}",
"private void showInfo() {\n JOptionPane.showMessageDialog(\n this,\n \"Пока что никакой\\nинформации тут нет.\\nДа и вряд ли будет.\",\n \"^^(,oO,)^^\",\n JOptionPane.INFORMATION_MESSAGE);\n }",
"private void signMessage() {\n\n String messageText = messageTextArea.getText();\n SecureCharSequence secureCharSequence = new SecureCharSequence(currentPassword.getPassword());\n String signMessage = this.address.signMessage(messageText, secureCharSequence);\n signature.setText(signMessage);\n\n }",
"public static boolean isSigned_infos_type() {\n return false;\n }",
"public void showInfo() {\n\t\tsuper.showInfo();\n\t\tSystem.out.println(\n\t\t\t\t\" Your Savings Account Features: \" +\n\t\t\t\t\"\\n debitCardNumber: \" + debitCardNumber + \n\t\t\t\t\"\\n debitCardPIN: \" + debitCardPIN);\n\t}",
"public interface SignView extends BaseView {\n String getPKG();//获取PKG信息\n void getPKGSuccess(TransferParentInfoResult result);//获取PKG信息成功\n void failed();\n void summitInfoSuccess(TransferReceiveResult result);//签收成功\n}",
"String getSign();",
"java.lang.String getSignatureText();",
"public java.lang.String getCallSign() {\n\t\treturn _tempNoTiceShipMessage.getCallSign();\n\t}",
"public String getSign() {\n\n return this.sign;\n }",
"@Override\n\tpublic String representation() {\n\t\treturn this.sign.name();\n\t}",
"public static boolean isSigned_infos_log_src() {\n return false;\n }",
"public interface SignReflection {\n /**\n * Reads an input packet of sign being updated\n *\n * @param packet The input packet of the sign being updated\n * @return The lines stored in the input packet\n */\n String[] readLines(Object packet);\n\n /**\n * Generates the sign editor packet\n *\n * @param location The location of the sign for the player's world or the game world\n * @return The output packet that includes the required information to open the sign editor\n */\n Object openSignEditor(Location location);\n\n /**\n * Update sign lines to the player\n *\n * @param player The player that you aim to update the sign for\n * @param location The location of the sign in the player's world\n * @param lines The new values of the lines of the sign\n */\n void updateSignToPlayer(Player player, Location location, String[] lines);\n\n /**\n * Send a block change that sets a certain block to be a sign.\n * Legacy and latest versions of Bukkit API includes different type of sign Material\n *\n * @param player The player to send the block change to\n * @param location The location of the block\n * @param data Raw data in bytes about the block\n */\n void sendSignChangeToPlayer(Player player, Location location, byte data);\n\n /**\n * Sends a packet to the player using NMS\n *\n * @param player The player that you are going to send the packet to\n * @param packet The object of the output packet\n */\n void sendPacketToPlayer(Player player, Object packet);\n}",
"public String getSign() {\n return sign;\n }",
"public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}",
"public String getSignName() {\n return signName;\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"com.credolabs.justcredo\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"Credo:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n }",
"private void printKeyHash(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"andbas.ui3_0628\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n\n }",
"void show_info() {\n\t\tsetAlwaysOnTop(false);\n\n\t\tString msg = \"<html><ul><li>Shortcuts:<br/>\"\n\t\t\t\t+ \"(\\\") start macro<br/>\"\n\t\t\t\t+ \"(esc) exit<br/><br/>\"\n\t\t\t\t+ \"<li>Author: <b>Can Kurt</b></ul></html>\";\n\n\t\tJLabel label = new JLabel(msg);\n\t\tlabel.setFont(new Font(\"arial\", Font.PLAIN, 15));\n\n\t\tJOptionPane.showMessageDialog(null, label ,\"Info\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\tsetAlwaysOnTop(true);\n\t}",
"void updateSignToPlayer(Player player, Location location, String[] lines);",
"public void allinfo()\n\t\t{\n\t\t\tsendBroadcast(new Intent(\"android.provider.Telephony.SECRET_CODE\", Uri.parse(\"android_secret_code://4636\")));\n\n\n\t\t}",
"public void showInfo() {\n\t\t\n\t\tsuper.showInfo();\n\t\tSystem.out.println(\"Your Checking Account features: \"\n\t\t\t\t+ \"\\nDebit Card Number: \" + debitCardNumber\n\t\t\t\t+ \"\\nDebit Card PIN: \" + debitCardPin\n\t\t\t\t+ \"\\n****************\"\n\t\t\t\t);\n\t\t\n\t}",
"public void displaySongInfo() {\n\t\tSystem.out.println(\"Track number: \" + this.trackNumber + \"\\n\");\n\t\tSystem.out.println(\"Title: \" + this.songTitle + \"\\n\");\n\t\tSystem.out.println(\"Composer_Name: \" + this.composerName + \"\\n\");\n\t\tSystem.out.println(\"Voices: \" + this.voiceMap.keySet() + \"\\n\");\n\t\tSystem.out.println(\"Meter: \" + this.meter + \"\\n\");\n\t\tSystem.out.println(\"Default note length: \" + this.Length_Default + \"\\n\");\n\t\tSystem.out.println(\"Tempo: \" + this.tempo + \"\\n\");\n\t\tSystem.out.println(\"Key signature: \" + this.key + \"\\n\");\n\t}",
"public abstract String getCurrentUserSignature(PortletRequest request);",
"private void show(Context context){\n try {\n PackageInfo info = context.getPackageManager().getPackageInfo(\n PACKAGE,\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n System.out.println(\"Package name: \" + info.packageName + \"hashcode: \" + Base64.encodeToString(md.digest(), Base64.NO_WRAP));\n }\n } catch (PackageManager.NameNotFoundException e) {\n Log.d(TAG, e.getMessage(), e);\n } catch (NoSuchAlgorithmException e) {\n Log.d(TAG, e.getMessage(), e);\n }\n }",
"@Override\t\n\tpublic boolean getSignedInGPGS() {\n\t\treturn false;\n\t}",
"@EventHandler(priority = EventPriority.MONITOR)\r\n\tpublic void onSignChange(SignChangeEvent event) {\r\n\t\t\r\n\t\tfinal Player creator = (Player)event.getPlayer();\r\n\t\tfinal InputPlayer iplayer = bSignModule.GUI_API.getPlayer(creator);\r\n\t\tfinal Location signLocation = event.getBlock().getLocation();\r\n\t\t\r\n\t\tSign newSign = null;\r\n\t\t\r\n\t\tif (event.getLine(0).equalsIgnoreCase(\"--weblink--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.web\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new WebSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the web link to link to\"));\r\n\t\t}\r\n\t\telse if (event.getLine(0).equalsIgnoreCase(\"--command--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.command\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new CommandSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the command for this sign to execute\"));\r\n\t\t}\r\n\t\telse if (event.getLine(0).equalsIgnoreCase(\"--info--\")) {\r\n\t\t\t\r\n\t\t\t// see if they have permissions to use signs\r\n\t\t\tif (!bSignModule.hasPermission(creator, \"bfundamental.bsign.create.info\"))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tnewSign = new InfoSign(creator, signLocation);\r\n\t\t\tiplayer.openGui(new SignInputGui(newSign, \"Enter the info message for this sign\"));\r\n\t\t}\r\n\t\t\r\n\t\tbSignModule.SIGNS.add(newSign);\r\n\t\t\r\n\t}",
"public String getSignLocation() {\n\t\treturn signLocation;\n\t}",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"net.simplifiedcoding.androidlogin\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n }",
"@Override\n\tpublic boolean getSignedInGPGS() {\n\t\treturn gameHelper.isSignedIn();\n\t}",
"private void printKeyHash() {\n\n try {\n\n PackageInfo info = getPackageManager().getPackageInfo(\"com.example.androidnotification\", PackageManager.GET_SIGNATURES);\n\n for (Signature signature : info.signatures) {\n\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n\n Log.d(TAG, \"printKeyHash: \" + Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n\n } catch (PackageManager.NameNotFoundException e) {\n\n e.printStackTrace();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"public void readSign()\n\t{\n\t\tboolean[][] boolTable = getTable();\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t public void run()\n\t\t {\n\t\t \tview.sPanel.updateTable(boolTable); // aktualizacja tablicy wypełenień w panelu do wyświetlania interpretacji znaku\n\t\t }\n\t\t});\n\t\t\n\t\tArrayList<Double> table = new ArrayList<Double>();\n\t\t\n\t\tfor(int i=0; i<10; ++i) // przygotowanie tablicy wejść dla sieci neuronowej\n\t\t\tfor(int j=0; j<7; ++j)\n\t\t\t\tif(boolTable[i][j])\n\t\t\t\t\ttable.add(1.0d);\n\t\t\t\telse\n\t\t\t\t\ttable.add(0.0d);\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable()\n\t\t{\n\t\t public void run()\n\t\t {\n\t\t \tview.label.setLabelText(model.getOutput(table)); // ustawienie zawartości pola tekstowego\n\t\t }\n\t\t});\n\t\t\n\t}",
"private void printSpecialThanks() {\n System.out.println(AraraUtils.wrap(localization.getMessage(\"Msg_SpecialThanks\")));\n }",
"@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }",
"com.microsoft.schemas.office.x2006.digsig.STSignatureText xgetSignatureText();",
"private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"[email protected]\");\n }",
"public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}",
"String getSignature();",
"String getSignature();",
"String getSignature();",
"public java.lang.String getSignPlace() {\n\t\treturn _tempNoTiceShipMessage.getSignPlace();\n\t}",
"public void printInfo() {\n String s = \"\";\n if (map.isEmpty()) {\n s += \"not keeping any entries\\n\";\n } else {\n s += \"This Node stores a range of \" + map.size() + \" keys :\\n from:\" + map.firstKey() + \" up to: \" + map.lastKey() + \"\\n\";\n }\n s += \"node key:\\t\" + nodeKey + \"\\n\";\n s += \"previous key:\\t\" + predKey + \"\\n\";\n\n window.getKeysInfoText().setText(s);\n }",
"void sendSignChangeToPlayer(Player player, Location location, byte data);",
"public static boolean isSigned_infos_metadata() {\n return false;\n }",
"private String getMessage() {\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\r\n\t\t\r\n\t\tboolean addSign = prefs.getBoolean(\"addsign\", true);\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\tdefMessage = \"I am busy right now and will call you latter.\";\r\n\t\t\r\n\t\tfinalMessage = prefs.getString(\"message\", defMessage);\r\n\t\tif(finalMessage.equals(\"\"))\r\n\t\t\tfinalMessage = defMessage;\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tfinalMessage = defMessage;\r\n\t\t}\r\n\t\t\r\n\t\tif(addSign)\r\n\t\t\tfinalMessage += \"\\nSent using Calls and SMS Blocker for android.\\nDownload from: https://play.google.com/store/apps/details?id=com.atiffarrukh.callandsmsblocker\";\r\n\t\treturn finalMessage;\r\n\t}",
"Object openSignEditor(Location location);",
"@Override\r\n\tpublic String getSign(String data, String id, String struc) {\n\t\treturn null;\r\n\t}",
"@Override\n public void display(){\n System.out.println(\"***************\");\n System.out.println(\"Checking Account\");\n super.display();\n System.out.println(\"Routing Number: \" + routingNumber);\n }",
"public void info()\n {\n System.out.println(toString());\n }",
"public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}",
"public String getInfoString();",
"public void checkAccountInfo(View view) {\t\tEosPrivateKey eosPrivateKey = new EosPrivateKey();\n//\t\tBigInteger asBigInteger = eosPrivateKey.getAsBigInteger();\n//\t\tString privateKey = eosPrivateKey.toString();\n//\t\tString publicKey = eosPrivateKey.getPublicKey().toString();\n//\t\tLog.e(\"asBigInteger\", asBigInteger+\"\");\n//\t\tLog.e(\"privateKey\", privateKey );\n//\t\tLog.e(\"publicKey\", publicKey );\n\t\t//\n\t\tEosPrivateKey eosPrivateKey1 = new EosPrivateKey(\"5JKsGbs4iCPDzffzp9BgRQkAkQYceV67SfbJFGhG57RGoVkGpuv\");\n\t\tLog.e(\"privateKey\", eosPrivateKey1.toString());\n\t\tLog.e(\"publicKey\", eosPrivateKey1.getPublicKey().toString());\n\t\t//\n\t}",
"public String getSignReturn() {\n return signReturn;\n }",
"public TPM_SIGN_INFO getLogSignInfo( //TPM_NONCE antiReplay,\r\n Map<Integer, TPM_STORE_PUBKEY> keyMap )\r\n {\r\n // TPM_DIGEST transDigest = this.computeLogDigest( keyMap );\r\n\r\n if ( (log.size() < 2)\r\n || !(log.get( 0 ).getTransOut() instanceof TPM_EstablishTransportOutput)\r\n || !(log.get( log.size() - 1 ).getTransOut() instanceof TPM_ReleaseTransportSignedOutput) )\r\n {\r\n // log must have at least an Establish and a ReleaseTransportSigned\r\n return null;\r\n }\r\n\r\n // NOTE: according to spec, transDigest starts as NULL\r\n // and is extended every time.\r\n\r\n // NOTE: I've tested it on a Broadcom 1.2 chip, and verified\r\n // that actually using null (i.e., an empty string)\r\n // works, not using an all-zeros TPM_DIGEST.\r\n // TPM_DIGEST transDigest = null;\r\n\r\n // Try this for Infineon\r\n TPM_DIGEST transDigest = setupInitialTransDigest();\r\n\r\n TPM_CURRENT_TICKS previousCurrentTicks = this.getStartTicks();\r\n TPM_NONCE antiReplay = this.getAntiReplayNonce();\r\n byte[] concat = new byte[0];\r\n\r\n for ( int i = 0; i < log.size(); i++ )\r\n {\r\n TPMTransportLogEntry logEntry = log.get( i );\r\n\r\n // Debug.println( \"Log entry \" + i + \": \" + logEntry );\r\n\r\n if ( i == (log.size() - 1) )\r\n {\r\n TPM_ReleaseTransportSigned relCmd = (TPM_ReleaseTransportSigned) logEntry.getTransCmd();\r\n antiReplay = relCmd.getAntiReplay();\r\n // System.out.println( \"TPMTransportLog: antiReplay = \" + antiReplay );\r\n }\r\n\r\n TPM_TRANSPORT_LOG_IN inLog = this.getTransportLogIn( logEntry,\r\n keyMap );\r\n if ( inLog != null )\r\n {\r\n // Debug.println( \"inLog: \" + inLog + \"\\n(bytes): \"\r\n // + ByteArrayUtil.toPrintableHexString( inLog.toBytes() ) );\r\n\r\n concat = ByteArrayUtil.concat( transDigest, inLog );\r\n transDigest = CryptoUtil.computeTPM_DIGEST( concat );\r\n\r\n // Debug.println( \"concat: \"\r\n // + ByteArrayUtil.toPrintableHexString( concat ) );\r\n // Debug.println( \"transDigest: \" + transDigest );\r\n }\r\n TPM_TRANSPORT_LOG_OUT outLog = this.getTransportLogOut( logEntry,\r\n previousCurrentTicks );\r\n if ( outLog != null )\r\n {\r\n // Debug.println( \"outLog: \" + outLog + \"\\n(bytes): \"\r\n // + ByteArrayUtil.toPrintableHexString( outLog.toBytes() ) );\r\n\r\n concat = ByteArrayUtil.concat( transDigest, outLog );\r\n transDigest = CryptoUtil.computeTPM_DIGEST( concat );\r\n\r\n // Debug.println( \"concat: \"\r\n // + ByteArrayUtil.toPrintableHexString( concat ) );\r\n // Debug.println( \"transDigest: \" + transDigest );\r\n }\r\n }\r\n\r\n TPM_SIGN_INFO signInfo = new TPM_SIGN_INFO( TPM_SIGN_INFO.FIXED_TRAN,\r\n antiReplay, transDigest.toBytes() );\r\n return signInfo;\r\n }",
"void showSignInInterstitial();",
"@Override\n public String info() {\n return String.format(\"%s. %s\", this.key, this.name);\n }",
"private void printKeyHash() {\n try {\n PackageInfo info =\n getPackageManager().getPackageInfo(\"in.peerreview.ping\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n Log.e(\"KeyHash:\", e.toString());\n } catch (NoSuchAlgorithmException e) {\n Log.e(\"KeyHash:\", e.toString());\n }\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\"com.lostfind\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", \"KEYHASH::::\"+Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"protected void printFaceBookKeyHash() {\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\"com.sakewiz.android\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash: \", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"public static void ShowKeys(ActionEvent event) {\n \n AuthenticateUtils authentic = new AuthenticateUtils();\n authentic.getPrivateKey();\n authentic.getPublicKey();\n //String public = authentic.getPublicKey();\n \n \n Label label1 = new Label (\"Private Key\");\n TextArea s = new TextArea(authentic.getPrivateKey());\n Label label2 = new Label (\"Public Key\");\n TextArea p = new TextArea(authentic.getPublicKey());\n \n s.setEditable(false);\n p.setEditable(false);\n s.setPrefColumnCount(3);\n p.setPrefColumnCount(3);\n s.setPrefRowCount(1);\n p.setPrefRowCount(1);\n\n \n Button close = new Button(\"Close\");\n close.setOnAction(popupUtils::closeFromEvent);\n\n Node source = (Node) event.getSource();\n Stage stage = (Stage) source.getScene().getWindow();\n popup(stage,label1,s,label2,p,close);\n }",
"public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}",
"public SignType getSignType();",
"protected void logResult(@Nonnull final SignatureSigningParameters params) {\n if (log.isDebugEnabled()) {\n log.debug(\"Resolved SignatureSigningParameters:\");\n \n final Credential signingCred = params.getSigningCredential();\n final Key signingKey = signingCred != null ? CredentialSupport.extractSigningKey(signingCred) : null;\n if (signingKey != null) {\n log.debug(\"\\tSigning credential with key algorithm: {}\", signingKey.getAlgorithm());\n } else {\n log.debug(\"\\tSigning credential: null\"); \n }\n \n log.debug(\"\\tSignature algorithm URI: {}\", params.getSignatureAlgorithm()); \n \n final KeyInfoGenerator generator = params.getKeyInfoGenerator();\n log.debug(\"\\tSignature KeyInfoGenerator: {}\", generator != null ? generator.getClass().getName() : \"null\");\n \n log.debug(\"\\tReference digest method algorithm URI: {}\", params.getSignatureReferenceDigestMethod()); \n log.debug(\"\\tReference canonicalization algorithm URI: {}\", \n params.getSignatureReferenceCanonicalizationAlgorithm()); \n \n log.debug(\"\\tCanonicalization algorithm URI: {}\", params.getSignatureCanonicalizationAlgorithm()); \n log.debug(\"\\tHMAC output length: {}\", params.getSignatureHMACOutputLength()); \n }\n }",
"private void signSetter(Block b, Player p, String[] lines) \n\t{\t\t\n\t\t//TODO: virer debug\n\t\t//p.sendMessage(\"dbg1\");\n\t\t\n\t\t\n\t\tif(b==null) \n\t\t\treturn;\n\t\t\n\t\tBoutiqueSign bs = new BoutiqueSign();\n\t\t\n\t\tbs.setOwner(p);\n\t\tbs.setLocation(b.getLocation());\n\t\tbs.setLines(lines);\n\n\t\t//TODO: virer debug\n\t\t/*\n\t\tp.sendMessage(\"dbg1 : line1 = \" + bs.getLine1());\n\t\tp.sendMessage(\"dbg1 : line2 = \" + bs.getLine2());\n\t\tp.sendMessage(\"dbg1 : line3 = \" + bs.getLine3());\n\t\tp.sendMessage(\"dbg1 : line4 = \" + bs.getLine4());\t\t\n\t\tp.sendMessage(\"dbg2 : type = \" + bs.getType());\n\t\t*/\n\t\t\n\t\tif(bs.isSignServer())\n\t\t{\n\t\t\t\n\t\t\tif (!PermissionsHandler.canSetGlobalSign(p))\n\t\t\t{\n\t\t\t\tp.sendMessage(PermissionsHandler.permissionErr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!bs.checkLines(p))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.SERVERSIGNADDED\")); //$NON-NLS-1$\n\t\t}\n\t\t\n\t\telse if(bs.isSignChest())\n\t\t{\n\t\t\tif (!PermissionsHandler.canSetPersonalSign(p))\n\t\t\t{\n\t\t\t\tp.sendMessage(plugin.chatPrefix + PermissionsHandler.permissionErr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!bs.checkLines(p))\n\t\t\t{\n\t\t\t\t//TODO: virer debug\n\t\t\t\t//p.sendMessage(\"erreur checkline\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHESTSIGNADDED\")); //$NON-NLS-1$\n\t\t}\t\n\t\telse if(bs.isSignWebAuction())\n\t\t{\n\t\t\tif (!PermissionsHandler.canSetWebAuctionSign(p))\n\t\t\t{\n\t\t\t\tp.sendMessage(PermissionsHandler.permissionErr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!bs.checkLines(p))\n\t\t\t{\n\t\t\t\t//TODO: virer debug\n\t\t\t\t//p.sendMessage(\"erreur checkline\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.WEBAUCTIONSIGNADDED\")); //$NON-NLS-1$\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tbs.setLine4(\"ok\");\t\t\t //$NON-NLS-1$\n\t\tbs.Render();\n\t\t\n\t\tthis.put(bs);\n\t\tplugin.signmanager.saveGlobalSigns();\n\t}",
"public static void printInfo(){\n }",
"public String getSignImgUrl() {\n return signImgUrl;\n }",
"public static boolean isSigned_infos_timestamp() {\n return false;\n }",
"@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}",
"public String getSignType() {\n return signType;\n }",
"public void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}",
"public abstract String getSignature();",
"public void setSign(String sign) {\n\n this.sign = sign;\n }",
"public String getInfoText();",
"public void printInfo(){\n\t}",
"public void printInfo(){\n\t}",
"public Sign getSign() {\n return sign;\n }",
"Sign get_channel_signer(boolean inbound, long channel_value_satoshis);",
"private static void wxSignTest(){\n\t\t\n\t\tString sb=\"appid=wx791233ecd4e71c3f&attach=91_40090_3999&mch_id=1220845901&openid=oc9Xijt__DS0SyGDGqGnUPxSkDWQ&cash_fee=7600&fee_type=CNY\"+\n\t\t\t\t\"&time_end=20150831172810&bank_type=BOC_DEBIT&nonce_str\"+\n\t\t\t\t\"=5K8264ILTKCH16CQ2502SI8ZNMTM67VS&total_fee=7600&trade_type=JSAPI&result_code=SUCCESS&return_code=SUCCESS&is_subscribe=Y&out_trade_\"+\n\t\t\t\t\"no=2015083100400904657685188272&transaction_id=1007950222201508310755172159&key=48d15a39462fbe06f6391328ff685954\";\n\t\t\tString sign = DigestUtils.md5Hex(sb).toUpperCase();\n\t\t\tSystem.out.println(\"sign=\"+sign);\t\n\t}",
"protected void displayReceivedData(UserInfo userInfo)\n {\n\n }",
"@EventHandler(ignoreCancelled = true)\n\tpublic void onSignChange(SignChangeEvent event) {\n\n\t\t// Automatically flag players with bypass as posting non-empty signs to skip empty checks\n\t\tboolean empty = !event.getPlayer().hasPermission(\"sblock.sign.unlogged\");\n\n\t\tfor (int i = 0; i < event.getLines().length; i++) {\n\t\t\tevent.setLine(i, ChatColor.translateAlternateColorCodes('&', event.getLine(i)));\n\t\t\tif (empty && !TextUtils.appearsEmpty(event.getLine(i))) {\n\t\t\t\tempty = false;\n\t\t\t}\n\t\t}\n\n\t\tif (empty || event.getPlayer().hasPermission(\"sblock.sign.unlogged\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tBlock block = event.getBlock();\n\n\t\tStringBuilder msg = new StringBuilder().append(ChatColor.GRAY)\n\t\t\t\t.append(block.getWorld().getName()).append(' ').append(block.getX()).append(\"x, \")\n\t\t\t\t.append(block.getY()).append(\"y, \").append(block.getZ()).append(\"z\\n\");\n\t\tfor (String line : event.getLines()) {\n\t\t\tif (!TextUtils.appearsEmpty(line)) {\n\t\t\t\tmsg.append(line).append(ChatColor.GRAY).append('\\n');\n\t\t\t}\n\t\t}\n\t\tmsg.delete(msg.length() - 3, msg.length());\n\n\t\tif (chat.testForMute(event.getPlayer(), msg.toString(), \"#sign\")) {\n\t\t\tevent.setCancelled(true);\n\t\t}\n\t}",
"String getInfo();",
"public String info(){\r\n String info =\"\";\r\n info += \"id karyawan : \" + this.idkaryawan + \"\\n\";\r\n info += \"Nama karyawan : \" + this.namakaryawan + \"\\n\";\r\n return info;\r\n }",
"public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }",
"@Override\n public String displayInfo() {\n String str = getPluginName() + \"\\n\";\n str += \"Status: \";\n if (isRunning())\n str += \"running\";\n else\n str += \"stop\";\n str += \"\\nPort:\" + params.getUnifyExportPort();\n return str;\n }",
"@Override\n\tpublic void printInfo() {\n\t\tsuper.printInfo();\n\t\tmessage();\n\t\tdoInternet();\n\t\tmailing();\n\t\tcalling();\n\t\twatchingTV();\n\n\t}",
"@Override\n\tpublic String getMYSign(Map<String, String> param) {\n\t\treturn appMd5(param,getKey());\n\t}",
"public void displayInformationObject(DataRecorderMessage infoObject) throws InvalidViewerMessageException;",
"public String getSignFormat() {\r\n\t\treturn this.signFormat;\r\n\t}",
"public void showInformationMessage(String msg) {\r\n JOptionPane.showMessageDialog(this,\r\n\t\t\t\t msg, TmplResourceSingleton.getString(\"info.dialog.header\"),\r\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE);\r\n }",
"public String getSignature()\r\n {\r\n return signature;\r\n }",
"public String printInfo()\r\n {\r\n String info;\r\n \r\n info = \"Inputed number = \" + mark;\r\n \r\n return info;\r\n }",
"public void affiche3(BigInteger signe){\n System.out.println(\"La signature est :\"+signe);\n }",
"public String showPlayListInformation(){\n\t\t\n\t\tString text = \"\";\n\t\t\n\t\treturn text;\n\t}",
"public void open(Plugin plugin, SpoutPlayer splayer) {\n\n GenericPopup popup = new GenericPopup();\n int width = splayer.getMainScreen().getMaxWidth();\n int height = splayer.getMainScreen().getMaxHeight();\n pluginLeg.log(\"aight\" + width + \"\" + height);\n\n// int width = splayer.getCurrentScreen().getWidth();\n// int height = splayer.getCurrentScreen().getHeight();\n\n //title of the screen\n GenericLabel topLabel = new GenericLabel(\"Clan-Invitation\");\n topLabel.setScale(1);\n\n topLabel.setWidth(topLabel.getText().length() * 8 * (int) topLabel.getScale()).setHeight((int) topLabel.getScale() * 15);\n\n topLabel.setX(width / 2 - topLabel.getWidth() / 2);\n topLabel.setY(topLabel.getHeight() / 2 + 5);\n popup.attachWidget(plugin, topLabel);\n\n //title of the screen\n String questionString = \"&2You are invited to \"+clan.getName()+\". Do you want to join?\";\n GenericLabel questionLabel = new GenericLabel(LegendaryClans.parseColor(questionString));\n questionLabel.setScale(1);\n questionLabel.setWidth(questionLabel.getText().length() * 5 * (int) questionLabel.getScale());\n questionLabel.setHeight((int) questionLabel.getScale() * 15);\n\n questionLabel.setX(width / 2 - questionLabel.getWidth() / 2);\n questionLabel.setY(height / 2 - questionLabel.getHeight() / 2);\n popup.attachWidget(plugin, questionLabel);\n\n //Accept Button\n LegendaryButton acceptButton = new LegendaryButton(LegendaryClans.parseColor(\"&2Accept!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n if (pluginLeg.getClanManager().getClanByPlayer(clan.getLeaders().get(0)) != null && askedPlayer != null) {\n clan.addMember(askedPlayer);\n } \n getPopup().close();\n }\n };\n\n\n acceptButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale()).setHeight((int) acceptButton.getScale() * 15);;\n acceptButton.setX(width / 2 + width / 4 - acceptButton.getWidth() / 2).setY(height / 2 + height / 4 - acceptButton.getHeight() / 2);\n\n\n popup.attachWidget(plugin, acceptButton);\n //deny button\n LegendaryButton denieButton = new LegendaryButton(LegendaryClans.parseColor(\"&4Deny!\"), popup) {\n\n @Override\n public void onButtonClick(ButtonClickEvent event) {\n clan.broadcastMessage(\"&4\" + askedPlayer.getName() + \" denied invitation!\");\n getPopup().close();\n }\n };\n\n denieButton.setWidth(acceptButton.getText().length() * 8 * (int) acceptButton.getScale());\n denieButton.setHeight((int) denieButton.getScale() * 15);\n// \n// ((LegendaryClans)plugin).log(\"\"+width+\",\"+height);\n// denieButton.setX(denieButton.getX()+denieButton.getWidth()/2 +10);\n\n denieButton.setX(width / 4 - denieButton.getWidth() / 2);\n denieButton.setY(height / 2 + height / 4 - denieButton.getHeight() / 2);\n popup.attachWidget(plugin, denieButton);\n\n splayer.closeActiveWindow();\n splayer.getMainScreen().attachPopupScreen(popup);\n }",
"public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}",
"private void getUserInfo() {\n\t}",
"public static void p_show_info_program() {\n System.out.println(\"╔══════════════════════════════╗\");\n System.out.println(\"║ SoftCalculator V1.2 ║\");\n System.out.println(\"║ Oscar Javier Cardozo Diaz ║\");\n System.out.println(\"║ 16/04/2021 ║\");\n System.out.println(\"╚══════════════════════════════╝\");\n }",
"private String signature() {\n\t\t++this.nonce;\n\t\tString message = new String(this.nonce + this.username + this.apiKey);\n\t\tMac hmac = null;\n\n\t\ttry {\n\t\t\thmac = Mac.getInstance(\"HmacSHA256\");\n\t\t\tSecretKeySpec secret_key = new SecretKeySpec(\n\t\t\t\t\t((String) this.apiSecret).getBytes(\"UTF-8\"), \"HmacSHA256\");\n\t\t\thmac.init(secret_key);\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn String.format(\"%X\",\n\t\t\t\tnew BigInteger(1, hmac.doFinal(message.getBytes())));\n\t}",
"@Override\n public String toString() {\n return info();\n }",
"protected void displayInfo(KeyEvent e){\n\t }"
] | [
"0.64014196",
"0.59764016",
"0.5920605",
"0.5916014",
"0.5915829",
"0.5879527",
"0.5822003",
"0.5818665",
"0.57804656",
"0.573906",
"0.5714277",
"0.57040185",
"0.56969595",
"0.56850183",
"0.5670416",
"0.5647627",
"0.56307",
"0.562508",
"0.5610912",
"0.5603866",
"0.5601995",
"0.55936795",
"0.5569917",
"0.55637497",
"0.55426884",
"0.55313754",
"0.55284405",
"0.550562",
"0.55035645",
"0.54838645",
"0.5478085",
"0.54736406",
"0.5471713",
"0.54628366",
"0.5451682",
"0.5444187",
"0.54436237",
"0.5434676",
"0.5434676",
"0.5434676",
"0.54222363",
"0.541629",
"0.5407891",
"0.53996724",
"0.5388892",
"0.5377403",
"0.5377113",
"0.536896",
"0.53593194",
"0.5356167",
"0.5344875",
"0.53411794",
"0.5337637",
"0.5328493",
"0.53237677",
"0.5323131",
"0.53132707",
"0.5307567",
"0.5301531",
"0.5274716",
"0.5269717",
"0.52686954",
"0.5264223",
"0.5263415",
"0.52632415",
"0.52630246",
"0.52560693",
"0.52551746",
"0.525506",
"0.5251775",
"0.52424484",
"0.52392095",
"0.52346045",
"0.52297634",
"0.52297634",
"0.5228866",
"0.5228329",
"0.522269",
"0.52204853",
"0.52201337",
"0.52138966",
"0.5213725",
"0.51918304",
"0.5186022",
"0.51821756",
"0.5177683",
"0.51773894",
"0.5168559",
"0.51627624",
"0.5158497",
"0.51544607",
"0.51534307",
"0.51530784",
"0.5145454",
"0.51445496",
"0.5142713",
"0.5141328",
"0.5131381",
"0.5119073",
"0.51161975"
] | 0.7373652 | 0 |
Double costAmount = bs.getMoneyTo(); | public boolean getDonation(BoutiqueSign bs, Player p)
{
String signOwner = bs.getOwnerString();
//Teste donation item ou thunes ?
//Don d'item
if(bs.getItemFrom() != null)
{
Integer qty = bs.getQtyFrom();
Integer id = bs.getItemFrom().itemId;
Integer damage = bs.getItemFrom().itemDamage;
if (!PlayerOperator.playerHasEnough( qty, id, damage, p))
{
p.sendMessage(plugin.chatPrefix + PlayerOperator.playerStockErr);
return false;
}
if (bs.isSignServer())
{
//Enleve le propriétaire du panneau pour les logs (car panneau serveur) !
signOwner = ""; //$NON-NLS-1$
}
else if (bs.isSignWebAuction())
{
// Panneau "webauctions"
// Ajoute les objets au stock WebAuctions
if(!plugin.db.wa_AddToStock(p.getName(), id, damage, qty))
{
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.UNABLETOADDINWEBSTOCKS") + signOwner + Messages.getString("Sign.SMILEYSAD")); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
}
else if (bs.isSignChest())
{
//p.sendMessage("dbg0: debut signchest");
// Cherche le coffre relié au panneau
Chest chest = bs.getChest();
if(chest==null)
{
//p.sendMessage("dbg1: coffre introuvable");
return false;
}
// Vérifie qu'il reste de la place dans le coffre pour stocker les objets à acheter
if (!ChestOperator.hasEnoughSpace(qty,id,damage, chest))
{
p.sendMessage(plugin.chatPrefix + ChestOperator.notEnoughSpaceErr);
return false;
}
// Credite le coffre de l'acheteur
ChestOperator.addToChestStock(qty, id, damage, chest);
}
// Retire les objets au donneur
PlayerOperator.removeFromPlayer(qty, id, damage, p);
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.YOUGIVE") + qty + Messages.getString("Sign.QTY1") + bs.getItemFrom().itemName + " " + (bs.isSignServer() ? Messages.getString("Sign.TOSERVER"): Messages.getString("Sign.TO") + signOwner + ".")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
try
{
Boutique.getInstance().db.logTransaction(p.getLocation(), p.getName(), signOwner, id , damage, qty , 0.0 ,"toto","titi"); //$NON-NLS-1$ //$NON-NLS-2$
}
catch (Exception e)
{
e.printStackTrace();
}
}
else if(bs.getMoneyFrom() != null)
{
//Don d'argent
//Verif money doneur
if (EconomyHandler.hasEnough(p.getName(), bs.getMoneyFrom())!=1)
{
p.sendMessage(plugin.chatPrefix + EconomyHandler.noFundsErr);
return false;
}
//Crédite le receveur (sauf si serveur)
if(!bs.isSignServer())
{
EconomyHandler.modifyMoney(bs.getOwnerString(), bs.getMoneyFrom());
}
//Débite le doneur
EconomyHandler.modifyMoney(p.getName(), -bs.getMoneyFrom());
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.YOUGIVE") + EconomyHandler.formatMoney(bs.getMoneyFrom()) + " " + EconomyHandler.formatCurrency(bs.getMoneyFrom()) + " " + (bs.isSignServer() ? Messages.getString("Sign.TOSERVER"): Messages.getString("Sign.TO") + signOwner));
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.MONEYREMAINING") + EconomyHandler.playerHave(p.getName())); //$NON-NLS-1$
try
{
Boutique.getInstance().db.logTransaction(p.getLocation(), p.getName(), signOwner, 0, 0, 0, bs.getMoneyFrom() ,"toto","titi"); //$NON-NLS-1$ //$NON-NLS-2$
}
catch (Exception e)
{
e.printStackTrace();
}
}
else
{
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.VROUMVROUMERR"));
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getMoney();",
"public Money getCost(){\r\n return this.cost;\r\n }",
"org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();",
"public double getMoney(){\n return money;\n }",
"public BigDecimal getCost() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"Cost\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }",
"int getMoney();",
"double getCost();",
"double getCost();",
"public Double getMoney() {\n return money;\n }",
"public double getCost(){\n return cost;\n }",
"public BigDecimal getMoney() {\r\n return money;\r\n }",
"public BigDecimal getMoney() {\r\n return money;\r\n }",
"public BigDecimal getMoney() {\r\n return money;\r\n }",
"public BigDecimal getMoney() {\n return money;\n }",
"public BigDecimal getMoney() {\n return money;\n }",
"public BigDecimal getMoney() {\n return money;\n }",
"int getMoneyValue();",
"int getMoneyValue();",
"public BigDecimal getPayAmt();",
"public int getMoney() {\n return this.budget;\n }",
"BigDecimal getAmount();",
"public double getMoney() {\n return this.money;\n }",
"@Override public double getCosto(){\n double d = 190.00;\n return d;\n }",
"double getTotalCost();",
"int getBonusMoney();",
"public double getCost() \n { \n return super.getCost() +22;\n }",
"int getCost();",
"int getCost();",
"int getCost();",
"public abstract double getCost();",
"BigDecimal getAmountAssigned(DestinationEntity destinationEntity);",
"public int getMoney()\n {\n return money;\n }",
"float getAmount();",
"double purchasePrice();",
"org.adscale.format.opertb.AmountMessage.Amount getExchangeprice();",
"public double calculateCost(Purchase purchase);",
"public double getCost() {\n return price;\n }",
"public double getMoney() {\n return money_;\n }",
"public BigDecimal getPriceEntered();",
"public BigDecimal getCost() {\r\n return cost;\r\n }",
"public double getPricePerSquareFoot(){\nreturn pricePerSquareFoot;\n}",
"public BigDecimal getPriceActual();",
"private double getBalance() { return balance; }",
"public BigDecimal getBSCA_ProfitPriceLimitEntered();",
"public BigDecimal getCost() {\n return this.cost;\n }",
"public BigDecimal getLineNetAmt();",
"public double getBalance(){\n return balance;\r\n }",
"Money getItemValue();",
"double getMonto();",
"double getMonto();",
"public Double getTotalBuyMoney() {\r\n return totalBuyMoney;\r\n }",
"public BigDecimal getLBR_TaxAmtCredit();",
"public double getMoney() {\n return money_;\n }",
"public int getCost() {\n/* 69 */ return this.cost;\n/* */ }",
"public int getCost(){\n return this.cost;\n }",
"public long getMoney() {\n return money;\n }",
"double getUnpaidAmount();",
"public double getBalance(){\n return balance;\n }",
"public double getCEMENTAmount();",
"BigDecimal getPrice();",
"double getPaidAmount();",
"public BigDecimal getBSCA_ProfitPriceLimit();",
"BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);",
"public double getMoney() {\n\t\treturn money;\n\t}",
"public double getMoney() {\n\t\treturn money;\n\t}",
"public Number getCost()\r\n {\r\n return (m_cost);\r\n }",
"public BigDecimal getCostPrice() {\n return costPrice;\n }",
"public double getBalance(){\n return balance;\n }",
"public int getMoney() {\n return money;\n }",
"public BigDecimal getPriceLimitWTax();",
"public BigDecimal getAgentMoney() {\n return agentMoney;\n }",
"public Money getTotalBalance();",
"@Override\n public int getCost() {\n int price = (int) Math.round(this.weight * this.pricePerLbs); //get the price of the cookies in the form of an int\n return price; //return the price\n\n }",
"public double getAmount() { return amount; }",
"double calculateDeliveryCost(Cart cart);",
"BigDecimal getOrigAmount();",
"public BigDecimal getRewardMoney() {\r\n return rewardMoney;\r\n }",
"public double getBalance(){\n return balance.getBalance();\n }",
"double getBalance();",
"double getBalance();",
"public double getBalance(){\n return balance;\n }",
"public double getCost()\r\n\t{\treturn this.cost;\t}",
"public double getCosts();",
"public double dollarTorp()\r\n\t{\r\n\t\treturn getAmount() * 14251.25;\r\n\t}",
"Money getDiscountValue();",
"public BigDecimal getBSCA_ProfitPriceStdEntered();",
"@Override \npublic double getPaymentAmount() { \n return getCommissionRate() * getGrossSales(); \n}",
"public BigDecimal getLBR_TaxRateCredit();",
"public double getCost() {\r\n\t \treturn(cost);\r\n\t}",
"public double getCost() {\n\t\treturn 1.25;\n\t}",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}",
"public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}",
"long getAmount();",
"public BigDecimal getOrderMoney() {\n return orderMoney;\n }",
"public float getTotalPrice(){\n return price * amount;\n }",
"public Integer getMoney() {\r\n return money;\r\n }",
"public double getMoney() {\n\t\treturn totalMoney;\n\t}"
] | [
"0.76533526",
"0.7470142",
"0.72322387",
"0.7154191",
"0.7131233",
"0.7111577",
"0.70155936",
"0.69375885",
"0.69375885",
"0.6930951",
"0.6913115",
"0.6901729",
"0.6901729",
"0.6901729",
"0.688691",
"0.688691",
"0.688691",
"0.6869022",
"0.6869022",
"0.68623525",
"0.685185",
"0.68403745",
"0.6823988",
"0.68093294",
"0.6764748",
"0.6760892",
"0.67422146",
"0.6716195",
"0.6716195",
"0.6716195",
"0.6713861",
"0.66972214",
"0.6694629",
"0.6687077",
"0.6685484",
"0.6670653",
"0.66697186",
"0.6668649",
"0.66651595",
"0.66565704",
"0.6651195",
"0.664781",
"0.6647157",
"0.6645663",
"0.66168433",
"0.6615146",
"0.6597096",
"0.6581238",
"0.6578322",
"0.6564241",
"0.6564241",
"0.6563685",
"0.6560964",
"0.6558216",
"0.6553301",
"0.65436584",
"0.6543394",
"0.6542655",
"0.653637",
"0.65351933",
"0.65328515",
"0.6510372",
"0.65008",
"0.6499146",
"0.6492046",
"0.6492046",
"0.64846087",
"0.6480396",
"0.64683706",
"0.6459008",
"0.64562464",
"0.6454194",
"0.64509535",
"0.64409107",
"0.64391017",
"0.6434682",
"0.643106",
"0.6430761",
"0.6430266",
"0.6425524",
"0.6425524",
"0.64235055",
"0.6419054",
"0.641158",
"0.6411417",
"0.64108187",
"0.64084816",
"0.64081466",
"0.6390802",
"0.6382388",
"0.6378535",
"0.6373824",
"0.6373824",
"0.6373824",
"0.636957",
"0.6369271",
"0.6367679",
"0.63591117",
"0.63582677",
"0.6357353",
"0.6353813"
] | 0.0 | -1 |
TODO Autogenerated method stub | public void saveGlobalSigns()
{
plugin.fileio.saveGlobalSigns();
} | {
"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 |
/ Enregistre le coffre pour un BoutiqueSignChest | public void setChest(Block sign, Chest chest, Player p)
{
BoutiqueSign bs = this.getBoutiqueSign(sign);
if(bs == null)
{
// TODO: message "Impossible de trouver le panneau en question"
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHOOSESIGNBEFORE")); //$NON-NLS-1$
return;
}
else
{
String newChestLoc = ""; //$NON-NLS-1$
String oldChestLoc = ""; //$NON-NLS-1$
Chest bsc = bs.getChest();
oldChestLoc = bs.getChestString();
newChestLoc = BoutiqueSign.getLocationString(chest.getBlock().getLocation());
//verifie que le panneau n'etait pas deja relié au coffre
if (oldChestLoc == newChestLoc)
{
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.SIGNALREADYBINDED")); //$NON-NLS-1$
return;
}
int distX = sign.getX() - chest.getBlock().getX();
int distZ = sign.getZ() - chest.getBlock().getZ();
int maxDist = 15;
if (distX > maxDist || distZ > maxDist )
{
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHESTTOOFARAWAY") + maxDist + Messages.getString("Sign.MAXBLOCKS")); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
//DEBUG
//p.sendMessage(plugin.chatPrefix + "Enregistrement coffre");
bs.setChest(chest);
updateSignDb(bs);
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHESTBINDED")); //$NON-NLS-1$
//DEBUG
//p.sendMessage(plugin.chatPrefix + "panneau: " + bs.getChestString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequiresApi(api = Build.VERSION_CODES.M)\n private void enregistrerCours()\n {\n cours.setTitre(vueModifierCoursChampTitre.getText().toString());\n cours.setHeure(vueModifierCoursChampHeure.getHour() + \":\" + vueModifierCoursChampHeure.getMinute());\n\n //coursDAO = CoursDAO.getInstance();\n\n coursDAO.modifierCours(cours);\n\n }",
"public void cobrarCheque(ChequesTercerosDto cheque) {\n if (cheque == null) {\n return;\n }\n cheque.setFechaCobro(new Date());\n chequesTercerosService.createOrEdit(cheque);\n jsfHelper.addInfoMessage(String.format(\"Cheque: %s marcado como cobrado.\", cheque.getNroCheque()));\n }",
"private void addCoche(ClickEvent clickEvent) throws NotFoundExcept {\r\n\t\tCocheDTO cocheDTO = new CocheDTO();\r\n\t\taddCocheSetValues(cocheDTO);\r\n\t\tcocheService.create(cocheDTO);\r\n\t\taddCocheEraseFields();\r\n\t\tthis.refresh(clickEvent);\r\n\t}",
"public void newCrayon(Crayon cr) {\r\n\tem.getTransaction( ).begin( );\r\n em.persist(cr);\r\n em.getTransaction().commit();\r\n }",
"public void enregistreEcPirate(PirateEcouteur ecouteur)\n\t{\n\t\tthis.pirateEcouteurs.add(PirateEcouteur.class, ecouteur);\n\t}",
"public void save(HrJBorrowcontract entity);",
"@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}",
"void entrerAuGarage();",
"@Override\n public Cours creerCours(String nomCours, Integer niveauCible, Date dateDebut, Integer duree, Integer enseignant, String idPiscine) {\n Creneau creneau = new Creneau(dateDebut, duree);\n creneau=creneauRepo.save(creneau);\n Piscine p = piscineRepo.findOne(idPiscine);\n Cours c = new Cours (nomCours, niveauCible,creneau, enseignant, new Participant[4],p );\n Cours insert = coursRepo.save(c);\n return insert;\n }",
"public void ajouterCource(Cource cource) {\n SQLiteDatabase db = this.getWritableDatabase(); // On veut écrire dans la BD\n ContentValues values = new ContentValues();\n values.put(COURCE_ID_USER, cource.getId_user());\n values.put(COURCE_PAS, cource.getPas());\n values.put(COURCE_CALORIES, cource.getCalories());\n values.put(COURCE_TEMPS, cource.getTemps());\n values.put(COURCE_DISTANCE, cource.getDistance());\n values.put(COURCE_TYPE, cource.getType());\n values.put(COURCE_DATE, cource.getDate());\n// Insérer le nouvel enregistrement\n long id = db.insert(TABLE_COURCE, null, values);\n db.close(); // Fermer la connexion\n }",
"@Override\n\tpublic void registrarSalida() {\n\n\t}",
"@Override\r\n\tpublic void addCompetences(Famille C) {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t \tsession.beginTransaction();\r\n\t \ttry {\r\n\t \t\tsession.save(C);\r\n\t \t} catch (Exception e) {\r\n\t \t\tsession.getTransaction().rollback();\r\n\t \t\te.printStackTrace();\r\n\t \t}\r\n\t \tsession.getTransaction().commit();\r\n\t \r\n\t}",
"@Override\n\tpublic int save(CursoAsignatura ca) {\n\t\treturn 0;\n\t}",
"public void salvarNoBanco() {\n\n try {\n ofertaDisciplinaFacade.save(oferta);\n// JsfUtil.addSuccessMessage(\"Pessoa \" + pessoa.getNome() + \" criado com sucesso!\");\n oferta= null;\n// recriarModelo();\n } catch (Exception e) {\n JsfUtil.addErrorMessage(e, \"Ocorreu um erro de persistência\");\n }\n }",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"public void enregistrement (double Ox1, double Oy1, double Px1, double Px2, double perim, double aire, String dessin){\n\t}",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"public void EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}",
"@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}",
"void SaveBudgetKeyAdditional(BudgetKeyAdditionalEntity budgetKeyAdditionalEntity);",
"private void ReservarCita(String horaini,String horafin)\n {\n progressDialog=new ProgressDialog(HorasCitasActivity.this);\n progressDialog.setTitle(\"Agregado horario\");\n progressDialog.setMessage(\"cargando...\");\n progressDialog.show();\n progressDialog.setCancelable(false);\n String key = referenceehoras.push().getKey();\n\n // para gaurar el nodo Citas\n // sadfsdfsdfsd1212sdss\n Horario objecita =new Horario(key,idespecialidad,horaini,horafin,nombreespecialidad );\n //HorarioAtencion\n // reference=FirebaseDatabase.getInstance().getReference(\"HorarioAtencion\");\n // referenceCitas= FirebaseDatabase.getInstance().getReference(\"CitasReservadas\").child(user_id);\n referenceehoras.child(key).setValue(objecita).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n Toast.makeText(HorasCitasActivity.this, \"Agregado\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(HorasCitasActivity.this, \"Error :\" +e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n }",
"@Override\npublic boolean saveCharitCom(Long idcommande,Charite Charite) {\n\tCommande c1= commandeDao.findOne(idcommande);\n\tSet<Commande> c= new HashSet<Commande>();\n\tc.add(c1);\n\t//Events e1 = eventDAO.findOne(idcommande);\n\tCharite.setCommandeCharite(c);\n\tchariteRepository.save(Charite);\n\treturn true;\n}",
"@Override\n\tpublic void saveSeckillUserInfo(SeckillUserInfo user, int hour)\n\t\t\t{\n seck.saveSeckillUserInfo(user, hour);\n\t}",
"private void registrarCoactivoOficioBien(CoactivoOficioBienDTO coactivoOficioBienDTO) {\n CoactivoOficioBien coactivoOficioBien = CoactivoOficioBienHelper.toLevel1Entity(coactivoOficioBienDTO, null);\n em.persist(coactivoOficioBien);\n }",
"@Override\n public void registerComplaint(final Complaint complaint) {\n String INSERT =\n \"INSERT INTO complaints (user_id,userName,roomId,message,dateOfComplaint,typeOfComplaint)\" +\n \" VALUES(?,?,?,?,?,?)\";\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = new Date();\n\n complaint.setDateOfComplaint(format.format(date.getTime()));\n\n jdbcTemplate.update(INSERT, new PreparedStatementSetter() {\n @Override\n public void setValues(PreparedStatement preparedStatement) throws SQLException {\n preparedStatement.setInt(1, complaint.getUserId());\n preparedStatement.setString(2, complaint.getUserName());\n preparedStatement.setString(3, complaint.getRoomId());\n preparedStatement.setString(4, complaint.getMessage());\n preparedStatement.setString(5, complaint.getDateOfComplaint());\n preparedStatement.setString(6, complaint.getType());\n }\n });\n\n logger.info(\"New Complaint By user \" + complaint.getUserName());\n\n }",
"public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }",
"public void save(){\n DatabaseReference dbRef = DatabaseHelper.getDb().getReference().child(DatabaseVars.VouchersTable.VOUCHER_TABLE).child(getVoucherID());\n\n dbRef.setValue(this);\n }",
"public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }",
"@Override\n\tpublic void save(Campground theCampground) {\n\t\tString sqlInsertCampground = \"Insert into campground (park_id,name,open_from_mm,open_to_mm,daily_fee) \" + \n\t\t\t\t\"values (?,?,?,?,?)\";\n\t\tjdbcTemplate.update(sqlInsertCampground,theCampground.getPark_id() // create primary key using new data\n ,theCampground.getName()\n ,theCampground.getOpen_from_mm()\n ,theCampground.getOpen_to_mm()\n ,theCampground.getDaily_fee());\t\n\t}",
"public void saveProduit(Produit theProduit);",
"@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }",
"@Override\n public void beforeShowNewEntity()\n {\n entity = new Aluno();\n entity.setDataNascimento(new GregorianCalendar());\n String senha = CriptografiaLogic.encriptar(\"123\");\n entity.setSenha(senha);\n }",
"void save(Cartera entity);",
"public void save(CbmCItemFininceItem entity);",
"public void ajouterFiche(Fiche fiche) ;",
"private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }",
"public void addNewBenificiary() {\n\t\t\tsetColBankCode(null);\n\t\t\tsetCardNumber(null);\n\t\t\tsetPopulatedDebitCardNumber(null);\n\t\t\tsetApprovalNumberCard(null);\n\t\t\tsetRemitamount(null);\n\t\t\tsetColAuthorizedby(null);\n\t\t\tsetColpassword(null);\n\t\t\tsetApprovalNumber(null);\n\t\t\tsetBooAuthozed(false);\n\t\t\tbankMasterList.clear();\n\t\t\tlocalbankList.clear();// From View V_EX_CBNK\n\t\t\tlstDebitCard.clear();\n\n\t\t\t// to fetch All Banks from View\n\t\t\t//getLocalBankListforIndicatorFromView();\n\t\t\tlocalbankList = generalService.getLocalBankListFromView(session.getCountryId());\n\n\t\t\tList<BigDecimal> duplicateCheck = new ArrayList<BigDecimal>();\n\t\t\tList<ViewBankDetails> lstofBank = new ArrayList<ViewBankDetails>();\n\t\t\tif (localbankList.size() != 0) {\n\t\t\t\tfor (ViewBankDetails lstBank : localbankList) {\n\t\t\t\t\tif (!duplicateCheck.contains(lstBank.getChequeBankId())) {\n\t\t\t\t\t\tduplicateCheck.add(lstBank.getChequeBankId());\n\t\t\t\t\t\tlstofBank.add(lstBank);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetBankMasterList(lstofBank);\n\t\t\tsetBooRenderSingleDebit(true);\n\t\t\tsetBooRenderMulDebit(false);\n\t\t}",
"public ingresarBiblioteca() {\n initComponents();\n this.nombreUsuario.setText(usuariosID[0].getNombre());\n this.Picture.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.PLAIN,10));\n usuario.insertarInicio(this.nombreUsuario.getText()/*, carpeta*/);\n usuario.obtenerNodo(0).getArchivo().insertarFinal(\"GENERAL\");//carpeta.insertarFinal(\"GENERAL\");\n }",
"public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }",
"private void registrarSolicitudOficioBien(SolicitudOficioBienDTO solicitudOficioBienDTO) {\n\n // Fecha solicitud\n solicitudOficioBienDTO.setFechaSolicitud(Calendar.getInstance().getTime());\n SolicitudOficioBien solicitudOficioBien = SolicitudOficioBienHelper.toLevel1Entity(solicitudOficioBienDTO,\n null);\n em.persist(solicitudOficioBien);\n solicitudOficioBienDTO.setId(solicitudOficioBien.getId());\n // Solicitud bien entidad\n for (SolicitudBienEntidadDTO solicitudBienEntidadDTO : solicitudOficioBienDTO.getSolicitudBienEntidadDTOs()) {\n solicitudBienEntidadDTO.setSolicitudOficioBienDTO(solicitudOficioBienDTO);\n registrarSolicitudBienEntidad(solicitudBienEntidadDTO);\n }\n }",
"@Override\n\tpublic CentreVisite add(CentreVisite chef) {\n\t\treturn CR.save(chef);\n\t}",
"@Secured(value = {\"ROLE_ADMIN\"})\n @RequestMapping(value = \"/casiers\", method = RequestMethod.POST)\n public Casier saveCasier(@RequestBody Casier casier, Delit delit){\n return casierDao.save(casier);\n }",
"@Override\n\tpublic Cours addCours(Cours cours) {\n\t\tem.persist(cours);\n\t\treturn cours;\n\t}",
"@Override\n public void saveVegetarianChange(ConnectathonParticipant cp) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"saveVegetarianChange\");\n }\n if (cp == null) {\n LOG.warn(\"saveVegetarianChange : ConnectathonParticipant is null \");\n return;\n }\n\n entityManager.merge(cp);\n entityManager.flush();\n\n }",
"@Override\n\tpublic void saveEstadoCabecera(EstadoCabecera estadoCabecera) {\n\n\t}",
"void registerGoods(Goods goods, int quantity) throws StoreKeeperWorkException;",
"public void modificarCompraComic();",
"public void recoit(Caisse caisse) {\n if (!this.estPlein()) {\n this.tapis.add(caisse);\n }\n else { // pas de gestion d'exception pour l'instant\n System.out.println(\"tapis plein, impossible de deposer\");\n }\n }",
"public static void inregistrareClient(Medic m, Client c){\r\n List<Client> clienti = m.getClienti();\r\n clienti.add(c);\r\n m.setClienti(clienti);\r\n audit(\"Inregitrare client\");\r\n }",
"public void inserir(Comentario c);",
"@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 }",
"private void ajoutAffichage(int choix) {\n switch(choix) {\n case AFFICHE_SPOOL :\n ecranSpool.createContents();\n afficheChoix = AFFICHE_SPOOL;\n mntmSpoolUsage.setEnabled(false);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_USER :\n ecranUser.createContents();\n afficheChoix = AFFICHE_USER;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(false);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.createContents();\n afficheChoix = AFFICHE_CONFIG;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(false);\n shell.layout();\n break;\n default: break;\n }\n }",
"private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}",
"void adicionaComentario(Comentario comentario);",
"private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"public String saveCata(){\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tFacesMessage facesMessage = new FacesMessage(\"Catalogo guardado\");\n\t\tfacesContext.addMessage(null, facesMessage);\n\t\treturn \"catalogo\";\n\t}",
"private void signSetter(Block b, Player p, String[] lines) \n\t{\t\t\n\t\t//TODO: virer debug\n\t\t//p.sendMessage(\"dbg1\");\n\t\t\n\t\t\n\t\tif(b==null) \n\t\t\treturn;\n\t\t\n\t\tBoutiqueSign bs = new BoutiqueSign();\n\t\t\n\t\tbs.setOwner(p);\n\t\tbs.setLocation(b.getLocation());\n\t\tbs.setLines(lines);\n\n\t\t//TODO: virer debug\n\t\t/*\n\t\tp.sendMessage(\"dbg1 : line1 = \" + bs.getLine1());\n\t\tp.sendMessage(\"dbg1 : line2 = \" + bs.getLine2());\n\t\tp.sendMessage(\"dbg1 : line3 = \" + bs.getLine3());\n\t\tp.sendMessage(\"dbg1 : line4 = \" + bs.getLine4());\t\t\n\t\tp.sendMessage(\"dbg2 : type = \" + bs.getType());\n\t\t*/\n\t\t\n\t\tif(bs.isSignServer())\n\t\t{\n\t\t\t\n\t\t\tif (!PermissionsHandler.canSetGlobalSign(p))\n\t\t\t{\n\t\t\t\tp.sendMessage(PermissionsHandler.permissionErr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!bs.checkLines(p))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.SERVERSIGNADDED\")); //$NON-NLS-1$\n\t\t}\n\t\t\n\t\telse if(bs.isSignChest())\n\t\t{\n\t\t\tif (!PermissionsHandler.canSetPersonalSign(p))\n\t\t\t{\n\t\t\t\tp.sendMessage(plugin.chatPrefix + PermissionsHandler.permissionErr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!bs.checkLines(p))\n\t\t\t{\n\t\t\t\t//TODO: virer debug\n\t\t\t\t//p.sendMessage(\"erreur checkline\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.CHESTSIGNADDED\")); //$NON-NLS-1$\n\t\t}\t\n\t\telse if(bs.isSignWebAuction())\n\t\t{\n\t\t\tif (!PermissionsHandler.canSetWebAuctionSign(p))\n\t\t\t{\n\t\t\t\tp.sendMessage(PermissionsHandler.permissionErr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!bs.checkLines(p))\n\t\t\t{\n\t\t\t\t//TODO: virer debug\n\t\t\t\t//p.sendMessage(\"erreur checkline\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tp.sendMessage(plugin.chatPrefix + Messages.getString(\"Sign.WEBAUCTIONSIGNADDED\")); //$NON-NLS-1$\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tbs.setLine4(\"ok\");\t\t\t //$NON-NLS-1$\n\t\tbs.Render();\n\t\t\n\t\tthis.put(bs);\n\t\tplugin.signmanager.saveGlobalSigns();\n\t}",
"@Override\n\tpublic void addCampus(Campus campus) {\n\t\tEntityManager em=emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\ttry {\n\t\t\tem.persist(campus);\n\t\t\tem.getTransaction().commit();\n\t\t\t\n\t\t} finally {\n\t\t\t// TODO: handle finally claus\n\t\t\tif (em.getTransaction().isActive()) {\n\t\t\t\tem.getTransaction().rollback();\n\t\t\t}\n\t\t}\n\t\t\n\t\tem.close();\n\t}",
"com.synergyj.cursos.webservices.ordenes.XMLBFactura addNewXMLBFactura();",
"@Override\n public void onPutCupRaised() {\n if (!theFSM.getCupPlaced()) {\n BufferedImage myPicture = null;\n try {\n myPicture = ImageIO.read(new File(\"./picts/gobeletPolluant.jpg\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n currentPicture.setIcon(new ImageIcon(myPicture));\n takeCupButton.setVisible(false);\n }\n }",
"public void insert(Calificar c){\n Session session = sessionFactory.openSession();\n \n Transaction tx = null;\n \n try{\n tx = session.beginTransaction();\n \n session.persist(c);\n tx.commit();\n }\n catch(Exception e){\n if(tx != null){ tx.rollback(); }\n e.printStackTrace();\n }\n finally { session.close(); }\n }",
"public void doNewRegister(){\t\t\n\t\t//Instantiate new contract Model\n\t\tContractModelDomain = new ContractModelDomain();\n\t\t\n\t\t//Reset textFromEditor value\n\t\ttextFromEditor = new String();\n\t\t\n\t\t//Set Old Description\n\t\toldDescription = \"\";\n\t}",
"public void fecharConta() {\n\t\tcliente.setConta(new Conta());\r\n\t\tRepositorioCliente repositorioCliente = new FabricaRepositorio().getRepCliente();\r\n\t\trepositorioCliente.editar((ClienteIndividual)cliente);\r\n//\t\tGerenciadorContaImpl contaImpl = new GerenciadorContaImpl();\r\n//\t\ttry {\r\n//\t\t\tcontaImpl.fecharConta(cliente);\r\n//\t\t} catch (OperacaoInvalidaException e) {\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t}",
"@Override\npublic boolean saveCharit3(Events e1,Charite Charite) {\n\t\n\t\n\tEvents e2 = eventDAO.findOne(e1.getId());\n\tCharite.setIdevents(e2);\n\tchariteRepository.save(Charite);\n\treturn true;\n}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,PlantillaFactura plantillafactura,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(plantillafactura.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(plantillafactura.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!plantillafactura.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(plantillafactura.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public abstract void commitMiembrosDeEquipo();",
"@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}",
"public void saveCard(card cardToBeSaved)\n {\n dbObj=new dbFlashCards(uid);\n dbObj.saveCard(packId, cardToBeSaved.getCardId(), cardToBeSaved.getFront(),cardToBeSaved.getBack());\n \n \n }",
"@Override\n public void saveFridayChange(ConnectathonParticipant cp) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"saveFridayChange\");\n }\n if (cp == null) {\n LOG.warn(\"saveFridayChange : ConnectathonParticipant is null \");\n return;\n }\n\n entityManager.merge(cp);\n entityManager.flush();\n\n }",
"public abstract void addInExpenditure(Transaction expenditure, Ui ui, String bankType) throws BankException;",
"@Override\n public void credit(Long idClient, Double value) {\n log.info(\"methode credit\");\n Optional<Compte> compteClient = getByIdClient(idClient);\n\n if (compteClient.isPresent()) {\n\n Double solde = compteClient.get().getSolde();\n compteClient.get().setSolde(solde + value);\n log.info(\"Methode credit : \" + compteClient.get().toString());\n\n update(compteClient.get());\n }\n }",
"public void ajouterChambreDeCommerce(){\n }",
"private void writefastcq() {\n\t\tEditor edit = preticket.edit();\r\n\t\tedit.putString(\"tickettype\", \"cq\");\r\n\t\tedit.commit();\r\n\t}",
"public void save(HrCStatitem entity);",
"public void registraBitacoraFactura(Factura f) {\n if (f.getEsPagada()) {\n bitacoraPago.insertar(f);\n }\n }",
"public void addCaisse(Caisse c){\n\tif(lesCaisses.isEmpty()){\n\t\tthis.lesCaisses.add(c);\n\t}\n\telse{\n\tif(nbOccuranceCaisse(c)==0){\n\tlesCaisses.add(c);\n\t}\n\t\t}\n\t\n}",
"public void setCuentaContableCierre(CuentaContable cuentaContableCierre)\r\n/* 103: */ {\r\n/* 104:119 */ this.cuentaContableCierre = cuentaContableCierre;\r\n/* 105: */ }",
"@Override\n\tpublic void registrarAtencion(TramiteUsuario tramite) {\n\t\ttramite.setSecUsuario1( Usuario.getUsuarioBean() );\n\t\ttramite.setSecUsuario2( Usuario.getUsuarioBean() );\n\t\ttramite.setEstado(1);\n\t\ttramite.setEstadoTramiteFinal( ParametroUtil.EstadoTramite.ATENDIDO.value );\n\t\ttramite.setFechaRegistro( new Date() );\n\t\ttramiteDAO.registrarMovimiento( tramite );\n\t\t\n\t\ttramite.getTramite().setEstado( ParametroUtil.EstadoTramite.ATENDIDO.value );\n\t\ttramiteDAO.registrar( tramite.getTramite() );\n\t\t\n\t}",
"@Command(command=\"thisisimpossibletowriteonasign\", permission=\"rs.sign.shop\")\n public static void shop(SignChangeEvent event) {\n Inventory chest = ChestFinder.findChest(event.getBlock());\n Block chestBlock = ChestFinder.findChestBlock(event.getBlock());\n \n if(chest == null) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_NoChest);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Get all lines and try to parse the amount\n String[] lines = event.getLines();\n Integer amount;\n \n try {\n amount = Integer.parseInt(lines[1]);\n } catch(NumberFormatException e) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_InvalidAmount);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Parse the third line (<sell>:<buy>)\n Matcher matcher = pattern.matcher(lines[2]);\n Float buy = 0.0F, sell = 0.0F;\n if(matcher.find()) {\n try {\n sell = Float.parseFloat(matcher.group(1));\n buy = Float.parseFloat(matcher.group(2));\n } catch(NumberFormatException e) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_InvalidBuySell);\n event.getBlock().breakNaturally();\n return;\n }\n } else {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_NoValidBuySellLine);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Check if Chest has items in it\n Boolean hasItem = false;\n ListIterator<ItemStack> itemStackListIterator = chest.iterator();\n \n while(itemStackListIterator.hasNext()) {\n ItemStack itemStack = itemStackListIterator.next();\n if(itemStack == null) continue;\n hasItem = true;\n break;\n }\n \n if(!hasItem) {\n event.getPlayer().sendMessage(ConfigManager.main.Chat_prefix + ConfigManager.language.Sign_Shop_ChestIsEmpty);\n event.getBlock().breakNaturally();\n return;\n }\n \n //Store the Chest\n com.geNAZt.RegionShop.Database.Model.Chest.store(event.getPlayer(), event.getBlock(), chestBlock, event.getPlayer().getWorld());\n com.geNAZt.RegionShop.Database.Table.Chest chest1 = com.geNAZt.RegionShop.Database.Model.Chest.get(chestBlock, event.getPlayer().getWorld(), false);\n \n //Store the Items\n itemStackListIterator = chest.iterator();\n Integer firstID = null;\n Byte firstData = null;\n Integer itemAmount = 0;\n ItemStack firstItemStack = null;\n while(itemStackListIterator.hasNext()) {\n ItemStack itemStack = itemStackListIterator.next();\n \n if(itemStack == null) continue;\n \n if(firstID == null) {\n firstID = itemStack.getTypeId();\n firstData = itemStack.getData().getData();\n firstItemStack = itemStack;\n \n if(Add.add(itemStack, event.getPlayer(), chest1, sell, buy, amount) == -1) {\n event.getBlock().breakNaturally();\n return;\n }\n \n itemAmount += itemStack.getAmount();\n \n continue;\n }\n \n if(itemStack.getTypeId() == firstID && itemStack.getData().getData() == firstData) {\n itemAmount += itemStack.getAmount();\n }\n }\n \n Items item = chest1.getItemStorage().getItems().iterator().next();\n item.setCurrentAmount(itemAmount);\n Database.getServer().update(item);\n \n item.getItemStorage().setItemAmount(itemAmount);\n Database.getServer().update(item.getItemStorage());\n \n //Create an itemdrop over the chest\n ItemStack itemStack = firstItemStack.clone();\n itemStack.setAmount(1);\n org.bukkit.entity.Item droppedItem = event.getPlayer().getWorld().dropItem(new Location(event.getPlayer().getWorld(), (double) chest1.getChestX() + 0.5, (double)chest1.getChestY() + 1.2, (double)chest1.getChestZ() + 0.5), itemStack);\n droppedItem.setVelocity(new Vector(0, 0.1, 0));\n NMS.safeGuard(droppedItem);\n \n //Change the Sign\n //Get the nice name\n String itemName = ItemName.getDataName(firstItemStack) + firstItemStack.getType().toString();\n if (firstItemStack.getItemMeta().hasDisplayName()) {\n itemName = \"(\" + firstItemStack.getItemMeta().getDisplayName() + \")\";\n }\n \n for(Integer line = 0; line < 4; line++) {\n event.setLine(line, ConfigManager.language.Sign_Shop_SignText.get(line).\n replace(\"%player\", event.getPlayer().getName()).\n replace(\"%itemname\", ItemName.nicer(itemName)).\n replace(\"%amount\", amount.toString()).\n replace(\"%sell\", sell.toString()).\n replace(\"%buy\", buy.toString()));\n }\n }",
"public void save(ControlAcceso entity) {\n\n\t\tcontrolA.insertControlAcc(entity.getTmno(), entity.getId().getEnno(), entity.getName(), entity.getInout(),\n\t\t\t\tentity.getMode(), entity.getId().getDatetime());\n\n\t}",
"public void actionPerformed(ActionEvent e){\n \tString nomButton=e.getActionCommand();\n\n\n \tif(nomButton.equals(\"Retour\")){\n \t\tnewMeuble.dispose();\n \t\tMeuble meuble = new Meuble();\n \t\tmeuble.setVisible(true); \n \t}\n \telse if(nomButton.equals(\"Enregistrer\")){\n \t\tMeubleBd app = new MeubleBd();\n \t\tboolean detachable = this.newMeuble.getIsRemovableBox();\n\n String name = this.newMeuble.getName();\n String description = this.newMeuble.getDescription();\n String piece = (String)this.newMeuble.getPieceComboBox().getSelectedItem();\n\n int number = 1;\n int volumeAv = 0;\n int volumeAp = 0;\n int numberDetachable = 0;\n\n try{\n number = Integer.parseInt(this.newMeuble.getNumberText()); \n volumeAv = Integer.parseInt(this.newMeuble.getVolume());\n volumeAp = Integer.parseInt(this.newMeuble.getVolumeAfterTexT().getText());\n numberDetachable = Integer.parseInt(this.newMeuble.getDetachableText());\n }catch(NumberFormatException exception){;}\n\n String img = this.newMeuble.getImg();\n\n if(!name.equals(\"\") && !description.equals(\"\")){\n app.insert(name,volumeAv,number,piece,detachable,numberDetachable,volumeAp,description,img);\n ListMeuble.donnees = app.getMeubles();\n this.newMeuble.dispose();\n Meuble meuble = new Meuble();\n meuble.setVisible(true);\n new PopUpValid(1,\"Insertion du meuble reussie.\");\n\n \n }else{\n new PopUpValid(2,\"Veuillez remplir les champs indiquer par (*).\");\n }\n ListMeuble.donnees = app.getMeubles();\n\n }\n\n}",
"void insertFlightseat(AirFlightseat dRef);",
"@Override\n\tpublic void registrarLlegada() {\n\t}",
"@Override\n public boolean onSave(EditTransaction et) {\n et.retrieveData(VisitPersongrow.GROWCODE, growType, false, null, null);\n et.retrieveData(VisitPersongrow.AGEMONTHCAN, ageCan, false, 0, 99, getString(R.string.err_no_value));\n\n ContentValues cv = et.getContentValues();\n // Put What\n String growtype = growType.getSelectId();\n String acan = ageCan.getText().toString();\n String abnom = abnomal.getText().toString();\n\n if (!TextUtils.isEmpty(growtype) && TextUtils.getTrimmedLength(growtype) == 1) {\n // Add Zero for 1 digit\n growtype = \"0\" + growtype;\n }\n\n System.out.println(\"my growtype = \" + growtype);\n cv.put(VisitPersongrow.GROWCODE, growtype);\n cv.put(VisitPersongrow.AGEMONTHCAN, acan);\n cv.put(VisitPersongrow.ABNORMAL, abnom);\n\n return true;\n }",
"public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }",
"public void saveDataSignIn(Client client) {\r\n\t\tSQLPeople sqlPeople = new SQLPeople();\r\n\r\n\t\tJTextField[] requiredFields = { jPanelFormClient.jtfDoc, jPanelFormClient.jtfName, jPanelFormClient.jtfLastName,\r\n\t\t\t\tjPanelFormClient.jtfPhone };\r\n\t\tif (UtilityClass.fieldsAreEmpty(requiredFields)) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Se debe ingresar información en los campos que son obligatorios (*)\",\r\n\t\t\t\t\t\"EXISTENCIA DE CAMPOS VACIOS\", JOptionPane.ERROR_MESSAGE);\r\n\t\t} else {\r\n\t\t\tif (sqlPeople.existDocumentId(Integer.parseInt(jPanelFormClient.jtfDoc.getText()))) {\r\n\r\n\t\t\t\tif (sqlPeople.existPhone(jPanelFormClient.jtfPhone.getText()) == 0) {\r\n\r\n\t\t\t\t\tif (UtilityClass.validateEmail(jPanelFormClient.jtfEmail.getText())\r\n\t\t\t\t\t\t\t|| jPanelFormClient.jtfEmail.getText().length() == 0) {\r\n\r\n\t\t\t\t\t\tclient.setPersonalIdentification(jPanelFormClient.jtfDoc.getText());\r\n\t\t\t\t\t\tclient.setName(jPanelFormClient.jtfName.getText());\r\n\t\t\t\t\t\tclient.setLastName(jPanelFormClient.jtfLastName.getText());\r\n\t\t\t\t\t\tclient.setBirthDate(jPanelFormClient.birthdayDateChooser.getDate());\r\n\t\t\t\t\t\tclient.setTelephone(jPanelFormClient.jtfPhone.getText());\r\n\t\t\t\t\t\tclient.setEmail(jPanelFormClient.jtfEmail.getText());\r\n\t\t\t\t\t\tclient.setAddress(jPanelFormClient.jtfAdress.getText());\r\n\t\t\t\t\t\tclient.setActivationState(\r\n\t\t\t\t\t\t\t\tActivationState.getState(jPanelFormClient.activRadioButton.isSelected()));\r\n\t\t\t\t\t\tif (sqlPeople.registerDataClient(client)) {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"REGISTRO GUARDADO CON EXITO\");\r\n\t\t\t\t\t\t\tjPanelFormClient.newForm();\r\n\t\t\t\t\t\t\tthis.jPanelFormClient.createAutomaticID();\r\n\t\t\t\t\t\t\tthis.addPet((Integer.parseInt(jPanelFormClient.lblIdSet.getText())-1) + \"\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR AL GUARDAR\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Correo no valido\", \"CORREO SIN FORMATO\",\r\n\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"El telefono ingresado ya existe en el sistema\",\r\n\t\t\t\t\t\t\t\"TELEFONO REPETIDO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El documento de identidad ya existe en el sistema\",\r\n\t\t\t\t\t\t\"DOCUMENTO REPETIDO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public GWDPEXPRESS_MY_ACHIEVEMENTS()\n{\najouterFenetre(\"EXPRESS_FEN_Search\", mWD_EXPRESS_FEN_Search);\najouterFenetre(\"EXPRESS_FEN_Profil\", mWD_EXPRESS_FEN_Profil);\najouterFenetre(\"EXPRESS_FEN_Achievement\", mWD_EXPRESS_FEN_Achievement);\n\n}",
"@Override\npublic boolean saveCharit2(long idevents,Charite Charite) {\n\tEvents e1 = eventDAO.findOne(idevents);\n\tCharite.setIdevents(e1);\n\tchariteRepository.save(Charite);\n\treturn true;\n}",
"public void salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"@RequestMapping(value = \"/cabaretier/save\", method = RequestMethod.POST)\n public String saveCabaretier(@RequestParam(\"cabaretier_voornaam\") String cabaretier_voornaam,\n @RequestParam(\"cabaretier_achternaam\") String cabaretier_achternaam,\n @RequestParam(\"geboortedatum\") String geboortedatum,\n @RequestParam(\"geslacht\") String geslacht) {\n \tCabaretier cabaretier = new Cabaretier(cabaretier_voornaam, cabaretier_achternaam, geboortedatum, geslacht, 0);\n \tcabaretierService.save(cabaretier);\n\n \treturn \"redirect:/\";\n }",
"@PrePersist\n private void onSave()\n {\n this.lastUpdateDateTime = new Date();\n if(this.registerDateTime == null)\n {\n this.registerDateTime = new Date();\n }\n \n if(this.personKey == null || this.personKey.isEmpty())\n {\n this.personKey = UUID.randomUUID().toString();\n }\n \n if(this.activationDate == null && (this.activationKey == null || this.activationKey.isEmpty()))\n {\n this.activationKey = UUID.randomUUID().toString();\n this.activationDate = new Date();\n }\n \n // O ID só será 0 (zero) se for a criação do registro no banco\n if(this.id == 0)\n {\n this.isValid = false;\n }\n }",
"public static void insertcou(String cno2, String cname2, double stucredit2) {\n\t\ttry{\n\t\t\tps = conn.prepareStatement(\"insert into course values ('\"+ cno2 +\"','\"+ cname2 +\"','\"+stucredit2+\"')\");\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息添加失败!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t}",
"protected void agregarUbicacion(){\n\n\n\n }",
"public void addAppareil(Capteur capt) {\n Log.v(Constante.TAG, \"Fonction appelée -> addAppareil\");\n\n SQLiteDatabase db = this.getWritableDatabase();\n //Log.v(\"TEST\", \"SQLITE\");\n\n ContentValues values = new ContentValues();\n values.put(KEY_IDc, capt.getIdc());\n values.put(KEY_DESCRIPTION, capt.getNom());\n //values.put(KEY_ETATr, capt.getId());\n values.put(KEY_ETATd, capt.getEtat());\n //values.put(KEY_DEMANDE_TRAITEE, capt.getId());\n //values.put(KEY_PUISSc, capt.getId());\n values.put(KEY_PUISSa, capt.getConso());\n // Inserting Row\n db.insert(TABLE_LOGIN, null, values);\n //db.close(); // Closing database connection\n }",
"@Override\n\tpublic int insertHjFw(String owNum, String content) {\n\t\tDgOpenWater dgOpenWater = dgOpenWaterMapper\n\t\t\t\t.selectByOpenWaterByNum(owNum);\n\t\tDgCallService dgCallService = new DgCallService();\n\t\tdgCallService.setContent(content);\n\t\tdgCallService.setState(1); // 初始化状态\n\t\tdgCallService.setSeatId(dgOpenWater.getSeatId());\n\t\tdgCallService.setOwNum(owNum);\n\t\tdgCallService.setType(1);\n\t\treturn dgCallServiceMapper.insert(dgCallService);\n\t}",
"@Override\r\n\tpublic void registriereBeobachter(Beobachter b) {\n\t\tbeobachter.add(b);\r\n\t}",
"public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"public void firebaseAdd(HashMap hashMap){\n DatabaseReference myref = FirebaseDatabase.getInstance().getReference(hashMap.get(\"CafeId\").toString()).child(\"Menu\").child(hashMap.get(\"MenuKatagori\").toString()).child(hashMap.get(\"KatagoriId\").toString());\n myref.child(\"Fiyat\").setValue(hashMap.get(\"YeniDeger\").toString());\n\n\n }",
"@Override\n\tpublic void save(Chitietdonhang danhMuc) {\n\t\tchiTietDonHangRepository.save(danhMuc);\n\t}"
] | [
"0.68283004",
"0.584956",
"0.57410794",
"0.57351005",
"0.57296467",
"0.5677461",
"0.5673804",
"0.5672335",
"0.5640674",
"0.5625619",
"0.56135327",
"0.5596942",
"0.5592996",
"0.55889887",
"0.5579217",
"0.5579217",
"0.5525192",
"0.5518162",
"0.5472113",
"0.5443912",
"0.54309124",
"0.5424979",
"0.54202765",
"0.5392785",
"0.5383062",
"0.5373844",
"0.53569186",
"0.53567266",
"0.5348152",
"0.53323984",
"0.5317661",
"0.5306878",
"0.5305758",
"0.530547",
"0.52962995",
"0.52840894",
"0.527081",
"0.5270045",
"0.524517",
"0.5243447",
"0.5238612",
"0.52295685",
"0.52145535",
"0.5205154",
"0.5204487",
"0.5204182",
"0.5201477",
"0.51958436",
"0.5193121",
"0.51864743",
"0.51815116",
"0.51734084",
"0.51709163",
"0.5166118",
"0.51631504",
"0.51609004",
"0.5151231",
"0.5149244",
"0.51473075",
"0.5145901",
"0.51363224",
"0.5130281",
"0.5129874",
"0.51244575",
"0.5123921",
"0.5114471",
"0.50991726",
"0.50983053",
"0.50976706",
"0.5093595",
"0.5093172",
"0.50888735",
"0.50818914",
"0.50784373",
"0.5076312",
"0.50736076",
"0.5068714",
"0.5068259",
"0.5068255",
"0.5061481",
"0.50586694",
"0.5057138",
"0.50568897",
"0.5056217",
"0.50555134",
"0.505337",
"0.50519496",
"0.50514174",
"0.50488853",
"0.5048281",
"0.50465095",
"0.5038839",
"0.5038397",
"0.5038197",
"0.5037785",
"0.5034978",
"0.50258195",
"0.50239205",
"0.50222427",
"0.5017397"
] | 0.6351957 | 1 |
/ / Le joueur peutil casser le panneau ? / | public boolean canBreakSign(Sign s, Player p)
{
if (!this.isSign(s))
return false;
boolean bool = false;
bool = isSignOwner(s,p);
if (!bool)
bool = p.isOp();
return bool;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }",
"@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }",
"int getNombreColonnesPlateau();",
"private void affPremierJoueur(String nomPJoueur) {\r\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\talert.setTitle(\"Premier joueur\");\r\n\t\talert.setHeaderText(null);\r\n\t\talert.setContentText(nomPJoueur + \" est le premier joueur a jouer\");\r\n\t\talert.showAndWait();\r\n\t}",
"public void changerJoueur() {\r\n\t\t\r\n\t}",
"@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}",
"@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }",
"public IJoueur quiEstMonMaitre();",
"public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }",
"@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"public void lanzarJuegoPianino(View view){\n\n puntuacion=0;\n notasTocadas=0;\n mensaje.setText(R.string.repite);\n switch(pref.getString(\"dificultad\", \"1\")){\n case \"0\": nuevaSecuencia=generarSecuencia(4);\n nuevaSecuencia[3]=nuevaSecuencia[0];\n secuenciaJugador= new int[4];\n break;\n case \"1\": nuevaSecuencia=generarSecuencia(7);\n nuevaSecuencia[6]=nuevaSecuencia[0];\n secuenciaJugador= new int[7];\n break;\n case \"2\": nuevaSecuencia=generarSecuencia(10);\n secuenciaJugador= new int[10];\n break;\n default: nuevaSecuencia= new int[7];\n }\n\n reproducirSecuencia(nuevaSecuencia,false);\n\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}",
"private void affTourJoueur(String nomJoueur) {\r\n\t\tlbl_tour.setText(nomJoueur);\r\n\t}",
"public void afficherLru() {\n\t\tint nbrCols = listEtape.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<Processus> list: listEtape) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\t\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resultPane);\n\t\n\n\t\tresultPane.setStyle(\"-fx-background-color: #23CFDC\");\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i< listEtape.size();i++) {\n\t\t\tArrayList<Processus> list = listEtape.get(i); \n\t\t\tfor(int j=0; j<list.size(); j++) {\n\t\t\t\tProcessus p = list.get(j); \n\t\t\t\tLabel label = new Label(\"\" + p.getValue());\n\n\t\t\t\tresultPane.add(label, i+1, j);\n\t\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t\t}\n\t\t}\n\t\tresultPane.setVisible(true);\n\t\tgenere = true;\n\t}",
"public void ajouterPanneauNord(Color couleur) {\r\n\r\n\t\t// Creation du panneau nord\r\n\t\t//\r\n\t\tpanneauNord = new PanneauG(this, config);\r\n\t\tpanneauNord.setBackground(couleur);\r\n\t\tpanneauNord.ajouterImage(\"../_Images/Banniere/BannierePanneauInformationsBoy.png\");\r\n\r\n\t\t// Ajout d'une grille de disposition\r\n\t\t//\r\n\t\tpanneauNord.setLayout(new FlowLayout());\r\n\r\n\t\t// Creation des boutons\r\n\t\t//\r\n\t\tbulleAide = JeuxGrille.creerBouton(\"../_Images/Bouton/bulle_blanche.png\", \"\", \"Comic sans ms\", 12, Color.black);\r\n\t\tbulleAide.setPreferredSize(new Dimension(400, 185));\r\n\r\n\t\t// Definition de la position du texte\r\n\t\t//\r\n\t\tbulleAide.setVerticalTextPosition(SwingConstants.CENTER);\r\n\t\tbulleAide.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\r\n\t\t// Ajout des boutons au panneau\r\n\t\t// \r\n\t\tpanneauNord.add(bulleAide);\r\n\r\n\t\t// Ajout d'une bordure au panneau\r\n\t\t//\r\n\t\tpanneauNord.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLoweredBevelBorder(), BorderFactory.createMatteBorder(1, 1, 0,\r\n\t\t\t\t0, Color.black)));\r\n\r\n\t\t// Ajout du panneau au cadre support\r\n\t\t//\r\n\t\tgetContentPane().add(panneauNord, BorderLayout.NORTH);\r\n\t}",
"public void choixDeJeu () {\n\t\t//Affichage d'une fenetre qui permet de choisir entre un labyrinthe genere aleatoirement et un fichier txt\n\t\tString[] choixPossibles = {\"Generer un labyrinthe aleatoirement\", \"Ouvrir un labyrinthe en .txt\"};\n\t\tString choix = (String)JOptionPane.showInputDialog(null, \"Que voulez-vous faire ?\", \"Labyrinthe\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixPossibles, choixPossibles[0]);\n\t\t\n\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\tif (choix != null) {\n\t\t\t//Affichage d'une fenetre qui permet de choisir le theme du jeu\n\t\t\tString[] choixTheme = {\"Theme par defaut\", \"Theme d'ancien labyrinthe en pierre\", \"Theme de The legend of zelda\", \"Theme de Métroid\", \"Theme d'incendie dans un batiment\", \"Theme de Mario\"};\n\t\t\tString theme = (String)JOptionPane.showInputDialog(null, \"Quel theme voulez-vous ?\", \"Choix du theme\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixTheme, choixTheme[1]);\n\n\t\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\t\tif (theme != null) {\n\t\t\t\t\n\t\t\t\t//Enregistrement du theme et changement de la couleur de fond de la fenetre.\t\n\t\t\t\tswitch (theme) {\n\t\t\t\tcase \"Theme par defaut\" : \n\t\t\t\t\tthemeJeu = 0;\n\t\t\t\t\tgrille.setBackground(new Color(91, 60, 17));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de The legend of zelda\" : \n\t\t\t\t\tthemeJeu = 2; \n\t\t\t\t\tgrille.setBackground(Color.BLACK);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Métroid\" : \n\t\t\t\t\tthemeJeu = 3; \n\t\t\t\t\tgrille.setBackground(Color.white);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme d'incendie dans un batiment\" : \n\t\t\t\t\tthemeJeu = 4; \n\t\t\t\t\tgrille.setBackground(new Color(61, 43, 31));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Mario\" : \n\t\t\t\t\tthemeJeu = 5; \n\t\t\t\t\tgrille.setBackground(Color.cyan);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tthemeJeu = 1;\n\t\t\t\t\tgrille.setBackground(new Color(69, 69, 69));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//Si l'utilisateur a choisi d'ouvrir un fichier texte\n\t\t\t\tif (choix.equals(\"Ouvrir un labyrinthe en .txt\")) {\t\t\t\t\n\t\t\t\t\t//On ouvre un explorateur qui permet de ne selectionner que des fichiers .txt\n\t\t\t\t\tJFileChooser exploreur = new JFileChooser();\n\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\".txt\", \"txt\");\n\t\t\t\t\texploreur.setFileFilter(filter);\n\t\t\t\t\texploreur.setAcceptAllFileFilterUsed(false);\n\t\t\t\t\tint valeurRetournee = exploreur.showOpenDialog(null);\n\n\t\t\t\t\t//Si le fichier est correct, on enregistre le nom de ce dernier, et on initie une partie.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tpartie.fichier = exploreur.getSelectedFile().getPath();\n\t\t\t\t\t\tpartie.largeur = 0;\n\t\t\t\t\t\tpartie.hauteur = 0;\n\t\t\t\t\t\tpartie.nbFilons = 0;\n\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t}\n\t\t\t\t\t//Sinon, on quitte le programme.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.CANCEL_OPTION) {\n\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Si l'utilisateur a choisi de generer un labyrinthe aleatoirement\n\t\t\t\telse {\n\t\t\t\t\t//On cree une nouvelle fenetre\n\t\t\t\t\tJFrame fenetreDimensions = new JFrame();\n\n\t\t\t\t\t//On cree un premier panneau qui contient un texte et un slider afin de regler la hauteur du labyrinthe\n\t\t\t\t\tJPanel panneauHauteur = new JPanel();\n\t\t\t\t\tJLabel labelHauteur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderHauteur = new JSlider();\t\t\t\t\n\t\t\t\t\tsliderHauteur.setMaximum(21);\n\t\t\t\t\tsliderHauteur.setMinimum(6);\n\t\t\t\t\tsliderHauteur.setValue(13);\n\t\t\t\t\tsliderHauteur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauHauteur.setBorder(BorderFactory.createTitledBorder(\"Hauteur du labyrinthe\"));\n\t\t\t\t\tpanneauHauteur.add(labelHauteur);\n\t\t\t\t\tpanneauHauteur.add(sliderHauteur);\n\n\t\t\t\t\t//On cree un second panneau qui contient un texte et un slider afin de regler la largeur du labyrinthe\n\t\t\t\t\tJPanel panneauLargeur = new JPanel();\n\t\t\t\t\tJLabel labelLargeur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderLargeur = new JSlider();\n\t\t\t\t\tsliderLargeur.setMaximum(38);\n\t\t\t\t\tsliderLargeur.setMinimum(6);\n\t\t\t\t\tsliderLargeur.setValue(13);\n\t\t\t\t\tsliderLargeur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauLargeur.setBorder(BorderFactory.createTitledBorder(\"Largeur du labyrinthe\"));\n\t\t\t\t\tpanneauLargeur.add(labelLargeur);\n\t\t\t\t\tpanneauLargeur.add(sliderLargeur);\n\n\t\t\t\t\t//On cree un bouton \"Continuer\"\n\t\t\t\t\tJButton boutonContinuer = new JButton(\"Continuer\");\n\t\t\t\t\tboutonContinuer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"continuer\"\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t//On efface la fenetre precedente et on en recree une\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tJFrame fenetreFilons = new JFrame();\n\n\t\t\t\t\t\t\t//On enregistre les valeurs des sliders precedents\n\t\t\t\t\t\t\tpartie.largeur = 2*sliderLargeur.getValue()-1;\n\t\t\t\t\t\t\tpartie.hauteur = 2*sliderHauteur.getValue()-1;\n\n\t\t\t\t\t\t\t//On cree un nouveau panneau qui contient un texte et un slider afin de regler le nombre de filons\n\t\t\t\t\t\t\tJPanel panneauFilons = new JPanel();\n\t\t\t\t\t\t\tJLabel labelFilons = new JLabel(1 + \" filon(s) :\");\n\t\t\t\t\t\t\tJSlider sliderFilons = new JSlider();\n\t\t\t\t\t\t\tsliderFilons.setMinimum(0);\n\t\t\t\t\t\t\tsliderFilons.setMaximum((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/4);\n\t\t\t\t\t\t\tsliderFilons.setValue(1);\n\t\t\t\t\t\t\tsliderFilons.setMajorTickSpacing((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/8);\n\t\t\t\t\t\t\tsliderFilons.setPaintTicks(true);\n\t\t\t\t\t\t\tsliderFilons.setPaintLabels(true);\n\t\t\t\t\t\t\tsliderFilons.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event) {\n\t\t\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\t\t\tlabelFilons.setText(((JSlider)event.getSource()).getValue() + \" filons :\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tpanneauFilons.setBorder(BorderFactory.createTitledBorder(\"Nombre de filons\"));\t\n\t\t\t\t\t\t\tpanneauFilons.add(labelFilons);\n\t\t\t\t\t\t\tpanneauFilons.add(sliderFilons);\t\n\n\t\t\t\t\t\t\t//On cree un bouton \"Jouer\"\n\t\t\t\t\t\t\tJButton boutonJouer = new JButton(\"Jouer\");\n\t\t\t\t\t\t\tboutonJouer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.nbFilons = sliderFilons.getValue();\n\t\t\t\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\t\t\tJButton annulerFilons = new JButton(\"Annuler\");\n\t\t\t\t\t\t\tannulerFilons.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\t\t\tJPanel boutonsFilons = new JPanel();\n\t\t\t\t\t\t\tboutonsFilons.add(boutonJouer);\n\t\t\t\t\t\t\tboutonsFilons.add(annulerFilons);\t\n\n\t\t\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\t\t\tfenetreFilons.setSize(320, 140);\n\t\t\t\t\t\t\tfenetreFilons.setTitle(\"Choix du nombre de filons\");\n\t\t\t\t\t\t\tfenetreFilons.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\t\t\tfenetreFilons.setLocationRelativeTo(null);\n\t\t\t\t\t\t\tfenetreFilons.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(panneauFilons, BorderLayout.CENTER);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(boutonsFilons, BorderLayout.SOUTH);\n\t\t\t\t\t\t\tfenetreFilons.setVisible(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\tJButton annulerDimension = new JButton(\"Annuler\");\n\t\t\t\t\tannulerDimension.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\tJPanel boutonsDimensions = new JPanel();\n\t\t\t\t\tboutonsDimensions.add(boutonContinuer);\n\t\t\t\t\tboutonsDimensions.add(annulerDimension);\t\n\n\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\tfenetreDimensions.setSize(575, 120);\n\t\t\t\t\tfenetreDimensions.setTitle(\"Choix des dimensions du labyrinthe\");\n\t\t\t\t\tfenetreDimensions.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\tfenetreDimensions.setLocationRelativeTo(null);\n\t\t\t\t\tfenetreDimensions.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauHauteur, BorderLayout.EAST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauLargeur, BorderLayout.WEST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(boutonsDimensions, BorderLayout.SOUTH);\n\t\t\t\t\tfenetreDimensions.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\telse {\n\t\t\t\tpartie.quitter();\n\t\t\t}\n\t\t}\n\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\telse {\n\t\t\tpartie.quitter();\n\t\t}\n\t}",
"void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}",
"public void affichageLabyrinthe () {\n\t\t//Affiche le nombre de coups actuel sur la console et sur la fenetre graphique\n\t\tSystem.out.println(\"Nombre de coups : \" + this.laby.getNbCoups() + \"\\n\");\t\t\n\t\tthis.enTete.setText(\"Nombre de coups : \" + this.laby.getNbCoups());\n\n\t\t//Affichage dans la fenêtre et dans la console du labyrinthe case par case, et quand la case est celle ou se trouve le mineur, affiche ce dernier\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tString ligne = new String();\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (i != this.laby.getMineur().getY() || j != this.laby.getMineur().getX()) {\n\t\t\t\t\tligne = ligne + this.laby.getLabyrinthe()[i][j].graphismeCase();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j]=new Case();\n\t\t\t\t\tligne = ligne + this.laby.getMineur().graphismeMineur();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (grille.getComponentCount() < this.laby.getLargeur()*this.laby.getHauteur()) {\n\t\t\t\t\tgrille.add(new JLabel());\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ligne);\n\t\t}\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getMineur().imageCase(themeJeu));\n\t}",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }",
"java.lang.String getPrenume();",
"public void ajouterPanneauSud(Color couleur) {\r\n\r\n\t\t// Creation du panneau nord\r\n\t\t//\r\n\t\tpanneauSud = new PanneauG(this, config);\r\n\t\tpanneauSud.setBackground(couleur);\r\n\t\tpanneauSud.ajouterImage(\"../_Images/Pyramide/3D/Pyramide.jpg\");\r\n\t\tpanneauSud.setPreferredSize(new Dimension(getWidth(), 300));\r\n\r\n\t\t// Ajout d'une bordure au panneau\r\n\t\t//\r\n\t\tpanneauSud.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLoweredBevelBorder(), BorderFactory.createMatteBorder(1, 1, 0, 0,\r\n\t\t\t\tColor.black)));\r\n\r\n\t\t// Ajout du panneau au cadre support\r\n\t\t//\r\n\t\tgetContentPane().add(panneauSud, BorderLayout.SOUTH);\r\n\t}",
"@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }",
"private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }",
"public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}",
"public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}",
"private UsineJoueur() {}",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public PanneauG obtenirPanneauNord() {\r\n\t\treturn panneauNord;\r\n\t}",
"public void toonFiguur() {\n System.out.format(\"kleur: %-5s oppervlakte: %5.3f inhoud: %5.3f\\n\",\n kleur, oppervlakte(), inhoud());\n }",
"private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}",
"int getNombreLignesPlateau();",
"public void afficherPlateau(Robot r) {\r\n\t\tfor(int i=0; i<plateau.length; i++) {\r\n\t\t\tfor (int j=0; j<plateau[0].length; j++) {\r\n\t\t\t\tSystem.out.print(\"|\");\r\n\t\t\t\tif(plateau[i][j].contientMine() > 0) {\r\n\t\t\t\t\tif (plateau[i][j].contientMine() != r.getEquipe())\r\n\t\t\t\t\t\tSystem.out.print(plateau[i][j]);\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(plateau[i][j]);\r\n\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"|\");\r\n\t\t\tif(i == 2)\r\n\t\t\t\tSystem.out.print(\"\tDeplacement = d et Attaque = a\");\r\n\t\t\tif(i == 3)\r\n\t\t\t\tSystem.out.print(\"\t\ta=haut-gauche, z=haut, e=haut-droite\");\r\n\t\t\tif(i == 4)\r\n\t\t\t\tSystem.out.print(\"\t\tq=gauche, d=droite\");\r\n\t\t\tif(i == 5){\r\n\t\t\t\tSystem.out.print(\"\t\tw=bas-gauche, s=bas, c=bas-droite\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t}",
"public void nastav() {\n\t\ttabulkaZiak.setMaxWidth(velkostPolickaX * 3 + 2);\n\t\ttabulkaZiak.setPlaceholder(new Label(\"Žiadne známky.\"));\n\n\t}",
"public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}",
"public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }",
"public void setLeaderBoard(HashMap<String,Integer> vp, Boolean lorenzo) {\r\n Pane p = (Pane) P1.getParent();\r\n int n = vp.size();\r\n\r\n for (int i = 0; i < n; i++) {\r\n String nickname = \"\";\r\n\r\n int max = -1;\r\n for(String s : vp.keySet()){\r\n if(vp.get(s)>max){\r\n nickname = s;\r\n max = vp.get(s);\r\n }\r\n }\r\n\r\n switch (i) {\r\n case 0 -> {\r\n P1.setText(nickname + \" - Punti vittoria: \" + vp.get(nickname));\r\n }\r\n case 1 -> {\r\n P2.setText(nickname + \" - Punti vittoria: \" + vp.get(nickname));\r\n }\r\n case 2 -> {\r\n P3.setText(nickname + \" - Punti vittoria: \" + vp.get(nickname));\r\n }\r\n case 3 -> {\r\n P4.setText(nickname + \" - Punti vittoria: \" + vp.get(nickname));\r\n }\r\n }\r\n vp.remove(nickname);\r\n }\r\n\r\n if(n==1){\r\n if(!lorenzo) {\r\n P2.setText(\"Lorenzo il magnifico\");\r\n }\r\n else{\r\n P2.setText(P1.getText());\r\n P1.setText(\"Lorenzo il magnifico\");\r\n }\r\n p.getChildren().remove(P3);\r\n p.getChildren().remove(P3_I);\r\n p.getChildren().remove(P4);\r\n p.getChildren().remove(P4_I);\r\n }\r\n else if(n==2){\r\n p.getChildren().remove(P3);\r\n p.getChildren().remove(P3_I);\r\n p.getChildren().remove(P4);\r\n p.getChildren().remove(P4_I);\r\n }\r\n else if(n==3){\r\n p.getChildren().remove(P4);\r\n p.getChildren().remove(P4_I);\r\n }\r\n }",
"private static void tourJeu(){\n\n\t\twhile(true){\n\t\t\tconsole.afficherEtatJoueurs();\n\t\t\tpasserTour();\n\t\t\tconsole.quelJoueurJoue(tour);\n\t\t\tconsole.afficherJeu();\n\t\t\tconsole.afficherDirectionAssam();\n\n\t\t\tint n;\n\t\t\twhile ((n = console.demanderNbDeplacement()) == -1 );\n\n\t\t\tconsole.afficherDirectionChoisie(n);\n\t\t\tdemanderDeplacerAssam(n);\n\n\n\t\t\tif(joueurElimine == jeu.getJoueurs().length-1){\n\t\t\t\tpasserTour();\n\t\t\t\tconsole.afficherGagnant(tour);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(verifTapis()){\n\t\t\t\tstatistique();\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}",
"private boolean estSurPlateau(Coordonnees emplacement) {\n return emplacement.getLigne() >= 0 && emplacement.getColonne() >= 0 && emplacement.getLigne() < Plateau.NOMBRE_COLONNE && emplacement.getColonne() < Plateau.NOMBRE_LIGNE;\n }",
"public static void posejeton(int [][] plateau, int colonne, int ligne, final int Joueur, Puissance4GUI gui)\r\n\t{\r\n\t\tfor (int l = 0; l <= ligne; l++)\r\n\t\t{\r\n\t\t\tplateau[colonne][l] = Joueur;\r\n\t\t\tgui.rafraichirCase(colonne,l);\r\n\t\t\tif (l > 0)\r\n\t\t\t\tgui.rafraichirCase(colonne, l-1);\r\n\t\t\tif (l != ligne)\r\n\t\t\t\tplateau[colonne][l] = 0;\r\n\t\t\ttry {\r\n\t\t\t\tThread.currentThread().sleep(200);\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException ie){}\r\n\t\t}\r\n\t}",
"public static void passerTour(){\n\t\tif(tour<jeu.getJoueurs().length){\n\t\t\ttour++;\n\t\t}\n\t\telse {\n\t\t\ttour = 1;\n\t\t}\n\t\tfor(int i=0;i<joueurElimine;i++){\n\t\t\tif(jeu.getJoueurs()[tour-1].getMonnaie()==0){\n\t\t\t\tif(tour<jeu.getJoueurs().length){\n\t\t\t\t\ttour++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttour = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void nommerHeros() {\n\t\tSystem.out.println(\"\\nComment voulez vous appeler votre personnage ?\");\n\t\tthis.nom = Clavier.entrerClavierString();\n\t\tSystem.out.println(\"\\n*********Bienvenue dans le labyrinthe \" + getNom()+\"*********\");\n\t}",
"private void luoKomponentit(Container pane) {\n GridBagLayout gbl = new GridBagLayout();\n GridBagConstraints c = new GridBagConstraints();\n \n pane.setLayout(gbl);\n \n JPanel peliPanel = new JPanel();\n JPanel pelaajatPanel = new JPanel();\n \n c.fill = GridBagConstraints.BOTH;\n \n c.weighty = 0.5;\n c.weightx = 1;\n c.gridx = 0;\n c.gridy = 0;\n pane.add(peliPanel,c,1);\n \n c.weightx = 0.4;\n c.ipadx = 50;\n c.gridx = 1;\n pane.add(pelaajatPanel,c,1);\n pelaajatPanel.setBorder(new LineBorder(Color.LIGHT_GRAY, 2));\n \n luoPeliKomponentit(peliPanel);\n luoPelaajaKomponentit(pelaajatPanel);\n }",
"public void pridajPane() {\n\t\tmojPane.setAlignment(Pos.CENTER);\n\n\t\tmojPane.getChildren().addAll(informacia, vyberPredmetov, tabulkaZiak);\n\t}",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }",
"@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}",
"public void leerPacientes (int id_nutricionista);",
"public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }",
"@Override\r\n public void hallarPerimetro() {\r\n this.perimetro = this.ladoA*3;\r\n }",
"public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\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\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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\r\n\t\t\t\t\t}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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\r\n\t\t\t\t\t}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\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\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\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}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void position(){\n\t\tpositionX=x;//coordonnees(dans la minimap) de la case ou on a clicke ou la fourmiliere(au debut).\n\t\tpositionY=y;\n\t\tboolean posX=false,posY=false;//Ces boolean me servent a savoir s'il a eu des changements sur les coordonnees.\n\t\tif(positionY-zoom/2<=0 ){//si ordonnee negative,ca veut dire qu'on est sorti de la minimap.\n\t\t\tpositionY=0;//pour pas etre hors du tableau on met l'ordonnee a 0\n\t\t\tposY=true;//et on indique qu'on a change les ordonnees.\n\t\t\t\t}\n\t\tif(positionX-zoom/2<=0){//si abscisse negative\n\t\t\tpositionX=0;\n\t\t\tposX=true;//on indique qu'on a change les abscisses.\n\t\t}\n\t\tif(positionY+zoom>=(finY-debutY)+1){//si ordonnee plus grand que la taille de la minimap.\n\t\t\tpositionY=heightCase*(finY-debutY)-zoom*heightCase;//on met donc ordonnees a la fin de la minimap (heightCase*(finY-debutY)) et on enleve la place(px) prise par le zoom. \n\t\t\tposY=true;//et on indique qu'on a change les ordonnees.\n\t\t}\n\t\tif(positionX+zoom>=(finX-debutX)+1){//si abscisse plus grand que la taille de la minimap.\n\t\t\tpositionX=widthCase*(finX-debutX)-zoom*widthCase;\n\t\t\tposX=true;\n\t\t}\n\t\tif(!posX) {//si on a pas change les abscisses\n\t\t\t\tpositionX=widthCase*positionX-zoom*widthCase/2;//pour trouver l'abscisse en px en multiplie positionX par la taille d'une case puis on enleve la place(px) prise par le zoom\n\t\t\t}\n\t\tif(!posY)//si on a pas change les ordonnees.\n\t\t\tpositionY=heightCase*positionY-zoom*heightCase/2;\n\t\t}",
"private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}",
"private void convertir(IConsole per, IConsole eq) throws RemoteException {\n\n\t\t// ajouter au leader s'il y en a un\n\t\tint leader = ((Personnage) per.getElement()).getLeader();\n\n\t\t// si charisme inférieur à deter alors rien ne se passe sinon le perso est changé d'équipe\n\t\tif (((Personnage)eq.getElement()).getDetermination() < ((Personnage)per.getElement()).getCharisme()) {\n\t\t\tif (leader == -1) { // le personnage n'est pas dans une equipe\n\t\t\t\teq.changerLeader(per);\n\t\t\t\tper.getElement().parler(\"J'ajoute \" + eq.getRefRMI() + \" a mon equipe\", per.getVueElement());\n\t\t\t\tSystem.out.println(per.getRefRMI() + \" ajoute a son equipe \" + eq.getRefRMI());\n\n\t\t\t} else { // le personnage a un leader\n\t\t\t\tIConsole lead = arene.consoleFromRef(leader);\n\n\t\t\t\teq.changerLeader(lead);\n\n\t\t\t\tlead.getElement().parler(\"J'ajoute \" + eq.getRefRMI() + \" a mon equipe (par \" + per.getRefRMI() + \")\", lead.getVueElement());\n\t\t\t\tSystem.out.println(leader + \" ajoute a son equipe (par \" + per.getRefRMI() + \") \" + eq.getRefRMI());\n\t\t\t}\n\t\t\t//le personnage reçoit la determination de son enroleur\n\t\t\teq.getElement().getCaract().put(\"determination\", ((Personnage) per.getElement()).getDetermination());\n\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Rien ne se passe\");\n\t\t}\n\t}",
"private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }",
"protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\r\n }",
"public void PedirSintomas() {\n\t\t\r\n\t\tSystem.out.println(\"pedir sintomas del paciente para relizar el diagnosticoa\");\r\n\t}",
"public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }",
"public void ucitajPotez(Potez potez) {\n\t\tint red = potez.vratiRed();\n\t\tint kolona = potez.vratiKolonu();\n\t\ttabla[red][kolona] = potez.vratiRezultat();\n\n\t\tif (potez.vratiRezultat() == Polje1.potopljen) {\n\t\t\tint gornjiRed, gornjaKolona;\n\t\t\tboolean cont1 = false;\n\t\t\tboolean cont2 = false;\n\t\t\tboolean redar = false;\n\t\t\tboolean kolonar = false;\n\t\t\twhile (redar == false) {\n\t\t\t\tif (red == 0) {\n\t\t\t\t\tgornjiRed = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjiRed = red - 1;\n\t\t\t\t}\n\t\t\t\tif (red == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\tred--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjiRed++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen || tabla[gornjiRed][kolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\t\tred++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tredar = true;\n\t\t\t}\n\t\t\tcont1 = false;\n\t\t\tcont2 = false;\n\t\t\tred = potez.vratiRed();\n\t\t\twhile (kolonar == false) {\n\t\t\t\tif (kolona == 0) {\n\t\t\t\t\tgornjaKolona = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjaKolona = kolona - 1;\n\t\t\t\t}\n\t\t\t\tif (kolona == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\tkolona--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjaKolona++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen || tabla[red][gornjaKolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\t\tkolona++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tkolonar = true;\n\n\t\t\t}\n\n\t\t}\n\n\n\t}",
"public Persoon(){\n geboorteDag = 0;\n geboorteMaand = 0;\n geboorteJaar = 0;\n nieuweGeslacht = 'x';\n }",
"private static boolean poserTapis(){\n\t\tSystem.out.println(\"Choisisser une premiere case pour poser la premiere partie du tapis\");\n\t\tint premiereCaseTapis = console.obtenirDirection();\n\t\tint direction = premiereCaseTapis;\n\t\tint posXTapis = 0, posYTapis = 0;\n\n\t\t//Pose du premier carre de tapis\n\t\ttry{\n\t\t\tif(premiereCaseTapis == 1){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-2][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-2;\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 2){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion();\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 3){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()-2].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-2;\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion();\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t\tconsole.afficherJeu();\n\t\tSystem.out.println(\"Choisissez la deuxieme case\");\n\n\t\t//Pose du second petit carre de tapis\n\t\twhile(true){\n\t\t\tint d = console.obtenirDirection();\n\t\t\t//pour ne pas faire de demi tour ou erreur de d\n\t\t\tif(direction == 1 && d == 2 || direction == 2 && d == 1 || direction == 3 && d == 4 || direction == 4 && d == 3 || d<1 || d>4){\n\t\t\t\tconsole.afficherImpossibleChoisirDirection();\n\t\t\t} else {\n\t\t\t\ttry{\n\t\t\t\t\tif(d == 1){\n\t\t\t\t\t\tjeu.cases[posXTapis-1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 2){\n\t\t\t\t\t\tjeu.cases[posXTapis+1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 3){\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis-1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis+1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tjeu.getJoueurs()[tour-1].useTapis();\n\t\treturn true;\n\n\n\t}",
"private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }",
"public PanCoperti() {\n /* rimanda al costruttore della superclasse */\n super(Layout.ORIENTAMENTO_ORIZZONTALE);\n\n\n try { // prova ad eseguire il codice\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n }// fine del blocco try-catch\n }",
"public void setPlateau(long plateau)\n {\n this.plateau = plateau;\n }",
"public void afficherVariables() {\n System.out.println\r\n (\"Objet de type GrillePain avec variables d'instance année = \" +\r\n annee + \" et nbTranches = \" + nbTranches);\r\n }",
"Vaisseau_positionner createVaisseau_positionner();",
"public void Ordenamiento() {\n\n\t}",
"public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }",
"@Override\r\n public void moverAyuda() {\n System.out.println(\"La reina puede mover hacia cualquier dirección en linea recta / diagonal\");\r\n }",
"public void introducirhora(){\n int horadespertar; \n }",
"@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}",
"@Override\n\tpublic void tipoMovimento() {\n\t\tSystem.out.println(super.getNome() + \" anda com 4 patas.\");\n\t}",
"public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }",
"private void acabarJogo() {\n\t\tif (mapa.isFimDeJogo() || mapa.isGanhouJogo()) {\r\n\r\n\t\t\tthis.timer.paraRelogio();\r\n\r\n\t\t\tif (mapa.isFimDeJogo()) {//SE PERDEU\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"VOCÊ PERDEU\", \"FIM DE JOGO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t} else {//SE GANHOU\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\t\t\"PARABÉNS \" + this.nomeJogador + \"! \" + \"TODAS AS BOMBAS FORAM ENCONTRADAS\", \"VOCÊ GANHOU\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\tiniciarRanking();//SE VENCEU MANDA O JOGADOR PRO RANKING\r\n\t\t\t}\r\n\t\t\tthis.voltarMenu();//VOLTA PRO MENU\r\n\r\n\t\t}\r\n\t}",
"public void affiche () {\r\n\t\tSystem.out.println(\"Nom du porteur du compte: \" + this.porteur);\r\n\t\tSystem.out.println(\"numéro du compte: \" + this.IBAN);\r\n\t\tSystem.out.println(\"Solde du compte: \" + this.solde);\r\n\t}",
"@Override\n\tpublic void transmetDonnee() {\n\n\t}",
"public interface Plateau {\r\n\r\n\t/**\r\n\t * Pour afficher la solution pendant le jeu\r\n\t * \r\n\t * @param msg\r\n\t * solution à afficher en mode dev\r\n\t */\r\n\tpublic void setMsgDev(String msg); // afficher le code chercher\r\n\r\n\t/**\r\n\t * Effacer le champs de proposition\r\n\t */\r\n\tpublic void cleanProposition();\r\n\r\n\t/**\r\n\t * Rajouter des valeurs dans le tableau de jeu\r\n\t * \r\n\t * @param results\r\n\t * tableau de jeu (propositions et resultats précédents)\r\n\t */\r\n\tpublic void setValues(String[][] results);\r\n\r\n\t/**\r\n\t * Faire une proposition de combinaison\r\n\t * \r\n\t * @param string\r\n\t * combinaison\r\n\t */\r\n\tpublic void setProposition(String string);\r\n\r\n\t/**\r\n\t * valide la combinaison saisie\r\n\t */\r\n\tpublic void validerSaisie();\r\n\r\n\t/**\r\n\t * actualise l'affichage en cas de changement\r\n\t */\r\n\tpublic void actualiserAffichage();\r\n}",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }",
"public void leerPlanesDietas();",
"public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }",
"public void retournerLesPilesParcelles() {\n int compteur = 0;\n //pour chacune des 4 piles , retourner la parcelle au sommet de la pile\n for (JLabel jLabel : pileParcellesGUI) {\n JLabel thumb = jLabel;\n retournerParcelles(thumb, compteur);\n compteur++;\n }\n }",
"@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}",
"private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}",
"public void setNomor(String nomor) {\n this.nomor = nomor;\n }",
"private static void cajas() {\n\t\t\n\t}",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"public JPanel retornarPainel() {\n\t\treturn painelMetadado;\n\t}",
"private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }",
"public void pararPersonaje(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Derecha\";//Guarda en la variable jugadorVista hacia donde miramos\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Abajo\";\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Izquierda\";\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Arriba\";\n }\n break;\n }\n\n }",
"public void ParcoursPrefixe() {\r\n System.out.print(getElement() + \",\");\r\n if (getGauche() != null) {\r\n getGauche().ParcoursPrefixe();\r\n }\r\n if (getDroite() != null) {\r\n getDroite().ParcoursPrefixe();\r\n }\r\n }",
"public supprimersalle(String n, String p, int t) {\n initComponents();\n this.setSize(566 , 318);\n this.setResizable(false);\n this.n=n;\n this.p=p;\n this.t=t;\n \n this.setLocationRelativeTo(null);\n try {\n st=c.obtenirCon().createStatement();\n rs=st.executeQuery(\"select* from salle\");\n \n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Erreur Séléction\",\"Erreur\",JOptionPane.ERROR_MESSAGE);\n }\n \n }",
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }"
] | [
"0.62557304",
"0.6248059",
"0.61248475",
"0.6063529",
"0.59409434",
"0.59377354",
"0.59363776",
"0.59295267",
"0.59282553",
"0.59209865",
"0.59193426",
"0.5874375",
"0.5864265",
"0.58541644",
"0.58461523",
"0.58305883",
"0.5829438",
"0.5826943",
"0.581467",
"0.58001477",
"0.5786702",
"0.57737404",
"0.57484746",
"0.5748197",
"0.5744931",
"0.5743622",
"0.5737421",
"0.57256806",
"0.5722974",
"0.5719839",
"0.5717761",
"0.5704726",
"0.5696931",
"0.5694339",
"0.5693396",
"0.5690284",
"0.56860113",
"0.5685422",
"0.5677018",
"0.56752735",
"0.5645661",
"0.564331",
"0.5626344",
"0.5623024",
"0.5616034",
"0.56115246",
"0.5603139",
"0.5602406",
"0.5600244",
"0.5593777",
"0.55904925",
"0.55708736",
"0.55686766",
"0.5562727",
"0.55619925",
"0.55612975",
"0.5556994",
"0.55544215",
"0.5546547",
"0.5535991",
"0.55351454",
"0.5530888",
"0.5526752",
"0.5525234",
"0.5523356",
"0.5514292",
"0.55118424",
"0.5511171",
"0.5508747",
"0.55069757",
"0.5505392",
"0.548284",
"0.5477216",
"0.5476648",
"0.54763585",
"0.5462989",
"0.5459482",
"0.54553956",
"0.54526997",
"0.54496646",
"0.54457235",
"0.544203",
"0.5441531",
"0.54411405",
"0.54411036",
"0.54403895",
"0.54356205",
"0.5434696",
"0.5434605",
"0.54294777",
"0.5426888",
"0.54262996",
"0.5422681",
"0.5421733",
"0.54164726",
"0.54161006",
"0.5411155",
"0.5408538",
"0.54081386",
"0.54041773",
"0.540338"
] | 0.0 | -1 |
/ Renvoi true si le player est le proprio du panneau | public boolean isSignOwner(Sign sign, Player p)
{
return getBoutiqueSign(sign.getBlock()).getOwnerString().compareToIgnoreCase(p.getName()) == 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean isPossible(Player p);",
"public abstract boolean isPlayer();",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean topPlayerWon() {\n return winner == 2;\n }",
"protected abstract boolean isPlayerActivatable(PlayerSimple player);",
"public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }",
"boolean hasPlayerBag();",
"@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }",
"public boolean winner(){\n\t\treturn goals1 > goals2;\n\t}",
"public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}",
"public boolean isWin(Player player, Point p, boolean test) {\n if (p.getX() == 0 && p.getY() == 0) {\n return false;\n }\n if (player == P1) {\n if (p.getY() >= 9) {\n return true;\n }\n return false;\n }\n else {\n if (p.getY() <= 1) {\n return true;\n }\n return false;\n }\n }",
"@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}",
"boolean hasPokemonDisplay();",
"public boolean isWin(Player player, Point p) {\n if (p.getX() == 0 && p.getY() == 0) {\n return false;\n }\n if (player == P1) {\n if (p.getY() >= 9) {\n winner = P1;\n return true;\n }\n return false;\n }\n else {\n if (p.getY() <= 1) {\n winner = P2;\n return true;\n }\n return false;\n }\n }",
"boolean hasActivePokemon();",
"public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }",
"public boolean activeFor(String player);",
"public boolean isPerdu() {\n\t\tassert(f.getLevel() != null);\n\t\t\n\t\tLevel l = f.getLevel();\n\t\t\n\t\tif(l.getBall() == null) {//pour le menu principal -> pas de balle\n\t\t\treturn false;\n\t\t}\n\t\tif(l.getType() == Type.INVERSE) {\n\t\t\treturn l.getBall().getPosY()<50;//en haut de l'ecran\n\t\t}else {\n\t\t\treturn l.getBall().getPosY()>f.getHauteurFenetre()-50;//en bas de l'ecran\n\t\t}\n\t}",
"public boolean isPlayer() {\n return player != null;\n }",
"public boolean winOfJuggernaut(){\n\tString [] names=getJoueurs();\n\tfor(int i=0; i<players.size(); i++){\n\t if(i!=juggernaut && players.get(names[i])) return false;\n\t}\n\treturn true;\n }",
"public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}",
"public boolean isPeace() {\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tChessPiece p = piece.get(order[i]);\r\n\t\t\tif (p.chessPlayer.equals(\"black\") || p.chessPlayer.equals(\"white\")) {\r\n\t\t\t\tVector<ChessBoardBlock> blocks = this.getMovablePosition(p);\r\n\t\t\t\tif (blocks.size()>1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }",
"public boolean playerActive(int pno){\n\t\tif (playerPosition.get(pno) == null || collectedGold.get(pno) == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{return true;}\n\t}",
"boolean isPlayableInGame();",
"public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }",
"public boolean checkPlays(Player player){\n return true;\n }",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"public boolean isSetPlayer() {\n return this.player != null;\n }",
"public boolean isCurrentPlayerHungry() {\r\n\tboolean isHungry = true;\r\n\tint length = this.territory[this.currentSide].length;\r\n\tfor (short i = 0; i < length && isHungry; i++) {\r\n\t isHungry = (this.territory[this.currentSide][i] == 0);\r\n\t}\r\n\r\n\treturn isHungry;\r\n }",
"public boolean stepOn(Player player) {\n //System.out.println(\"Nem léphetsz rá a MapElementre.\");\n return false;\n }",
"public boolean isPlayerWinner(int player)\n {\n return players[player] == 100;\n }",
"public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }",
"public boolean estaVacia() {\n return (top == -1); // regresa verdadero si la cima es igual a -1 \r\n }",
"public boolean isOnPlayerOne() {\r\n\t\treturn onTraderOne;\r\n\t}",
"public boolean Tie() {\n\t\tboolean isTie = false;\n\t\tfor(int i=1;i<numPlayers;i++)\t{\n\t\t\tif(!isTie)\t{\n\t\t\t\tif(!record[i].equalsIgnoreCase(\"p\") && record[i-1].equalsIgnoreCase(\"p\"))\t{\n\t\t\t\t\tisTie = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isTie;\n\t}",
"public boolean CanMakeaMove(Player p) {\r\n List<Integer> dominoesNumbers = p.getAllNumbers();\r\n System.out.println(\"There is \" + this.stack.size() + \" more dominoes in the stack\");\r\n return this.stack.isEmpty() || playedDominoes.isEmpty() || dominoesNumbers.contains(end[0]) || dominoesNumbers.contains(end[1]);\r\n }",
"public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}",
"public boolean stupneProOriGraf(){\n\t\tint pom = 0;\n\t\tfor(int i = 0; i < vrchP.length;i++){\n\t\t\tif(vrchP[i].stupenVstup != vrchP[i].stupenVystup)\n\t\t\t\tpom++;\n\t\t}\n\t\tif(pom != 0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"public int canPoseBombAndStillBeSafe() {\n Player currentPlayer = state.getCurrentPlayer();\n List<Player> players = state.getPlayers();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n for (Player p : players) {\n if (!p.equals(currentPlayer)) {\n if (canBombThisEnemyAndRunSafe(currentPlayer,p)) {\n return 1;\n }\n }\n }\n return 0;\n }",
"public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }",
"public boolean isVisionary(EntityPlayer player);",
"public boolean getPlayerOne()\n\t{\n\t\treturn playerOne;\n\t}",
"boolean hasPokemon();",
"public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }",
"public boolean estaLlena() {\n return (capacidad == top+1); // regresa verdadero si la capacidad es igual al tope (la cima +1)\r\n }",
"public boolean isWin_LordVetinari(){\r\n // player got lordVetinari card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 1){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if (playerHoldCard != null) {\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n\r\n Set<Integer> areaList = new HashSet<Integer>();\r\n for (Integer minionID : playerHoldCard.getMinionList()) {\r\n int minion_ID = minionID;\r\n MinionPiece minion = discWorld.getMinionPiece_HASH().get(minion_ID);\r\n if (minion.getAreaNumber() != ConstantField.DEFAULT_UNDEFINED_PLAYID) {\r\n int areaID = minion.getAreaNumber();\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n // make sure free of demon\r\n if (area.getDemonList().size() == 0) {\r\n areaList.add(minion.getAreaNumber());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (numPlayers == 2) {\r\n\r\n if (areaList.size() >= 11) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 3) {\r\n\r\n if (areaList.size() >= 10) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 4) {\r\n\r\n if (areaList.size() >= 9) {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }",
"public boolean showPlayer(){\n\t\t\n\t\tSystem.out.println(\"\\t\"+color+\"\\t \"+playermoney+\"\\t \\t\"+totalminions+\" \\t\"+totalbuildings+\" \\t\\t\"+personalityCard.cardName);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isIsJuniorMatch() {\n\t\treturn _esfTournament.isIsJuniorMatch();\n\t}",
"private boolean playerWonGameWithVerticalLine(Player player) {\n char playerSymbol = player.getType(); \n for (int i = 0; i < 3; i++) {\n if (boardState[0][i] == playerSymbol && boardState[1][i] == playerSymbol \n && boardState[2][i] == playerSymbol) {\n return true; \n }\n \n }\n return false; \n }",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"boolean isPlayable();",
"public boolean checkCheck(Player p){\n\t\tPosition position = null;\n\t\tfor (int i = Position.MAX_ROW; i >= Position.MIN_ROW; i--) {\n\t\t\tfor (char c = Position.MIN_COLUMN; c <= Position.MAX_COLUMN; c++) {\n\t Piece piece = gameState.getPieceAt(String.valueOf(c) + i);\n\t if(piece!=null &&piece.getClass().equals(King.class) && piece.getOwner()==p){\n\t \tposition = new Position(c,i);\n\t \tbreak;\n\t }\n\t\t\t}\n\t\t}\n\t\t//Find out if a move of other player contains position of king\n\t\tList<Move> moves = gameState.listAllMoves(p==Player.Black?Player.White:Player.Black,false);\n\t\tfor(Move move : moves){\n\t\t\tif(move.getDestination().equals(position)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"@Override\n\tpublic boolean paie() {\n\n\t\treturn true;\n\t}",
"boolean isPlayerTurn();",
"private boolean amIleader() {\n \t\treturn vs.getRank(myEndpt) == 0;\n \t}",
"boolean hasPokers();",
"boolean hasPokers();",
"private boolean playerWonGameWithHorizontalLine(Player player) {\n char playerSymbol = player.getType();\n for (int i = 0; i < 3; i++) {\n if (boardState[i][0] == playerSymbol && boardState[i][1] == playerSymbol \n && boardState[i][2] == playerSymbol) {\n return true; \n }\n \n }\n return false; \n }",
"public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}",
"public static boolean playsAsProtoss() {\n return AtlantisConfig.MY_RACE.equals(RaceTypes.Protoss);\n }",
"public boolean PilaVacia()\n {\n if(tope == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"@java.lang.Override\n public boolean hasActivePokemon() {\n return activePokemon_ != null;\n }",
"public boolean isTerritoryBelongsCurrentPlayer() {\n if(selectedTerritoryByPlayer.getConquerID() == null)\n return false;\n return selectedTerritoryByPlayer.getConquerID().equals(currentPlayerTurn.getID());\n }",
"boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }",
"boolean getParlay();",
"@Override\n public final boolean canStand(Playery player) {\n return true;\n }",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"public boolean pickedup(Player player) {\n\t\treturn false;\n\t}",
"public boolean prereqCheck(Player p){\r\n\t\t\r\n\t\tif (p.getLearning() < prereqSkill[Chips.LEARNING.ordinal()] ||\r\n\t\t\tp.getCraft() < prereqSkill[Chips.CRAFTING.ordinal()] ||\r\n\t\t\tp.getIntegrity() < prereqSkill[Chips.INTEGRITY.ordinal()]){\r\n\t\t\treturn false;\r\n\t\t} else return true;\r\n\t}",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"public Boolean getWinner(){\n return spil.erSpilletVundet();\n }",
"@Test\n @DisplayName(\"After one player makes one move, verify conditions for next player toggle\")\n void doesPlayerContinue() {\n Player player = playerService.getP1();\n Pit pit = boardService.getPitByID(0);\n Move move = new Move(player, pit);\n boardService.updateBoardForMove(move);\n Assert.assertTrue(boardService.doesPlayerContinue());\n\n // For the next move, if player 1 moves from pit 1, player will not continue\n pit = boardService.getPitByID(1);\n move = new Move(player, pit);\n boardService.updateBoardForMove(move);\n Assert.assertFalse(boardService.doesPlayerContinue());\n }",
"boolean hasTargetPlayerName();",
"public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }",
"private static boolean comparePlayerPosition(RSTile tile) {\n RSTile player_position = Player07.getPosition();\n if (tile == null || player_position == null) {\n return false;\n }\n return tile.equals(player_position);\n }",
"public boolean won()\n {\n for(int i=0;i<4;i++)\n {\n if(foundationPile[i].isEmpty() || foundationPile[i].peek().getRank()!=Rank.KING)\n return false; \n }\n return true;\n }",
"public abstract void isUsedBy(Player player);",
"private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\n }",
"public boolean playerCollideTest(PlayerObject player)\n {\n if (this.isTouchable)\n {\n return true;\n\n }\n else return false;\n }",
"public boolean isInPlay() {\n\t\tif (getX() < LEFT_FIELD_LIMIT || getX() > RIGHT_FIELD_LIMIT || \n\t\t\t\t getY() <= MINIMUM_FOOTBALL_Y) {\n\t\t\tinPlay_ = false;\n\t\t\treturn inPlay_;\n\t\t} \n\t\treturn inPlay_;\n\t}",
"boolean playerExists() {\n return this.game.h != null;\n }",
"public static boolean thirdPlayer() {\n return TUIMenu.displayValueMenu(\n \"Troisième joueur ?\",\n List.of(\n new SupplierAction<>() {\n public String name() {\n return \"Oui\";\n }\n\n public Boolean get() {\n return true;\n }\n },\n new SupplierAction<>() {\n public String name() {\n return \"Non\";\n }\n\n public Boolean get() {\n return false;\n }\n }\n )\n );\n }",
"public boolean estPlein() {\n return this.tapis.size() == capacite;\n }",
"private boolean estPrise(Deplacement unDeplacement, Couleur couleurJoueur) {\n\t\tPosition[] positions = unDeplacement.toArray(new Position[0]); \n\t\tif(positions.length > 2) {\n\t\t\treturn true;\n\t\t}\n\t\tCollection<Position> c = Position.diagonale(positions[0], positions[1]); \n\t\tif (c.size() >= 1) {\n\t\t\tPion aDeplacer = obtenirPion(positions[0]);\n\t\t\tif(!(aDeplacer instanceof Dame)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tfor (Position pos: c) {\n\t\t\t\t\tif(obtenirPion(pos) != null) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean playerWon() {\n\t\treturn lastPlayerWin;\n\t}",
"public boolean makeNoble(QKPlayer player) {\n if (player.getKingdom() != this) {\n return false;\n }\n\n return true;\n }",
"public boolean gameContinue() {\n for (Player player : players) {\n if (player.getPoints() > END_GAME_POINTS) {\n return false;\n }\n }\n return true;\n }",
"boolean canMove(Color player) {\n int[][] myStatusBoard;\n if (_playerOnMove == ORANGE) {\n myStatusBoard = _orangeStatusBoard;\n } else {\n myStatusBoard = _violetStatusBoard;\n }\n if (Game._totalMoves < 2) {\n return true;\n }\n int i, j;\n for (i = 0; i < 16; i++) {\n for (j = 0; j < 16; j++) {\n if (myStatusBoard[i][j] == 1) {\n if (findMove(i, j, myStatusBoard)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"private boolean shouldAttackPlayer(EntityPlayer player) {\n ItemStack itemStack = player.inventory.armorInventory[3];\n if (itemStack != null && itemStack.getItem() == Item.getItemFromBlock(Blocks.pumpkin))\n return false;\n Vec3 lookVec = player.getLook(1.0F).normalize();\n Vec3 posVec = Vec3.createVectorHelper(this.posX - player.posX, this.boundingBox.minY + this.height / 2.0 - player.posY - player.getEyeHeight(), this.posZ - player.posZ);\n double distance = posVec.lengthVector();\n posVec = posVec.normalize();\n double dotProduct = lookVec.dotProduct(posVec);\n return dotProduct > 1.0 - 0.025 / distance ? player.canEntityBeSeen(this) : false;\n }",
"public boolean stupneProNeoriGraf(){\n\t\tint pom = 0;\n\t\tfor(int i = 0;i<vrchP.length;i++){\n\t\t\tint pom2 = vrchP[i].stupenVstup + vrchP[i].stupenVystup;\n\t\t\tpom2 = pom2 % 2;\n\t\t\tif(pom2 != 0)\n\t\t\t\tpom++;\n\t\t}\n\t\tif(pom != 0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"public boolean play(Pawn p,ArrayList<Pawn> opponentPawnList) {\n\t\tboolean ret = true;\n\t\tif (this.version == 0) {\n\t\t\tint indPawn = 0;\n\t\t\tboolean peutYAller = false;\n\n\t\t\tfor (Pawn pawn : this.pawnListPlayer) {\n\t\t\t\tif (pawn.equals(p)) {\n\t\t\t\t\tindPawn = this.pawnListPlayer.indexOf(pawn);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (!peutYAller) {\n\t\t\t\tpeutYAller = true;\n\n\t\t\t\tint[] coord = consoleControl.askCoordMove(p);\n\n\t\t\t\tfor (Pawn pawn : this.pawnListPlayer) {\n\t\t\t\t\tif (Arrays.equals(pawn.getPosition(), coord)) {\n\t\t\t\t\t\tSystem.out.println(\"Déplacement non autorisé : tu ne peux pas te placer sur un de tes pions\");\n\t\t\t\t\t\tpeutYAller = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(peutYAller) {\n\t\t\t\t\tif (p.rules1(coord)) {\n\t\t\t\t\t\tif (p.rules2(coord,this.pawnListPlayer,opponentPawnList)) {\n\t\t\t\t\t\t\tif (p.rules3(coord,opponentPawnList)) {\n\t\t\t\t\t\t\t\tp.setPosition(coord[0],coord[1]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Déplacement non autorisé : tu ne dois pas passer au dessus d'un pion qui ne t'appartient pas\");\n\t\t\t\t\t\t\t\tpeutYAller = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Déplacement non autorisé : tu dois déplacer ton pion d'autant de cases qu'il y a de pions sur la ligne de déplacement\");\n\t\t\t\t\t\t\tpeutYAller = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Déplacement non autorisé : tu dois déplacer ton pion à l'horizontal, à la vertical ou en diagonale\");\n\t\t\t\t\t\tpeutYAller = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(peutYAller) {\n\t\t\t\tthis.pawnListPlayer.set(indPawn, p);\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"@Override\n public boolean isChasingPlayer()\n {\n return(chasingPlayer);\n }",
"public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }",
"public boolean hasActivePokemon() {\n return activePokemonBuilder_ != null || activePokemon_ != null;\n }",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"public boolean isPaused(){\r\n\t\tif (this.pauseGame(_p)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}",
"private boolean isPlayer1Move(int move) {\n return ((move < 5) || (move == 10));\n }",
"public boolean pobjeda() {\r\n\t\treturn !igrajPoslijePobjede && pobjeda;\t\r\n\t}",
"public String playerNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-200 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+250 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}"
] | [
"0.715345",
"0.6949788",
"0.6921416",
"0.69115514",
"0.68856925",
"0.6721195",
"0.6676439",
"0.6663357",
"0.66570795",
"0.66305125",
"0.66194326",
"0.6598904",
"0.6592634",
"0.657099",
"0.6549907",
"0.6547802",
"0.651482",
"0.6508484",
"0.6482654",
"0.6439636",
"0.64076346",
"0.6397274",
"0.6385919",
"0.63784564",
"0.6378258",
"0.63695055",
"0.6367759",
"0.6362563",
"0.6354618",
"0.6350478",
"0.6346437",
"0.6343461",
"0.6337556",
"0.6315167",
"0.6273607",
"0.6264",
"0.62595713",
"0.6254811",
"0.624383",
"0.6225379",
"0.62228376",
"0.6214994",
"0.6204542",
"0.62029266",
"0.6200193",
"0.61913985",
"0.61842006",
"0.6176811",
"0.6159437",
"0.61555326",
"0.61533105",
"0.6153305",
"0.6152619",
"0.6147822",
"0.61478096",
"0.61457235",
"0.6144198",
"0.61422664",
"0.61422664",
"0.61174434",
"0.6110972",
"0.6106058",
"0.6099743",
"0.60985583",
"0.6077835",
"0.6077748",
"0.60721004",
"0.6068903",
"0.6062973",
"0.60500723",
"0.6048978",
"0.6048026",
"0.60430205",
"0.60410184",
"0.603851",
"0.6037221",
"0.60324156",
"0.6029475",
"0.6029251",
"0.6028296",
"0.60212433",
"0.6019027",
"0.6018874",
"0.601825",
"0.601687",
"0.6016323",
"0.6011873",
"0.6009235",
"0.6007369",
"0.60056055",
"0.5996313",
"0.5995138",
"0.5991511",
"0.59901",
"0.59891003",
"0.5987539",
"0.59834045",
"0.59810394",
"0.59762317",
"0.59758127",
"0.5975374"
] | 0.0 | -1 |
TODO: Check worldguard TODO: Cehck LWC | public boolean isChestOwner(Chest chest, Player p)
{
return WorldGuardHandler.canBuild(p, chest.getBlock());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private FlyWithWings(){\n\t\t\n\t}",
"private stendhal() {\n\t}",
"private void registToWX() {\n }",
"public void smell() {\n\t\t\n\t}",
"private WAPIHelper() { }",
"protected WumpusMap() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n public void afterWorldInit() {\n }",
"Context mo1490b();",
"private Rekenhulp()\n\t{\n\t}",
"public void mo21787L() {\n }",
"private void poetries() {\n\n\t}",
"private void strin() {\n\n\t}",
"public void ovr() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void mo38117a() {\n }",
"private TMCourse() {\n\t}",
"private static void updateworld_laws(final Map<Issue, Alignment> oldlaw) {\r\n if ((i.issue(Issue.DEATHPENALTY).law() == Alignment.ARCHCONSERVATIVE || oldlaw\r\n .get(Issue.DEATHPENALTY) == Alignment.ARCHCONSERVATIVE)\r\n && !i.issue(Issue.DEATHPENALTY).law().equals(oldlaw.get(Issue.DEATHPENALTY))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(Prison.class)) {\r\n l.initlocation();\r\n }\r\n if (l.type().isType(CourtHouse.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if (i.issue(Issue.GUNCONTROL).law() == Alignment.ELITELIBERAL\r\n && oldlaw.get(Issue.GUNCONTROL).ordinal() < Alignment.ELITELIBERAL.ordinal()) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(PawnShop.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((i.issue(Issue.POLICEBEHAVIOR).law() == Alignment.ARCHCONSERVATIVE || oldlaw\r\n .get(Issue.POLICEBEHAVIOR) == Alignment.ARCHCONSERVATIVE)\r\n && !i.issue(Issue.POLICEBEHAVIOR).law().equals(oldlaw.get(Issue.POLICEBEHAVIOR))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(Prison.class)) {\r\n l.initlocation();\r\n }\r\n if (l.type().isType(IntelligenceHq.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((!i.freeSpeech() || oldlaw.get(Issue.FREESPEECH) == Alignment.ARCHCONSERVATIVE)\r\n && !i.issue(Issue.FREESPEECH).law().equals(oldlaw.get(Issue.FREESPEECH))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(FireStation.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((i.issue(Issue.PRIVACY).law() == Alignment.ARCHCONSERVATIVE || oldlaw.get(Issue.PRIVACY) == Alignment.ARCHCONSERVATIVE)\r\n && !i.issue(Issue.PRIVACY).law().equals(oldlaw.get(Issue.PRIVACY))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(IntelligenceHq.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((i.issue(Issue.CORPORATECULTURE).law() == Alignment.ARCHCONSERVATIVE || oldlaw\r\n .get(Issue.CORPORATECULTURE) == Alignment.ARCHCONSERVATIVE)\r\n && !i.issue(Issue.CORPORATECULTURE).law().equals(oldlaw.get(Issue.CORPORATECULTURE))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(House.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((i.issue(Issue.TAX).law() == Alignment.ARCHCONSERVATIVE || oldlaw.get(Issue.TAX) == Alignment.ARCHCONSERVATIVE)\r\n && !i.issue(Issue.TAX).law().equals(oldlaw.get(Issue.TAX))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(House.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((i.issue(Issue.DRUGS).law() == Alignment.ELITELIBERAL || oldlaw.get(Issue.DRUGS) == Alignment.ELITELIBERAL)\r\n && !i.issue(Issue.DRUGS).law().equals(oldlaw.get(Issue.DRUGS))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(CrackHouse.class) // Crack House, or\r\n // Recreational\r\n // Drugs Center?\r\n && l.renting() != null) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n if ((i.issue(Issue.NUCLEARPOWER).law() == Alignment.ELITELIBERAL || oldlaw\r\n .get(Issue.NUCLEARPOWER) == Alignment.ELITELIBERAL)\r\n && !i.issue(Issue.NUCLEARPOWER).law().equals(oldlaw.get(Issue.NUCLEARPOWER))) {\r\n for (final Location l : i.location) {\r\n if (l.type().isType(Nuclear.class)) {\r\n l.initlocation();\r\n }\r\n }\r\n }\r\n }",
"private void processWCBy(WasControlledBy dep) {\n\t\t// TODO Auto-generated method stub\n\t}",
"public boolean isWCS();",
"abstract public IWorldStateCache clientWorldStateCache();",
"private UsineJoueur() {}",
"private final zzgy zzgb() {\n }",
"public void mo4359a() {\n }",
"public void mo3370l() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private void m10993cR(Context context) {\n if (context != null) {\n Class<ITemplateService> cls = ITemplateService.class;\n ITemplateService iTemplateService = (ITemplateService) BizServiceManager.getService(ITemplateService.class);\n if (iTemplateService != null) {\n iTemplateService.updateRollTemplateMapInfo(context);\n }\n C7675d.aAK();\n long j = !C8048e.aBe().isInChina() ? 2 : 0;\n C7835b.m22858iI(true);\n if (!C8048e.aBe().mo23629Mu() && !C8048e.aBe().mo23630Mv() && !C8048e.aBe().mo23631Mw()) {\n C1848s.m5326ai(Boolean.valueOf(true)).mo10194f(C1487a.aUa()).mo10200k(j, TimeUnit.SECONDS).mo10188a((C1850u<? super T>) new C1810c<Boolean>() {\n /* renamed from: e */\n public void onSuccess(Boolean bool) {\n C8049f.aBf().restoreGoodsAndPurchaseInfo();\n }\n\n public void onError(Throwable th) {\n }\n });\n }\n C4037m.m10020Hw();\n C3935b.m9679Lb().mo23481Lk();\n }\n }",
"public void referToSpecialist(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"@Override\n public void world() {\n super.world();\n }",
"void mo1943l();",
"public void gored() {\n\t\t\n\t}",
"World getWorld();",
"@Override\n\tpublic void w() {\n\n\t}",
"public void mo6081a() {\n }",
"public World getClientWorld()\n {\n return null;\n }",
"public Object getPriceFromWorld()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to getPriceFromWorld : \" + \"Agent\");\r\n/* 111 */ \tthis.price = worldForAgent.getPrice();\r\n/* 112 */ \treturn this;\r\n/* */ }",
"public World getWorld();",
"private void m10989Qx() {\n LbsManagerProxy.init(VivaBaseApplication.m8749FZ().getApplicationContext(), AppStateModel.getInstance().isInChina());\n LbsManagerProxy.setAutoStop(true);\n LbsManagerProxy.recordLocation(false, false);\n LbsManagerProxy.resetLocation();\n LbsManagerProxy.recordLocation(true, false);\n }",
"private WolUtil() {\n }",
"@Override\n\tpublic World getWorld() { return world; }",
"void mo12389a(Context context, Glide eVar, Registry registry);",
"void kiemTraThangHopLi() {\n }",
"private LOCFacade() {\r\n\r\n\t}",
"private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }",
"public static void caso32(){\n\t FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso3.owl\",\"file:resources/caso3.repository\",fm);\n\t\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"response2\");\n\t\t\tif(map==null){\n\t\t\t\tSystem.out.println(\"El map es null\");\n\t\t\t}else{\n\t\t\t\tMapUtils.imprimirMap(map);\n\t\t\t}\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private void level7() {\n }",
"public final void mo19209c() {\n zzi.f56267a.mo31623a(getApplicationContext(), new zyz());\n }",
"@Override\n\tpublic void requestLaw() {\n\t\tSystem.out.println(\"xiaoming-requestLaw\");\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 mo3376r() {\n }",
"public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"public interface PlayerWDS {\n\n /**\n * 根据球队缩写列表和当前赛季年份 爬取球员基本数据.html表\n *\n * @param abbr 球队缩写\n * @param year 当前赛季年份\n * @return List<StringBuffer> 爬取球员基本数据.html表\n */\n public StringBuffer getPlayerInfo(String abbr,int year);\n\n /**\n * 根据路径 爬取球员职业生涯的数据\n *\n * @param path 球员数据路径\n * @return StringBuffer 爬取球员职业生涯的数据\n */\n public StringBuffer getPlayerImg(String path);\n}",
"public static void hvitetest1w(){\r\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void mo21877s() {\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"public static void setWorld(World aWorld)\r\n/* */ {\r\n\t \tlogger.info(count++ + \" About to setWotld : \" + \"Agent\");\r\n/* 43 */ \tworldForAgent = aWorld;\r\n/* */ }",
"private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }",
"public void skystonePos4() {\n }",
"zzang mo29839S() throws RemoteException;",
"private HSBC() {\n\t\t\n\t\t\n\t}",
"public SystematicAcension_by_LiftingTechnology() {\n\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 }",
"@Model\n private boolean isValidSuperWorld(World world){\n \t return (world == null || !world.isTerminatedWorld());\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo12930a() {\n }",
"@Override\r\n\tpublic void sssDoLwTestInit() {\n\r\n\t}",
"private void courseEffects() {\n\t\t\n\t}",
"public World getWorld(String worldName);",
"OptimizeResponse() {\n\n\t}",
"public void createWorld(){\n\n }",
"Room mo12151c();",
"public void mo55254a() {\n }",
"public contrustor(){\r\n\t}",
"public static World readWorld() {\n\t\treturn null;\n\t}",
"private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}",
"private void pump_water() {\n\t\t\r\n\t}",
"void bypass();",
"Lingua getLingua();",
"private void init() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"public WorldGenGrassUnderbean()\n {\n }",
"public void woke(){\n\n //TODO\n\n }",
"@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}",
"void mo21072c();",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"WorldCoordinates getWCSCenter();"
] | [
"0.60975003",
"0.6072293",
"0.5813581",
"0.5598282",
"0.5550185",
"0.5523548",
"0.55027175",
"0.5482158",
"0.546043",
"0.54536355",
"0.5447837",
"0.536535",
"0.53397244",
"0.52993715",
"0.52672446",
"0.5249854",
"0.52406526",
"0.5237797",
"0.52188087",
"0.52072",
"0.5205238",
"0.5195186",
"0.519391",
"0.518724",
"0.51857567",
"0.51843154",
"0.5175623",
"0.5175304",
"0.5166237",
"0.5162799",
"0.5161183",
"0.5161179",
"0.514679",
"0.5142462",
"0.51383555",
"0.51304775",
"0.51258004",
"0.51229817",
"0.51206243",
"0.5117442",
"0.511279",
"0.51085615",
"0.51041806",
"0.5103946",
"0.5102507",
"0.5079537",
"0.50707185",
"0.50619",
"0.50585186",
"0.50478333",
"0.5035338",
"0.5024326",
"0.5023972",
"0.5023493",
"0.5021992",
"0.5020576",
"0.5020576",
"0.50200605",
"0.5014283",
"0.5013305",
"0.5012512",
"0.5010512",
"0.5010209",
"0.50092673",
"0.500366",
"0.49982098",
"0.49940017",
"0.49939775",
"0.49932608",
"0.498074",
"0.49779123",
"0.49779123",
"0.49779123",
"0.49779123",
"0.49779123",
"0.49779123",
"0.49779123",
"0.49744698",
"0.49743927",
"0.49708506",
"0.4969006",
"0.49684122",
"0.49677053",
"0.49603525",
"0.49595472",
"0.49538004",
"0.49533215",
"0.49524656",
"0.49495727",
"0.49486855",
"0.49479118",
"0.49466342",
"0.494502",
"0.49421933",
"0.49354747",
"0.49348867",
"0.4933291",
"0.49327052",
"0.49323642",
"0.49321875",
"0.49285144"
] | 0.0 | -1 |
Creates new form InvoiceCreate | public InvoiceCreate() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createInvoice() {\n\t}",
"public Invoice createInvoice(Order order);",
"@RequestMapping(value = \"/save\", method = RequestMethod.POST)\n public String saveNewInvoice(@Valid @ModelAttribute Invoice invoice) {\n invoice.setCreatedUser(annonsePersonController.getLoggedInUser());\n invoice.setLastEditedUser(annonsePersonController.getLoggedInUser());\n invoice.setCreatedDate(Calendar.getInstance());\n invoice.setLastEditedDate(Calendar.getInstance());\n invoiceService.saveAndFlush(invoice);\n for(Sale sale: invoice.getSales()){\n salesService.saveAndFlush(sale);\n }\n return \"redirect:/annonseweb/invoice/\" + invoice.getId();\n }",
"public Invoice create() {\r\n\t\treturn new Invoice();\r\n\t}",
"@PostMapping(\"/invoices\")\n\tpublic ResponseEntity<Invoice> createInvoice(@RequestBody Invoice invoice) throws URISyntaxException {\n\t\tlog.debug(\"REST request to save Invoice : {}\", invoice);\n\t\tif (invoice.getId() != null) {\n\t\t\tthrow new BadRequestAlertException(\"A new invoice cannot already have an ID\", ENTITY_NAME, \"idexists\");\n\t\t}\n\t\tInvoice result = invoiceService.save(invoice);\n\t\treturn ResponseEntity.created(new URI(\"/api/invoices/\" + result.getId()))\n\t\t\t\t.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME,\n\t\t\t\t\t\tresult.getId().toString()))\n\t\t\t\t.body(result);\n\t}",
"private void carregarInvoice() throws BusinessException {\r\n\r\n\t\t// REMOCAO DE ANEXO DE INVOICE\r\n\t\t// if (invoice.getAnexo() != null) {\r\n\t\t// nomeArquivo = invoice.getAnexo().getNomeArquivo();\r\n\t\t// }\r\n\r\n\t\tif (invoice.getIncoterm() != null) {\r\n\t\t\tIncoterm inco = facade.getIncoTermsById(invoice.getIncoterm()\r\n\t\t\t\t\t.getId());\r\n\t\t\tinvoice.setIncoterm(inco);\r\n\t\t}\r\n\t\trenderizaDadosFornecedor();\r\n\r\n\t}",
"boolean createInvoice(int id, String title, LocalDate effecitvedate, float amount) throws PreconditionException, PostconditionException, ThirdPartyServiceException;",
"private String CreateInvoice() throws Exception {\n\n\t\tgetDriver().get(\"https://stg.autobrain.com/worker/retail_fulfillment/new_invoice\");\n\n\t\t// Add Quantity\n\t\tString s = prop.getProperty(\"no_of_devices\");\n\t\tint quantity = Integer.parseInt(s);\n\n\t\tfor (int i = 0; i < quantity; i++) {\n\t\t\tVisibilityOfElementByXpath(\"//div[@class='input-group number-picker']/span[2]/button\", 15).click();\n\t\t\tThread.sleep(500);\n\t\t}\n\n\t\t// Get invoice auto-generated number\n\t\tinvoice_id_before = VisibilityOfElementByXpath(\"//code[@class='name-preview']\", 15).getText();\n\t\tinvoice_id_before = invoice_id_before.replace(\"#\", \"\");\n\n\t\t// Description\n\t\tVisibilityOfElementByID(\"invoice_description\", 15).sendKeys(\"testing_\" + invoice_id_before);\n\n\t\t// Select account type\n\t\tSelect select = new Select(VisibilityOfElementByID(\"invoice_account_type\", 15));\n\n\t\tif (prop.getProperty(\"account_type\").equalsIgnoreCase(\"Autobrain Family\")) {\n\t\t\tinvoice_account_type = \"personal\";\n\t\t}\n\n\t\telse if (prop.getProperty(\"account_type\").equalsIgnoreCase(\"Autobrain Business\")) {\n\t\t\tinvoice_account_type = \"business\";\n\t\t}\n\n\t\tselect.selectByVisibleText(invoice_account_type);\n\n\t\t// Submit button\n\t\twait(getDriver(), 10).until(ExpectedConditions.visibilityOfElementLocated(By.name(\"commit\"))).click();\n\n\t\t// Validate invoice created\n\t\t// Get invoice auto-generated number\n\t\tString invoice_id_after = VisibilityOfElementByXpath(\"//code[@class='name-preview']\", 15).getText();\n\n\t\tif (!invoice_id_before.equals(invoice_id_after)) {\n\t\t\tSystem.out.println(\"Invoice created successfully!\");\n\t\t}\n\n\t\telse if (invoice_id_before.equals(invoice_id_after)) {\n\t\t\tAssert.assertEquals(true, false, \"Invoice not created successfully!\");\n\t\t}\n\n\t\treturn invoice_name = \"testing_\" + invoice_id_before;\n\n\t}",
"Message create(MessageInvoice invoice);",
"public Invoice(){//String invoiceId, String customer, String invoiceIssuer, Timestamp invoicingDate, TimeStamp dueDate, BigDecimal netAmount, BigDecimal vat, BigDecimal totalAmount, String currency, String linkToInvoiceDocument, String linkToInvoiceDocumentCopy, String invoicingPeriod, BigDecimal gp, Event event, Timestamp paidDate, BigDecimal amountOpen, String revenueType, String originalInvoiceId) {\r\n }",
"boolean add(InvoiceDTO invoiceDTO);",
"InvoiceItem addInvoiceItem(InvoiceItem invoiceItem);",
"public Invoice createInvoice(Order order) {\n\t\treturn new Invoice(order);\n\t}",
"public InvoiceModel() {\n \n }",
"InvoiceSpecification createInvoiceSpecification();",
"public void getInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nEnter info for invoice number \" + (numberOfBills - counter) + \": \");\r\n\r\n\t\tinvoiceInfo[numberOfBills - counter] = new Invoice();\r\n\t\tinvoiceInfo[numberOfBills - counter].setNameFromUser();\r\n\t\tinvoiceInfo[numberOfBills - counter].setAmountFromUser();\r\n\t\tinvoiceInfo[numberOfBills - counter].setDateFromUser();\r\n\r\n\t}",
"public InvoiceLineViewForm() throws IllegalArgumentException, Exception {\n\t\tbuildMainLayout();\n\t\tsetCompositionRoot(mainLayout);\n\t\t\n\t\t// TODO add user code here\t\t\n\t\tinitComponents();\n\t\t\n\t\t// configure Organization Type data\n\t\tinvoiceLineStatusField.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);\n\t\tinvoiceLineStatusField.setItemCaptionPropertyId(\"description\");\n\t\t\n\t\tinvoiceField.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);\n\t\tinvoiceField.setItemCaptionPropertyId(\"code\");\n\t\t\n\t\tivaField.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);\n\t\tivaField.setItemCaptionPropertyId(\"description\");\n\t\t\t\t\n\t\t// get form services from OSGi Service Registry\n\t\tgetServices();\n\t\t\n\t\t// load data sources\n\t\tloadData();\t\t\n\t}",
"public void setInvoice(String invoice) {\n this.invoice = invoice;\n }",
"@Override\n\tpublic void prepareInvoice(){\n\t\tSystem.out.println(\"invoice prepared...\");\n\t}",
"public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Invoice(){\r\n this.userName = \"\";\r\n this.InvoiceCode = \"\";\r\n this.items = new ArrayList<>();\r\n this.amount = 0.0;\r\n \r\n }",
"public InvoiceR() {\n initComponents();\n }",
"@PostMapping(value = \"/create\",consumes = MediaType.APPLICATION_JSON_VALUE)\n public InternationalTournaments create(@RequestBody InternationalTournaments create){\n return service.create(create);\n }",
"@Test\n public void testOrderFactoryInvoice() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n \n // create the invoice\n orderController.addOrderInvoice(orderController.getOrder(1));\n\n // check that the invoice is created\n assertEquals(1, orderController.getOrderInvoices().size());\n }",
"@PostMapping(\"/invoice-lines\")\n public ResponseEntity<InvoiceLinesDTO> createInvoiceLines(@Valid @RequestBody InvoiceLinesDTO invoiceLinesDTO) throws URISyntaxException {\n log.debug(\"REST request to save InvoiceLines : {}\", invoiceLinesDTO);\n if (invoiceLinesDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new invoiceLines cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n InvoiceLinesDTO result = invoiceLinesService.save(invoiceLinesDTO);\n return ResponseEntity.created(new URI(\"/api/invoice-lines/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public Invoice()\r\n {\r\n items = new ArrayList<>();\r\n listeners = new ArrayList<>();\r\n }",
"public InvoiceMenuBoundary()\n {\n invoiceController = new InvoiceController();\n }",
"public void setInvoice(java.lang.String invoice) {\r\n this.invoice = invoice;\r\n }",
"public void generateInvoice() throws InvoicePrintException {\n authInvoice = null;\n try {\n signedInvoice = signer.sign(xmlGenerate.generateXMLFile(getInvoice(), getCustomer(), issuer), issuer.getCertificate(), issuer.getPassword());\n final List<Autorizacion> authResponse = authorization.syncRequest(signedInvoice, ServiceEnvironment.TEST, 20);\n if (!authResponse.isEmpty()) {\n final Autorizacion autorizacion = authResponse.get(0);\n final String authorizationStatus = autorizacion.getEstado();\n LOG.info(String.format(\"Invoice status: %s\", authorizationStatus));\n FacesMessageHelper.addInfo(String.format(\"Factura %s\", authorizationStatus), null);\n FacesMessageHelper.addQueryMessages(autorizacion.getMensajes().getMensaje());\n\n if (AuthorizationState.AUTORIZADO.name().equals(authorizationStatus)) {\n authInvoice = autorizacion.getNumeroAutorizacion() == null ? null : autorizacion;\n List<Attachment> attachments = createAttachments(autorizacion);\n stroreDocument(AuthorizationState.AUTORIZADO);\n sendMailWithAttachments(attachments);\n }\n } else {\n FacesMessageHelper.addError(\"Existe Problemas con el Servicio de Rentas Internas \", \"\");\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n }\n\n } catch (ReturnedInvoiceException rie) {\n final Comprobante comprobante = rie.getComprobantes().get(0);\n FacesMessageHelper.addRequestMessages(comprobante.getMensajes().getMensaje());\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n } catch (SignerException e) {\n LOG.error(e, e);\n FacesMessageHelper.addError(String.format(\"Hubo un error al firmar el documento: %s\", e.getMessage()), \"\");\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n } catch (Exception e) {\n FacesMessageHelper.addError(\"Existe Problemas con el Servicio de Rentas Internas \", \"Reintente la facturacion\");\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n }\n }",
"@Nonnull\n public static UBL23WriterBuilder <InvoiceType> invoice ()\n {\n return UBL23WriterBuilder.create (InvoiceType.class);\n }",
"public void showInvoiceNo(){\n\t}",
"public InvoiceBalance()\n {\n }",
"public AddIvoiceDetailsUi(java.awt.Frame parent, boolean modal, boolean isOut) {\n super(parent, modal);\n initComponents();\n locationComboBox.setModel(LocationAction.getLocationModel());\n transactionList = new ArrayList<Transaction>();\n outFlg = isOut;\n this.setTitle(\"New Invoice Details\");\n if(isOut){\n supplierLabel.setText(\"Customer Name\");\n supplierNumberLabel.setText(\"Customer #\");\n } else {\n supplierLabel.setText(\"Supplier Name\");\n supplierNumberLabel.setText(\"Supplier #\");\n \n }\n itemNameLabel.setVisible(false);\n customerNameLabel.setEnabled(true);\n supplierLabel.setEnabled(true);\n customerNumberValueLabel.setEnabled(true);\n supplierNumberLabel.setEnabled(true);\n jButton1.setEnabled(true);\n invoiceYearComboBox.setModel(DateActions.getYearModel());\n invoiceYearComboBox.setSelectedItem(new GregorianCalendar().get(GregorianCalendar.YEAR));\n invoiceMonthComboBox.setSelectedIndex(new GregorianCalendar().get(GregorianCalendar.MONTH));\n invoiceDayComboBox.setModel(DateActions.fixDay(invoiceMonthComboBox.getSelectedIndex(), invoiceYearComboBox.getSelectedItem().toString()));\n invoiceDayComboBox.setSelectedIndex(new GregorianCalendar().get(GregorianCalendar.DATE)-1);\n \n initializeTable();\n// } else {\n// customerNameLabel.setVisible(false);\n// supplierLabel.setVisible(false);\n// jButton1.setVisible(false);\n// }\n \n \n }",
"private void generatorder_complete (MInvoice invoice)\r\n\t {\r\n\r\n\t\t trx.commit();\r\n\r\n\t\t // Switch Tabs\r\n\t\t tabbedPane.setSelectedIndex(1);\r\n\t\t //\r\n\t\t iTextInOutGenerated = new StringBuffer();\r\n\t\t iTextInOutGenerated.append(\"<br><br>\")\r\n\t\t .append(\"<b>NOTA DE CREDITO No. \")\r\n\t\t .append(invoice.getDocumentNo())\r\n\t\t .append(\"</b><br><br>\");\r\n\t\t MInvoiceLine[] fromLines = invoice.getLines();\r\n\t\t for (int i = 0; i < fromLines.length; i++)\r\n\t\t {\r\n\t\t\t MInvoiceLine line = fromLines[i];\r\n\t\t\t iTextInOutGenerated.append(line.getQtyInvoiced().setScale(2, BigDecimal.ROUND_HALF_UP));\t\t\t\t\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(MUOM.get(Env.getCtx(), line.getC_UOM_ID()).getName());\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(line.getName());\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(line.getLineNetAmt().setScale(2, BigDecimal.ROUND_HALF_UP));\r\n\t\t\t iTextInOutGenerated.append(\"<br>\");\r\n\t\t }\r\n\t\t info.setText(iTextInOutGenerated.toString());\r\n\r\n\t\t //\tGet results\r\n\t }",
"public void setInvoiceNumber(int invoicenum) {\n invoiceNumber = invoicenum;\n }",
"public void invoice(){ //------------------------------->>-----------------------------------void invoice------------------------------->>--------------------------------------------------//\r\n\t\r\n\t\r\n\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\r\n\t\tSystem.out.println(\"\tSr.No\t||\tName \t||\tQuantity\t||\tPrice\t||\tAmount\t\");\r\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\r\n \t\r\n\tfor(i = 1; i <= n; i++){\r\n\r\n\t\tSystem.out.println(\"\\t\"+ i+\"\\t\\t\"+name[i]+\"\\t\\t\"+quantity[i]+\"\\t\\t\\t\"+price[i]+\"\\t\\t\"+amount[i]); \t\t\r\n\t \r\n\t} // end of for loop\r\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\r\n\t\tSystem.out.println(\"\tTotal\t\t||\t\t\t\t\t\t \t\t\"+ total);\r\n\t\tSystem.out.println(\" For You\t\t||\t\t\t\t\t\t \t\t\"+ cc);\r\n\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n \r\n }",
"int insert(ProcRecInvoice record);",
"Documento createDocumento();",
"public ProductCreate() {\n initComponents();\n }",
"public Invoice getInvoice() {\n return invoice;\n }",
"public void saveFiAvailableInvoice(FiAvailableInvoice fiAvailableInvoice);",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"public CreateAccount() {\n initComponents();\n selectionall();\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"@PreAuthorize(\"hasRole('ROLE_LEVEL4') or hasRole('ROLE_LEVEL3')\")\n\t@RequestMapping(value = \"/{process}/invoice\", method = RequestMethod.POST)\n\tpublic String invoiceMainPost(Model model, User user,\n\t\t\t@ModelAttribute InvoiceFilter invoiceFilter,\n\t\t\t@PathVariable String process) {\n\tuser.setSubProcess(\"invoice\");\n\t\t\n\t\tinvoiceFilter.setProcess(process);\n\n//\t\tinvoiceFilter.getPagination().setNumItems(\n//\t\t\t\tinvoiceService.getInvoiceListCount(invoiceFilter, process));\n//\n//\t\tList<Invoice> invoiceList = invoiceService\n//\t\t\t\t.getInvoiceList(invoiceFilter);\n//\n//\t\tmodel.addAttribute(\"filterMap\", invoiceService.getInvoiceFilterMap(invoiceFilter));\n//\n//\t\tmodel.addAttribute(\"user\", user);\n//\t\tmodel.addAttribute(\"invoiceList\", invoiceList);\n\t\tinvoiceFilter.getPagination().setNumItems(invoiceService.getInvoiceListCount(invoiceFilter, process));\n\t\tList<Invoice> invoiceList = invoiceService.getInvoiceList(invoiceFilter);\n\t\tSystem.out.println(\"======== PAGINATION SIZE : \"+invoiceFilter.getPagination().getNumItems()+\" ============\");\n\t\tSystem.out.println(\"======== CURRENT PAGE : \"+invoiceFilter.getPagination().getCurrentPage()+\" ======\");\n\t\tSystem.out.println(\"======== INVOICE LIST SIZE : \"+invoiceList.size()+\" ============\");\n\t\tmodel.addAttribute(\"filterMap\", invoiceService.getInvoiceFilterMap(invoiceFilter));\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"invoiceList\", invoiceList);\n\t\treturn process + \"/invoice/main\";\n\t}",
"@RequestMapping(value = { \"/newcontract\" }, method = RequestMethod.POST)\n public String saveContract(@RequestParam(value = \"tNumber\", required = false) String phone, @RequestParam(value = \"customer\", required = false) String sso,\n @RequestParam(value = \"tarif\", required = false) String tarif,\n ModelMap model) {\n\n\n Customer customer = userService.findBySSO(sso);\n Tarif tarif1 = tarifService.findById(Integer.parseInt(tarif));\n Contract contract = new Contract(phone, customer, tarif1);\n// if (result.hasErrors()) {\n// return \"contractRegistration\";\n// }\n customer.setTelNumber(phone);\n userService.updateUser(customer);\n contractService.persist(contract);\n List<Contract> tarifContracts = contractService.findContractByTarif(tarif1);\n tarifContracts.add(contract);\n model.addAttribute(\"tarif\", tarif1);\n model.addAttribute(\"customer\", customer);\n model.addAttribute(\"phone\", customer.getTelNumber());\n model.addAttribute(\"contract\", contract);\n model.addAttribute(\"success\", \"Contract \" + contract.getContractId() + \" \" + \" added successfully\");\n model.addAttribute(\"loggedinuser\", getPrincipal());\n return \"registrationsuccess\";\n }",
"@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}",
"boolean edit(InvoiceDTO invoiceDTO);",
"public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }",
"@Override\n public void checkInvoiceIntanciation(Institution institution) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"checkInvoiceIntanciation\");\n }\n // Check invoice instanciation\n try {\n TestingSession activatedTestingSession = TestingSession.getSelectedTestingSession();\n\n // We check if the invoice exists (cause if the testing session changed, the invoice may not exist)\n\n EntityManager em = EntityManagerService.provideEntityManager();\n selectedInvoiceForInstitution = Invoice.getInvoiceForAnInstitutionAndATestingSession(em, institution,\n activatedTestingSession);\n\n // if it does not exist, we create it\n if (selectedInvoiceForInstitution == null) {\n\n selectedInvoiceForInstitution = new Invoice(institution, activatedTestingSession);\n selectedInvoiceForInstitution.setFeesPaid(BigDecimal.ZERO);\n selectedInvoiceForInstitution.setFeesDue(BigDecimal.ZERO);\n selectedInvoiceForInstitution.setFeesDiscount(BigDecimal.ZERO);\n selectedInvoiceForInstitution.setVatAmount(BigDecimal.ZERO);\n\n }\n // else we update the invoice (cause number of systems may have changed, number of domains too) :\n else {\n\n }\n } catch (Exception e) {\n ExceptionLogging.logException(e, LOG);\n FacesMessages.instance().add(StatusMessage.Severity.ERROR, \"Problem checking Invoice instanciation : \" + e.getMessage());\n }\n }",
"@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}",
"public String getInvoice() {\n return invoice;\n }",
"@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }",
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"public CrearPedidos() {\n initComponents();\n }",
"public Invoice(int id, ArrayList<Food> foods, Customer customer)\n {\n this.id = id;\n this.foods = foods;\n // this.date = date;\n this.customer = customer;\n this.date = new GregorianCalendar();\n this.invoiceStatus = InvoiceStatus.Ongoing;\n }",
"public void addInvoice(lnrpc.Rpc.Invoice request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.AddInvoiceResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getAddInvoiceMethod(), getCallOptions()), request, responseObserver);\n }",
"public AddPurchaseDetail() {\r\n super();\r\n }",
"public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}",
"public InvoicesPopupDialog createDialog(Context context, List<Invoice> invoices){\n\t\tgInvoicesPopupDialog.setContentView(R.layout.dialog_popup_invoices);\n\t\tgInvoicesPopupDialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tgInvoicesPopupDialog.setCancelable(true);\n\n\t\tImageView ivBack = (ImageView) gInvoicesPopupDialog.findViewById(R.id.iv_go_back);\n\t\tivBack.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgInvoicesPopupDialog.dismiss();\n\t\t\t}\n\t\t});\n\t\trecentInvoices = invoices;\n\t\tthis.mContext = context;\n\n\t\tlvMenu = (ListView) gInvoicesPopupDialog.findViewById(R.id.lv_menu);\n\t\tloadRecentInvoicesMenu();\n\n\t\tlvMenu.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tif(position < recentInvoices.size())\n\t\t\t\t{\n\t\t\t\t\tInvoice invoice = recentInvoices.get(position);\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\tbundle.putString(Resource.KEY_URL, invoice.getInvoiceUrl());\n\t\t\t\t\tbundle.putString(Resource.KEY_TITLE, mContext.getString(R.string.invoices));\n\t\t\t\t\tbundle.putString(Resource.KEY_INVOICE_ID, invoice.getInvoiceId());\n\n\t\t\t\t\tIntent intent = new Intent(mContext, InvoiceActivity.class);\n\t\t\t\t\tintent.putExtras(bundle);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn gInvoicesPopupDialog;\n\t}",
"public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }",
"@RequestMapping(method = RequestMethod.POST, produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<?> createInventory(@Valid @RequestBody InventoryRequest inventoryRequest){\n Product product = productService.getProductById(inventoryRequest.getProductId());\n\n //Criando produto no estoque\n Inventory inventory = inventoryService.createInventoryItem(new Inventory(inventoryRequest.getAmount()));\n product.setInventory(inventory);\n inventory.setProduct(product);\n\n //Atualizando associações entre estoque e produto\n inventoryService.updateInventoryItem(inventory);\n\n return ResponseEntity.status(HttpStatus.CREATED).build();\n }",
"public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }",
"@PostMapping(\"/invoices/{invoice_number}/paytransactions\")\r\n public PayTransaction createPayTransaction(@PathVariable long invoice_number, @Valid @RequestBody PayTransaction payTransaction) {\r\n return invoiceRepository.findById(invoice_number).map(invoice -> {\r\n payTransaction.setInvoice(invoice);\r\n // Manually invoice number needs to be set. Otherwise it will be empty.\r\n payTransaction.setInvoice_number(invoice.getInvoice_number());\r\n return payTransactionRepository.save(payTransaction);\r\n }).orElseThrow(() -> new ResourceNotFoundException(\"Invoice ID \" + invoice_number + \" not found\"));\r\n }",
"public void addInvoice(lnrpc.Rpc.Invoice request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.AddInvoiceResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getAddInvoiceMethod(), responseObserver);\n }",
"@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}",
"public lnrpc.Rpc.AddInvoiceResponse addInvoice(lnrpc.Rpc.Invoice request) {\n return blockingUnaryCall(\n getChannel(), getAddInvoiceMethod(), getCallOptions(), request);\n }",
"void setInvoiceId(Long invoiceId);",
"FORM createFORM();",
"public Invoice(String partNo, String partDesc, double price, int quantity){\n\t\t\n\t\t// initialize the instance variable partNo (i.e. this.partNo) with the value of the parameter partNo\n\t\tthis.partNo = partNo;\n\t\t// initialize the instance variable partDesc (i.e. this.partDesc) with the value of the parameter partDesc\n\t\tthis.partDesc = partDesc;\n\t\t// initialize the instance variable price (i.e. this.price) with the value of the parameter price\n\t\tthis.price = price;\n\t\t// initialize the instance variable quantity (i.e. this.quantity) with the value of the parameter quantity\n\t\tthis.quantity = quantity;\n\t}",
"public FrmNuevoProveedor() {\n initComponents();\n }",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"public void setDateInvoice(Date dateInvoice) {\n this.dateInvoice = dateInvoice;\n }",
"void validateActivoCreate(Activo activo);",
"public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }",
"private PersonCtr createCustomer()\n {\n\n // String name, String addres, int phone, int customerID\n PersonCtr c = new PersonCtr();\n String name = jTextField3.getText();\n String address = jTextPane1.getText();\n int phone = Integer.parseInt(jTextField2.getText());\n int customerID = phone;\n Customer cu = new Customer();\n cu = c.addCustomer(name, address, phone, customerID);\n JOptionPane.showMessageDialog(null, cu.getName() + \", \" + cu.getAddress()\n + \", tlf.nr.: \" + cu.getPhone() + \" er oprettet med ID nummer: \" + cu.getCustomerID()\n , \"Kunde opretttet\", JOptionPane.INFORMATION_MESSAGE);\n return c;\n\n\n }",
"public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.AddInvoiceResponse> addInvoice(\n lnrpc.Rpc.Invoice request) {\n return futureUnaryCall(\n getChannel().newCall(getAddInvoiceMethod(), getCallOptions()), request);\n }",
"Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoice getInvoice();",
"@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }",
"public CadastroProdutoNew() {\n initComponents();\n }",
"public FormInserir() {\n initComponents();\n }",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"Invoice getById(int invoiceId);",
"@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}",
"@Test\n @Transactional\n void createInvoiceWithExistingId() throws Exception {\n invoice.setId(1L);\n\n int databaseSizeBeforeCreate = invoiceRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restInvoiceMockMvc\n .perform(\n post(ENTITY_API_URL)\n .with(csrf())\n .contentType(MediaType.APPLICATION_JSON)\n .content(TestUtil.convertObjectToJsonBytes(invoice))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the Invoice in the database\n List<Invoice> invoiceList = invoiceRepository.findAll();\n assertThat(invoiceList).hasSize(databaseSizeBeforeCreate);\n }",
"public FrmIntProveedor() {\n initComponents();\n muestraProveedor();\n\n }",
"@Override\n void create(Cliente cliente);",
"public CrearProductos() {\n initComponents();\n }",
"public CreateCustomer() {\n initComponents();\n }",
"public InwardEntity createEstimateInvoice(InwardEntity invoice, String companyId, String newcustomerId) throws EntityException\n\t{\n\n\t\tDatastore ds = null;\n\t\tCompany cmp = null;\n\t\tBusinessPlayers customer = null;\n\t\tProducts prod = null;\n\t\tTax tax = null;\n\t\tKey<InwardEntity> key = null;\n\t\tObjectId oid = null;\n\t\tObjectId customerOid = null;\n\t\tObjectId prodOid = null;\n\t\tObjectId taxOid = null;\n\t\tInwardEntity estimate = null;\n\t\tInwardEntity existingInvoice = null;\n\t\tboolean customerChange = false;\n\n\n\t\ttry\n\t\t{\n\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\toid = new ObjectId(companyId);\n\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\tcmp = query.get();\n\t\t\tif(cmp == null)\n\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t// check if estimate exists\n\n\t\t\tQuery<InwardEntity> equery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isEstimate\", true).filter(\"isInvoice\", false).field(\"estimateNumber\").equal(invoice.getEstimateNumber());\n\t\t\testimate = equery.get();\n\t\t\tif(estimate == null)\n\t\t\t\tthrow new EntityException(512, \"estimate not found\", null, null);\n\n\t\t\t//check if customer changed, if yes then see if he exists\n\n\t\t\tif(!(estimate.getCustomer().getId().toString().equals(newcustomerId)))\n\t\t\t{\n\t\t\t\tcustomerChange = true;\n\t\t\t\tcustomerOid = new ObjectId(newcustomerId);\n\t\t\t\tQuery<BusinessPlayers> bpquery = ds.createQuery(BusinessPlayers.class).field(\"company\").equal(cmp).field(\"id\").equal(customerOid).field(\"isCustomer\").equal(true).field(\"isDeleted\").equal(false);\n\t\t\t\tcustomer = bpquery.get();\n\t\t\t\tif(customer == null)\n\t\t\t\t\tthrow new EntityException(513, \"customer not found\", null, null);\n\t\t\t}\n\n\n\n\t\t\t//check if invoice with this serial number exists\n\n\t\t\tequery = ds.createQuery(InwardEntity.class).filter(\"company\",cmp).field(\"isInvoice\").equal(true).field(\"invoiceSerialId\").equal(invoice.getInvoiceSerialId());\n\t\t\texistingInvoice = equery.get();\n\t\t\tif(existingInvoice != null)\n\t\t\t\tthrow new EntityException(514, \"invoice number found\", null, null);\n\n\n\n\t\t\t//collect new invoice details - can have deleted entries (2 queries per product)\n\t\t\tList<OrderDetails> invoiceDetails = invoice.getInvoiceDetails();\n\n\t\t\tfor(OrderDetails detail : invoiceDetails)\n\t\t\t{\n\n\t\t\t\tif(detail.getTax().getId() != null && detail.getTax().isDeleted() == false)\n\t\t\t\t{\n\n\t\t\t\t\ttaxOid = new ObjectId(detail.getTax().getId().toString());\n\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //has been deleted in due course\n\t\t\t\t}\n\n\t\t\t\t//check tax exists, if deleted\n\t\t\t\tif(detail.getTax().getId() != null && detail.getTax().isDeleted() == true)\n\t\t\t\t{\n\n\t\t\t\t\ttaxOid = new ObjectId(detail.getTax().getId().toString());\n\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //tax doesn't exists / may not be deleted\n\t\t\t\t}\n\n\t\t\t\tif(detail.getProduct().isDeleted() == false) //product cant be null\n\t\t\t\t{\n\n\t\t\t\t\tprodOid = new ObjectId(detail.getProduct().getId().toString());\n\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //has been deleted in due course\n\t\t\t\t}\n\n\t\t\t\tif(detail.getProduct().isDeleted() == true)\n\t\t\t\t{\n\n\t\t\t\t\tprodOid = new ObjectId(detail.getProduct().getId().toString());\n\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //product doesn't exists / may not be deleted\n\t\t\t\t}\n\n\n\t\t\t\t//each pod needs Id\n\t\t\t\tdetail.setId(new ObjectId());\n\t\t\t\tdetail.setTax(tax);\n\t\t\t\tdetail.setProduct(prod);\n\n\t\t\t\ttax = null;\n\t\t\t\ttaxOid = null;\n\t\t\t\tprod = null;\n\t\t\t\tprodOid = null;\n\n\t\t\t}\n\n\n\t\t\testimate.setisInvoice(true);\n\t\t\tif(customerChange == true)\t\n\t\t\t\testimate.setCustomer(customer);\n\t\t\testimate.setInvoiceNumber(invoice.getInvoiceNumber());\n\t\t\testimate.setInvoiceDate(invoice.getInvoiceDate());\n\t\t\testimate.setInvoiceDueinterval(invoice.getInvoiceDueinterval());\n\t\t\testimate.setInvoiceDuedate(invoice.getInvoiceDuedate());\n\t\t\testimate.setInvoiceSubtotal(invoice.getInvoiceSubtotal());\n\t\t\testimate.setInvoiceTaxtotal(invoice.getInvoiceTaxtotal());\n\t\t\testimate.setInvoiceGrandtotal(invoice.getInvoiceGrandtotal());\n\t\t\testimate.setisInvoicedeleted(false);\n\t\t\testimate.setInvoiceDetails(invoiceDetails);\n\t\t\testimate.setInvoiceSerialId(invoice.getInvoiceSerialId());\n\t\t\testimate.setInvoiceNotes(invoice.getInvoiceNotes());\n\n\n\t\t\tjava.math.BigDecimal invoiceAdvance = estimate.getEstimateAdvancetotal();\n\n\t\t\testimate.setInvoiceAdvancetotal(invoiceAdvance);\n\n\t\t\testimate.setInvoiceBalance(invoice.getInvoiceGrandtotal().subtract(invoiceAdvance));\n\n\n\t\t\tkey = ds.merge(estimate);\n\t\t\tif(key == null)\n\t\t\t\tthrow new EntityException(515, \"could not update\", null, null);\n\n\t\t}\n\t\tcatch(EntityException e)\n\t\t{\n\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\n\t\t\tthrow new EntityException(500, null , e.getMessage(), null);\n\t\t}\n\t\treturn estimate;\n\n\t}",
"public frmAddIncidencias() {\n initComponents();\n }",
"private void generateInvoice(String clientID, String selectedMovieTheater, String selectedMovieOriginalName, String selectedScreeningId, int seatListSize) {\n\n AdministratorSQLiteOpenHelper administratorSQLiteOpenHelper = new AdministratorSQLiteOpenHelper(this, \"CineTEC\", null, 1);\n SQLiteDatabase sqLiteDatabase = administratorSQLiteOpenHelper.getWritableDatabase();\n\n PdfDocument pdfDocument = new PdfDocument();\n\n PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(1200, 2010, 1).create();\n PdfDocument.Page page = pdfDocument.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint titlePaint = new Paint();\n\n Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.logo);\n Bitmap bitmapLogo = Bitmap.createScaledBitmap(bitmap, 580, 300, false);\n\n canvas.drawBitmap(bitmapLogo, -100, 120, titlePaint);\n\n titlePaint.setTextAlign(Paint.Align.RIGHT);\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n titlePaint.setTextSize(70);\n canvas.drawText(\"CineTEC\", 1150, 150, titlePaint);\n\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n titlePaint.setTextSize(35);\n canvas.drawText(\"Barrio Escalante, Avenida 7, San José, Costa Rica\", 1150, 250, titlePaint);\n canvas.drawText(\"(+506) 2555 5555\", 1150, 300, titlePaint);\n canvas.drawText(\"[email protected]\", 1150, 350, titlePaint);\n canvas.drawText(\"www.cinetec.cr\", 1150, 450, titlePaint);\n\n canvas.drawLine(50, 500, 1150, 500, titlePaint);\n\n Paint paint = new Paint();\n\n // Getting client by id\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM CLIENT WHERE ID=\" + clientID, null);\n\n String firstName = \"\";\n String lastName = \"\";\n String secLastName = \"\";\n String phoneNumber = \"\";\n\n while(cursor.moveToNext()) {\n\n firstName = cursor.getString(1);\n lastName = cursor.getString(2);\n secLastName = cursor.getString(3);\n phoneNumber = cursor.getString(6);\n\n }\n\n paint.setTextAlign(Paint.Align.LEFT);\n paint.setTextSize(35);\n canvas.drawText(\"Invoice issued for:\", 50, 550, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n paint.setTextSize(50);\n canvas.drawText(firstName + \" \" + lastName + \" \" + secLastName, 50, 600, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n paint.setTextSize(35);\n canvas.drawText(\"(+506) \" + phoneNumber, 50, 700, paint);\n\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n DateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Payment Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 700, paint);\n canvas.drawText(\"Invoice Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 750, paint);\n\n paint.setStyle(Paint.Style.FILL);\n paint.setTextAlign(Paint.Align.LEFT);\n canvas.drawText(\"Movie\", 50, 850, paint);\n canvas.drawText(\"Screening\", 300, 850, paint);\n canvas.drawText(\"Theater\", 500, 850, paint);\n canvas.drawText(\"Price\", 700, 850, paint);\n canvas.drawText(\"Quantity\", 850, 850, paint);\n canvas.drawText(\"Total\", 1050, 850, paint);\n\n canvas.drawLine(50, 870, 1150, 870, paint);\n\n // Getting seats by screening id\n cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM SCREENING WHERE ID=\" + selectedScreeningId, null);\n\n String hour = \"\";\n\n while(cursor.moveToNext()) {\n\n hour = cursor.getString(3);\n\n }\n\n String subTotal = Integer.toString(3097 * seatListSize);\n\n canvas.drawText(selectedMovieOriginalName, 50, 920, paint);\n canvas.drawText(hour + \":00\", 330, 920, paint);\n canvas.drawText(selectedMovieTheater, 500, 920, paint);\n canvas.drawText(\"₡ 3097\", 680, 920, paint);\n canvas.drawText(Integer.toString(seatListSize), 910, 920, paint);\n canvas.drawText(\"₡ \" + subTotal, 1040, 920, paint);\n\n canvas.drawLine(690, 1000, 1150, 1000, paint);\n\n String total = Integer.toString(3500 * seatListSize);\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Subtotal:\", 830, 1050, paint);\n canvas.drawText(\"₡ \" + subTotal, 1150, 1050, paint);\n\n canvas.drawText(\"IVA:\", 830, 1100, paint);\n canvas.drawText(\"13 %\", 1150, 1100, paint);\n\n canvas.drawText(\"Total:\", 830, 1150, paint);\n canvas.drawText(\"₡ \" + total, 1150, 1150, paint);\n\n pdfDocument.finishPage(page);\n\n String pathFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString();\n\n File file = new File(pathFile, \"/CineTEC_Invoice.pdf\");\n\n try {\n\n pdfDocument.writeTo(new FileOutputStream(file));\n\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n pdfDocument.close();\n\n }",
"@PostMapping(\"/add\")\n public EmptyResponse create(@Valid @RequestBody DiscountAddRequest request){\n discountAddService.createNewDiscount(request);\n\n return new EmptyResponse();\n }",
"public com.alain.puntocoma.model.Catalogo create(long catalogoId);",
"public OrderItemsCopyForm(UUID parentId, PurchaseOrderItemListPanel orderItemsPanel, List<DummyInvoice> dummyInvoices) {\n super(parentId);\n if ( orderItemsPanel==null )\n throw new IllegalArgumentException(\"cant be null: 'orderItemsPanel'\");\n this.orderItemsPanel = orderItemsPanel;\n this.dummyInvoices = dummyInvoices;\n initComponents();\n initData();\n }",
"public InvoicePayment(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n setLocationRelativeTo(null);\n txtInvoiceValue.setEnabled(false);\n txtNewBalance.setEnabled(false);\n txtPayAmount.setEnabled(false);\n setCardPayment(false);\n setChequePayment(false);\n rdoPrintBill.setSelected(true);\n }",
"@Transactional\n\t@Override\n\tpublic Prenotazione create(long id,LocalDate dataInzio, LocalDate dataFine, LocalTime oraInzio, LocalTime oraFine, \n\t\t\tString descrizione, Car car, User user) {\n\t\treturn this.prenotazioneRepository.create(id, dataInzio, dataFine, oraInzio, oraFine, descrizione, car, user);\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n invoiceCreationPanel = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jTextField9 = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jTextField10 = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jTextField11 = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n jTextField12 = new javax.swing.JTextField();\n jTextField13 = new javax.swing.JTextField();\n jTextField14 = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jTextField15 = new javax.swing.JTextField();\n jTextField16 = new javax.swing.JTextField();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTextArea2 = new javax.swing.JTextArea();\n jLabel18 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));\n\n invoiceCreationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Invoice\"));\n invoiceCreationPanel.setLayout(new java.awt.GridBagLayout());\n\n jLabel9.setText(\"BillNo:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel9, gridBagConstraints);\n\n jTextField9.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField9, gridBagConstraints);\n\n jLabel10.setText(\"Our D.C No:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel10, gridBagConstraints);\n\n jTextField10.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField10, gridBagConstraints);\n\n jLabel11.setText(\"Date:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel11, gridBagConstraints);\n\n jTextField11.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField11, gridBagConstraints);\n\n jLabel12.setText(\"Date:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel12, gridBagConstraints);\n\n jTextField12.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField12, gridBagConstraints);\n\n jTextField13.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField13, gridBagConstraints);\n\n jTextField14.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField14, gridBagConstraints);\n\n jLabel13.setText(\"VAT%\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel13, gridBagConstraints);\n\n jLabel14.setText(\"Your Order No:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel14, gridBagConstraints);\n\n jLabel15.setText(\"Date:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 6;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel15, gridBagConstraints);\n\n jLabel16.setText(\"Party TIN NO:\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 6;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jLabel16, gridBagConstraints);\n\n jTextField15.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 7;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField15, gridBagConstraints);\n\n jTextField16.setText(\"jTextField1\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 7;\n gridBagConstraints.gridy = 6;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n gridBagConstraints.weightx = 0.1;\n invoiceCreationPanel.add(jTextField16, gridBagConstraints);\n\n jScrollPane3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"To M/s\"));\n\n jTextArea2.setColumns(20);\n jTextArea2.setRows(5);\n jScrollPane3.setViewportView(jTextArea2);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 8;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_END;\n invoiceCreationPanel.add(jScrollPane3, gridBagConstraints);\n\n jLabel18.setText(\"RAMANA ENGINEERING WORKS\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridwidth = 9;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;\n gridBagConstraints.weighty = 0.3;\n invoiceCreationPanel.add(jLabel18, gridBagConstraints);\n\n getContentPane().add(invoiceCreationPanel);\n\n pack();\n }",
"@FXML\n\tpublic void createClient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString names = txtClientNames.getText();\n\t\tString surnames = txtClientSurnames.getText();\n\t\tString id = txtClientId.getText();\n\t\tString adress = txtClientAdress.getText();\n\t\tString phone = txtClientPhone.getText();\n\t\tString observations = txtClientObservations.getText();\n\n\t\tif (!names.equals(empty) && !surnames.equals(empty) && !id.equals(empty) && !adress.equals(empty)\n\t\t\t\t&& !phone.equals(empty) && !observations.equals(empty)) {\n\t\t\tcreateClient(names, surnames, id, adress, phone, observations, 1);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"Purchase create(Purchase purchase) throws SQLException, DAOException;"
] | [
"0.7896295",
"0.72240186",
"0.70689535",
"0.6815683",
"0.67951643",
"0.6575817",
"0.6509331",
"0.6498958",
"0.6401175",
"0.63503635",
"0.62748206",
"0.6088581",
"0.60680413",
"0.60406",
"0.5960113",
"0.5938678",
"0.59192467",
"0.5910737",
"0.5859369",
"0.584195",
"0.57603556",
"0.57583034",
"0.57373315",
"0.57286966",
"0.57212347",
"0.5633449",
"0.5586707",
"0.5570757",
"0.554835",
"0.55129296",
"0.5510996",
"0.54929084",
"0.54673886",
"0.5423405",
"0.54231703",
"0.5422111",
"0.5409463",
"0.540253",
"0.53933537",
"0.53922176",
"0.5385857",
"0.53836405",
"0.5382046",
"0.5351876",
"0.53510535",
"0.53290635",
"0.5321723",
"0.53072363",
"0.53019345",
"0.52855086",
"0.526943",
"0.5250473",
"0.5241007",
"0.52400386",
"0.522096",
"0.52003247",
"0.5199401",
"0.51951087",
"0.51826453",
"0.5176674",
"0.5172709",
"0.5171359",
"0.51675093",
"0.51664823",
"0.5163486",
"0.5154783",
"0.51503617",
"0.51420873",
"0.51351386",
"0.51321954",
"0.512837",
"0.51270163",
"0.5122077",
"0.5101102",
"0.51005304",
"0.5099373",
"0.5096132",
"0.50906324",
"0.5077222",
"0.5076362",
"0.50727624",
"0.5071658",
"0.50646704",
"0.5058239",
"0.50571907",
"0.5053113",
"0.50519615",
"0.5048709",
"0.50414705",
"0.50345",
"0.50325847",
"0.5032094",
"0.50314724",
"0.5031018",
"0.502925",
"0.5027781",
"0.5003144",
"0.4997551",
"0.49965498",
"0.49960834"
] | 0.7180529 | 2 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
invoiceCreationPanel = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jTextField9 = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
jTextField10 = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jTextField11 = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
jTextField12 = new javax.swing.JTextField();
jTextField13 = new javax.swing.JTextField();
jTextField14 = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jTextField15 = new javax.swing.JTextField();
jTextField16 = new javax.swing.JTextField();
jScrollPane3 = new javax.swing.JScrollPane();
jTextArea2 = new javax.swing.JTextArea();
jLabel18 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));
invoiceCreationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Invoice"));
invoiceCreationPanel.setLayout(new java.awt.GridBagLayout());
jLabel9.setText("BillNo:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel9, gridBagConstraints);
jTextField9.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField9, gridBagConstraints);
jLabel10.setText("Our D.C No:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 6;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel10, gridBagConstraints);
jTextField10.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 6;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField10, gridBagConstraints);
jLabel11.setText("Date:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridheight = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel11, gridBagConstraints);
jTextField11.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField11, gridBagConstraints);
jLabel12.setText("Date:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 6;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel12, gridBagConstraints);
jTextField12.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 6;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField12, gridBagConstraints);
jTextField13.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField13, gridBagConstraints);
jTextField14.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 5;
gridBagConstraints.gridy = 6;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField14, gridBagConstraints);
jLabel13.setText("VAT%");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 6;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel13, gridBagConstraints);
jLabel14.setText("Your Order No:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel14, gridBagConstraints);
jLabel15.setText("Date:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel15, gridBagConstraints);
jLabel16.setText("Party TIN NO:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 6;
gridBagConstraints.gridy = 6;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jLabel16, gridBagConstraints);
jTextField15.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField15, gridBagConstraints);
jTextField16.setText("jTextField1");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 7;
gridBagConstraints.gridy = 6;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.weightx = 0.1;
invoiceCreationPanel.add(jTextField16, gridBagConstraints);
jScrollPane3.setBorder(javax.swing.BorderFactory.createTitledBorder("To M/s"));
jTextArea2.setColumns(20);
jTextArea2.setRows(5);
jScrollPane3.setViewportView(jTextArea2);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 8;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridheight = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_END;
invoiceCreationPanel.add(jScrollPane3, gridBagConstraints);
jLabel18.setText("RAMANA ENGINEERING WORKS");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = 9;
gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START;
gridBagConstraints.weighty = 0.3;
invoiceCreationPanel.add(jLabel18, gridBagConstraints);
getContentPane().add(invoiceCreationPanel);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public kunde() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.73208135",
"0.7291972",
"0.7291972",
"0.7291972",
"0.7287118",
"0.72494483",
"0.7214677",
"0.72086734",
"0.7197058",
"0.71912485",
"0.7185818",
"0.71596724",
"0.71489036",
"0.7094215",
"0.7082007",
"0.70579666",
"0.6988024",
"0.6978225",
"0.6955616",
"0.6955434",
"0.69458616",
"0.69446844",
"0.6937443",
"0.69325924",
"0.69280547",
"0.69266534",
"0.69264925",
"0.6912501",
"0.6911917",
"0.6894212",
"0.6893167",
"0.68922186",
"0.6892184",
"0.6890009",
"0.688444",
"0.6883334",
"0.68823224",
"0.6879555",
"0.68768615",
"0.6875667",
"0.68722147",
"0.6860655",
"0.68569547",
"0.6856804",
"0.6856167",
"0.6855431",
"0.6854634",
"0.68536645",
"0.68536645",
"0.684493",
"0.6837617",
"0.68372554",
"0.68303156",
"0.6828861",
"0.6827668",
"0.68246883",
"0.68245596",
"0.6818436",
"0.6818284",
"0.6812057",
"0.681017",
"0.68095857",
"0.68093693",
"0.6809163",
"0.68027467",
"0.67963576",
"0.6794979",
"0.6793972",
"0.6792247",
"0.67903155",
"0.67896885",
"0.67893314",
"0.6783135",
"0.6767654",
"0.67672074",
"0.67655265",
"0.6757984",
"0.6757062",
"0.6754005",
"0.67513984",
"0.674334",
"0.6740801",
"0.6737678",
"0.6737453",
"0.6734575",
"0.67281",
"0.6727845",
"0.67219335",
"0.67169774",
"0.67163646",
"0.6715783",
"0.67106164",
"0.6708574",
"0.6705358",
"0.67030907",
"0.6701408",
"0.6700769",
"0.66998196",
"0.6695165",
"0.66917574",
"0.6691252"
] | 0.0 | -1 |
compensates for a shadow underneath the ball | public Ball(Vector2 position) {
this.position = position;
build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getSoftShadowLength();",
"@Override\r\n\tpublic void renderShadow(float[] vpMatrix) {\n\t\t\r\n\t}",
"private void setupShadow()\n {\n int maximumPortNumber = Math.max(module_.getInputs().size(), module_.getOutputs().size());\n shadow_ = new BufferedImage(200 + 1 + 20, maximumPortNumber * 20 + 30 + 1 + 20, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g = (Graphics2D) shadow_.getGraphics();\n g.setBackground(Color.white);\n g.setColor(new Color(0.0f, 0.0f, 0.0f, 0.3f));\n g.fillRoundRect(3, 3, 200, maximumPortNumber * 20 + 30, 20, 20);\n g.setColor(Color.white);\n // Convolve the shadow image using a median kernel\n int kSize = 5;\n float[] data = new float[kSize * kSize];\n float value = (float) (1. / (float) (kSize * kSize));\n for (int i = 0; i < data.length; i++)\n {\n data[i] = value;\n }\n op_ = new ConvolveOp(new Kernel(kSize, kSize, data));\n }",
"public float shadows(float var1, float var2, float var3, float var4, float var5, Point intersect, int index) {\r\n float second = 0;\r\n \r\n for(int i = 0; i < lights.size(); i++) {\r\n Vec N, L, V, H;\r\n \r\n Point center = spheres.get(index).getCenter();\r\n \r\n N = (intersect.point_sub(center)).normalize();\r\n L = (lights.get(i).getPoint().point_sub(intersect)).normalize();\r\n V = (window.getEye().point_sub(intersect)).normalize();\r\n H = (L.vec_add(V)).const_div(((L.vec_add(V)).length()));\r\n \r\n float S = 1;\r\n for(int j=0; j < spheres.size(); j++) {\r\n float xd, yd, zd, xo, yo, zo, xc, yc, zc, rc, A, B, C, disc, t0, t1;\r\n \r\n xd = L.getX();\r\n yd = L.getY();\r\n zd = L.getZ();\r\n xo = intersect.getX();\r\n yo = intersect.getY();\r\n zo = intersect.getZ();\r\n xc = spheres.get(j).getCenter().getX();\r\n yc = spheres.get(j).getCenter().getY();\r\n zc = spheres.get(j).getCenter().getZ();\r\n rc = spheres.get(j).getRadius();\r\n \r\n A = xd*xd + yd*yd + zd*zd;\r\n B = 2*(xd*(xo-xc) + yd*(yo-yc) + zd*(zo-zc));\r\n C = (xo-xc)*(xo-xc) + (yo-yc)*(yo-yc) + (zo-zc)*(zo-zc) - rc*rc;\r\n\r\n disc = B*B - 4*A*C;\r\n \r\n t0 = -B + (float) Math.sqrt(disc)/(2*A);\r\n t1 = -B - (float) Math.sqrt(disc)/(2*A);\r\n \r\n if(t0 > t1) {\r\n float flip = t0;\r\n t0 = t1;\r\n t1 = flip;\r\n }\r\n \r\n if(disc >= 0 && t0 > 0 && t0 < (intersect.point_sub(lights.get(i).getPoint())).length()) {\r\n S = 0;\r\n }\r\n } // end spheres for loop\r\n float temp;\r\n if(N.dot(L) < 0) { \r\n temp = 0; \r\n } else {\r\n temp = N.dot(L);\r\n }\r\n \r\n second = second + S*(((var1*var2)*temp) + (float) ((var3*var4)*Math.pow(N.dot(H), var5)));\r\n } // end lights for loop\r\n return second;\r\n }",
"private void generateShadowVolumeStencil() {\n\t\tGL11.glColorMask(false, false, false, false);\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT\n\t\t\t\t| GL11.GL_STENCIL_BUFFER_BIT);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(passThruContext);\n\t\t}\n\n\t\t// PERFORM STENCIL TEST OF OBJECTS THAT CAST SHADOWS\n\t\tGL11.glClear(GL11.GL_STENCIL_BUFFER_BIT);\n\t\tGL11.glEnable(GL11.GL_STENCIL_TEST);\n\t\tGL11.glStencilFunc(GL11.GL_ALWAYS, 1, 0xff);\n\t\tGL11.glEnable(GL11.GL_DEPTH_TEST);\n\t\tGL11.glDepthFunc(GL11.GL_LESS);\n\t\tGL11.glDepthMask(false);\n\t\tGL11.glEnable(GL11.GL_CULL_FACE);\n\n\t\t// pass 1 frontface culling\n\t\tGL11.glCullFace(GL11.GL_BACK);\n\t\tGL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_INCR);\n\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tif (re.castShadows) {\n\t\t\t\tre.render(volumeShadowContext);\n\t\t\t}\n\t\t}\n\n\t\t// pass 2 backface culling\n\t\tGL11.glCullFace(GL11.GL_FRONT);\n\t\tGL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_DECR);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tif (re.castShadows) {\n\t\t\t\tre.render(volumeShadowContext);\n\t\t\t}\n\t\t}\n\t}",
"public void blurShadow(Graphics2D g, Shape clipShape) {\n Rectangle tmp = clipShape.getBounds();\n int width = tmp.x + tmp.width;\n int height = tmp.y + tmp.height;\n tmp.setRect(0, 0, width + getEffectWidth() * 2 + 1,\n height + getEffectWidth() * 2 + 1);\n\n // Apply the border glow effect \n BufferedImage clipImage = getClipImage(tmp);\n Graphics2D g2dImage = clipImage.createGraphics();\n try {\n /* clear the buffer */\n g2dImage.setComposite(AlphaComposite.Clear);\n g2dImage.fillRect(0, 0, clipImage.getWidth(), clipImage.getHeight());\n /* translate with offset */\n g2dImage.translate(getEffectWidth() - getOffset().getX(),\n getEffectWidth() - getOffset().getY());\n /* */\n g2dImage.setComposite(AlphaComposite.Src);\n g2dImage.setPaint(getBrushColor());\n g2dImage.translate(offset.getX(), offset.getY());\n g2dImage.fill(clipShape);\n g2dImage.translate(-offset.getX(), -offset.getY());\n } finally {\n /* draw the final image */\n g2dImage.dispose();\n }\n g.drawImage(clipImage, blurKernel, -getEffectWidth() + (int) getOffset().getX(),\n -getEffectWidth() + (int) getOffset().getY());\n }",
"private void calcShadeLevel() {\n TexturedPolygon3D poly = (TexturedPolygon3D)sourcePolygon;\n float intensity = 0;\n if (lightSource != null) {\n\n\n // average all the vertices in the polygon\n directionToLight.setTo(0,0,0);\n for (int i=0; i<poly.getNumVertices(); i++) {\n directionToLight.add(poly.getVertex(i));\n }\n directionToLight.divide(poly.getNumVertices());\n\n // make the vector from the average vertex\n // to the light\n directionToLight.subtract(lightSource);\n directionToLight.multiply(-1);\n\n // get the distance to the light for falloff\n float distance = directionToLight.length();\n\n // compute the diffuse reflect\n directionToLight.normalize();\n Vector3D normal = poly.getNormal();\n intensity = lightSource.getIntensity(distance)\n * directionToLight.getDotProduct(normal);\n intensity = Math.min(intensity, 1);\n intensity = Math.max(intensity, 0);\n }\n\n intensity+=ambientLightIntensity;\n intensity = Math.min(intensity, 1);\n intensity = Math.max(intensity, 0);\n int level =\n Math.round(intensity*ShadedTexture.MAX_LEVEL);\n ((ShadedTexture)poly.getTexture()).\n setDefaultShadeLevel(level);\n }",
"public void addShadow() {\n startShadow();\n }",
"public void setSoftnessLength(float softShadowLength);",
"public static DirectionalLightShadowFilter addShadow(DirectionalLight light)\n\t{\n\n DirectionalLightShadowFilter dlsf = new DirectionalLightShadowFilter(GVars_Soul_Model.app.getAssetManager(), SHADOWMAP_SIZE, 1);\n dlsf.setLight(light);\n dlsf.setLambda(0.55f);\n dlsf.setShadowIntensity(1.0f);\n dlsf.setEdgeFilteringMode(EdgeFilteringMode.Nearest);\n dlsf.setEnabled(true);\n\n volatileFPP.addFilter(dlsf);\n\n //GVars_Soul_Model.app.getViewPort().addProcessor(volatileFPP);\n \n return dlsf ;\n\t}",
"public final native Shadow getShadow() /*-{\n\t\tif (this.getShadow() != null) {\n\t\t\tvar shadow = @net.edzard.kinetic.Shadow::new()();\n\t\t\tif(this.getShadow().color != null)\n\t \t\t\[email protected]::setColour(Lnet/edzard/kinetic/Colour;)(@net.edzard.kinetic.Colour::new(Ljava/lang/String;)(this.getShadow().color));\n\t\t\tif(this.getShadow().blur != null) \n\t\t\t\[email protected]::setBlur(D)(this.getShadow().blur);\n\t\t\tif(this.getShadow().offset != null) \n\t\t\t\[email protected]::setOffset(Lnet/edzard/kinetic/Vector2d;)(@net.edzard.kinetic.Vector2d::new(DD)(this.getShadow().offset.x, this.getShadow().offset.y));\n\t\t\tif(this.getShadow().alpha != null) \n\t\t\t\[email protected]::setAlpha(D)(this.getShadow().alpha);\t\t\t\t\t\n\t\t\treturn shadow;\n\t\t} else return null;\n\t}-*/;",
"public void calculateSandB(int mode) {\n\t\tdouble dx = mouseClickedPoint.getX() - mouseDraggedPoint.getX();\n\t\tdx *= -1.0;\n\t\tdouble dy = mouseClickedPoint.getY() - mouseDraggedPoint.getY();\n\t\tdy *= -1.0;\n\t\tfloat ds = (float)dx/(float)400.0;\n\t\tfloat db = (float)dy/(float)600.0;\n\t\t\n\t\t//Set the saturation\n\t\tfloat s = cpModel.getSaturation();\n if(mode == 2) {\n ds *= 0.1;\n\t\t}\n\t\tcpModel.setSaturation(s);\n\t\t\n\t\t//Set the brightness\n\t\tfloat b = cpModel.getBrightness();\n\t\tif(mode == 2) {\n db *= 0.1;\n\t\t}\n\t\tb+=db;\n\t\tcpModel.setBrightness(b);\n cmModel.updateSB(ds,db);\n\t}",
"private final void rubbingFramesEffects() {\n\t\tdx *= Utils.RUBBING;\n\t\tif (FastMath.abs(dx) < Utils.tol) dx=0;\n\t\tdy *= Utils.RUBBING;\n\t\tif (FastMath.abs(dy) < Utils.tol) dy = 0;\n\t\tdtheta *= Utils.RUBBING;\n\t\tif (FastMath.abs(dtheta) < Utils.tol) dtheta = 0;\n\t}",
"private DropShadow getDropShadow() {\n DropShadow shadow = new DropShadow();\n shadow.setOffsetX(10);\n shadow.setOffsetY(10);\n shadow.setHeight(10);\n shadow.setHeight(10);\n shadow.setBlurType(BlurType.THREE_PASS_BOX);\n shadow.setColor(Color.GRAY);\n return shadow;\n }",
"public void act() \n {\n age += 1;\n \n RandomTerrain world = (RandomTerrain)getWorld();\n \n int centreX = getX();\n \n int leftX = centreX - WHEEL_BASE;\n int rightX = centreX + WHEEL_BASE;\n \n int leftY = world.getTerrainHeight(leftX) - WHEEL_RADIUS;\n int rightY = world.getTerrainHeight(rightX) - WHEEL_RADIUS;\n \n double angle = Math.atan2(rightY - leftY, WHEEL_BASE * 2);\n \n /*\n {\n int midY = (leftY + rightY) / 2;\n leftY = midY + (int)(-WHEEL_BASE * Math.sin(angle));\n rightY = midY + (int)(WHEEL_BASE * Math.sin(angle));\n }\n */\n \n exactX += velocity * Math.cos(Math.max(-Math.PI/4, Math.min(Math.PI/4, angle)));\n \n setLocation((int)exactX, (leftY + rightY) / 2);\n \n GreenfootImage img = new GreenfootImage(WHEEL_BASE * 3, WHEEL_BASE * 3);\n img.setColor(java.awt.Color.RED);\n \n int leftWheelX = (img.getWidth()/2) - WHEEL_BASE;\n int rightWheelX = (img.getWidth()/2) + WHEEL_BASE;\n int leftWheelY = leftY - getY() + (img.getHeight()/2);\n int rightWheelY = rightY - getY() + (img.getHeight()/2);\n \n drawWheel(img, leftWheelX, leftWheelY);\n drawWheel(img, rightWheelX, rightWheelY);\n \n int perpX = (int)(WHEEL_BASE * Math.cos(angle - Math.PI/2));\n int perpY = (int)(WHEEL_BASE * Math.sin(angle - Math.PI/2));\n \n int[] xs = new int[] {leftWheelX, leftWheelX + perpX, rightWheelX + perpX, rightWheelX};\n int[] ys = new int[] {leftWheelY, leftWheelY + perpY, rightWheelY + perpY, rightWheelY};\n \n img.fillPolygon(xs, ys, 4);\n \n setImage(img);\n \n if ((exactX < 0 && velocity < 0 )|| (exactX >= getWorld().getWidth() && velocity > 0))\n {\n getWorld().removeObject(this);\n }\n }",
"private boolean growSapling(World world, int x, int y, int z, Random rand)\r\n {\r\n \t// Total value of this crop\r\n \tfloat value = 0;\r\n \t\r\n \t// Not bright enough for the sapling to grow.\r\n \tif (world.getBlockLightValue(x, y + 1, z) < SaplingMinimumLight) \r\n \t\treturn true;\r\n \t\r\n \t// Radius to check nearby ground blocks.\r\n \tint r = 2;\r\n \tfor (int i = -r + x; i <= r + x; i++)\r\n \tfor (int k = -r + z; k <= r + z; k++)\r\n \tfor (int j = -2 + y; j <= 0 + y; j++)\r\n \t{\r\n \t\t// Ignore corners, sapling block and mounds next to sapling. Maintain surface gradient!\r\n \t\tif (Math.abs(i - x) <= 1 && j == y && Math.abs(k - z) <= 1) continue;\r\n \t\tif (i == x && j == (y - 1) && k == z) continue;\r\n \t\tif (Math.abs(i - x) == r && Math.abs(k - z) == r) continue;\r\n \t\t\r\n \t\tBlock block = world.getBlock(i, j, k);\r\n \t\tMaterial above = world.getBlock(i, j + 1, k).getMaterial();\r\n \t\tif (SaplingSoilBlocks.contains(block) && (above == Material.air || above == Material.vine || above == Material.plants || above == Material.snow || above == Material.leaves)) \r\n \t\t{\r\n \t\t\t// Light level above soil\r\n \t\t\tint light = world.getBlockLightValue(i, j + 1, k);\r\n\r\n \t\t\t// Light is \"natural\" if consistent over 4 y levels\r\n \t\t\tboolean natural = true;\r\n \t\t\tfor (int l = 2; l <= 4; l++)\r\n \t\t\t\tif (world.getBlockLightValue(i, j + 1, k) != light) \r\n \t\t\t\t\tnatural = false;\r\n \t\t\t\r\n \t\t\tvalue += (float)light * (natural ? 1.0f : 0.75f) * (above == Material.plants || above == Material.snow ? 0.75f : 1.0f) * (above == Material.vine || above == Material.leaves ? 0.5f : 1.0f);\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (rand.nextDouble() < (GrowthMultiplierSapling * 0.25d / Math.pow(2.0d, (300.0d - value) / 75.0d)))\r\n \t\treturn !(new WorldGenKawaiiTree(this)).generate(world, rand, x, y, z);\r\n \t\r\n \treturn true;\r\n }",
"public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }",
"private void renderShadowMap() {\n GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboId[0]);\n GLES20.glViewport(0, 0, mShadowMapWidth,\n mShadowMapHeight);\n // Clear color and buffers\n GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);\n // Start using the shader\n GLES20.glUseProgram(mDepthMapProgram);\n float[] tempResultMatrix = new float[16];\n // Calculate matrices for standing objects\n // View matrix * Model matrix value is stored\n Matrix.multiplyMM(mLightMvpMatrix_staticShapes, 0, mLightViewMatrix, 0, mModelMatrix, 0);\n // Model * view * projection matrix stored and copied for use at rendering from camera point of view\n Matrix.multiplyMM(tempResultMatrix, 0, mLightProjectionMatrix, 0, mLightMvpMatrix_staticShapes, 0);\n System.arraycopy(tempResultMatrix, 0, mLightMvpMatrix_staticShapes, 0, 16);\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandleShadow, 1, false, mLightMvpMatrix_staticShapes, 0);\n // Render all stationary shapes on scene\n\n mDrawPlane.setDraw(mPositionHandleShadow, 0, 0, 0, true);\n mDrawPlane.draw();\n\n // Calculate matrices for moving objects\n // Rotate the model matrix with current rotation matrix\n Matrix.multiplyMM(tempResultMatrix, 0, mModelMatrix, 0, mCubeRotation, 0);\n // View matrix * Model matrix value is stored\n Matrix.multiplyMM(mLightMvpMatrix_dynamicShapes, 0, mLightViewMatrix, 0, tempResultMatrix, 0);\n // Model * view * projection matrix stored and copied for use at rendering from camera point of view\n Matrix.multiplyMM(tempResultMatrix, 0, mLightProjectionMatrix, 0, mLightMvpMatrix_dynamicShapes, 0);\n System.arraycopy(tempResultMatrix, 0, mLightMvpMatrix_dynamicShapes, 0, 16);\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandleShadow, 1, false, mLightMvpMatrix_dynamicShapes, 0);\n // Render all moving shapes on scene\n mDrawObj.setDraw(mPositionHandleShadow,0,0,0,true);\n }",
"@Override\n public int getShadowSize() {\n\treturn Geometry.getW(shadow.getElement());\n }",
"Light getEWlight();",
"public double calculateBmiDragon(){\n\t\treturn weight/(height*height);\n\t}",
"public static double wallSmoothing(Rectangle2D.Double field, double bfWidth,\n double bfHeight, Point2D.Double startLocation, double startAngleRadians,\n int orientation, double wallStick) {\n\n/*\n double angle = startAngle;\n _lastWallSmoothAway = false;\n while (!field.contains(x + Math.sin(Math.toRadians(angle))*WALL_STICK,\n y+Math.cos(Math.toRadians(angle))*WALL_STICK)) {\n angle += orientation*smoothNormal*7.0;\n if (smoothNormal == -1) { _lastWallSmoothAway = true; }\n }\n\n return angle;\n*/\n // Trying to do almost exactly the equivalent of the above in more\n // code but less CPU time. The above needs a low increment to work\n // perfectly smoothly, which results in very slow execution.\n //\n // NOTE: The two algorithms can give slightly different results,\n // but that is mainly because the iterative one never tests a\n // very specific angle in a corner that would turn up \"in bounds\";\n // if it increased the angle var by (1/INFINITY), they'd be the\n // same (as far as I can tell.)\n\n double angle = startAngleRadians;\n double wallDistanceX = Math.min(startLocation.x - 18,\n bfWidth - startLocation.x - 18);\n double wallDistanceY = Math.min(startLocation.y - 18,\n bfHeight - startLocation.y - 18);\n\n if (wallDistanceX > wallStick && wallDistanceY > wallStick) {\n return startAngleRadians;\n }\n\n double testX = startLocation.x + (Math.sin(angle) * wallStick);\n double testY = startLocation.y + (Math.cos(angle) * wallStick);\n double testDistanceX = Math.min(testX - 18, bfWidth - testX - 18);\n double testDistanceY = Math.min(testY - 18, bfHeight - testY - 18);\n\n double adjacent = 0;\n int g = 0;\n\n while (!field.contains(testX, testY) && g++ < 25) {\n if (angle < 0) {\n angle += (2 * Math.PI);\n }\n if (testDistanceY < 0 && testDistanceY < testDistanceX) {\n // wall smooth North or South wall\n angle = ((int) ((angle + (Math.PI / 2)) / Math.PI)) * Math.PI;\n adjacent = Math.abs(wallDistanceY);\n } else if (testDistanceX < 0 && testDistanceX <= testDistanceY) {\n // wall smooth East or West wall\n angle = (((int) (angle / Math.PI)) * Math.PI) + (Math.PI / 2);\n adjacent = Math.abs(wallDistanceX);\n }\n\n angle += orientation *\n (Math.abs(Math.acos(adjacent / wallStick)) + 0.0005);\n\n testX = startLocation.x + (Math.sin(angle) * wallStick);\n testY = startLocation.y + (Math.cos(angle) * wallStick);\n testDistanceX = Math.min(testX - 18, bfWidth - testX - 18);\n testDistanceY = Math.min(testY - 18, bfHeight - testY - 18);\n }\n\n return angle;\n }",
"private void wentOffWall() {\n //random location\n b.numX = r.nextInt(2400) + 100;\n b.numY = r.nextInt(1400) + 100;\n //random speed\n b.xSpeed = this.newSpeed();\n b.ySpeed = this.newSpeed();\n }",
"private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int w, int h)\r\n/* 193: */ {\r\n/* 194:228 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 195: */ \r\n/* 196: */ \r\n/* 197:231 */ g2.drawOval(x, y, w, h);\r\n/* 198: */ }",
"void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }",
"@Override\n public void update(int n, int n2) {\n void mouseY;\n void mouseX;\n super.update((int)mouseX, (int)mouseY);\n float[] hsb = Color.RGBtoHSB(this.setting.getValue().getRed(), this.setting.getValue().getGreen(), this.setting.getValue().getBlue(), null);\n double difference = Math.min(95, Math.max(0, (int)(mouseX - this.getX())));\n this.hueWidth = Float.intBitsToFloat(Float.floatToIntBits(0.012939732f) ^ 0x7EEB012B) * (hsb[0] * Float.intBitsToFloat(Float.floatToIntBits(0.22324012f) ^ 0x7DD0990F) / Float.intBitsToFloat(Float.floatToIntBits(0.07544195f) ^ 0x7E2E814F));\n this.satWidth = Float.intBitsToFloat(Float.floatToIntBits(0.009555363f) ^ 0x7EA18E19) * (hsb[1] * Float.intBitsToFloat(Float.floatToIntBits(0.021556562f) ^ 0x7F049763) / Float.intBitsToFloat(Float.floatToIntBits(0.026331188f) ^ 0x7F63B481));\n this.briWidth = Float.intBitsToFloat(Float.floatToIntBits(0.02392782f) ^ 0x7E790447) * (hsb[2] * Float.intBitsToFloat(Float.floatToIntBits(0.09763377f) ^ 0x7E73F437) / Float.intBitsToFloat(Float.floatToIntBits(0.019418718f) ^ 0x7F2B1401));\n this.alphaWidth = Float.intBitsToFloat(Float.floatToIntBits(0.010174015f) ^ 0x7E9BB0E9) * ((float)this.setting.getValue().getAlpha() / Float.intBitsToFloat(Float.floatToIntBits(0.0089911735f) ^ 0x7F6C4FB7));\n this.changeColor(difference, new Color(Color.HSBtoRGB((float)(difference / Double.longBitsToDouble(Double.doubleToLongBits(0.15404371830294214) ^ 0x7F9477B45E21F7BFL) * Double.longBitsToDouble(Double.doubleToLongBits(0.050973544293479105) ^ 0x7FDC99345367453FL) / Double.longBitsToDouble(Double.doubleToLongBits(0.03014217321508198) ^ 0x7FE85D9700C1AF0AL)), hsb[1], hsb[2])), new Color(Color.HSBtoRGB(Float.intBitsToFloat(Float.floatToIntBits(1.8279414E38f) ^ 0x7F0984DF), hsb[1], hsb[2])), this.hueDragging);\n this.changeColor(difference, new Color(Color.HSBtoRGB(hsb[0], (float)(difference / Double.longBitsToDouble(Double.doubleToLongBits(0.1223112785883676) ^ 0x7FE88FCABD780F54L) * Double.longBitsToDouble(Double.doubleToLongBits(0.026943886254004668) ^ 0x7FED172D9927021DL) / Double.longBitsToDouble(Double.doubleToLongBits(0.05427001644334754) ^ 0x7FDD4947938E1C55L)), hsb[2])), new Color(Color.HSBtoRGB(hsb[0], Float.intBitsToFloat(Float.floatToIntBits(1.1082437E38f) ^ 0x7EA6BFFF), hsb[2])), this.saturationDragging);\n this.changeColor(difference, new Color(Color.HSBtoRGB(hsb[0], hsb[1], (float)(difference / Double.longBitsToDouble(Double.doubleToLongBits(0.12328622126775308) ^ 0x7FE84FAF90647595L) * Double.longBitsToDouble(Double.doubleToLongBits(0.09854681448488288) ^ 0x7FCFBA5D315669BFL) / Double.longBitsToDouble(Double.doubleToLongBits(0.029067112480345214) ^ 0x7FEB43C4E5F80CC0L)))), new Color(Color.HSBtoRGB(hsb[0], hsb[1], Float.intBitsToFloat(Float.floatToIntBits(3.3573391E38f) ^ 0x7F7C9400))), this.brightnessDragging);\n this.changeAlpha(difference, (float)(difference / Double.longBitsToDouble(Double.doubleToLongBits(0.014823398455503097) ^ 0x7FD99BBADCA7DC11L) * Double.longBitsToDouble(Double.doubleToLongBits(0.013271171619186513) ^ 0x7FE4CDEA80AC0D24L) / Double.longBitsToDouble(Double.doubleToLongBits(0.08218747250746601) ^ 0x7FDAEA3CFA8F7AADL)), this.alphaDragging);\n }",
"private Color calcGlobalEffects(GeoPoint geopoint, Ray ray, int level, double k) {\r\n\t\tif (level == 1 || k < MIN_CALC_COLOR_K) {\r\n\t\t\treturn Color.BLACK;\r\n\t\t}\r\n\t\tColor color = Color.BLACK;\r\n\t\tVector n = geopoint.geometry.get_Normal(geopoint.point);\r\n\t\tMaterial material = geopoint.geometry.getMaterial();\r\n\t\t// calculate reflectedd äùú÷ôåú\r\n\t\tdouble kr = material.kR;\r\n\t\tdouble kkr = k * kr;\r\n\t\tif (kkr > MIN_CALC_COLOR_K) {\r\n\t\t\ttry {\r\n\t\t\t\tif(AdaptiveDiffusedAndGlossyFlag)//if adaptive Diffused And Glossy is on\r\n\t {\r\n\t // calc the reflected vector\r\n\t double nv1 = ray.getDir().dotProduct(n);\r\n\t Vector v1 = ray.getDir();\r\n\t Vector ref = v1.add(n.scale(-2*nv1));\r\n\t //calc the color\r\n\t color = color.add(AdaptiveDiffusedAndGlossy(n,geopoint.point,ref,-1, material.get_DiffusedAndGlossy(),level,kkr,kr).scale(kr));\r\n\t }\r\n\t else\r\n\t {\r\n\t List<Ray> reflectedRays = constructReflectedRays(n, geopoint.point,ray, material.get_DiffusedAndGlossy());\r\n\t primitives.Color tempColor1 = primitives.Color.BLACK;\r\n\t //calculate for each ray\r\n\t for(Ray reflectedRay: reflectedRays)\r\n\t {\r\n\t GeoPoint gp = findClosestIntersection(reflectedRay);\r\n\t tempColor1 = tempColor1.add(gp == null ? primitives.Color.BLACK : calcColor(gp, reflectedRay, level - 1, kkr).scale(kr));\r\n\t }\r\n\t color = color.add(tempColor1.reduce(reflectedRays.size()));\r\n\t }\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\treturn geopoint.geometry.getEmmission();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t// calculate refracted ù÷éôåú\r\n\t\tdouble kt = material.kT;\r\n\t\tdouble kkt = k * kt;\r\n\t\tif (kkt > MIN_CALC_COLOR_K) {\r\n\t\t\ttry {\r\n\t\t\t\tif(AdaptiveDiffusedAndGlossyFlag)//if adaptive Diffused And Glossy is on\r\n\t\t\t\t{\r\n\t\t\t\t\tcolor = color.add(AdaptiveDiffusedAndGlossy(n,geopoint.point,ray.getDir(),1, material.get_DiffusedAndGlossy(),level,kkt,kt).scale(kt));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tList<Ray> refractedRays = constructRefractedRays(n, geopoint.point,ray, material.get_DiffusedAndGlossy());\r\n\t\t\t\t\tprimitives.Color tempColor2 = primitives.Color.BLACK;\r\n\t\t\t\t\t//calculate for each ray\r\n\t\t\t\t\tfor(Ray refractedRay: refractedRays)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tGeoPoint gp = findClosestIntersection(refractedRay);\r\n\t\t\t\t\t\ttempColor2 = tempColor2.add(gp == null? primitives.Color.BLACK : calcColor(gp, refractedRay, level -1, kkt).scale(kt));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcolor = color.add(tempColor2.reduce(refractedRays.size()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{return geopoint.geometry.getEmmission();}\r\n\t\r\n\t\t}\r\n\t\treturn color;\r\n\t}",
"private Color calcColor(GeoPoint geoPoint, Ray inRay, int level, double k) {\n if (level == 0 || k < MIN_CALC_COLOR_K) {\n return Color.BLACK;\n }\n Color result = geoPoint.getGeometry().getEmmission();\n Point3D pointGeo = geoPoint.getPoint();\n\n /**v=is the vector from camera strait ahead.\n * n=the vector normal to the point on that shape/object*/\n Vector v = pointGeo.subtract(scene.getCamera().getSpo()).normalize();\n Vector n = geoPoint.getGeometry().getNormal(pointGeo);\n\n Material material = geoPoint.getGeometry().getMaterial();\n int nShininess = material.getnShininess();\n double kd = material.getkD();\n double ks = material.getkS();\n double kr = geoPoint.getGeometry().getMaterial().getkR();//each time gets the amount of mirror in the object.\n double kt = geoPoint.getGeometry().getMaterial().getkT();//each time gets the amount of transparent in the object.\n double kkr = k * kr;//if kr/kt was small so it will smaller the kkr/kkt before we send to the function again.\n double kkt = k * kt;\n\n List<LightSource> lightSources = scene.getLightSources();\n if (lightSources != null) {\n for (LightSource light : lightSources) {//for each light will check\n Vector l = light.getL(pointGeo);//L=the vector from light to point\n double nl = alignZero(n.dotProduct(l));\n double nv = alignZero(n.dotProduct(v));\n if (nl * nv > 0) {\n /**how much shakof are all the objects between the light in the point. it can reduce the impact ot the light\n * if there is no objects it will return 1. ktr*1=the same. no change.\n * even if one is (atum) so it will block the light.\n * and then will add the color with a (mekadem)that can make smaller the\n * impact of the light because there are objects that are not so shakoof and disturb the color*/\n double t = transparency(light, l, n, geoPoint);\n if (t * k > MIN_CALC_COLOR_K) {\n Color ip = light.getIntensity(pointGeo).scale(t);\n result = result.add(calcDiffusive(kd, nl, ip), calcSpecular(ks, l, n, nl, v, nShininess, ip));\n }\n }\n }\n }\n\n if (level == 1) {//Stop condition .we went a enough far away from the point\n return Color.BLACK;\n }\n\n /**A nother Stop condition.\n * if we in ecounterend a object with very little mirror so it smallered the kkr.\n * will check if the (mekadem), is still higher then the min number*/\n if (kkr > MIN_CALC_COLOR_K) {\n Ray reflectedRay = constructReflectedRay(pointGeo, inRay, n);\n GeoPoint reflectedPoint = findClosestIntersection(reflectedRay);\n if (reflectedPoint != null) {\n result = result.add(calcColor(reflectedPoint, reflectedRay, level - 1, kkr).scale(kr));\n }\n }\n if (kkt > MIN_CALC_COLOR_K) {//if the shkefut of the number is still high\n Ray refractedRay = constructRefractedRay(pointGeo, inRay, n);//so will send a ray from the knew object.\n GeoPoint refractedPoint = findClosestIntersection(refractedRay);//ho is the point you got\n if (refractedPoint != null) {//if you got a point lets send that point again to see if he also is impacted.\n result = result.add(calcColor(refractedPoint, refractedRay, level - 1, kkt).scale(kt));\n }\n }\n return result;//returns the color that will be added to the point.\n }",
"private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }",
"public void buildingEffect(LoopManiaWorld world) {\n\n List<BasicEnemy> enemies = world.getEnemies();\n\n for (BasicEnemy e : enemies) {\n // if the enemy is in radius and is in battle\n if (Math.pow((this.getX() - e.getX()), 2) + Math.pow((this.getY() - e.getY()), 2) < Math.pow(TOWER_RADIUS,\n 2) && e.isInBattle()) {\n int beforeHealth = e.getHealth();\n e.setHealth(beforeHealth - DAMAGE);\n }\n }\n }",
"public float getLightBrightness(Point3d position, boolean calculateBlock){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\tfloat sunLight = world.getSunBrightness(0)*(world.getLightFor(EnumSkyBlock.SKY, pos) - world.getSkylightSubtracted())/15F;\r\n\t\tfloat blockLight = calculateBlock ? world.getLightFromNeighborsFor(EnumSkyBlock.BLOCK, pos)/15F : 0.0F;\r\n\t\treturn Math.max(sunLight, blockLight);\r\n\t}",
"private void m23260f() {\n Shimmer aVar;\n Shader shader;\n Rect bounds = getBounds();\n int width = bounds.width();\n int height = bounds.height();\n if (width != 0 && height != 0 && (aVar = this.f19138f) != null) {\n int a = aVar.mo28981a(width);\n int b = this.f19138f.mo28983b(height);\n boolean z = true;\n if (this.f19138f.f19117g != 1) {\n if (!(this.f19138f.f19114d == 1 || this.f19138f.f19114d == 3)) {\n z = false;\n }\n if (z) {\n a = 0;\n }\n if (!z) {\n b = 0;\n }\n shader = new LinearGradient(0.0f, 0.0f, (float) a, (float) b, this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n } else {\n shader = new RadialGradient(((float) a) / 2.0f, ((float) b) / 2.0f, (float) (((double) Math.max(a, b)) / Math.sqrt(2.0d)), this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n }\n this.f19134b.setShader(shader);\n }\n }",
"private void grainEffect(int barra) {\n float val = barra / 200f;\n Log.i(\"kike\", \"valor efecte: \" + val + \" barra: \" + barra);\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_GRAIN);\n effect.setParameter(\"strength\", val);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }",
"public static void shovelSnow() {\n currentBackground.getSnow().shovelSnow(currentShovel.getShovelPower(),\n currentBackground.getSnowFall());\n }",
"public float getRainStrength(Point3d position){\r\n\t\treturn world.isRainingAt(new BlockPos(position.x, position.y + 1, position.z)) ? world.getRainStrength(1.0F) + world.getThunderStrength(1.0F) : 0.0F;\r\n\t}",
"private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 89: */ {\r\n/* 90:133 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 91: */ \r\n/* 92: */ \r\n/* 93:136 */ g2.drawRect(x, y, width, height);\r\n/* 94: */ }",
"@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }",
"public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }",
"public void borders() {\n if (loc.y > height) {\n vel.y *= -bounce;\n loc.y = height;\n }\n if ((loc.x > width) || (loc.x < 0)) {\n vel.x *= -bounce;\n } \n //if (loc.x < 0) loc.x = width;\n //if (loc.x > width) loc.x = 0;\n }",
"private void decorateMountainsFloat(int xStart, int xLength, int floor, boolean enemyAddedBefore, ArrayList finalListElements, ArrayList states)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false && enemyAddedBefore==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t if ((xLength - e) - (xStart + s) > 0){\r\n\t for(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }",
"private void drawHeart (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n\n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\t\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"private boolean unshaded(Vector l, Vector n, GeoPoint gp, LightSource lightSource) \r\n\t{\r\n\t\tVector lightDirection = l.scale(-1); // from point to light source\r\n//\t\tVector delta = n.scale(n.dotProduct(lightDirection) > 0 ? DELTA : -DELTA);// where we need to move the point\r\n//\t\tPoint3D point = gp.point.add(delta);// moving the point\r\n//\t\tRay lightRay = new Ray(point, lightDirection);// the new ray after the moving\r\n\t\tRay lightRay = new Ray(gp.point, lightDirection, n);\r\n\t\tList<GeoPoint> intersections = scene.geometries.findGeoIntersections(lightRay);\r\n\t\tif (intersections == null)\r\n\t\t\treturn true;// if there are not intersection points - unshadow\r\n\t\tdouble lightDistance = lightSource.getDistance(gp.point);\r\n\t\tfor (GeoPoint g : intersections) {\r\n\t\t\tif (Util.alignZero(g.point.distance(lightRay.getP0()) - lightDistance) <= 0\r\n\t\t\t\t\t&& g.geometry.getMaterial().kT == 0)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}",
"private void drawThumbShadow(float screenCoord, Canvas canvas) {\n mThumbShadowMatrix.setTranslate(screenCoord + mThumbShadowXOffset, mTextOffset + mThumbHalfHeight + mThumbShadowYOffset);\n mTranslatedThumbShadowPath.set(mThumbShadowPath);\n mTranslatedThumbShadowPath.transform(mThumbShadowMatrix);\n canvas.drawPath(mTranslatedThumbShadowPath, shadowPaint);\n }",
"@Override\n\tpublic void onUpdate()\n\t{\n\t\tthis.lastTickPosX = this.posX;\n\t\tthis.lastTickPosY = this.posY;\n\t\tthis.lastTickPosZ = this.posZ;\n\t\tsuper.onUpdate();\n\n\t\tif (this.throwableShake > 0)\n\t\t{\n\t\t\t--this.throwableShake;\n\t\t}\n\n\t\tif (this.inGround)\n\t\t{\n\t\t\tif (this.worldObj.getBlockState(this.getPosition()).getBlock() == this.inTile)\n\t\t\t{\n\t\t\t\t++this.ticksInGround;\n\n\t\t\t\tif (this.ticksInGround == 1200)\n\t\t\t\t{\n\t\t\t\t\tthis.setDead();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.inGround = false;\n\t\t\tthis.motionX *= this.rand.nextFloat() * 0.2F;\n\t\t\tthis.motionY *= this.rand.nextFloat() * 0.2F;\n\t\t\tthis.motionZ *= this.rand.nextFloat() * 0.2F;\n\t\t\tthis.ticksInGround = 0;\n\t\t\tthis.ticksInAir = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t++this.ticksInAir;\n\t\t}\n\n\t\tVec3 vec3 = new Vec3(this.posX, this.posY, this.posZ);\n\t\tVec3 vec31 = new Vec3(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\t\tMovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31);\n\t\tvec3 = new Vec3(this.posX, this.posY, this.posZ);\n\t\tvec31 = new Vec3(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n\t\tif (movingobjectposition != null)\n\t\t{\n\t\t\tvec31 = new Vec3(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);\n\t\t}\n\n\t\tif (!this.worldObj.isRemote)\n\t\t{\n\t\t\tEntity entity = null;\n\t\t\tList list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this,\n\t\t\t\t\tthis.getEntityBoundingBox().addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));\n\t\t\tdouble d0 = 0.0D;\n\t\t\tEntityLivingBase entitylivingbase = this.getThrower();\n\n\t\t\tfor (Object obj : list)\n\t\t\t{\n\t\t\t\tEntity entity1 = (Entity) obj;\n\n\t\t\t\tif (entity1.canBeCollidedWith() && ((entity1 != entitylivingbase) || (this.ticksInAir >= 5)))\n\t\t\t\t{\n\t\t\t\t\tfloat f = 0.3F;\n\t\t\t\t\tAxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().expand(f, f, f);\n\t\t\t\t\tMovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31);\n\n\t\t\t\t\tif (movingobjectposition1 != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble d1 = vec3.distanceTo(movingobjectposition1.hitVec);\n\n\t\t\t\t\t\tif ((d1 < d0) || (d0 == 0.0D))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tentity = entity1;\n\t\t\t\t\t\t\td0 = d1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (entity != null)\n\t\t\t{\n\t\t\t\tmovingobjectposition = new MovingObjectPosition(entity);\n\t\t\t}\n\t\t}\n\n\t\tif (movingobjectposition != null)\n\t\t{\n\t\t\tif ((movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)\n\t\t\t\t\t&& (this.worldObj.getBlockState(movingobjectposition.getBlockPos()).getBlock() == Blocks.portal))\n\t\t\t{\n\t\t\t\tthis.inPortal = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.onImpact(movingobjectposition);\n\t\t\t}\n\t\t}\n\n\t\tthis.posX += this.motionX;\n\t\tthis.posY += this.motionY;\n\t\tthis.posZ += this.motionZ;\n\t\tfloat f1 = MathHelper.sqrt_double((this.motionX * this.motionX) + (this.motionZ * this.motionZ));\n\t\tthis.rotationYaw = (float) ((Math.atan2(this.motionX, this.motionZ) * 180.0D) / Math.PI);\n\n\t\tfor (this.rotationPitch = (float) ((Math.atan2(this.motionY, f1) * 180.0D) / Math.PI); (this.rotationPitch\n\t\t\t\t- this.prevRotationPitch) < -180.0F; this.prevRotationPitch -= 360.0F)\n\t\t{\n\t\t}\n\n\t\twhile ((this.rotationPitch - this.prevRotationPitch) >= 180.0F)\n\t\t{\n\t\t\tthis.prevRotationPitch += 360.0F;\n\t\t}\n\n\t\twhile ((this.rotationYaw - this.prevRotationYaw) < -180.0F)\n\t\t{\n\t\t\tthis.prevRotationYaw -= 360.0F;\n\t\t}\n\n\t\twhile ((this.rotationYaw - this.prevRotationYaw) >= 180.0F)\n\t\t{\n\t\t\tthis.prevRotationYaw += 360.0F;\n\t\t}\n\n\t\tthis.rotationPitch = this.prevRotationPitch + ((this.rotationPitch - this.prevRotationPitch) * 0.2F);\n\t\tthis.rotationYaw = this.prevRotationYaw + ((this.rotationYaw - this.prevRotationYaw) * 0.2F);\n\t\tfloat f2 = 0.99F;\n\t\tfloat f3 = this.getGravityVelocity();\n\n\t\tif (this.isInWater())\n\t\t{\n\t\t\tfor (int i = 0; i < 4; ++i)\n\t\t\t{\n\t\t\t\tfloat f4 = 0.25F;\n\t\t\t\tthis.worldObj.spawnParticle(EnumParticleTypes.WATER_BUBBLE, this.posX - (this.motionX * f4), this.posY - (this.motionY * f4),\n\t\t\t\t\t\tthis.posZ - (this.motionZ * f4), this.motionX, this.motionY, this.motionZ);\n\t\t\t}\n\n\t\t\tf2 = 0.8F;\n\t\t}\n\n\t\tthis.motionX *= f2;\n\t\tthis.motionY *= f2;\n\t\tthis.motionZ *= f2;\n\t\tthis.motionY -= f3;\n\t\tthis.setPosition(this.posX, this.posY, this.posZ);\n\t}",
"private void updateLight() {\r\n\t}",
"@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}",
"public void Wall()\n {\n if (this.getX() > 50 -this.getScale()) \n { \n this.setX(this.getX()-0.5); \n } \n else if (this.getX() < getScale()) \n {\n this.setX(this.getX()+0.5);\n \n }else if (this.getZ() > 50-this.getScale() ) \n {\n this.setZ(this.getZ()-0.5);\n \n }else if (this.getScale() > this.getZ()) \n {\n this.setZ(this.getZ()+0.5);\n }\n }",
"@Override\n\t public void onDrawShadow(Canvas canvas) {\n\n\t // Draws the ColorDrawable in the Canvas passed in from the system.\n\t shadow.draw(canvas);\n\t }",
"public final native void setShadow(Shadow shadow) /*-{\n\t\tthis.setShadow({\n color: [email protected]::getColour()()[email protected]::toString()(),\n blur: [email protected]::getBlur()(),\n offset: [[email protected]::getOffset()()[email protected]::x, \n \t\t [email protected]::getOffset()()[email protected]::y],\n alpha: [email protected]::getAlpha()()\n });\n\t}-*/;",
"@Override\n\tprotected void draw(Canvas canvas) {\t\tcanvas.setColor(Color.DARK_GREEN);\n\t\tcanvas.drawRectangle(getBounds());\n\t\t\n/*\t\tRectangle originalClipping = canvas.getClipping();\n\t\tcanvas.setClipping(getBounds());\n\t\t\n\t\tTransformation originalTransformation = canvas.getTransformation();\n\n\t\tdrawWorld(new ShadowCanvas(canvas));\n\t\t\n\t\tcanvas.setAlpha(1.0f);\n\t\tcanvas.setTransformation(originalTransformation);\n\t\tcanvas.setClipping(getBounds());\n\t\t\n\t\tdrawWorld(canvas);\n\t\t\n\t\tcanvas.setClipping(originalClipping);\n*/\t}",
"public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }",
"private Vec3 getLightPosition() {\r\n\t\tdouble elapsedTime = getSeconds() - startTime;\r\n\t\tfloat x = 5.0f * (float) (Math.sin(Math.toRadians(elapsedTime * 50)));\r\n\t\tfloat y = 2.7f;\r\n\t\tfloat z = 5.0f * (float) (Math.cos(Math.toRadians(elapsedTime * 50)));\r\n\t\treturn new Vec3(x, y, z);\r\n\r\n\t\t//return new Vec3(5f,3.4f,5f); // use to set in a specific position for testing\r\n\t}",
"public void setShadow(float xOffset, float yOffset, Colour c) {\n shadow = new Box(x + xOffset, y + yOffset, w, h, 0, c);\r\n }",
"protected Vec3 maybeBackOffFromEdge(Vec3 debug1, MoverType debug2) {\n/* 1102 */ if (!this.abilities.flying && (debug2 == MoverType.SELF || debug2 == MoverType.PLAYER) && isStayingOnGroundSurface() && isAboveGround()) {\n/* 1103 */ double debug3 = debug1.x;\n/* 1104 */ double debug5 = debug1.z;\n/* 1105 */ double debug7 = 0.05D;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1110 */ while (debug3 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, 0.0D))) {\n/* 1111 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1112 */ debug3 = 0.0D; continue;\n/* 1113 */ } if (debug3 > 0.0D) {\n/* 1114 */ debug3 -= 0.05D; continue;\n/* */ } \n/* 1116 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1121 */ while (debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(0.0D, -this.maxUpStep, debug5))) {\n/* 1122 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1123 */ debug5 = 0.0D; continue;\n/* 1124 */ } if (debug5 > 0.0D) {\n/* 1125 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1127 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1132 */ while (debug3 != 0.0D && debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, debug5))) {\n/* 1133 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1134 */ debug3 = 0.0D;\n/* 1135 */ } else if (debug3 > 0.0D) {\n/* 1136 */ debug3 -= 0.05D;\n/* */ } else {\n/* 1138 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* 1141 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1142 */ debug5 = 0.0D; continue;\n/* 1143 */ } if (debug5 > 0.0D) {\n/* 1144 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1146 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* 1149 */ debug1 = new Vec3(debug3, debug1.y, debug5);\n/* */ } \n/* 1151 */ return debug1;\n/* */ }",
"protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public BaseShadowSystem () {\n\t\tthis(new AABBNearFarAnalyzer(),\n\t\t\tnew FixedShadowMapAllocator(FixedShadowMapAllocator.QUALITY_MED, FixedShadowMapAllocator.QUANTITY_MAP_MED),\n\t\t\tnew BoundingSphereDirectionalAnalyzer(), new FrustumLightFilter());\n\t}",
"public void knockBack(Entity entity, float par2, double par3, double par5, double par6) {\n\t\tif (this.rand.nextDouble() >= this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).getAttributeValue()) {\n\t\t\tthis.isAirBorne = true;\n\t\t\tfloat f1 = MathHelper.sqrt_double(par3 * par3 + par5 * par5);\n\t\t\tfloat f2 = 0.4F;\n\t\t\tthis.motionX /= 2.0D;\n\t\t\tthis.motionY /= 2.0D;\n\t\t\tthis.motionZ /= 2.0D;\n\t\t\tthis.motionX -= par3 / (double)f1 * (double)f2;\n\t\t\tthis.motionY += (double)f2;\n\t\t\tthis.motionZ -= par5 / (double)f1 * (double)f2;\n\t\t\tif (this.motionY > par6) {\n\t\t\t\tthis.motionY = par6;\n\t\t\t}\n\t\t}\n\t}",
"public void raiseFlatbed(){\n if(getCurrentSpeed() == 0){\n flatbed.raiseFlatbed();\n }\n }",
"String getCollisionAvoidanceFactor();",
"private double transparency(LightSource light, Vector l, Vector n, GeoPoint geopoint) {\n Vector lightDirection = l.scale(-1); // switch to the opposite side from point to light source\n Ray lightRay = new Ray(geopoint.getPoint(), lightDirection, n);//build the Ray raised from the point.\n Point3D pointGeo = geopoint.getPoint();//the point.\n\n /**if the ray from point did not find eny objects so it will bring back 1=no change. do not reduse the impact of the light*/\n List<GeoPoint> intersections = null;\n intersections = scene.getGeometries().findGeoIntersections(lightRay);\n if (intersections == null) {\n return 1d;//all lights impact and go throw. there is no change.\n }\n double lightDistance = light.getDistance(pointGeo);\n double ktr = 1d;\n for (GeoPoint gp : intersections) {//adds all the objects that are in the middle in terms of their transparency.\n if (alignZero(gp.getPoint().distance(pointGeo) - lightDistance) <= 0) {\n ktr *= gp.getGeometry().getMaterial().getkT();\n if (ktr < MIN_CALC_COLOR_K) {//if that specific object is atum so it will return 0.\n return 0.0;\n }\n }\n }\n return ktr;//how much shakoof are all the different objects between the light to the point.\n }",
"public void CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }",
"public void run(double deltaMs) {\n //wave360.setPeriod(speedParam.getValuef() * speedMult);\n //wave100.setPeriod(speedParam.getValuef() * speedMult);\n total_ms1+=deltaMs;\n total_ms2+=deltaMs;\n // Use a for loop here to set the ube colors\n if (total_ms2>50) {\n\t for (int i=0; i<model.baseCubes.size(); i++ ) {\n\t\t BaseCube cube=model.baseCubes.get(i);\n\n\t\t if (hits_cube(i,current_cube_r)) {\n\t\t\t shadow[i][0]=(float)1;\n\t\t\t shadow[i][1]=(float)0;\n\t\t\t shadow[i][2]=(float)0;\n\t\t } else if (hits_cube(i,current_cube_g)) {\n\t\t\t shadow[i][0]=(float)0;\n\t\t\t shadow[i][1]=(float)1;\n\t\t\t shadow[i][2]=(float)0;\n\t\t } else if (hits_cube(i,current_cube_b)) {\n\t\t\t shadow[i][0]=(float)0;\n\t\t\t shadow[i][1]=(float)0;\n\t\t\t shadow[i][2]=(float)1;\n\t\t } else {\n\t\t\t shadow[i][0]=(float)Math.min(1,new_shadow(shadow[i][0],dmax(i,current_cube_r)));\n\t\t\t shadow[i][1]=(float)Math.min(1,new_shadow(shadow[i][1],dmax(i,current_cube_g)));\n\t\t\t shadow[i][2]=(float)Math.min(1,new_shadow(shadow[i][2],dmax(i,current_cube_b)));\n\t\t }\n\t\t float norm =shadow[i][0]*2+shadow[i][1]+shadow[i][2];\n\t\t float h = (360*shadow[i][0]*2+120*shadow[i][1]+240*shadow[i][2])/norm;\n\t\t float v = (shadow[i][0]+shadow[i][1]+shadow[i][2])*100;\n\t\t colors[cube.index] = lx.hsb( h , 100, Math.min(100,v));\n\t }\n\t\ttotal_ms2=0;\n }\n if (total_ms1>10*speedParam.getValuef()) {\n\n\t //transistion to new cube\n\n\t float new_p;\n\t for (int j=0; j<n; j++) {\n\t\t new_p = (float)Math.random();\n\t\t for (int i=0; i<model.baseCubes.size(); i++) {\n\t\t\t if (new_p>0.0) {\n\t\t\t\t new_p-=p[current_cube_r[j]][i];\n\t\t\t } else {\n\t\t\t\t current_cube_r[j]=i;\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\t\t new_p = (float)Math.random();\n\t\t for (int i=0; i<model.baseCubes.size(); i++) {\n\t\t\t if (new_p>0.0) {\n\t\t\t\t new_p-=p[current_cube_g[j]][i];\n\t\t\t } else {\n\t\t\t\t current_cube_g[j]=i;\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\t\t new_p = (float)Math.random();\n\t\t for (int i=0; i<model.baseCubes.size(); i++) {\n\t\t\t if (new_p>0.0) {\n\t\t\t\t new_p-=p[current_cube_b[j]][i];\n\t\t\t } else {\n\t\t\t\t current_cube_b[j]=i;\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\t }\n\t total_ms1=0;\n }\n }",
"public void update()\n {\n // start from the bottom of the world\n\n for (int y = height - 1; y >= 0; --y)\n {\n // compute offset to this and next line\n\n int thisOffset = y * width;\n \n // are we at top or bottom?\n\n boolean atTop = y == 0;\n boolean atBot = y == height - 1;\n\n // process line in random order\n \n for (int x: xRndIndex[rnd.nextInt(RND_INDEX_CNT)])\n {\n // index of this pixel\n \n int ip = thisOffset + x;\n \n // value of this pixel\n\n int p = pixels[ip];\n\n // don't process inert matter\n\n if (p == AIR || p == ROCK || p == EARTH)\n continue;\n\n // are we on a left or right edge?\n\n boolean atLeft = x == 0;\n boolean atRight = x == width - 1;\n\n // indices of pixels around this particle\n\n int iuc = ip - width;\n int idc = ip + width;\n int idl = idc - 1;\n int idr = idc + 1;\n int il = ip - 1;\n int ir = ip + 1;\n\n // get pixels for each index\n\n int uc = atTop ? ROCK : pixels[iuc];\n int dc = atBot ? ROCK : pixels[idc];\n int dl = atBot || atLeft ? ROCK : pixels[idl];\n int dr = atBot || atRight ? ROCK : pixels[idr];\n int l = atLeft ? ROCK : pixels[il];\n int r = atRight ? ROCK : pixels[ir];\n \n // the following actions propogate elements around the\n // world, they do not conserve matter\n\n // if fire, propogate fire\n\n if (p == FIRE1 || p == FIRE2 || p == FIRE3 || \n p == FIRE4 || p == FIRE5 || p == FIRE6)\n {\n int[] burn = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n\n\n for (int ib: burn)\n {\n int b = pixels[ib];\n\t\t\t\t\t \n\t\t\t\t\t // fire burns plants and oil, makes steam out of water\n\t\t\t\t\t \n if ((b == PLANT || b == OIL || b == COLUMBINE) &&\n rnd.nextInt(FIRE_CHANCE_IN) == 0)\n pixels[ib] = FIRE1;\n else\n if (b == WATER)\n {\n pixels[ib] = STEAM;\n pixels[ip] = STEAM;\n\t\t\t\t\t\t pixels[iuc] = STEAM;\n p = STEAM;\n break;\n }\n }\n // move fire along\n\n if (p == FIRE1)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE2)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE3)\n {\n pixels[ip] = FIRE4;\n continue;\n }\n if (p == FIRE4)\n {\n pixels[ip] = FIRE5;\n continue;\n }\n if (p == FIRE5)\n {\n pixels[ip] = FIRE6;\n continue;\n }\n if (p == FIRE6)\n {\n pixels[ip] = AIR;\n continue;\n }\n }\n // if this is steam, evaporate into air\n\n if (p == STEAM)\n { pixels[ip] = AIR;\n continue;\n\t\t\t }\n\n // if this is an everything sucker\n\n if (p == AIR_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n pixels[it] = AIR;\n continue;\n }\n // if this is a water source\n\n if (p == WATER_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(WATER_CHANCE_IN) == 0)\n pixels[it] = WATER;\n continue;\n }\n // if this is a fire source\n\n if (p == OIL_SOURCE)\n {\n int[] targets = {atRight ? ip : ir,\n atLeft ? ip : il,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR)\n pixels[it] = OIL;\n continue;\n }\n // if this is a sand source\n\n if (p == SAND_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(SAND_CHANCE_IN) == 0)\n pixels[it] = SAND;\n continue;\n }\n // if this is a plant, propogate growth\n\n if (p == PLANT)\n {\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n int[] targets = {atLeft ? ip : il,\n atLeft || atTop ? ip : iul,\n atRight ? ip : ir,\n atRight || atTop ? ip : iur,\n atTop ? ip : iuc,\n atBot ? ip : idc,\n atBot || atLeft ? ip : idl,\n atBot || atRight ? ip : idr,\n };\n\t\t\t\t if (pixels[idl] == PLANT && pixels[idc] == PLANT && \n\t\t\t\t pixels[idr] == PLANT && pixels[ir] == PLANT && \n\t\t\t\t\t pixels[il] == PLANT && pixels[iuc] == WATER)\n\t\t\t\t\t pixels[ip] = COLUMBINE;\n for (int ix: targets)\n if (pixels[ix] == AIR)\n for (int it: targets)\n if (pixels[it] == WATER && rnd.nextInt(PLANT_CHANCE_IN) == 0)\n pixels[it] = PLANT;\n\t\t\t\t continue;\n }\n // if this is a flower\n\n if (p == COLUMBINE)\n\t\t\t {\n\t\t\t continue;\n\t\t\t }\n // if this is a fire source\n\n if (p == FIRE_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == PLANT || pixels[it] == OIL)\n pixels[it] = FIRE1;\n continue;\n }\n // all actions from this point on conserve matter\n // we only calculate the place to which this particle\n // will move, the the default is to do nothing\n\n int dest = NO_CHANGE;\n \n // if it's a oil\n\n if (p == OIL)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR)\n dest = idc;\n \n // if air on both sides below, pick one\n\n else if (dl == AIR && dr == AIR)\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // if it's water\n\n else if (p == WATER)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR || dc == OIL)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == OIL) && (dr == AIR || dr == OIL))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == OIL)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == OIL)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // all other elements behave like sand\n\n else\n {\n // if air underneath, go down\n \n if (dc == AIR || dc == WATER)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == WATER) && \n (dr == AIR || dr == WATER))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == WATER)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == WATER)\n dest = idr;\n }\n // if a change is requried, swap pixles\n\n try\n {\n if (dest != NO_CHANGE)\n {\n if (pixels[ip] == WATER_SOURCE)\n out.println(\"swap1 WS & \" + Element.lookup(pixels[dest]));\n if (pixels[dest] == WATER_SOURCE)\n out.println(\"swap2 WS & \" + Element.lookup(pixels[ip]));\n\n pixels[ip] = pixels[dest];\n pixels[dest] = p;\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n out.println(\" X: \" + x);\n out.println(\" Y: \" + y);\n out.println(\"Source: \" + Element.lookup(p));\n out.println(\"Source: \" + Element.lookup(pixels[ip]));\n out.println(\" Dest: \" + Element.lookup(pixels[dest]));\n \n }\n }\n }\n }",
"private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }",
"private void filllightEffect(int barra) {\n float val = barra / 75f - 1.3333333f;\n Log.i(\"kike\", \"valor efecte: \" + val + \" barra: \" + barra);\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_FILLLIGHT);\n effect.setParameter(\"strength\", val);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }",
"public Ray calculateReflectionRay() {\n Vec3 directN = mInRay.getDirection();\n\n if(mShape.getReflection().blurryness != 0){\n CoordinateSystem coordSys = this.calculateCoordinateSystem(directN);\n\n Vec3 directNB = coordSys.vecB;\n Vec3 directNC = coordSys.vecC;\n\n directN = this.calculateTransformedRandomEndDirection(directN, directNB, directNC, true);\n }\n\n return calculateReflectionRay(directN);\n }",
"private void paintRectangleWithBevel(Graphics2D g2d, int width, int height,\n\t\t\tColor c) {\n\t\tif (drawingBorders) {\n\t\t\twidth = width - 1;\n\t\t\theight = height - 1;\n\t\t}\n\n\t\tGeneralPath path = new GeneralPath();\n\t\tpath.moveTo(0, 0);\n\t\tpath.lineTo(width - 1, 0);\n\t\tpath.lineTo(width - 1, height - 1);\n\t\tpath.lineTo(0, height - 1);\n\t\tpath.closePath();\n\n\t\tPaint oldPaint = g2d.getPaint();\n\t\tStroke oldStroke = g2d.getStroke();\n\n\t\tg2d.setPaint(c);\n\t\tg2d.fill(path);\n\n\t\tg2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT,\n\t\t\t\tBasicStroke.JOIN_MITER));\n\n\t\t// Draw highlight (Northeast)\n\t\tpath = new GeneralPath();\n\t\tpath.moveTo(0, 0);\n\t\tpath.lineTo(width - 1, 0);\n\t\tpath.lineTo(width - 1, height - 1);\n\t\tColor highlightColour = new Color((c.getRed() * blendFactor + 255)\n\t\t\t\t/ (blendFactor + 1), (c.getGreen() * blendFactor + 255)\n\t\t\t\t/ (blendFactor + 1), (c.getBlue() * blendFactor + 255)\n\t\t\t\t/ (blendFactor + 1));\n\t\tg2d.setPaint(highlightColour);\n\t\tg2d.draw(path);\n\n\t\t// Draw shadow (Southwest)\n\t\tpath = new GeneralPath();\n\t\tpath.moveTo(0, 0);\n\t\tpath.lineTo(0, height - 1);\n\t\tpath.lineTo(width - 1, height - 1);\n\t\tColor shadowColour = new Color((c.getRed() * blendFactor)\n\t\t\t\t/ (blendFactor + 1), (c.getGreen() * blendFactor)\n\t\t\t\t/ (blendFactor + 1), (c.getBlue() * blendFactor)\n\t\t\t\t/ (blendFactor + 1));\n\t\tg2d.setPaint(shadowColour);\n\t\tg2d.draw(path);\n\n\t\tg2d.setPaint(oldPaint);\n\t\tg2d.setStroke(oldStroke);\n\n\t}",
"protected void paintBorderGlow(Graphics2D g2,\n Shape clipShape, int width, int height) {\n int steps = getBrushSteps();\n\n boolean inside = isRenderInsideShape();\n\n g2.setPaint(getBrushColor());\n g2.translate(offset.getX(), offset.getY());\n\n if (isShouldFillShape()) {\n // set the inside/outside mode\n if (inside) {\n g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 1f));\n Area a1 = new Area(new Rectangle(\n (int) -offset.getX() - 20,\n (int) -offset.getY() - 20,\n width + 40, height + 40));\n Area a2 = new Area(clipShape);\n a1.subtract(a2);\n g2.fill(a1);\n } else {\n g2.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OVER, 1f));\n g2.fill(clipShape);\n }\n }\n\n float brushAlpha = 1f / steps;\n g2.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OVER, brushAlpha));\n\n // draw the effect\n for (float i = 0; i < steps; i = i + 1f) {\n float brushWidth = i * effectWidth / steps;\n g2.setStroke(new BasicStroke(brushWidth,\n BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));\n g2.draw(clipShape);\n }\n g2.translate(-offset.getX(), -offset.getY());\n\n }",
"@Override\n public void run()\n {\n final int minX = region.getMinimumPoint().getX();\n final int minZ = region.getMinimumPoint().getZ();\n final int maxX = region.getMaximumPoint().getX();\n final int maxZ = region.getMaximumPoint().getZ();\n final int midX = (maxX - minX) / 2;\n final int midZ = (maxZ - minZ) / 2;\n double playerY = player.getLocation().getY();\n\n if (midX / 6 > 0)\n {\n int tmp = 0;\n final int amount = midX / 5;\n for (int i = 0; i < amount; i++)\n {\n final int x = minX + midX - tmp;\n final int x2 = minX + midX + tmp;\n for (double y = playerY - 10; y <= playerY + 10; y++)\n {\n player.spawnParticle(Particle.FLAME, x, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, x, y, maxZ, 0);\n player.spawnParticle(Particle.FLAME, x2, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, x2, y, maxZ, 0);\n }\n tmp += 5;\n }\n }\n if (midZ / 6 > 0)\n {\n int tmp = 0;\n final int amount = midZ / 5;\n for (int i = 0; i < amount; i++)\n {\n final int z = minZ + midZ - tmp;\n final int z2 = minZ + midZ + tmp;\n\n for (double y = playerY - 10; y <= playerY + 10; y++)\n {\n player.spawnParticle(Particle.FLAME, minX, y, z, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, z, 0);\n player.spawnParticle(Particle.FLAME, minX, y, z2, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, z2, 0);\n }\n tmp += 5;\n }\n }\n\n for (double y = playerY - 40; y <= 256; y++)\n {\n player.spawnParticle(Particle.FLAME, minX, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, minX, y, maxZ, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, minZ, 0);\n player.spawnParticle(Particle.FLAME, maxX, y, maxZ, 0);\n }\n timer--;\n\n if (0 > this.timer)\n {\n player.sendMessage(\"§5Boundaries have been expired.\");\n this.cancel();\n }\n }",
"private void redeyeEffect(float[] f) {\n float val = 0;\n Log.i(\"kike\", \"valor efecte: \" + val + \" barra: \");\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_REDEYE);\n effect.setParameter(\"centers\", f);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }",
"@LargeTest\n public void testShadows() {\n TestAction ta = new TestAction(TestName.SHADOWS);\n runTest(ta, TestName.SHADOWS.name());\n }",
"private void generateBorder() {\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (x == 0 || y == 0 || x == width - 1 || y == height - 1) {\n\t\t\t\t\ttiles[x + y * width] = Tile.darkGrass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private Vec3 trace(Ray ray) {\n\t\tSphere sphere = null;\n\n\t\tfor (int i = 0; i < spheres.size(); i++) {\n\t\t\tif (spheres.get(i).intersect(ray)) {\n\t\t\t\tsphere = spheres.get(i);\n\t\t\t}\n\t\t}\n\n\t\tif (sphere == null) {\n\t\t\treturn new Vec3(0.0f); // Background color.\n\t\t}\n\n\t\tVec3 p = ray.getIntersection(); // Intersection point.\n\t\tVec3 n = sphere.normal(p); // Normal at intersection.\n\n\t\treturn light.phong(sphere, p, n);\n\t}",
"private void update(Ball currBall){\n currBall.ovalX += currBall.speedX * TIME_STEP;\n currBall.ovalY += currBall.speedY * TIME_STEP;\n\n if (currBall.ovalX >= screenW - currBall.ovalD) { // Right penetration\n currBall.speedX = -currBall.speedX;\n currBall.ovalX = currBall.ovalX - 2 * ((currBall.ovalX + currBall.ovalD) - screenW);\n } else if (currBall.ovalX <= 0) { // Left penetration\n currBall.speedX = -currBall.speedX;\n currBall.ovalX = -currBall.ovalX;\n }\n if (currBall.ovalY >= screenH - currBall.ovalD) { // Bottom penetration\n currBall.speedY = -currBall.speedY;\n currBall.ovalY = currBall.ovalY - 2 * ((currBall.ovalY + currBall.ovalD) - screenH);\n } else if (currBall.ovalY <= 0) { // Top penetration\n currBall.speedY = -currBall.speedY;\n currBall.ovalY = -currBall.ovalY;\n }\n }",
"protected int getShadeAlpha() {\n int a = currAlpha - 80;\n if (a < 0)\n a = 0;\n return a;\n }",
"public void onLivingUpdate()\n {\n if (this.worldObj.isDaytime() && !this.worldObj.isRemote && !this.isChild())\n {\n float var1 = this.getBrightness(100.0F);\n\n if (var1 > 0.5F && this.rand.nextFloat() * 30.0F < (var1 - 0.4F) * 2.0F && this.worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))\n {\n boolean var2 = true;\n ItemStack var3 = this.getEquipmentInSlot(4);\n\n if (var3 != null)\n {\n if (var3.isItemStackDamageable())\n {\n var3.setItemDamage(var3.getItemDamageForDisplay() + this.rand.nextInt(2));\n\n if (var3.getItemDamageForDisplay() >= var3.getMaxDamage())\n {\n this.renderBrokenItemStack(var3);\n this.setCurrentItemOrArmor(4, (ItemStack)null);\n }\n }\n\n var2 = false;\n }\n\n if (var2)\n {\n this.setFire(-99);\n }\n }\n }\n\n super.onLivingUpdate();\n }",
"private IncreaseEdgeCurvatureBiomeDecorator() {\n }",
"public void flap(){\n bird.setY(bird.getY() - 6);\n }",
"public int getHeight(){ return heightRadius; }",
"public LightShot(AbstractGame world) {\n super(world);\n innerColor = Color.WHITE;\n myCircle = new Circle(3);\n myCircle.setCenterX(0);\n myCircle.setCenterY(0);\n myCircle.setFill(innerColor);\n myShape = myCircle;\n speed = 10;\n GaussianBlur blur = new GaussianBlur();\n blur.setRadius(5);\n myShape.setEffect(blur);\n FadeTransition fadeOut = new FadeTransition(Duration.seconds(2), myShape);\n fadeOut.setFromValue(1);\n fadeOut.setToValue(0);\n fadeOut.playFromStart();\n // new AudioClipPlayer(AudioClipPlayer.HEARTBEAT).start();\n }",
"@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tint size, x, y;\n\t\tif (this.getHeight() < this.getWidth()) {\n\t\t\tsize = (int) (this.getHeight() / 1.5);\n\t\t} else {\n\t\t\tsize = (int) (this.getWidth() / 1.5);\n\t\t}\n\t\tx = (int) ((this.getWidth() / 2.0) - size / 2.0);\n\t\ty = (int) ((this.getHeight() / 2.0) - size / 2.0);\n\t\tint eyesize = (int) (size / 8.0);\n\t\tint eyex = (int) (x + size * 0.3 - eyesize / 2.0);\n\t\tint eyey = (int) (y + size * 0.4 - eyesize / 2.0);\n\t\tint eyex2 = (int) (x + size * 0.7 - eyesize / 2.0);\n\t\tint[] xpoints = {x, x + size, (int) (x + size / 2.0)};\n\t\tint[] ypoints = {(int) (y + size / 5.0), (int) (y + size / 5.0),\n\t\t\t\t(int) (y - size / 10.0)};\n\t\tPolygon hat = new Polygon(xpoints, ypoints, 3);\n\t\t\n\t\tif (zustand >0) {\n\t\t\tg.setColor(Color.GREEN);\n\t\t\tg.fillOval(x, y, size, size);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.fillOval(eyex, eyey, eyesize, eyesize);\n\t\t\tg.fillOval(eyex2, eyey, eyesize, eyesize);\n\t\t\tg.fillPolygon(hat);\n\t\t\tg.fillArc((int) (x + size / 5.0), (int) (y + size * 0.5),\n\t\t\t\t\t(int) (size * 0.6), (int) (size * 0.4), 0, -180);\n\t\t} else if (zustand == 0) {\n\t\t\tg.setColor(Color.YELLOW);\n\t\t\tg.fillOval(x, y, size, size);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.fillOval(eyex, eyey, eyesize, eyesize);\n\t\t\tg.fillOval(eyex2, eyey, eyesize, eyesize);\n\t\t\tg.fillPolygon(hat);\n\t\t\tg.fillRect(eyex, (int) (y + size * 0.75), eyex2 + eyesize - eyex,\n\t\t\t\t\t(int) (eyesize / 2.0));\n\t\t} else {\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillOval(x, y, size, size);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.fillOval(eyex, eyey, eyesize, eyesize);\n\t\t\tg.fillOval(eyex2, eyey, eyesize, eyesize);\n\t\t\tg.fillPolygon(hat);\n\t\t\tg.fillArc((int) (x + size / 5.0), (int) (y + size * 0.6),\n\t\t\t\t\t(int) (size * 0.6), (int) (size * 0.4), 0, 180);\n\t\t}\n\t}",
"void update(){\n\t\topacity -= (float)(1.0/(wakeStrength + 1));\n\t\twakeLife--;\n\t}",
"public Color4f getColor(Ray ray, IntersectResult result) {\n \tColor4f c = new Color4f();\n \tif(result.t == Double.POSITIVE_INFINITY) {\n \t\tc.x = render.bgcolor.x;\n \t\tc.y = render.bgcolor.y;\n \t\tc.z = render.bgcolor.z;\n \t\treturn c;\n \t}\n \t\n \t//Ambient color\n \tc.x = ambient.x * result.material.diffuse.x;\n \tc.y = ambient.y * result.material.diffuse.y;\n \tc.z = ambient.z * result.material.diffuse.z;\n \t\n \t//multi light resources contribute to result point\n \tfor(Light light: lights.values()) {\n \t\tRay shadowRay = new Ray();\n \t\tIntersectResult shadowResult = new IntersectResult();\n \t\t\n \t\tint rowNum = 5;\n \t\tint columnNum = 5; //the light plane is separated to rowNum*columnNum sub plane.\n \t\tColor4f lightAccumColor = new Color4f();\n \t\tfor(int i = 0; i < rowNum; i++) {\n \t\tfor(int j = 0; j < columnNum; j++) {\n \t\t\tLight jitterLight = new Light();\n \t\tjitterLight.color.set(light.color);\n \t\tjitterLight.from.set(light.from);\n \t\tjitterLight.power = light.power;\n \t\tVector3d a = new Vector3d(2, 2, 0);\n \t\tVector3d b = new Vector3d(0, 2, 2);\n \t\ta.scale((double)i/(double)rowNum); //delta\n \t\tb.scale((double)j/(double)columnNum);\n \t\t//jitterLight.from = light.from + epsilon1*a + epsilon2*b\n \t\tjitterLight.from.x = jitterLight.from.x+a.x+b.x;\n \t\tjitterLight.from.y = jitterLight.from.y+a.y+b.y;\n \t\tjitterLight.from.z = jitterLight.from.z+a.z+b.z;\n \t\t\n \t\t\n \t\tif(!inShadow(result, surfaceList, jitterLight, shadowResult, shadowRay)) {\n \t \t\t//Lambertian shader\n \t \t\tColor3f ld = new Color3f();\n \t \t\tVector3d l = new Vector3d();\n \t \t\t\n \t \t\t//Area light according to FCG p340\n \t \t\tl.sub(jitterLight.from, result.p);\n \t \t\tl.normalize();\n \t \t\tdouble max = Math.max(0.0, l.dot(result.n));\n \t \t\tld.x = (float)(light.color.x * light.power * result.material.diffuse.x * max);\n \t \t\tld.y = (float)(light.color.y * light.power * result.material.diffuse.y * max);\n \t \t\tld.z = (float)(light.color.z * light.power * result.material.diffuse.z * max);\n \t \t\t\n \t \t\t//Blinn-Phone shader\n \t \t\tColor3f ls = new Color3f();\n \t \t\tVector3d h = new Vector3d();\n \t \t\tVector3d v = new Vector3d();\n \t \t\tv.sub(ray.eyePoint, result.p);\n \t \t\tv.normalize();\n \t \t\th.add(l, v);\n \t \t\th.normalize();\n \t \t\tmax = Math.max(0.0, h.dot(result.n));\n \t \t\tls.x = (float)( light.color.x * light.power * result.material.specular.x * Math.pow(max, result.material.shinyness));\n \t \t\tls.y = (float)( light.color.y * light.power * result.material.specular.y * Math.pow(max, result.material.shinyness));\n \t \t\tls.z = (float)( light.color.z * light.power * result.material.specular.z * Math.pow(max, result.material.shinyness));\n \t \t\t\n \t \t\t//update c\n \t \t\tlightAccumColor.x += ld.x+ls.x;\n \t \t\tlightAccumColor.y += ld.y+ls.y;\n \t \t\tlightAccumColor.z += ld.z+ls.z;\n \t\t}\n \t\t\n \t\tif(result.material.mirror != null) {\n \t\t\t//Firstly calculate reflection ray\n \t\t\tRay mirrorRay = new Ray();\n \t\t\tIntersectResult mirrorResult = new IntersectResult();\n \t\t\tmirrorRay.eyePoint.set(result.p); //Firstly origin is intersection point\n \t\t\tmirrorRay.viewDirection.set(ray.viewDirection); //initialize to d temply, finally to r = d-2(dn)n textbook 103\n \t\t\t\n \t\t\tVector3d d = new Vector3d();\n \t\t\tVector3d n = new Vector3d();\n \t\t\td.set(ray.viewDirection);\n \t\t\tn.set(result.n);\n \t\t\tn.scale(-2.0*d.dot(n)); // n = -2(dn)n\n \t\t\tmirrorRay.viewDirection.add(n); //finally\n \t\t\t\n \t\t\tVector3d epsilon = new Vector3d();\n \t\t\tepsilon.set(mirrorRay.viewDirection);\n \t\t\tepsilon.scale(1e-8);\n \t\t\tmirrorRay.eyePoint.add(epsilon); //add a very small offset in the mirror ray direction to avoid t = 0 \n \t\t\t\n \t\t\tfor(Intersectable surface: surfaceList) {\n \t\t\t\tsurface.intersect(mirrorRay, mirrorResult); //see the intersection of mirror ray with the scene\n \t\t\t}\n \t\t\tColor4f mirrorColor = getColor(mirrorRay, mirrorResult);\n \t\t\tlightAccumColor.x += result.material.mirror.x*mirrorColor.x;\n \t\t\tlightAccumColor.y += result.material.mirror.y*mirrorColor.y;\n \t\t\tlightAccumColor.z += result.material.mirror.z*mirrorColor.z;\n \t\t}\n \t\t}\n \t\t}\n \t\tlightAccumColor.scale(1/(float)(rowNum*columnNum));\n \t\tc.add(lightAccumColor);\n\n \t\t\n \t\t\n \t}\n \t\n \treturn c;\n }",
"protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"private void reactMain_region_digitalwatch_Display_glowing_GlowDelay() {\n\t\tif (timeEvents[5]) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 5);\n\n\t\t\tsCIDisplay.operationCallback.unsetIndiglo();\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOff;\n\t\t} else {\n\t\t\tif (sCIButtons.topRightPressed) {\n\t\t\t\tnextStateIndex = 3;\n\t\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 5);\n\n\t\t\t\tsCIDisplay.operationCallback.setIndiglo();\n\n\t\t\t\tnextStateIndex = 3;\n\t\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t\t}\n\t\t}\n\t}",
"private void adjustLightFixture(World world, int i, int j, int k, Block block)\n\t{\n\t\tTessellator tess = Tessellator.instance;\n float brightness = block.getLightValue(world, i, j, k);\n int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);\n int modulousModifier = skyLight % 65536;\n int divModifier = skyLight / 65536;\n tess.setColorOpaque_F(brightness, brightness, brightness);\n OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier);\n\t}",
"float getWetness();",
"public void\nsetShininessElt(float value )\n\n{\n this.coinstate.shininess = value;\n}",
"public void addLightSource(Item lightSource) {\n/* 5374 */ if (lightSource.getTemplateId() == 1243)\n/* */ return; \n/* 5376 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5380 */ if (lightSource.getColor() != -1)\n/* */ {\n/* 5382 */ int lightStrength = Math.max(WurmColor.getColorRed(lightSource.getColor()), \n/* 5383 */ WurmColor.getColorGreen(lightSource.getColor()));\n/* 5384 */ lightStrength = Math.max(lightStrength, WurmColor.getColorBlue(lightSource.getColor()));\n/* 5385 */ if (lightStrength == 0)\n/* 5386 */ lightStrength = 1; \n/* 5387 */ byte r = (byte)(WurmColor.getColorRed(lightSource.getColor()) * 128 / lightStrength);\n/* 5388 */ byte g = (byte)(WurmColor.getColorGreen(lightSource.getColor()) * 128 / lightStrength);\n/* 5389 */ byte b = (byte)(WurmColor.getColorBlue(lightSource.getColor()) * 128 / lightStrength);\n/* */ \n/* 5391 */ vz.sendAttachItemEffect(lightSource.getWurmId(), (byte)4, r, g, b, lightSource\n/* 5392 */ .getRadius());\n/* */ \n/* */ \n/* */ }\n/* 5396 */ else if (lightSource.isLightBright())\n/* */ {\n/* 5398 */ int lightStrength = (int)(80.0F + lightSource.getCurrentQualityLevel() / 100.0F * 40.0F);\n/* 5399 */ vz.sendAttachItemEffect(lightSource.getWurmId(), (byte)4, \n/* 5400 */ Item.getRLight(lightStrength), Item.getGLight(lightStrength), Item.getBLight(lightStrength), lightSource\n/* 5401 */ .getRadius());\n/* */ }\n/* */ else\n/* */ {\n/* 5405 */ vz.sendAttachItemEffect(lightSource.getWurmId(), (byte)4, (byte)80, (byte)80, (byte)80, lightSource\n/* 5406 */ .getRadius());\n/* */ }\n/* */ \n/* */ }\n/* 5410 */ catch (Exception e) {\n/* */ \n/* 5412 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }",
"private Color calcLocalEffects(GeoPoint intersection, Ray ray,double k) \r\n\t{\r\n\t\tVector v = ray.getDir();// ray direction\r\n\t\tVector n = intersection.geometry.get_Normal(intersection.point);\r\n\t\tdouble nv = Util.alignZero(n.dotProduct(v));\r\n\t\tif (Util.isZero(nv))// there is no diffusive and Specular\r\n\t\t\treturn Color.BLACK;\r\n\t\tint nShininess = intersection.geometry.getMaterial().nShininess;\r\n\t\tdouble kd = intersection.geometry.getMaterial().kD;\r\n\t\tdouble ks = intersection.geometry.getMaterial().kS;\r\n\t\tColor color = Color.BLACK;\r\n\t\tfor (LightSource lightSource : scene.lights) {\r\n\t\t\tVector l = lightSource.getL(intersection.point);\r\n\t\t\tdouble nl = Util.alignZero(n.dotProduct(l));\r\n\t\t\tif (nl * nv > 0) { // sign(nl) == sing(nv)\r\n\t\t\t\tdouble ktr = transparency( l, n, intersection,lightSource);\r\n\t\t\t\tif (ktr * k > MIN_CALC_COLOR_K) {\r\n\t\t\t\t\tColor lightIntensity = lightSource.getIntensity(intersection.point).scale(ktr);\r\n\t\t\t\t\tcolor = color.add(calcDiffusive(kd, nl, lightIntensity),\r\n\t\t\t\t\t\t\tcalcSpecular(ks, l, n, nl, v, nShininess, lightIntensity));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}",
"public Vector traceRay(Ray ray, int bounces) {\n\t\t\n\t\t/* Terminate after too many bounces. */\n\t\tif(bounces > this.numBounces)\n\t\t\treturn new Vector(0.0, 0.0, 0.0);\n\t\t\n\t\t/* Trace ray. */\n\t\tObjectHit hit = getHit(ray);\n\n\t\tif(hit.hit) {\n\t\t\t\n\t\t\t/* Light emitted by the hit location. */\n\t\t\tVector color = hit.material.getEmission(hit.textureCoordinates.x, hit.textureCoordinates.y);\n\t\t\t\n\t\t\t/* Light going into the hit location. */\n\t\t\tVector incoming = new Vector(0.0, 0.0, 0.0);\n\t\t\t\n\t\t\t/* Do secondary rays. */\n\t\t\tVector selfColor = hit.material.getColor(hit.textureCoordinates.x, hit.textureCoordinates.y);\n\t\t\tdouble diffuseness = hit.material.getDiffuseness();\n\t\t\t\n\t\t\tfor(int i = 0; i < this.numSecondaryRays; i++) {\n\n\t\t\t\tRay newRay = new Ray(hit.hitPoint, new Vector(0.0, 0.0, 0.0));\n\t\t\t\t\t\t\n\t\t\t\tVector diffuseSample = new Vector(0.0, 0.0, 0.0);\n\t\t\t\tVector specularSample = new Vector(0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t\tif(diffuseness > 0.0) {\n\t\t\t\t\tVector diffuseVector = Material.getDiffuseVector(hit.normal);\n\t\t\t\t\tnewRay.direction = diffuseVector;\n\t\t\t\t\tdiffuseSample = traceRay(newRay, bounces + 1);\n\t\t\t\t\tdiffuseSample = diffuseSample.times(diffuseVector.dot(hit.normal)).times(selfColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(diffuseness < 1.0) {\n\t\t\t\t\tVector specularVector = Material.getReflectionVector(hit.normal, ray.direction, hit.material.getGlossiness());\n\t\t\t\t\tnewRay.direction = specularVector;\n\t\t\t\t\tspecularSample = traceRay(newRay, bounces + 1);\n\t\t\t\t\t\n\t\t\t\t\tif(!hit.material.isPlastic())\n\t\t\t\t\t\tspecularSample = specularSample.times(selfColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tVector total = diffuseSample.times(hit.material.getDiffuseness()).plus(specularSample.times(1 - hit.material.getDiffuseness()));\n\t\t\t\tincoming = incoming.plus(total);\n\t\t\t}\n\t\t\t\n\t\t\tincoming = incoming.divBy(this.numSecondaryRays);\n\t\t\treturn color.plus(incoming);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t/* If the ray missed return the ambient color. */\n\t\t\tVector d = new Vector(0.0, 0.0, 0.0).minus(ray.direction);\n\t\t\tdouble u = 0.5 + Math.atan2(d.z, d.x) / (2 * Math.PI);\n\t\t\tdouble v = 0.5 - Math.asin(d.y) / Math.PI;\n\t\t\t\n\t\t\treturn skyMaterial.getColor(u, v).times(255).plus(skyMaterial.getEmission(u, v));\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }",
"@Override\n public void tick() {\n if (!this.world.isRemote) {\n if (this.angler == null) {\n this.remove();\n return;\n }\n this.setFlag(6, this.isGlowing());\n }\n this.baseTick();\n age++;\n\n if (this.world.isRemote) {\n int i = this.getDataManager().get(cau_ent);\n\n if (i > 0 && this.caughtEntity == null) {\n this.caughtEntity = this.world.getEntityByID(i - 1);\n MinecraftForge.EVENT_BUS.post(new HookReturningEvent(this));\n }\n } else {\n ItemStack itemstack = this.angler.getHeldItemMainhand();\n\n if (age > 80 || !this.angler.isAlive() || itemstack.getItem() != Items.ITEM_GRAB_HOOK || this.getDistanceSq(this.angler) > 4096.0D) {\n this.remove();\n this.angler.fishingBobber = null;\n return;\n }\n }\n\n if (this.caughtEntity != null && this.angler != null) {\n pullEntity();\n return;\n }\n if (this.inGround) {\n if(hasGrappling && this.angler != null){\n pullUser();\n }else{\n this.remove();\n }\n return;\n }\n\n // In the air\n ++this.ticksInAir;\n if (this.ticksInAir == 20) {\n setReturning();\n }\n if (!this.world.isRemote) {\n boolean caughtSomething = checkCollision();\n if(caughtSomething){\n return;\n }\n\n if (this.isReturning) {\n Vector3d target = this.angler.getPositionVec().add(0, this.angler.getEyeHeight(), 0);\n Vector3d v = target.subtract(this.getPositionVec());\n if (v.length() < 3D) {\n this.remove();\n return;\n }\n v = v.normalize().scale(speed).subtract(0, 0.1, 0);\n this.setMotion(v);\n }\n }\n\n this.move(MoverType.SELF, this.getMotion());\n this.setPosition(this.getPosX(), this.getPosY(), this.getPosZ());\n }",
"public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}",
"private void paint(int sideLength) {\n\n float fac = randomStart;\n while (sideLength >= 2) {\n\n for (int py = 0; py < _height; py += sideLength) {\n for (int px = 0; px < _width; px += sideLength) {\n // fetch corner colors\n float c1 = mono[repeat(px, py, _width, _height)];\n float c3 = mono[repeat(px + sideLength, py, _width, _height)];\n float c7 = mono[repeat(px, py + sideLength, _width, _height)];\n float c9 = mono[repeat(px + sideLength, py + sideLength, _width,\n _height)];\n\n int shortX = px / sideLength; \n int shortY = py / sideLength; \n \n \n float c2 = (c1 + c3) / 2 + calcFac(fac, shortX, shortY);\n float c4 = (c1 + c7) / 2 + calcFac(fac, shortX, shortY);\n float c5 = (c1 + c3 + c7 + c9) / 4 + calcFac(fac, shortX, shortY);\n\n mono[repeat(px + sideLength / 2, py, _width, _height)] = c2;\n mono[repeat(px, py + sideLength / 2, _width, _height)] = c4;\n mono[repeat(px + sideLength / 2, py + sideLength / 2, _width, _height)] = c5;\n }\n }\n\n fac = fac * randomFactor + randomSummand;\n\n sideLength /= 2;\n }\n }",
"@Override\n public void setup() {\n background(bgColor);\n \n \n \nfor (int i = 0; i < 5; i++) {\nfloat\tyt=height/2+width/2-(i*60);\nfloat\tht = map(y,height/2-100,height/2+200,0,40);\nfloat\t xt = 400 - 200;\n\t float wt = 2 * 200;\nRectangle r = new Rectangle(xt,yt,wt,ht);\nmissingSun.add(r);\nfill(bgColor);\nrect(xt,yt, wt,ht);\n}\n\n \n }",
"public void showShadow(boolean z, boolean z2) {\n if (z && this.shadowView.getTag() == null) {\n return;\n }\n if (z || this.shadowView.getTag() == null) {\n AnimatorSet animatorSet = this.shadowAnimator;\n int i = null;\n if (animatorSet != null) {\n animatorSet.cancel();\n this.shadowAnimator = null;\n }\n View view = this.shadowView;\n if (!z) {\n i = 1;\n }\n view.setTag(i);\n float f = 1.0f;\n if (z2) {\n AnimatorSet animatorSet2 = new AnimatorSet();\n this.shadowAnimator = animatorSet2;\n Animator[] animatorArr = new Animator[1];\n View view2 = this.shadowView;\n Property property = View.ALPHA;\n float[] fArr = new float[1];\n if (!z) {\n f = 0.0f;\n }\n fArr[0] = f;\n animatorArr[0] = ObjectAnimator.ofFloat(view2, property, fArr);\n animatorSet2.playTogether(animatorArr);\n this.shadowAnimator.setDuration(200);\n this.shadowAnimator.setInterpolator(CubicBezierInterpolator.EASE_OUT);\n this.shadowAnimator.addListener(new AnimatorListenerAdapter() {\n public void onAnimationEnd(Animator animator) {\n AnimatorSet unused = SearchField.this.shadowAnimator = null;\n }\n });\n this.shadowAnimator.start();\n return;\n }\n View view3 = this.shadowView;\n if (!z) {\n f = 0.0f;\n }\n view3.setAlpha(f);\n }\n }",
"private float deskYToAbst(int y)\n {\n return ((float)y/height);\n }",
"private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }",
"void object_below_eyes_level_calc(){\n down_angle=Math.abs(down_angle);\n up_angle=Math.abs(up_angle);\n angle_with_ground=90-angle_with_ground;\n distance_from_object=human_length*Math.tan(Math.toRadians(angle_with_ground));\n double all=distance_from_object*Math.tan(Math.toRadians(down_angle));\n double part=distance_from_object*Math.tan(Math.toRadians(up_angle));\n length_of_object=all-part;\n object_height_from_ground=human_length-all;\n ORI.setText(\"length_of_object :\\n\" +String.valueOf(String.format(\"%.2f\",(length_of_object/100))) +\" M\"+ \"\\n\" + \"distance_from_object :\\n\" + String.valueOf(String.format(\"%.2f\",(distance_from_object/100)))+\" M\" + \"\\n\"+\"height_from_ground :\\n\" + String.valueOf(String.format(\"%.2f\",(object_height_from_ground/100)))+\" M\");\n ORI.setVisibility(View.VISIBLE);\n }"
] | [
"0.6870211",
"0.6219169",
"0.6080755",
"0.6022085",
"0.60175693",
"0.60153097",
"0.59950185",
"0.5802242",
"0.57665074",
"0.56156963",
"0.55620104",
"0.555613",
"0.5538497",
"0.5520035",
"0.5511358",
"0.5474146",
"0.54513764",
"0.5444229",
"0.5440243",
"0.541147",
"0.540906",
"0.53598744",
"0.53565204",
"0.5354624",
"0.53419816",
"0.5305222",
"0.5282777",
"0.52703184",
"0.5259506",
"0.5258633",
"0.52581584",
"0.52529603",
"0.5251145",
"0.5244948",
"0.52434695",
"0.52385885",
"0.5237934",
"0.5233908",
"0.5233374",
"0.5229696",
"0.52225417",
"0.5218399",
"0.5214569",
"0.52079415",
"0.5206781",
"0.5202762",
"0.5190113",
"0.51684594",
"0.5139139",
"0.51383793",
"0.51350635",
"0.5132434",
"0.51297355",
"0.5124465",
"0.5124027",
"0.51200175",
"0.5113371",
"0.50993454",
"0.50988305",
"0.50879407",
"0.508574",
"0.508541",
"0.508326",
"0.50780374",
"0.5078031",
"0.50702804",
"0.50666237",
"0.50656766",
"0.5054518",
"0.50520957",
"0.5042549",
"0.5038621",
"0.50323206",
"0.50237554",
"0.5018294",
"0.50149065",
"0.5013475",
"0.5007515",
"0.5004028",
"0.5002436",
"0.5001195",
"0.49986565",
"0.49968812",
"0.49963832",
"0.49929196",
"0.49899068",
"0.49897414",
"0.49773228",
"0.4973144",
"0.4972777",
"0.49671218",
"0.49629447",
"0.496061",
"0.49510467",
"0.49507242",
"0.49499145",
"0.49461377",
"0.49407652",
"0.49385384",
"0.49335507",
"0.49293235"
] | 0.0 | -1 |
todo important optimize.. isnt there a way to make this smarter? we can probably cache some numbers here e.g. (Controller.getCamera().getUnprojectedScreenVector().x 1) + radius) will be the same entire game.. also, is there a better way of updating linear velocity? not with resetting it to the object | @Override
public void render(SpriteBatch spriteBatch) {
// check for collision with the left side of the screen
/*if (body.getPosition().x < (Controller.getCamera().getUnprojectedScreenVector().x * -1) + radius) {
body.setLinearVelocity(body.getLinearVelocity().x * -1, body.getLinearVelocity().y);
}
// check for collision with the right side of the screen
if (body.getPosition().x > Controller.getCamera().getUnprojectedScreenVector().x - radius) {
body.setLinearVelocity(body.getLinearVelocity().x * -1, body.getLinearVelocity().y);
}*/
// check for collision with the top side of the screen
if (body.getPosition().y > Controller.getGameViewport().getWorldHeight() - radius) {
body.setLinearVelocity(body.getLinearVelocity().x, Math.abs(body.getLinearVelocity().y) * -1);
}
// synchronize sprite with the body
position.set(body.getPosition().x - radius - margin, body.getPosition().y - radius - margin);
sprite.setPosition(position.x, position.y);
sprite.draw(spriteBatch);
// todo the ball should be destroyed when it is below the screen (and invalidated once it is below the plank)
// there should be some kind of container of balls (there can be more balls in the game) and once
// all balls are invalidated, they should be destroyed and game should be failed
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }",
"protected void calcVelocity()\n\t{}",
"private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }",
"public void update(){\n posX += velX;\n posY += velY;\n }",
"public void update(){\n velX *= damp;\n velY *= damp;\n posX += velX;\n posY += velY;\n }",
"private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}",
"private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}",
"public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}",
"void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}",
"static void resetVelocity(){currentVelocity = INITIAL_SPEED;}",
"public void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n acc.mult(0);\n }",
"private void setLinearVelocity() {\r\n\t\tif (movingElement.getWorldLocations().size() < 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<WorldCursorRecord> positions = movingElement.getWorldLocations();\r\n\t\tint lastIndex = positions.size() - 1;\r\n\t\tint nextLastIndex = lastIndex - 2;\r\n\t\tVector3f lastPosition = positions.get(lastIndex).worldLocation;\r\n\t\tlong lastTime = positions.get(lastIndex).time;\r\n\t\tVector3f nextLastPosition = positions.get(nextLastIndex).worldLocation;\r\n\t\tlong nextLastTime = positions.get(nextLastIndex).time;\r\n\t\tfloat diffTimeMS = (lastTime - nextLastTime) / 1000000f;\r\n\t\tlinearVelocity = lastPosition.subtract(nextLastPosition).mult(\r\n\t\t\t\t(1f / diffTimeMS) * 1000f);\r\n\t\tlinearVelocity.setZ(0);\r\n\t}",
"static int getVelocity(){return currentVelocity;}",
"private void UpdateVelocity()\n\t{\n\t\tVector2 currentPosition = new Vector2(parent.transform.position);\n\t\tVector2 newVelocity = Vector2.Add(currentPosition,previousPosition.negate());\n\t\tpreviousPosition = currentPosition;\n\t\t\n\t\tfloat currentRotation = parent.transform.rotation;\n\t\tangularVelocity = currentRotation - previousRotation;\n\t\tpreviousRotation = currentRotation;\n\t\t\n\t\tvelocity = newVelocity;\n\t}",
"@Override\n public void updateObjects(float delta, Matrix3x3f viewport, float width, float height) {\n\n //Checking terminal velocity\n if (distFallen < TERMINAL_V) {\n //Acceleration of gravity\n ty -= (falling += Math.pow(9.80665f, 2) * delta);\n distFallen++;\n } else {\n //Terminal was reached, so stop increasing fall speed.\n ty -= falling;\n }\n\n //If below screen\n if (ty < (-1 * (height / 2 + 200))) {\n this.isAlive = false;\n }\n\n Matrix3x3f mat = Matrix3x3f.translate(tx, ty);\n velocity = mat.mul(new Vector2f());\n\n //Translations\n world = Matrix3x3f.translate(velocity);\n //Multiply by viewport scalar\n world = world.mul(viewport);\n }",
"@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}",
"void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}",
"public double getCurrentVelocity( )\r\n {\r\n return Math.sqrt( this.h_velocity * this.h_velocity + this.v_velocity * this.v_velocity );\r\n }",
"public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }",
"public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }",
"private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }",
"public void update(float delta)\n {\n\n x = acceleration.x;\n y = acceleration.y;\n x = x * delta; //to scale by frame rate to keep things smooth\n y = y * delta;\n\n velocity.add(x, y); //sets new velocity\n\n if(velocity.y >350)\n {\n velocity.y = 350;\n //Gdx.app.log(\"Block\", \"MAX SPEED\");\n }\n\n x = velocity.x;\n y = velocity.y;\n x = x * delta;\n y = y * delta;\n\n position.add(x,y); //sets new position\n\n //position.add(velocity.cpy().scl(delta));\n\n rect.set(position.x, position.y, width,height);\n\n if(position.y > gameHeight) //determine if object is still on screen\n {\n isScrolled = true;\n }\n }",
"public double update() {\n\t\t double time=System.currentTimeMillis();\n\t\t boolean update=false;\n\t\t \n\t\t// Keyboard handling\n\t\tif (scene.ready) {\n\t\t\tif (command==KeyEvent.VK_D) \n\t\t\t\tcamera.y_rot=camera.y_rot+0.02;\n\t\t\tif (command==KeyEvent.VK_A)\n\t\t\t\tcamera.y_rot=camera.y_rot-0.02;\n\t\t\tif (command==KeyEvent.VK_Q)\n\t\t\t\tcamera.z_rot=camera.z_rot-0.02;\n\t\t\tif (command==KeyEvent.VK_E)\n\t\t\t\tcamera.z_rot=camera.z_rot+0.02;\n\t\t\tif (command==KeyEvent.VK_R)\n\t\t\t\tcamera.x_rot=camera.x_rot+0.02;\n\t\t\tif (command==KeyEvent.VK_F)\n\t\t\t\tcamera.x_rot=camera.x_rot-0.02;\n\n\t\t\tif (command==KeyEvent.VK_W)\n\t\t\t\tcamera.translateWithRespectToView(0,0,250);\n\t\t\tif (command==KeyEvent.VK_S)\n\t\t\t\tcamera.translateWithRespectToView(0,0,-250);\n\t\t\tif (command==KeyEvent.VK_Z)\n\t\t\t\tcamera.translateWithRespectToView(-250,0,0);\n\t\t\tif (command==KeyEvent.VK_X)\n\t\t\t\tcamera.translateWithRespectToView(250,0,0);\n\t\t\tif (command==KeyEvent.VK_T)\n\t\t\t\tcamera.translateWithRespectToView(0,250,0);\n\t\t\tif (command==KeyEvent.VK_G)\n\t\t\t\tcamera.translateWithRespectToView(0,-250,0);\n\n\t\t\tif (command==KeyEvent.VK_J)\n\t\t\t\tvobject[0].rotate(0,-0.01,0);\n\t\t\tif (command==KeyEvent.VK_L)\n\t\t\t\tvobject[0].rotate(0,0.01,0);\n\t\t\tif (command==KeyEvent.VK_I)\n\t\t\t\tvobject[0].rotate(0.01,0.0,0);\n\t\t\tif (command==KeyEvent.VK_K)\n\t\t\t\tvobject[0].rotate(-0.01,0,0);\n\t\t\tif (command==KeyEvent.VK_U)\n\t\t\t\tvobject[0].rotate(0,0.00,-0.01);\n\t\t\tif (command==KeyEvent.VK_O)\n\t\t\t\tvobject[0].rotate(0.0,0,0.01);\n\n\t\t\tif (command==KeyEvent.VK_1) \n\t\t\t{scene.dot_field= !scene.dot_field;}\n\t\t\tif (command==KeyEvent.VK_2)\n\t\t\t{scene.wireframe= !scene.wireframe;}\n\t\t\tif (command==KeyEvent.VK_3)\n\t\t\t{scene.solid_poly= !scene.solid_poly;}\n\t\t\tif (command==KeyEvent.VK_4)\n\t\t\t{scene.hidden_face= !scene.hidden_face;}\n\t\t\tif (command==KeyEvent.VK_5)\n\t\t\t{scene.simple_shaded= !scene.simple_shaded;}\n\t\t\tif (command==KeyEvent.VK_6)\n\t\t\t{scene.z_sorted= !scene.z_sorted;}\n\t\t\tif (command==KeyEvent.VK_7)\n\t\t\t{scene.gouraud_shaded= !scene.gouraud_shaded;}\n\t\t\tif (command==KeyEvent.VK_8)\n\t\t\t{scene.fullstats= !scene.fullstats;}\n\n\t\t\tif (command==KeyEvent.VK_0 && scene.ready)\n\t\t\t{worldgrid.diamondSquare(1,roughness,1); \n\t\t\t}\n\n\t\t\tif (command==KeyEvent.VK_9) \n\t\t\t{scene.surface= !scene.surface;}\n\n\t\t\tif (command==KeyEvent.VK_P && scene.ready) {\n\t\t\t\t//Planet myplanet=new Planet(60);\n\t\t\t\tmyplanet.Iterate(0.1,1,1);\n\t\t\t\t//myplanet.scale(2000);\n\t\t\t\tvobject[0]=myplanet;\n\t\t\t}\n\n\t\t\tcommand=0;\n\t\t}\n\n\t\t// generic\n\n\t\tif (!scene.surface) {\t\n\t\t\tif (!scene.test) {\n\t\t\t\tvobject[0].rotate(0.000,0.002,0.000);\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvobject[0].rotate(0.008,0.005,0.01);\n\t\t\t}\n\t\t}\n\n\n\t\n\t\tif ((first_time) && (scene.surface)) {foreThoughtThread.start(); first_time=false; }\n\t\tupdateLighting();\n\t\treturn tick_time_seconds;\n\t}",
"@Override\n public void update(double delta) {\n model.rotateXYZ(0,(1 * 0.001f),0);\n\n float acceleration = 0.1f;\n float cameraSpeed = 1.5f;\n\n // Left - right\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_A) == GLFW_PRESS)\n speedz+= (speedz < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_A) == GLFW_RELEASE)\n speedz-= (speedz-acceleration > 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_D) == GLFW_PRESS)\n speedz-= (speedz > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_D) == GLFW_RELEASE)\n speedz+= (speedz+acceleration < 0) ? acceleration : 0;\n\n // Forward - backward\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_W) == GLFW_PRESS)\n speedx+= (speedx < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_W) == GLFW_RELEASE)\n speedx-= (speedx > 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_S) == GLFW_PRESS)\n speedx-= (speedx > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_S) == GLFW_RELEASE)\n speedx+= (speedx+acceleration < 0) ? acceleration : 0;\n\n // up - down\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_Q) == GLFW_PRESS)\n speedy+= (speedy < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_Q) == GLFW_RELEASE)\n speedy-= (speedy > 0.1) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_E) == GLFW_PRESS)\n speedy-= (speedy > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_E) == GLFW_RELEASE)\n speedy+= (speedy < 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_TAB) == GLFW_PRESS) {\n speedz = 0;\n speedx = 0;\n }\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_R) == GLFW_PRESS) {\n debugCameraObject.eyePos.x = 0;\n debugCameraObject.eyePos.y = 0;\n debugCameraObject.eyePos.z = 0;\n }\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_T) == GLFW_PRESS) {\n showSkybox = !showSkybox;\n }\n\n\n debugCameraObject.processKeyboard(DebugCamera.CameraMovement.RIGHT, (float) (speedz * delta));\n debugCameraObject.processKeyboard(DebugCamera.CameraMovement.FORWARD, (float) (speedx * delta));\n }",
"public void onUpdate()\n {\n super.onUpdate();\n this.jumpMovementFactor = 0.0F;\n this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;\n\n if (this.target != null && this.target instanceof EntityLiving)\n {\n EntityLiving var1 = (EntityLiving) this.target;\n\n if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n } else\n {\n if (this.target != null && this.target.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n\n if (this.target == null)\n {\n this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);\n\n if (this.target == null)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n\n return;\n }\n }\n }\n\n if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())\n {\n if (!this.isReformed())\n {\n this.setReformed(true);\n }\n\n this.stop();\n this.moveTimer = 0;\n }\n\n if (this.slider == null)\n {\n Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);\n var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n if (var18 != null)\n {\n var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);\n }\n\n if (!this.worldObj.isRemote)\n {\n Object var4 = null;\n List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));\n double var6 = 0.0D;\n\n for (int var8 = 0; var8 < var15.size(); ++var8)\n {\n Entity var9 = (Entity) var15.get(var8);\n\n if (var9.canBeCollidedWith() && var9 != this)\n {\n float var10 = 0.3F;\n\n if (var9 instanceof EntitySlider)\n {\n this.slider = (EntitySlider) var9;\n var18 = null;\n }\n\n AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);\n MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);\n\n if (var12 != null)\n {\n double var13 = var16.distanceTo(var12.hitVec);\n\n if (var13 < var6 || var6 == 0.0D)\n {\n var6 = var13;\n }\n }\n }\n }\n }\n\n if (this.slider == null || this.slider.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n }\n } else if (this.slider.target != this.target)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n } else\n {\n this.fallDistance = 0.0F;\n double var17;\n double var5;\n double var3;\n\n if (this.gotMovement)\n {\n if (this.isCollided)\n {\n var17 = this.posX - 0.5D;\n var3 = this.boundingBox.minY + 0.75D;\n var5 = this.posZ - 0.5D;\n\n if (this.crushed)\n {\n this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, \"random.explode\", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n }\n\n this.stop();\n } else\n {\n if (this.speedy < 2.0F)\n {\n this.speedy += 0.035F;\n }\n\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n\n if (this.direction == 0)\n {\n this.motionY = (double) this.speedy;\n\n if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 1)\n {\n this.motionY = (double) (-this.speedy);\n\n if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 2)\n {\n this.motionX = (double) this.speedy;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 3)\n {\n this.motionX = (double) (-this.speedy);\n\n if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 4)\n {\n this.motionZ = (double) this.speedy;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 5)\n {\n this.motionZ = (double) (-this.speedy);\n\n if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n }\n }\n } else\n {\n this.motionY = 0.0D;\n\n if (this.moveTimer > 0)\n {\n --this.moveTimer;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n } else\n {\n var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));\n var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));\n var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));\n\n if (var17 > var5)\n {\n this.direction = 2;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))\n {\n this.direction = 3;\n }\n } else\n {\n this.direction = 4;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))\n {\n this.direction = 5;\n }\n }\n\n if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)\n {\n this.direction = 0;\n\n if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))\n {\n this.direction = 1;\n }\n }\n\n this.gotMovement = true;\n }\n }\n\n if (this.harvey > 0.01F)\n {\n this.harvey *= 0.8F;\n }\n }\n }",
"public static void new_speed( Body body, double t ){\r\n body.currentState.vx = body.currentState.vx + body.currentState.ax * t; // new x velocity\r\n body.currentState.vy = body.currentState.vy + body.currentState.ay * t; // new y velocity\r\n body.currentState.vz = body.currentState.vz + body.currentState.az * t; // new z velocity\r\n }",
"public void update()\n {\n // always roatating time by 7 for fixed point calculation\n x = (velocity*cos(theta) *time) >> 21;\n int yFirstPart = (int)(velocity*sin(theta)*time) >> 21;\n int ySecondPart = (int)((g*time*time) >> 15);\n y = yFirstPart - ySecondPart;\n y =initialY - y;\n x= x + initialX;\n time+= updateSpeed;\n if(lastY == -1)\n {\n lastY = y;\n }else{\n int direction = lastY - y;\n if(lastDirection == -1)\n {\n lastDirection = direction;\n }else{\n if(lastDirection != 0 && direction != 0)\n {\n \n int signOfDirection = lastDirection / Math.abs(lastDirection);\n int signOfLastDirection = direction / Math.abs(direction);\n if(signOfDirection != signOfLastDirection)\n {\n if(!reachedTop)\n {\n onTop();\n reachedTop = true;\n }\n \n setIsOnHalf(true);\n }\n }\n lastY = y;\n }\n \n }\n }",
"public void changeVel(double xV, double yV){ \n this.xVel += xV;\n this.yVel += yV;\n }",
"@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}",
"@Override\n public void update() {\n y += velY;\n setRectHitBox();\n }",
"@Override\n public void update(float delta) {\n if (engine) {\n //accelerate\n velocity.x += acceleration * direction.x * delta;\n velocity.y += acceleration * direction.y * delta;\n } else {\n //decelerate\n velocity.scl((1 - (delta / 2))); //(1-delta/2) approx= 0.991\n\n //ship stops when speed is close to 0\n if (velocity.len() < 15) {\n velocity.setZero();\n }\n }\n //cap speed\n if (velocity.len() > speedCap) {\n velocity.setLength(speedCap);\n }\n\n //adjust ship position\n super.update(delta);\n }",
"public void updatePhysics() {\n ball.setLayoutX(ball.getLayoutX() + velX);\n ball.setLayoutY(ball.getLayoutY() - velY);\n\n velY += accelY;\n velX += accelX;\n }",
"public void updateFireVector(){\n\t\tdouble difX = owner.getMouseX() - owner.getMidX();\n\t\tdouble difY = owner.getMouseY() - owner.getMidY();\n\t\tdouble magnitude = Math.pow(difX * difX + difY * difY, .5);\n//\t\tdouble newFireX = difX / magnitude;\n//\t\tdouble newFireY = difY / magnitude;\n//\t\tif(Math.abs(newFireX - fireX) > Math.abs(minChange)){\n//\t\t\tfireX = newFireX;\n//\t\t}\n//\t\tif(Math.abs(newFireY - fireY) > Math.abs(minChange)){\n//\t\t\tfireY = newFireY;\n//\t\t}\n\t\tfireX = difX / magnitude;\n\t\tfireY = difY / magnitude;\n//\t\tif(fireX < 0){\n//\t\t\tfacingRight = -1;\n//\t\t}\n//\t\telse{\n//\t\t\tfacingRight = 1;\n//\t\t}\n//\t\tSystem.out.println(fireX);\n//\t\tSystem.out.println(fireY);\n//\t\tSystem.out.println();\n\t}",
"List<Velocity> initialBallVelocities();",
"public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }",
"public void move(){\r\n double newXCoord = super.xCoord + super.xVelocity;\r\n double newYCoord = super.yCoord + super.yVelocity;\r\n\r\n if( (newXCoord - super.radius) <= -MAX_X_COORD || (newXCoord + super.radius) >= MAX_X_COORD){\r\n super.xVelocity = -super.xVelocity;\r\n }\r\n if( (newYCoord - super.radius) <= MIN_Y_COORD || (newYCoord + super.radius) >= MAX_Y_COORD){\r\n super.yVelocity = -super.yVelocity;\r\n }\r\n\r\n super.xCoord = super.xCoord + super.xVelocity;\r\n super.yCoord = super.yCoord + super.yVelocity;\r\n }",
"public void update(double dt,double fX,double fY){\n\t\tdouble ax = fX/mass;\n\t\tdouble ay = fY/mass; \n\t\txxVel= xxVel + ax * dt;\n\t\tyyVel= yyVel + ay * dt;\n\t\txxPos = xxPos + xxVel * dt;\n\t\tyyPos = yyPos + yyVel * dt; \n\t}",
"public void update()\n {\n long elapsed = (System.nanoTime()-startTime)/1000000;\n if(elapsed>100)\n {\n hard += 20; // increase difficulty\n score = Dynamics.getPosition();\n startTime = System.nanoTime();\n }\n dx = (int)Dynamics.getVelocityX();\n\n animation.update();\n x += dx;\n if(x < 0){\n x = 0;\n } else if (x+width > GamePanel.WIDTH){\n x = GamePanel.WIDTH-width;\n }\n\n }",
"public double getVelocity()\n {\n return velocity * FPS;\n }",
"public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }",
"@Override\n \tpublic void update(double ticksPassed) {\n \t\tdouble dx = this.velocity.getX() * ticksPassed;\n \t\tdouble dy = this.velocity.getY() * ticksPassed;\n \t\t//check boundaries first\n \t\tif ((this.position.getX() + dx) < 0) { //off left\n \t\t\tdx = this.position.getX();\n \t\t\tthis.velocity.setX(0);\n \t\t}\n \t\telse if ((this.position.getX() + dx > App.WIDTH)) { //off right\n \t\t\tdx = (App.WIDTH - this.position.getX());\n \t\t\tthis.velocity.setX(0);\n \t\t}\n \t\tif ((this.position.getY() + dy) < 0) { //off top\n \t\t\tdy = this.position.getY();\n \t\t\tthis.velocity.setY(0);\n \t\t}\n \t\telse if ((this.position.getY() + dy) > App.HEIGHT) { //off bottom\n \t\t\tdy = (App.HEIGHT - this.position.getY());\n \t\t\tthis.velocity.setY(0);\n \t\t}\n \t\tthis.position.setX(this.position.getX() + dx);\n \t\tthis.position.setY(this.position.getY() + dy);\n \t\t//move the hitbox too\n \t\tthis.hitBox.move(dx, dy);\n \t\t//slow velocity due to drag\n \t\tdouble xDrag = this.drag * ticksPassed *\n \t\t\tMath.abs(this.direction.getX());\n \t\tdouble yDrag = this.drag * ticksPassed *\n \t\t\tMath.abs(this.direction.getY());\n \t\tdx = (this.velocity.getX() > 0) ?\n \t\t\t-Math.min(xDrag, this.velocity.getX()) :\n \t\t\tMath.min(xDrag, -this.velocity.getX());\n \t\tdy = (this.velocity.getY() > 0) ?\n \t\t\t-Math.min(yDrag, this.velocity.getY()) :\n \t\t\tMath.min(yDrag, -this.velocity.getY());\n \t\tthis.velocity.setX(this.velocity.getX() + dx);\n \t\tthis.velocity.setY(this.velocity.getY() + dy);\n \t\t//try to face the player\n \t\tDoubleVec2D toPlayer =\n \t\t\tthis.player.getPosition().subtract(this.position);\n \t\tDoubleVec2D toPlayerNorm = toPlayer.normalized();\n\t\t//perpdot = sin_theta, dot = cos_theta, negative y is up\n\t\tdouble angleBetween = -Math.atan2(toPlayerNorm.perpDot(this.direction),\n\t\t\t\ttoPlayerNorm.dot(this.direction));\n \t\tdouble rot = (angleBetween > 0) ? \n \t\t\t\tMath.min(this.maxRot, angleBetween) * ticksPassed:\n \t\t\t\tMath.max(-this.maxRot, angleBetween) * ticksPassed;\n \t\tdouble cosTheta = Math.cos(rot);\n \t\tdouble sinTheta = Math.sin(rot);\n \t\tdouble xPrime = (this.direction.getX() * cosTheta) - \n \t\t\t(this.direction.getY() * sinTheta);\n \t\tdouble yPrime = (this.direction.getX() * sinTheta) + \n \t\t\t(this.direction.getY() * cosTheta);\n \t\tthis.direction = new DoubleVec2D(xPrime, yPrime);\n \t\t//modify velocity for controls\n \t\t//TODO maybe modify for angle from player\n \t\tdx = this.direction.getX() * this.acceleration * ticksPassed;\n \t\tdy = this.direction.getY() * this.acceleration * ticksPassed;\n \t\tif (toPlayer.magnitude() > 1.0) {\n \t\t\tthis.velocity.setX(this.velocity.getX() + dx);\n \t\t\tthis.velocity.setY(this.velocity.getY() + dy);\n \t\t}\n \t\t//spawn bullet, considering cooldown\n \t\t//only shoot when facing the player and near the player\n \t\tthis.ticksSinceBullet += ticksPassed;\n \t\tif ((Math.abs(angleBetween) < this.maxAngleToFire) &&\n \t\t\t\t(Math.abs(toPlayer.magnitude()) < this.maxDistanceToFire) &&\n \t\t\t\t(this.ticksSinceBullet >= this.bulletCooldown)) {\n \t\t\tDoubleVec2D position = new DoubleVec2D(this.position.getX(),\n \t\t\t\t\tthis.position.getY());\n \t\t\tDoubleVec2D direction = new DoubleVec2D(this.direction.getX(),\n \t\t\t\t\tthis.direction.getY());\n \t\t\tthis.firedBullet = new Bullet(position, direction, false);\n \t\t\tthis.ticksSinceBullet = 0;\n \t\t}\n \t}",
"public static void initVelocity() {\n }",
"public void update(long fps) {\n rect.left = rect.left + ((float)xVelocity / fps);\n rect.top = rect.top + ((float)yVelocity / fps);\n rect.right = rect.left + width;\n rect.bottom = rect.top + height;\n }",
"public void update()\n\t{\n\t\tif (active)\n\t\t{\n\t\t\t// Increases speed to accelerate.\n\t\t\tif (speed < max_speed) speed += acceleration;\n\n\t\t\tif (speed > max_speed) speed = max_speed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Negates speed to slow down.\n\t\t\tif (speed > 0) speed = -speed;\n\t\t\tif (speed < 0) speed += acceleration;\n\n\t\t\tif (speed > 0) speed = 0;\n\t\t}\n\n\t\t// Sets the speed for thrust.\n\t\thost.momentum.addVelocity(new Displacement(speed * Math.cos(angle), speed * Math.sin(angle)));\n\t}",
"public Vector2D getVelocity ();",
"@Override\n\tpublic void update(float time) {\n\t\tif (lastPosition == null) {\n\t\t\tlastPosition = new Vector3f();\n\t\t\tlastPosition.set(getPosition());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Velocity\n\t\tvelocity.set(getPosition());\n\t\tvelocity.subtractLocal(lastPosition);\n\t\tvelocity.divideLocal(time);\n\t\t\n\t\t//Remember position for next update\n\t\tlastPosition.set(getPosition());\n\t}",
"public void update(){\n\t\ttime += System.currentTimeMillis() - lastTime;\n\t\tlastTime = System.currentTimeMillis();\n\t\t\n\t\t/*fin quando il tempo Ŕ maggiore della velocita incrementa gli indici*/\n\t\tif(time > velocity){\n\t\t\tindex++;\n\t\t\ttime = 0;\n\t\t\tif(index >= animation_frame.length)\n\t\t\t\t{\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t}\n\t}",
"public void clearVelocity();",
"public void setVector(float x, float y)\n {\n speedVector.x = x / 5;\n speedVector.y = y / 5;\n if((mag = speedVector.x * speedVector.x + speedVector.y * speedVector.y) > 1)\n {\n mag = FloatMath.sqrt(mag);\n speedVector.x /= mag;\n speedVector.y /= mag;\n }\n }",
"public void update(double dt, double fX, double fY){\n\n\t\tdouble aX = fX/mass;\n\t\tdouble aY = fY/mass;\n\n\t\tdouble xxNewVel = dt*aX;\n\t\tdouble yyNewVel = dt*aY;\n\n\n\t\txxVel = xxVel + xxNewVel;\n\t\tyyVel = yyVel + yyNewVel;\n\n\t\txxPos += dt*xxNewVel;\n\t\tyyPos += dt*yyNewVel;\n\t}",
"private void updatePhysics ( ECSEntity entity, long t )\n {\n // Constants.\n \n final double SCREEN_HEIGHT = 600.0;\n final double FRICTION_COEFFICIENT = 0.0001 / SCREEN_HEIGHT;\n final double ACCELERATION = 0.001 / SCREEN_HEIGHT;\n \n // Initialize working variables.\n \n double ax = 0.0;\n double ay = 0.0;\n \n // Retrieve the entity's components.\n \n this.transform = ( ComponentTransform ) entity.getComponent ( Constants.COMPONENT_TRANSFORM );\n this.physics = ( ComponentPhysics ) entity.getComponent ( Constants.COMPONENT_PHYSICS );\n \n // Initialize working variables.\n \n Vector2D a = new Vector2D ( this.physics.acceleration );\n Vector2D v = new Vector2D (); \n Vector2D d = new Vector2D ();\n Vector2D u = new Vector2D ();\n Vector2D dUp = new Vector2D ( 0.0, 1.0 );\n Vector2D dDown = new Vector2D ( 0.0, -1.0 );\n Vector2D dRight = new Vector2D ( 1.0, 0.0 );\n Vector2D dLeft = new Vector2D ( -1.0, 0.0 );\n double p = FRICTION_COEFFICIENT;\n double vMax = this.physics.vMax;\n \n // Calculate velocity.\n \n v.setVector ( a.scale ( t ) ); // Acceleration: a = v/t ↔ v = a·t (Newtonian acceleration).\n \n // Apply accelerator.\n \n if ( v.magnitude() < vMax / t )\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.add ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.add ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.add ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.add ( dLeft.scale ( ACCELERATION ) ) ); } \n } \n else\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.subtract ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.subtract ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.subtract ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.subtract ( dLeft.scale ( ACCELERATION ) ) ); }\n }\n \n // Calculate displacement. ( Distance to move in this time slice ).\n \n d.setVector ( v.scale ( t ) ); // Velocity: v = d/t ↔ d = v·t (Newtonian velocity).\n \n // Apply friction coefficient.\n \n double a2 = 4.0; // Friction amplifier. Used to speed up lateral deceleration, which improves the sense of control response experienced by the user.\n \n ax = a.getX ();\n ay = a.getY ();\n \n if ( this.physics.accelerateUp || this.physics.accelerateDown )\n {\n // If the user is currently accelerating up or down, then use the friction amplifier to speed up deceleration along the horizontal axis.\n \n if ( ax < 0 ) ax += p*a2;\n if ( ax > 0 ) ax -= p*a2;\n if ( ay < 0 ) ay += p;\n if ( ay > 0 ) ay -= p;\n }\n else if ( this.physics.accelerateLeft || this.physics.accelerateRight )\n {\n // If the user is currently accelerating left or right, then use the friction amplifier to speed up deceleration along the vertical axis.\n \n if ( ax < 0 ) ax += p;\n if ( ax > 0 ) ax -= p;\n if ( ay < 0 ) ay += p*a2;\n if ( ay > 0 ) ay -= p*a2;\n }\n else\n {\n // If the user is not accelerating in any direction, then just apply the normal friction coefficient in all direction.\n \n if ( ax < 0 ) { ax += p; if ( ax > 0.0 ) ax = 0.0; }\n if ( ax > 0 ) { ax -= p; if ( ax < 0.0 ) ax = 0.0; }\n if ( ay < 0 ) { ay += p; if ( ay > 0.0 ) ay = 0.0; }\n if ( ay > 0 ) { ay -= p; if ( ay < 0.0 ) ay = 0.0; }\n }\n \n a.setVector ( ax, ay );\n \n // Update physics.\n \n this.physics.acceleration.setVector ( a );\n this.physics.velocity.setVector ( v );\n \n // Update translation.\n \n this.transform.translation.setVector ( this.transform.translation.add ( d ) );\n }",
"private void updateBit() {\r\n float frameTime = 10f;\r\n xVel += (xAccel * frameTime);\r\n yVel += (yAccel * frameTime);\r\n\r\n float xS = (xVel / 20) * frameTime; //PROVIDE THE ANGULE OF THE POSITION\r\n float yS = (yVel / 20) * frameTime; // WITH LESS DENOMINADOR THE BALL MOVE IS MORE DIFFICULT\r\n\r\n xPos -= xS;\r\n yPos -= yS;\r\n\r\n if (xPos > xMax) {\r\n xPos = xMax;\r\n } else if (xPos < 0) {\r\n xPos = 0;\r\n }\r\n\r\n if (yPos > yMax) {\r\n yPos = yMax;\r\n } else if (yPos < 0) {\r\n yPos = 0;\r\n }\r\n\r\n\r\n }",
"private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }",
"@NativeType(\"ovrVector3f\")\n public OVRVector3f LinearVelocity() { return nLinearVelocity(address()); }",
"public void update() {\n \n // move\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n location.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n \n // decay life\n leftToLive = lifespan - (millis() - birth);\n }",
"public double getVelocity() {\n return 360000./(projDensity * projRadius);\n }",
"public void update(){\n\t\tx+=xspeed; \n\t\ty+=yspeed;\t\n\t}",
"@Override\n public Point3D getValue() {\n return velocity;\n }",
"public void update(float delta){\n\t\tposition.add(velocity.cpy().mul(delta));\n\t\tthis.bounds.setPosition(position.x, position.y);\n\t}",
"protected void update(float delta)\n {\n float stiffnessScale = 1f/16f;\n\n // FORCE CALCULATIONS\n float springForceX = -owner.STIFFNESS*stiffnessScale*(position.x - desiredPosition.x);\n float dampingForceX = owner.DAMPING * velocity.x;\n float forceX = springForceX - dampingForceX;\n\n float springForceY = -owner.STIFFNESS*stiffnessScale*(position.y - desiredPosition.y);\n float dampingForceY = owner.DAMPING * velocity.y;\n float forceY = springForceY - dampingForceY;\n\n float springForceZ = -owner.STIFFNESS*stiffnessScale*(position.z - desiredPosition.z);\n float dampingForceZ = owner.DAMPING * velocity.z;\n float forceZ = springForceZ - dampingForceZ;\n\n applyForce(forceX, forceY, forceZ);\n\n\n velocity.x += acceleration.x * delta;\n velocity.y += acceleration.y * delta;\n velocity.z += acceleration.z * delta;\n\n position.x += velocity.x * delta;\n position.y += velocity.y * delta;\n position.z += velocity.z * delta;\n //only want positive Z, as that is how the alpha color on the grid is determined\n position.z = abs(position.z);\n\n //not really accurate but it works\n velocity.scl(owner.DAMPING*delta);\n if(velocity.len2() < MathUtils.FLOAT_ROUNDING_ERROR)\n {\n velocity.x = velocity.y = velocity.z = 0;\n }\n\n color.lerp(desiredColor, delta * 0.5f);\n }",
"@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"static float calculateNewVelocity(float a, float deltaTime, float v0) {\n return v0 + (a * deltaTime);\n }",
"void setVelocity(int vel) {\n\t\tthis.velocity = vel;\n\t}",
"@Override\n protected void update(Engine engine) {\n\t\trs = (GL4RenderSystem) engine.getRenderSystem();\n\t\t\n\t\telapsTime += engine.getElapsedTimeMillis();\n\t\telapsTimeSec = Math.round(elapsTime/1000.0f);\n\t\telapsTimeStr = Integer.toString(elapsTimeSec);\n\t\t\n\t\t//player.update(elapsTimeSec);\n\t\tSceneNode dragon = engine.getSceneManager().getSceneNode(\"dragonNPCNode\");\n\t\t\n\t\tdIter++;\n\t\t//if(dIter == 200)\n\t\t//{\n\t\t\t//dir = dir*-1;\n\t\t\t//dIter = 0;\n\t\t//}\n\t\tif(dIter <= 200)\n\t\tdragon.moveBackward(dir);\n\t\t\n\t\tif(dIter > 200 && dIter <= 400 )\n\t\t\tdragon.moveLeft(dir);\n\t\t\n\t\tif(dIter > 400 && dIter <= 600 )\n\t\t\tdragon.moveForward(dir);\n\t\t\n\t\tif(dIter > 600 && dIter <= 800 )\n\t\t\tdragon.moveRight(dir);\n\t\t\n\t\tif(dIter == 800 )\n\t\t\tdIter = 0;\n\t\t//SkeletalEntity dragonSE =\n\t\t\t\t//(SkeletalEntity) engine.getSceneManager().getEntity(\"dragonSkeleton\");\n\t\t//dragonSE.update();\n\t\t\n\t\tfloat time = engine.getElapsedTimeMillis();\n\t\t\n\t\tfloat playerFloat[] = player.getNode().getLocalTransform().toFloatArray();\n\t\t//playerFloat[7] = player.getNode().getLocalPosition().y();\n\t\tdouble playerMat[] = toDoubleArray(playerFloat);\n\t\tMatrix4 mat3;\n\t\tmat3 = Matrix4f.createFrom(toFloatArray(player.getNode().getPhysicsObject().getTransform()));\n\t\t//player.getNode().setLocalPosition(playerFloat[3],mat3.value(1,3), playerFloat[11]);\n\t\t//double playerMat[] = toDoubleArray(player.getNode().getLocalTransform().toFloatArray());\n\t\tplayerFloat = player.getNode().getLocalTransform().toFloatArray();\n\t\t//playerFloat[7] = player.getNode().getLocalPosition().y();\n\t\tplayerFloat[7] = mat3.value(1,3);//set y coordinate to physics world\n\t\tplayerMat = toDoubleArray(playerFloat);\n\t\tSystem.out.println(\"player.getNode().getLocalTransform(): \" + player.getNode().getLocalTransform());\n\t player.getNode().getPhysicsObject().setTransform(playerMat);\n\t \n\t player.update(elapsTimeSec);\n\t SkeletalEntity manSE =\n \t\t(SkeletalEntity) engine.getSceneManager().getEntity(\"knightSkeleton\");\n \t\tmanSE.update();\n\n\t \n\t\tif (running)\n\t\t{ \n\t\t\tMatrix4 mat;\n\t\t\tphysicsEng.update(time);\n\t\t\tfor (SceneNode s : engine.getSceneManager().getSceneNodes())\n\t\t\t{ \n\t\t\t\t//if (s.getPhysicsObject() != null && s.getName() != player.getNode().getName())\n\t\t\t\t//if (s.getPhysicsObject() != null /*&& s.getName() != player.getNode().getName()*/)\n\t\t\t\t{ \n\t\t\t\t\tmat = Matrix4f.createFrom(toFloatArray(s.getPhysicsObject().getTransform()));\n\t\t\t\t\ts.setLocalPosition(mat.value(0,3),mat.value(1,3), mat.value(2,3));\n\t\t\t\t} \n\t\t\t} \n\t\t}\n\n\t\tdispStr=\"Time = \" + elapsTimeStr + \" Score: \"+player.getScore();\n\t\trs.setHUD(dispStr, 15, 15);\n\t\tif(player.isBoostActive()) dispStr+=\" Boost Active!\";\n\t\tim.update(elapsTime);\n\t\tprocessNetworking(elapsTime);\n\t\t\n\t\tcheckForCollisions();\n\t\t//player.update(elapsTimeSec);\n\t\tSystem.out.println(\"ball transform: \" + ball2Node.getLocalTransform() );\n\t\tSystem.out.println(\"ball physycs object transform: \" + ball2Node.getPhysicsObject().getTransform()[0] + ',' \n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[1] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[2] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[3] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[4] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[5] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[6] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[7] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[8] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[9] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[10] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[11] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[12] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[13] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[14] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[15] + ',');\n\t\tSystem.out.println(\"ball linear velocity: \" + ball2Node.getPhysicsObject().getLinearVelocity());\n\t\tif(distanceTo(player.getNode().getLocalPosition(),ball2Node.getLocalPosition()) <= 4)\n\t\t{\n\t\t\tball2Node.setLocalPosition(0,10,0);\n\t\t\tfloat velocityArray[] = { 0, 5, 0};\n\t\t\tball2Node.getPhysicsObject().setLinearVelocity(velocityArray);\n\t\t\tfloat floTemp[] = ball2Node.getLocalTransform().toFloatArray();\n\t\t\tdouble dubTemp[] = {(double)floTemp[0], (double)floTemp[1], (double)floTemp[2], (double)floTemp[3], (double)floTemp[4],\n\t\t\t\t\t(double)floTemp[5],(double)floTemp[6],(double)floTemp[7], (double)floTemp[8], (double)floTemp[9], (double)floTemp[10], (double)floTemp[11]\n\t\t\t\t\t\t\t, (double)floTemp[12], (double)floTemp[13], (double)floTemp[14], (double)floTemp[15] };\n\t\t\t\n\t\t\tdouble dubTemp2[] = toDoubleArray(floTemp);\n\n\n\t\t\t Matrix4 mat2;\n\t\t\tball2Node.getPhysicsObject().setTransform(dubTemp2);\n\t\t\t\n\t\t\t//mat2 = Matrix4f.createFrom(toDoubleArray( ball2Node.getLocalTransform().toFloatArray()))\n\t\t\t//ball2Node.getPhysicsObject().setTransform(dubTemp2);\n\t\t\t//ball2Node.setPhysicsObject(ball2PhysObj);\n\t\t\t//ball2Node.getPhysicsObject().getTransform().\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t//player.playWalkAnimation();\n\t\t\n\t\t\n\t\t\n\t\t/*ball2Node.getPhysicsObject().setTransform(ball2Node.getLocalTransform());\n\t\t//ball2PhysObj.set\n\t\tphysicsEng.\n\t\ttemptf = toDoubleArray(ball1Node.getLocalTransform().toFloatArray());\n \tball1PhysObj = physicsEng.addSphereObject(physicsEng.nextUID(),\n \tmass, temptf, 2.0f);\n \tball1PhysObj.setBounciness(1.0f);\n \tball1Node.setPhysicsObject(ball1PhysObj);*/\n\t\t\n\t\t/* check if player jumped*/\n\t\t\n\t}",
"@Override\n\tpublic Vector2 getLinearVelocity() {\n\t\treturn body.getLinearVelocity();\n\t}",
"@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }",
"public void update() {\n super.update();\n // Code specific to the ship gameObject\n action = ctrl.action();\n direction.rotate(action.turn * STEER_RATE * Constants.DT);\n velocity.addScaled(direction, (MAG_ACC * Constants.DT * action.thrust));\n position.addScaled(velocity, DRAG * Constants.DT);\n position.wrap(Constants.FRAME_WIDTH, Constants.FRAME_HEIGHT);\n\n // Checks if the user is pressing forwards\n if(action.thrust == 1){\n thrusting = true;\n } else{\n thrusting = false;\n }\n time -= 1;\n if(action.shoot && time <= 0){\n mkBullet();\n time = 30;\n }\n\n if(invincible)\n color = Color.blue;\n else\n color = Color.cyan;\n }",
"float speedForVector(float x, float y) {\n return distanceToXY(pos.x+x,pos.y+y);\n }",
"@Override\n\t\tpublic void updateVariables(){\n\t\t\tthis.currentX = odometer.getCurrentX();\n\t\t\tthis.currentY = odometer.getCurrentY();\n\t\t\tthis.currentAngle = odometer.getHeadingAngle();\n\t\t\tthis.currentAverageVelocity = odometer.getCurrentAverageVelocity();\n\t\t}",
"@Override\n public void update(float deltaTime) {\n this.lastPosition.set(this.position.x, this.position.y, this.position.z);\n\n this.velocity.x -= (K_M * this.velocity.x) * deltaTime;\n this.velocity.y -= (K_M * this.velocity.y) * deltaTime;\n this.velocity.z -= (K_M * this.velocity.z + GRAVITY) * deltaTime;\n\n // update position\n if (this.position.z > 0) {\n this.velocity.add(0, 0, -GRAVITY);\n }\n\n this.velocity.scl(deltaTime);\n this.position.add(this.velocity.x, this.velocity.y, this.velocity.z);\n if (this.position.z < 0) { // ball bounces on floor\n this.velocity.z = -this.velocity.z;\n this.position.z += this.velocity.z;\n\n if (this.velocity.z > 0.9f) {\n this.bounce.play(0.2f);\n }\n\n this.velocity.z -= this.velocity.z / 4;\n this.velocity.x -= this.velocity.x / 32;\n this.velocity.y -= this.velocity.y / 32;\n }\n this.velocity.scl(1 / deltaTime);\n }",
"public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}",
"public void runProjectionMotion(){\n\t\tpos.setLocation(pos.getX() + vel[0]/5, pos.getY() - vel[1]/5);\r\n\t\tvel[1]-=gravity;\r\n\t}",
"public void updateVelocity() {\n \t// Step 1: input power and convert the power to a force based on the starting velocity\n \tsetWeight();\n \tdouble trainMass = trainWeight*KG_PER_POUND;\n \t\n \t// this is ensuring that we never get a negative speed\n \tif (this.currentSpeed == 0) {\n \t\tthis.force = (this.powerIn)/1;\n \t} else {\n \t\tthis.force = (this.powerIn)/this.currentSpeed;\n \t}\n \tsetGrade();\n \t\n \t// Step 2: Calculate the slope of the train's current angle (Degrees = Tan-1 (Slope Percent/100))\n \tthis.slope = Math.atan2(this.grade,100);\n \tdouble angle = Math.toDegrees(this.slope);\n \t\n \t// Step 3: Calculate the forces acting on the train using the coefficient of friction\n \t// and the train's weight in lbs converted to kg divided over the wheels (where the force is technically\n \t// being applied times gravity (G)\n \tthis.normalForce = (trainMass/this.trainWheels) * G * Math.sin((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n \tthis.downwardForce = (trainMass/this.trainWheels) * G * Math.cos((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n\n \t// compute friction force\n \tthis.friction = (FRICTION_COEFFICIENT * this.downwardForce) + this.normalForce;\n \t\n \t// sum of the forces\n \tthis.totalForce = this.force - this.friction;\n \t \t\n \tthis.force = this.totalForce;\n \t\n \t// Step 4: Calculate acceleration using the F = ma equation, where m = the mass of the body moving\n \tthis.trainAcceleration = this.force/trainMass;\n \t\n \t// and have to check to make sure this acceleration does not exceed our max.\n \tif (this.trainAcceleration >= TRAIN_MAX_ACCELERATION * 1) {\t// time elapsed (one second)\n \t\t// set the acceleration as the max acceleration because we cannot exceed that\n \t\tthis.trainAcceleration = TRAIN_MAX_ACCELERATION * 1;\t// time elapsed (one second)\n \t}\n \t\n\t\temerBrake = this.getEBrake();\n \t// decelerates the train based on the values given in the spec sheet for the emergency brake\n \tif (emerBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_E_BRAKE*1);\n \t}\n \t\n \t// decelerates the train based onthe values given in the spec sheet for the service brake\n \tif(serviceBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_SERVICE_BRAKE*1);\n \t}\n \t\n \t// Step 5: Calculate the final speed by adding the old speed with the acceleration x the time elapsed (one second)\n \tthis.finalSpeed = this.currentSpeed + (this.trainAcceleration * 1);\n \t\n \t// NO NEGATIVE SPEEDS YINZ\n \tif(this.finalSpeed < 0) {\n this.finalSpeed = 0;\n }\n \t\n \t// resetting the current speed based on our calculations\n \tthis.currentSpeed = this.finalSpeed;\n \tthis.distTravelled = this.currentSpeed * 1; // speed times the time between clock ticks = distance travelled\n \t//System.out.println(finalSpeed);\n \t\n \tif(!(currentBlock == this.position.getCurrentBlock())) {\n \t\tmetersIn = 0;\n \t} else {\n \t\tmetersIn += this.distTravelled;\n \t}\n \tthis.position.moveTrain(this.distTravelled); // method call to tell the position class how far to move the train\n \t\n }",
"private void move() {\n acceleration.accelerate(velocity, position);\r\n }",
"@Override\n\tpublic void tick() {\n\t\n\t\t\n\t\tx += velX;\n\t\ty += velY;\n\t\t\n\t\tcollision();\n\t\t\n\t\tif (input.keys[0]) {velY -= accel;}\n\t\tif (input.keys[2]) {velY += accel;}\n\t\tif (!input.keys[0] && !input.keys[2]) {\n\t\t\tif (velY > 0) {\n\t\t\t\tvelY -= deccel;\n\t\t\t} else if (velY < 0) {\n\t\t\t\tvelY += deccel;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (input.keys[1]) {velX -= accel;}\n\t\tif (input.keys[3]) {velX += accel;}\n\t\tif (!input.keys[1] && !input.keys[3]) {\n\t\t\tif (velX > 0) {\n\t\t\t\tvelX -= deccel;\n\t\t\t} else if (velX < 0) {\n\t\t\t\tvelX += deccel;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (velX >= 6) {velX = 6;} else if (velX <= -6) {velX = -6;}\n\t\tif (velY >= 6) {velY = 6;} else if (velY <= -6) {velY = -6;}\n\t\t\n\t\t\n\t\tanim.runAnimation();\n\t}",
"public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }",
"public Vector2f getVelocity(){\n\t\treturn velocity.copy();\n\t}",
"void update() {\n for( int i= 0; i < masses.length; i++) {\n masses[i].posX += masses[i].vx*dt;\n masses[i].posY += masses[i].vy*dt;\n }\n\n for( int i = 0; i < springs.length; i++) {\n if( !springs[i].mass1.fixed ) {\n springs[i].mass1.vx += ( springs[i].forceX() + nx(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vx ) * dt;\n springs[i].mass1.vy += ( springs[i].forceY() + ny(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vy ) * dt;\n }\n\n if( !springs[i].mass2.fixed ) {\n springs[i].mass2.vx += ( (-1)*springs[i].forceX() + nx(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vx ) * dt;\n springs[i].mass2.vy += ( (-1)*springs[i].forceY() + ny(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vy ) * dt;\n }\n }\n }",
"double getVy() { return vel[1]; }",
"double getVx() { return vel[0]; }",
"public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}",
"public double getVelocity() {\n return mV;\n }",
"public void setVelocity(double x, double y) {\n velocity[X] = x;\n velocity[Y] = y;\n //velocity[Z] = z;\n }",
"public void update(double dt, double fX, double fY){\n\t\tdouble xAce = fX / this.mass;\n\t\tdouble yAce = fY / this.mass;\n\t\tthis.xxVel += xAce * dt;\n\t\tthis.yyVel += yAce * dt;\n\t\tthis.xxPos += xxVel * dt;\n\t\tthis.yyPos += yyVel * dt;\n\n\t}",
"public void updateMovement() {\n //if the x speed hasn't reached its max, increase the velocity\n if (Math.abs(this.xVel) < this.xTargetSpeed) {\n this.xVel += this.acceleration*this.dir;\n }\n\n //falling because of gravity -> freefall acceleration\n this.yVel += World.GRAVITY;\n\n //cling onto wall\n if (this.state.equals(\"onLeftWall\")\n || this.state.equals(\"onRightWall\")) {\n this.yVel -= World.GRAVITY/1.2;\n }\n\n this.x += this.xVel;\n \n if (!this.gravityCancel) {\n this.y += this.yVel;\n }\n }",
"public void setVelocity(float dummyX, float dummyZ){\n\t\t\n\t}",
"public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }",
"public Velocity getVelocity() {\r\n return this.vel;\r\n }",
"public void clearAngularVelocity();",
"public void updateLogic(){\n\t\t\n\t\tif(gameMode){\n\t\t\tif(firstTouchdown){\n\t\t\t\t//linear x movement of the cube \n\t\t\t\tthis.applyBodyForceToCenter(Gsing.get().cSpeed, 0, true); \n\t\t\t\tthis.setBodyLinearDamping(0.3f); \n\t\t\t}\n\t\t\t\n\t\t\tif(!stopInc){\n\t\t\t\tthis.applyBodyForceToCenter(0, 50*this.getBodyMass(), true);\n\t\t\t}\n\t\t\t\n\t\t\tif(jump && isTouching){\n\t\t\t\tjump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tcheckInAirRotation = true; \n\t\t\t\tpos = this.getBodyWorldCenter();\n//\t\t\t\tthis.setBodyLinearVelocity(this.getBodyLinearVelocity().x, 17); \n\t\t\t\tthis.applyBodyLinearImpulse(new Vector2(0, Gsing.get().cImpulse), pos, true);\n\t\t\t}\n\t\t\t\n\t\t\tif(flyMode){\n\t\t\t\tpos = this.getBodyWorldCenter();\n\t\t\t\tthis.applyBodyForceToCenter(0, 35*this.getBodyMass(), true);\n\t\t\t\t\n\t\t\t\tif(fly){\n\t\t\t\t\tfly = false; \n\t\t\t\t\tthis.applyBodyForceToCenter(0, Gsing.get().cForce, true); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(specialJump && isTouching){\n\t\t\t\tangle = Math.random()*Math.PI*2; \n\t\t\t\tspecialJump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tpos = this.getBodyWorldCenter(); \n\t\t\t\tthis.applyBodyLinearImpulse(specialImpulse, pos, true); \n\t\t\t\tLogger.log(\"jumped in a special way\"); \n\t\t\t}\n\t\t\t\n\t\t\tif(checkInAirRotation){\n\t\t\t\tsetDrawAngle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDamageCnt == 6){\n\t\t\t\tcubeDead = true; \n\t\t\t}\n\t\t\t\n\t\t\t//check if the cube has encountered an obstacle\n\t\t\tif(isHurt)\n\t\t\t{\n\t\t\t\temitParticle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDead){\n\t\t\t\tScreenHub.s.transitionTo(2, ScreenManager.TransactionType.SLICE); \n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse{\n\t\t\t\n\t\t\tif(this.getBodyLinearVelocity().x < .1 && !itsTheEnd){\n\t\t\t\tif(this.getBodyWorldCenter().y <= Gdx.graphics.getHeight()*.75){\n\t\t\t\t\tthis.applyBodyForceToCenter(0, 700f, true);\n//\t\t\t\t\tthis.getBody().setTransform(this.getBodyPosition(), 0);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\temitParticle(); \n\t\t\t\t\titsTheEnd = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcheckParticles4Destruction();\n\t}",
"public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }",
"public static void updatePosition() {\n\t\tfor (int i = 0; i < TitanV4.planets.length; i++) { //compute forces between all celestial corpses\n\t\t\tfor(int j=i; j<TitanV4.planets.length; j++){\n\t\t\t\tif (i != j) {\n\t\t\t\t\tdouble upper = TitanV4.G*TitanV4.planets[i].getMass() * TitanV4.planets[j].getMass();\n\t\t\t\t\tdouble lower = TitanV4.planets[i].getPosition().distanceFrom(TitanV4.planets[j].getPosition());\n\t\t\t\t\tdouble gravitation = upper/lower;\n\t\t\t\t\tVector a = new Vector();\n\t\t\t\t\ta = TitanV4.planets[i].getPosition().substract(TitanV4.planets[j].getPosition()).normalize().multiply(-1);\n\n\t\t\t\t\tTitanV4.planets[i].force.add(a.multiply(gravitation));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//compute acceleration vector for each celestial corpse but the sun\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tTitanV4.planets[i].acceleration = (TitanV4.planets[i].force.divide(TitanV4.planets[i].getMass()));\n\t\t}\n\n\t\t//calculate change in speed over deltaT\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tVector oldVelocity = new Vector(TitanV4.planets[i].velocity);\n\t\t\tTitanV4.planets[i].velocity.add((TitanV4.planets[i].acceleration.multiply(TitanV4.deltaT)));\n\n\t\t\tVector posChange = new Vector();\n\t\t\tposChange = (oldVelocity.add(velocity).divide(2)).multiply(TitanV4.deltaT);\n\t\t\tTitanV4.planets[i].pos.add(posChange);\n\t\t}\n\t}",
"@Override\n\tpublic void tick() {\n\t\tif(levelOver) {\n\t\t\tif(this.getY()+this.getHeight() > flag.getY() + flag.getBounds().getHeight() - 60) {\n\t\t\t\tthis.setVelY(0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ty += velY;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(y > Window.HEIGHT + 2000) {\n\t\t\tif(!played) {\n\t\t\t\tAudioHandler.getMusic(\"theme\").pause();\n\t\t\t\tAudioHandler.getSound(\"died\").play();\n\t\t\t\tplayed = true;\n\t\t\t}\n\t\t\tDrawingCanvas.gameState = GameState.End;\n\t\t\treturn;\n\t\t}\n\n\t\tif(!died) {\n\t\t\t\n\t\t\tif(velX > 0 || KeyBoard.cameraVelX < 0) {\n\t\t\t\tcountRight += 0.5;\n\t\t\t\tif(countRight >= 6) countRight = 0;\n\t\t\t\tfacingRight = true;\n\t\t\t\tfacingLeft = false;\n\t\t\t} else if(velX < 0 || KeyBoard.cameraVelX > 0) {\n\t\t\t\tcountLeft += 0.5;\n\t\t\t\tif(countLeft >= 6) countLeft = 0;\n\t\t\t\tfacingRight = false;\n\t\t\t\tfacingLeft = true;\n\t\t\t} \n\t\t\t\n\t\t//\tSystem.out.println(\"dPressed: \"+KeyBoard.dPressed+\" aPressed: \"+KeyBoard.aPressed);\n\t\t\t\n\t\t\t\n\t\t\tx += velX;\n\t\t\ty += velY;\n\t\t\t\n\t\t\t/*if(!collideCheck()) {\n\t\t\t\tvelY -= accY;\n\t\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\tvelY+=accY;\n\t\t\tcollideCheck();\n\t\t\t\n\t\t\t//if(jumping) velY += accY;\n\t//\t\tif(velX > 0) velX += accX;\n\t//\t\telse if(velX < 0) velX -= accX;\n\t\t\t\n\t\t\tvelY = Window.clamp(80, -30, velY);\n\t\t} else if(died) {\n\t\t\ty += velY;\n\t\t\tvelY += accY;\n\t\t}\n\t\t\n\t}",
"public void addVelocity(double x, double y) {\n velocityX += x;\n velocityY += y;\n }",
"public void moveOneStep() {\n if (velocity.getDx() < 0 && this.center.getX() - this.radius < bottomLeftBound) {\n this.setVelocity(-velocity.getDx(), velocity.getDy());\n } else if (velocity.getDx() > 0 && this.center.getX() + this.radius > bottomRightBound) {\n this.setVelocity(-velocity.getDx(), velocity.getDy());\n }\n if (velocity.getDy() < 0 && this.center.getY() - this.radius < topLeftBound) {\n this.setVelocity(velocity.getDx(), -velocity.getDy());\n } else if (velocity.getDy() > 0 && this.center.getY() + this.radius > topRightBound) {\n this.setVelocity(velocity.getDx(), -velocity.getDy());\n }\n this.center = this.getVelocity().applyToPoint(this.center);\n }",
"private void update(Ball currBall){\n currBall.ovalX += currBall.speedX * TIME_STEP;\n currBall.ovalY += currBall.speedY * TIME_STEP;\n\n if (currBall.ovalX >= screenW - currBall.ovalD) { // Right penetration\n currBall.speedX = -currBall.speedX;\n currBall.ovalX = currBall.ovalX - 2 * ((currBall.ovalX + currBall.ovalD) - screenW);\n } else if (currBall.ovalX <= 0) { // Left penetration\n currBall.speedX = -currBall.speedX;\n currBall.ovalX = -currBall.ovalX;\n }\n if (currBall.ovalY >= screenH - currBall.ovalD) { // Bottom penetration\n currBall.speedY = -currBall.speedY;\n currBall.ovalY = currBall.ovalY - 2 * ((currBall.ovalY + currBall.ovalD) - screenH);\n } else if (currBall.ovalY <= 0) { // Top penetration\n currBall.speedY = -currBall.speedY;\n currBall.ovalY = -currBall.ovalY;\n }\n }",
"public void setVelocity(double x, double y) {\n velocityX = x;\n velocityY = y;\n }",
"@Override\n public void update(double dt) {\n myLifetime -= dt;\n \n if (myLifetime <= 0) {\n destroy();\n }\n else {\n double d = SPEED * dt;\n double angle = Math.toRadians(getRotation());\n translate(d * Math.cos(angle), d * Math.sin(angle));\n \n // add momentum term\n translate(dt * myMomentum[0], dt * myMomentum[1]);\n }\n }",
"@Override\n public void onUpdate(float v) {\n }",
"public Velocity getVelocity() {\n return this.v;\n\n }"
] | [
"0.73962855",
"0.73897123",
"0.7145946",
"0.71187127",
"0.7109862",
"0.70733213",
"0.7071355",
"0.70034975",
"0.69661105",
"0.68775386",
"0.6865201",
"0.684901",
"0.6847168",
"0.6793805",
"0.6774074",
"0.67518175",
"0.6745853",
"0.67436177",
"0.668098",
"0.668098",
"0.66738504",
"0.6668327",
"0.66648585",
"0.66207504",
"0.65884453",
"0.65696985",
"0.65547365",
"0.65480465",
"0.6533191",
"0.65055364",
"0.6490549",
"0.6468415",
"0.64635843",
"0.64557356",
"0.6454164",
"0.6422434",
"0.64087296",
"0.64051086",
"0.639264",
"0.63863313",
"0.63460183",
"0.63432604",
"0.63420075",
"0.6338314",
"0.6332153",
"0.63308245",
"0.6330764",
"0.6323913",
"0.63214827",
"0.6314339",
"0.63032275",
"0.62958306",
"0.6286079",
"0.6285704",
"0.6281146",
"0.6271117",
"0.6256534",
"0.625152",
"0.6250587",
"0.62419087",
"0.62407106",
"0.6233419",
"0.62316865",
"0.6231555",
"0.62310433",
"0.6218576",
"0.61989206",
"0.6198167",
"0.6179027",
"0.61779565",
"0.61743766",
"0.61600435",
"0.61593795",
"0.61582124",
"0.61561596",
"0.6144853",
"0.6144551",
"0.61425537",
"0.614207",
"0.6136028",
"0.6131887",
"0.612402",
"0.6119267",
"0.61140907",
"0.6112254",
"0.61094916",
"0.61070305",
"0.61013776",
"0.60983986",
"0.6092503",
"0.6083047",
"0.608126",
"0.6079519",
"0.6066688",
"0.6064046",
"0.6060524",
"0.60483813",
"0.6044524",
"0.6042464",
"0.6031476",
"0.6024305"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==btnDeposit) {//change pin
// System.out.println(Integer.valueOf(passwordField_1.getText()));
// System.out.println(Integer.valueOf(passwordField_2.getText()));
// System.out.println(Integer.valueOf(passwordField_1.getText())-Integer.valueOf(passwordField_2.getText())==0 );
if((passwordField_2.getText()!="" && Integer.valueOf(passwordField_1.getText())-Integer.valueOf(passwordField_2.getText())!=0 ) || Integer.valueOf(passwordField.getText())!=c.getPin())
JOptionPane.showMessageDialog(null, "Kindly recheck your Pin!");
else{
dispose();
c.setPin(Integer.valueOf(passwordField_1.getText()));
if(BankContoller.pinChange(c))JOptionPane.showMessageDialog(null, "Your Password has been changed Successfully, "+c.getName());
new Bank_ThankYou();
}
}
if(e.getSource()==btnLogin) {//cancel
dispose();
}
} | {
"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 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.id | public Integer getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public long getShopBasketId();",
"public long getItemShopBasketId();",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"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 Integer getBallPackId() {\n return ballPackId;\n }",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"public int getProduct_id() {\n\t\treturn product_id;\n\t}",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"@Override\r\n\tpublic Long getID(ProductIngredientParam param) {\n\t\treturn param.getId();\r\n\t}",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) 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 id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"long getPackageid();",
"long getPackageid();",
"public Integer getProductId() {\n\t\treturn productId;\n\t}",
"Product getProductByID(Long id);",
"public int getProductId() {\n return productId;\n }",
"public int getProductId() {\n return productId;\n }",
"public String getProductid() {\n return productid;\n }",
"public Product getProductFromId(Integer prodId) throws BackendException;",
"public Long getProductId() {\n\t\treturn productId;\n\t}",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public PxProductInfo getComboId() {\n return comboId;\n }",
"public String getProductID() {\r\n return productID;\r\n }",
"CafeProduct getProductById(final Integer productId);",
"public Integer getId()\r\n\t\t{ return mapping.getId(); }",
"Product selectByPrimaryKey(Long id);",
"public String getProductID(Integer randomeProductPlateNumber) {\n\t\t By currentProductLinkField = By.xpath(\"//*[@id='product-list']/div/div[\"+ randomeProductPlateNumber + \"]/a[1]\");\n\t\treturn driver.findElement(currentProductLinkField).getAttribute(\"data-linkproductid\");\n\t}",
"public int getProductId() {\n\t\treturn productId;\n\t}",
"public String getProductId() {\r\n\t\treturn productId;\r\n\t}",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public int getProdId() {\n\t\treturn prodId;\n\t}",
"protected String getProductId() {\n return productId;\n }",
"public String getProductId();",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public abstract Integer getCompteId();",
"public String getProductoId() {\n\t\treturn productoId;\n\t}",
"Product selectByPrimaryKey(Integer id);",
"public Integer getProductTypeId() {\r\n return productTypeId;\r\n }",
"public String getProductId() ;",
"Product getProductById(Integer productID);",
"@Override\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\t@Column(name = \"pepe_sq_id\")\n\tpublic Long getId() {\n\t\treturn super.getId();\n\t}",
"public int getIdProducto() {\n return idProducto;\n }",
"String getProductId();",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"public String getProd_id() {\r\n\t\treturn prod_id;\r\n\t}",
"@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY, generator=\"TB_PRODUTO_ID_SEQ\")\n\t@SequenceGenerator(allocationSize=1, initialValue=1, name=\"TB_PRODUTO_ID_SEQ\", sequenceName=\"TB_PRODUTO_ID_SEQ\")\n\t@Column(name=\"id\",length=11, unique=true)\n\tpublic Integer getIdProduto() {\n\t\treturn idProduto;\n\t}",
"public int getM_Production_ID();",
"@Exclude\n public String getIdProduct() {\n return idProduct;\n }",
"@Override\n\tpublic long getContent_id() {\n\t\treturn _buySellProducts.getContent_id();\n\t}",
"public int getId() {\n return parameter.getId();\n }",
"public String getPackageId()\n {\n return packageId;\n }",
"public int getM_Product_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Product_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public int getAD_Tree_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"AD_Tree_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"int getBId();",
"@JsonGetter(\"product_id\")\n public Integer getProductId ( ) { \n return this.productId;\n }",
"@Override\r\n\tpublic String getId() {\n\t\treturn mProductionId;\r\n\t}",
"Product findProductById(Long id);",
"ItoProduct selectByPrimaryKey(Integer id);",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}",
"public Integer getProductUomId() {\n return productUomId;\n }",
"public Integer getProductUomId() {\n return productUomId;\n }",
"public Integer getProductColorId() {\r\n return productColorId;\r\n }",
"public static Product getProductFromProductId(int temp) {\n\n\t\tProduct productdb = new Product();\n\t\tSession session = factory.openSession();\n\n\t\tTransaction transaction = session.beginTransaction();\n\n\t\tproductdb = (Product) session.get(Product.class, temp);\n\n\t\ttransaction.commit();\n\n\t\treturn productdb;\n\t}",
"@Import(\"id\")\n\tint getId();",
"public String getIdProducto() {\n\t\treturn idProducto;\n\t}",
"@Override\n\tpublic int insertProduct(Product product) throws ProductRepositoryException {\n\t\ttry (Connection conn = DriverManager.getConnection(dbUrl, userName, password)) {\n\n\t\t\t// creating statement, returns result-set with the key-values\n\t\t\tPreparedStatement stmt = conn.prepareStatement(INSERT_PRODUCT_STATEMENT, Statement.RETURN_GENERATED_KEYS);\n\n\t\t\tsetCommonParameters(product, stmt);\n\t\t\t// executing the command, result is the count of the affected data-sets\n\t\t\tint rowAffected = stmt.executeUpdate();\n\t\t\tif (rowAffected != 1) {\n\t\t\t\tSystem.out.println(\"No dataset involved with the insert ????\");\n\t\t\t\tthrow new ProductRepositoryException(\"No dataset is involved with the insert.\");\n\t\t\t}\n\n\t\t\t// when everything went right, getting the key\n\t\t\tResultSet keys = stmt.getGeneratedKeys();\n\t\t\tif (keys.next()) {\n\t\t\t\tint id = keys.getInt(1);\n\t\t\t\tSystem.out.printf(\"Object inserted with the new ID=%d\\n\", id);\n\t\t\t\treturn id;\n\t\t\t} else {\n\t\t\t\t// shouldn't happen\n\t\t\t\tSystem.err.printf(\"Object inserted, new ID unknown!\");\n\t\t\t\tthrow new ProductRepositoryException(\"The dataset was inserted but the ID couldn't be identified\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Error when inserting product datatset\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ProductRepositoryException(\"Error inserting the product-datasetz\", e);\n\t\t}\n\t}",
"public Integer getBlId() {\n return blId;\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t}",
"public long getPrimaryKey() {\n\t\treturn _telefonoSolicitudProducto.getPrimaryKey();\n\t}",
"@Override\n\tpublic int getProductId(final String producerCode)\n\t{\n\t\tint item = 0;\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tString sql = \"select i.item from item i where producer_code = '\" + producerCode + \"'\";\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tProductRset = ps.executeQuery();\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl.getProductId(): Returning item\"\n\t\t\t\t\t+ \"select i.item from item where producer_code = '\" + producerCode\n\t\t\t\t\t+ \"' returning item\");\n\t\t\twhile (ProductRset.next())\n\t\t\t{\n\t\t\t\titem = ProductRset.getInt(\"item\");\n\t\t\t}\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"ProductDAOImpl.getProductId():\", ex.getMessage());\n\t\t}\n\n\t\treturn item;\n\n\t}",
"public Integer getId() {\n\t\treturn loanId; //changed LoAn_Id to loanId\r\n\t}",
"public Long getId() {\n return super.getId();\n }",
"public void setBallPackId(Integer ballPackId) {\n this.ballPackId = ballPackId;\n }",
"Product findById(long id);",
"public int getNextIdNumberForProduct() {\n Integer maxId = 0;\n for(Product product : allProducts) {\n if(product.getId() > maxId) {\n maxId = product.getId();\n }\n }\n \n return maxId + 1;\n }",
"private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }",
"public abstract Long getId();",
"public Integer getGoodsPkId() {\n\t\treturn goodsPkId;\n\t}"
] | [
"0.6585784",
"0.65012026",
"0.6482965",
"0.64771736",
"0.63803566",
"0.63718235",
"0.63572496",
"0.6356124",
"0.62682766",
"0.62682766",
"0.62681913",
"0.62404794",
"0.62404794",
"0.61988896",
"0.61913764",
"0.61913764",
"0.61913764",
"0.61913764",
"0.61913764",
"0.61913764",
"0.6177188",
"0.6177188",
"0.614586",
"0.614586",
"0.614586",
"0.6133957",
"0.60592526",
"0.6055826",
"0.6039133",
"0.6039133",
"0.603499",
"0.5979282",
"0.5963999",
"0.5963999",
"0.5962291",
"0.59005064",
"0.5889157",
"0.5876027",
"0.5876027",
"0.5876027",
"0.5876027",
"0.5876027",
"0.5865137",
"0.5823414",
"0.5796989",
"0.57892996",
"0.5788409",
"0.5785349",
"0.57643026",
"0.57498384",
"0.5746637",
"0.5746637",
"0.5745716",
"0.57059157",
"0.56993914",
"0.5698581",
"0.5696742",
"0.56854725",
"0.5681186",
"0.56689906",
"0.5652461",
"0.5651035",
"0.5643057",
"0.5637959",
"0.5632338",
"0.56294924",
"0.5626099",
"0.562497",
"0.562335",
"0.5615716",
"0.5612416",
"0.559839",
"0.5597098",
"0.5594071",
"0.5553536",
"0.55533344",
"0.5547325",
"0.5530269",
"0.55206203",
"0.551716",
"0.55127037",
"0.5503649",
"0.5496605",
"0.5496605",
"0.54861146",
"0.5466457",
"0.546183",
"0.5444994",
"0.5444864",
"0.5443496",
"0.5440628",
"0.54222727",
"0.5418459",
"0.5413498",
"0.5405272",
"0.5401202",
"0.53986245",
"0.53950053",
"0.5393641",
"0.5389499",
"0.53820395"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.id | public void setId(Integer id) {
this.id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setProductId(String productId) ;",
"@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}",
"public void setBallPackId(Integer ballPackId) {\n this.ballPackId = ballPackId;\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setIdProducto(int value) {\n this.idProducto = value;\n }",
"public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}",
"protected void setProductId(String productId) {\n this.productId = productId;\n }",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"public Integer getBallPackId() {\n return ballPackId;\n }",
"public void setProductId(Integer productId) {\n\t\tthis.productId = productId;\n\t}",
"void updateOfProductById(long id);",
"public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }",
"public void setShopBasketId(long shopBasketId);",
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public void setProduct(entity.APDProduct value);",
"public int getProduct_id() {\n\t\treturn product_id;\n\t}",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public void setProductId(Long productId) {\n\t\tthis.productId = productId;\n\t}",
"public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public void setM_Production_ID (int M_Production_ID);",
"@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }",
"public void setProductId(String productId) {\n this.productId = productId;\n }",
"public int getProductId() {\n return productId;\n }",
"public int getProductId() {\n return productId;\n }",
"Product updateProductById(Long id);",
"public String getProductid() {\n return productid;\n }",
"public void setItemShopBasketId(long itemShopBasketId);",
"public void setProduct(Product product) {\n this.product = product;\n }",
"public void setProductId(String productId) {\r\n\t\tthis.productId = productId;\r\n\t}",
"public static Boolean upate_product_packID(int prodID,int packID){\n String sql = \"UPDATE Product SET PackageID = ?, Status = ? WHERE ID = ? \";\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setInt(1,packID);\n if (prodID==-1) pstmt.setInt(2,0);\n else pstmt.setInt(2,1);\n pstmt.setInt(3,prodID);\n if(pstmt.executeUpdate()!=0)\n return true;\n }catch (SQLException e){\n System.out.println(e.getMessage());\n }\n return false;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n\t\treturn productId;\n\t}",
"@Override\r\n\tpublic void setId(String id) {\n\t\tmProductionId = id;\r\n\t}",
"private void setBId(int value) {\n \n bId_ = value;\n }",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public long getItemShopBasketId();",
"protected String getProductId() {\n return productId;\n }",
"public long getShopBasketId();",
"public Long getProductId() {\n\t\treturn productId;\n\t}",
"public void setProductRelatedByRelProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProductId(((NumberKey) key).intValue());\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"Product getProductByID(Long id);",
"@Override\r\n\tpublic int updateProductById(HashMap<String, Object> map) {\n\t\tProduct product = (Product) map.get(\"product\");\r\n\t\tdao.updateProductById(product);\r\n\t\tList<ProductOption> oldList = (List<ProductOption>) map.get(\"oldList\");\r\n\t\tfor(int idx=0; idx<oldList.size(); idx++){\r\n\t\t\toldList.get(idx).setProductId(product.getProductId());\r\n\t\t\tdao.updateProductOptionById(oldList.get(idx));\r\n\t\t}\r\n\t\tList<ProductOption> newList = (List<ProductOption>) map.get(\"newList\");\r\n\t\tif(map.get(\"newList\")!=null){\r\n\t\t\tfor(int idx=0; idx<newList.size(); idx++){\r\n\t\t\t\tnewList.get(idx).setProductId(product.getProductId());\r\n\t\t\t\toptionDao.insertOption(newList.get(idx));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif( map.get(\"image\")!=null){\r\n\t\t\tProductDetailImage image = ((ProductDetailImage) map.get(\"image\"));\r\n\t\t\tdao.updateDetailImageById(image);\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_buySellProducts.setPrimaryKey(primaryKey);\n\t}",
"public void setIdBoleta(int value) {\n this.idBoleta = value;\n }",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"public void setId(Long pid) {\n this.pid = pid;\n }",
"public String getProductId() {\r\n\t\treturn productId;\r\n\t}",
"public int getProductId() {\n\t\treturn productId;\n\t}",
"public String getProductID() {\r\n return productID;\r\n }",
"public void setProductColorId(Integer productColorId) {\r\n this.productColorId = productColorId;\r\n }",
"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 abstract void setCompteId(Integer pCompteId);",
"public void setPackageId( String packageId )\n {\n this.packageId = packageId;\n }",
"public void setIdproducto(int idproducto) {\r\n\t\tthis.idproducto = idproducto;\r\n\t}",
"public void setProductId(int v) throws TorqueException\n {\n \n if (this.productId != v)\n {\n this.productId = v;\n setModified(true);\n }\n \n \n if (aProductRelatedByProductId != null && !(aProductRelatedByProductId.getProductId() == v))\n {\n aProductRelatedByProductId = null;\n }\n \n }",
"public void setProductTypeId(Integer productTypeId) {\r\n this.productTypeId = productTypeId;\r\n }",
"public void setProductUomId(Integer productUomId) {\n this.productUomId = productUomId;\n }",
"public void setProductUomId(Integer productUomId) {\n this.productUomId = productUomId;\n }",
"public void updateProductById(Product p, int id) {\n\t\tp.setId(id);\r\n\t\tp.setCreateDate(new java.sql.Date(new Date().getTime()));\r\n\t\tproductMapper.updateProductById(p);\r\n\t}",
"public void setProduct(Product selectedProduct) {\n\t\t\n\t\tthis.modifiedProduct = selectedProduct;\n\n\t\tidField.setText(Integer.toString(modifiedProduct.getId()));\n\t\tproductNameField.setText(modifiedProduct.getName());\n\t\tpriceField.setText(Double.toString(modifiedProduct.getPrice()));\n\t\tinvField.setText(Integer.toString(modifiedProduct.getStock()));\n\t\tmaxField.setText(Integer.toString(modifiedProduct.getMax()));\n\t\tminField.setText(Integer.toString(modifiedProduct.getMin()));\n\t\t\t\t\n\t\tdummyList = modifiedProduct.getAllAssociatedParts();\n\t\tpartListProductTable.setItems(dummyList);\n\t}",
"CafeProduct getProductById(final Integer productId);",
"public int getProdId() {\n\t\treturn prodId;\n\t}",
"@Override\n\tpublic void setContent_id(long content_id) {\n\t\t_buySellProducts.setContent_id(content_id);\n\t}",
"public Product getProductFromId(Integer prodId) throws BackendException;",
"public void setProduct(final ProductReference product);",
"public void setM_Product_ID(int M_Product_ID) {\n\t\tif (M_Product_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"M_Product_ID is mandatory.\");\n\t\tset_Value(\"M_Product_ID\", new Integer(M_Product_ID));\n\t}",
"public void setId(long id) {\n id_ = id;\n }",
"@Override\r\n\tpublic Long getID(ProductIngredientParam param) {\n\t\treturn param.getId();\r\n\t}",
"public Builder setPackageid(long value) {\n bitField0_ |= 0x00000002;\n packageid_ = value;\n onChanged();\n return this;\n }",
"public void setProductid(String productid) {\n this.productid = productid == null ? null : productid.trim();\n }",
"public Builder setPackageid(long value) {\n bitField0_ |= 0x00000001;\n packageid_ = value;\n onChanged();\n return this;\n }",
"public void setProductIds(Set<Long> productIdsIn) {\n productIds = productIdsIn;\n }",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"protected abstract void setId(P object, Long id);"
] | [
"0.65337604",
"0.65337604",
"0.62915456",
"0.6279618",
"0.61924356",
"0.61816955",
"0.61816955",
"0.6130745",
"0.60975236",
"0.60975236",
"0.60975236",
"0.60975236",
"0.60975236",
"0.60975236",
"0.60529727",
"0.60529727",
"0.60275036",
"0.60188186",
"0.59333336",
"0.5920808",
"0.5903489",
"0.589381",
"0.58896005",
"0.5882345",
"0.58665675",
"0.58621585",
"0.58238125",
"0.58238125",
"0.5812666",
"0.581176",
"0.5811609",
"0.5811609",
"0.57686085",
"0.5766076",
"0.5761493",
"0.5761493",
"0.5761493",
"0.5761493",
"0.5761493",
"0.5761493",
"0.5736417",
"0.5671387",
"0.56299335",
"0.5615617",
"0.5615617",
"0.56140506",
"0.55935544",
"0.5590439",
"0.5570917",
"0.55461746",
"0.55458236",
"0.5530998",
"0.5530998",
"0.5530998",
"0.5530998",
"0.5530998",
"0.55260193",
"0.5524812",
"0.55088526",
"0.55016184",
"0.5497286",
"0.5493572",
"0.54888266",
"0.5481203",
"0.5481138",
"0.547032",
"0.54677343",
"0.5461354",
"0.5460281",
"0.5454287",
"0.5453995",
"0.5453995",
"0.5415373",
"0.5405649",
"0.5401587",
"0.53976065",
"0.5397443",
"0.53934485",
"0.53813595",
"0.5381262",
"0.53785217",
"0.5376783",
"0.537585",
"0.53755033",
"0.53755033",
"0.53753",
"0.5375039",
"0.5372435",
"0.5351025",
"0.5348902",
"0.5338262",
"0.53235954",
"0.53185946",
"0.53066194",
"0.52985156",
"0.52939874",
"0.5292631",
"0.52754945",
"0.5274549",
"0.52670217",
"0.5260821"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.value_id | public Integer getValueId() {
return valueId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getValueId() {\n return this.valueId;\n }",
"String getValueId();",
"public java.lang.String getValue_id() {\n return value_id;\n }",
"public int getM_Product_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Product_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) 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 id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"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 }",
"@Select({\n \"select\",\n \"id, spec_id, value, orders\",\n \"from spec_value\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"personal.bs.dao.mapper.SpecValuePOMapper.BaseResultMap\")\n SpecValuePO selectByPrimaryKey(Integer id);",
"public int getM_Splitting_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Splitting_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public Integer getProductAttributeValueId() {\n return productAttributeValueId;\n }",
"@Override\n\tpublic String getPkVal() {\n\t\treturn null;\n\t}",
"public int getM_Warehouse_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Warehouse_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public PxProductInfo getComboId() {\n return comboId;\n }",
"public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}",
"public long getItemShopBasketId();",
"public long getShopBasketId();",
"public Integer getProductId() {\n\t\treturn productId;\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Override\n\t\tpublic int getValueColumn() {\n\t\t\treturn valueColumn;\n\t\t}",
"public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"@JsonGetter(\"product_id\")\n public Integer getProductId ( ) { \n return this.productId;\n }",
"public Integer getBallPackId() {\n return ballPackId;\n }",
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public Object findByPrimaryKey(long value) {\n\t\tTypedQuery<Pump> tq = em.createNamedQuery(Pump.FIND_PUMP_BY_PK, Pump.class);\n\t\ttq.setParameter(\"valueId\", value);\n\t\treturn tq.getSingleResult();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"public String getProductId() ;",
"public int getC_POSDocType_ID() \n{\nInteger ii = (Integer)get_Value(COLUMNNAME_C_POSDocType_ID);\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public long getMappedValue() {\n\t\treturn this.value;\n\t}",
"public int getProductId() {\n return productId;\n }",
"public int getProductId() {\n return productId;\n }",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"public abstract Integer getCompteId();",
"public String getProductId();",
"public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}",
"io.dstore.values.IntegerValue getValueLanguageId();",
"public int getValue()\n {\n return mi_value;\n }",
"public int getValue()\n {\n return mi_value;\n }",
"public Object get_KeyValue(){return\t\t\t Id;}",
"@java.lang.Override public int getPokedexIdValue() {\n return pokedexId_;\n }",
"public Integer getProductionId() {\n return productionId;\n }",
"public int getM_Production_ID();",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public Integer getId()\r\n\t\t{ return mapping.getId(); }",
"@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract String getValue();",
"String getProductId();",
"@java.lang.Override public int getPokedexIdValue() {\n return pokedexId_;\n }",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"public int getM_Locator_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Locator_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public Long getProductId() {\n\t\treturn productId;\n\t}",
"public int getProduct_id() {\n\t\treturn product_id;\n\t}",
"public double getPk()\n {\n return this.pk;\n }",
"public int getValue(){\n\t\treturn value;\n\t}",
"@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}",
"@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}",
"@Override\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\t@Column(name = \"pepe_sq_id\")\n\tpublic Long getId() {\n\t\treturn super.getId();\n\t}",
"public int getProdId() {\n\t\treturn prodId;\n\t}",
"public Value get(int valueID) throws DatabaseException\n\t{\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tValue value = new Value();\n\t\ttry\n\t\t{\n\t\t\tString sql = \"SELECT * FROM \\\"values\\\" WHERE valueID = \" + Integer.toString(valueID);\n\t\t\tstmt = db.getConnection().prepareStatement(sql);\n\t\t\trs = stmt.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tvalue.setValueID(rs.getInt(1));\n\t\t\t\tvalue.setRecordID(rs.getInt(2));\n\t\t\t\tvalue.setFieldID(rs.getInt(3));\n\t\t\t\tvalue.setBatchID(rs.getInt(4));\n\t\t\t\tvalue.setProjectID(rs.getInt(5));\n\t\t\t\tvalue.setData(rs.getString(6));\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tthrow new DatabaseException();\n\t\t}\n\t\treturn value;\n\t}",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"@Override\n public int intValue(int numId) {\n return 0;\n }",
"public int getValue() {\r\n return value;\r\n }",
"@Override\r\n\tpublic String getId() {\n\t\treturn mProductionId;\r\n\t}",
"public int getC_Conversion_UOM_ID() \n{\nInteger ii = (Integer)get_Value(\"C_Conversion_UOM_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public int getValue()\n\t{\n\t\treturn value;\n\t}",
"public int getValue()\n\t{\n\t\treturn value;\n\t}",
"public int getValue()\n\t{\n\t\treturn value;\n\t}",
"@Override\n\tpublic int getProductId(final String producerCode)\n\t{\n\t\tint item = 0;\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tString sql = \"select i.item from item i where producer_code = '\" + producerCode + \"'\";\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tProductRset = ps.executeQuery();\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl.getProductId(): Returning item\"\n\t\t\t\t\t+ \"select i.item from item where producer_code = '\" + producerCode\n\t\t\t\t\t+ \"' returning item\");\n\t\t\twhile (ProductRset.next())\n\t\t\t{\n\t\t\t\titem = ProductRset.getInt(\"item\");\n\t\t\t}\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"ProductDAOImpl.getProductId():\", ex.getMessage());\n\t\t}\n\n\t\treturn item;\n\n\t}",
"protected String getProductId() {\n return productId;\n }",
"public List<ProductInner> value() {\n return this.value;\n }",
"public int getValue() \n {\n return value;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue()\n {\n return value;\n }",
"public int getValue() \n {\n return value;\n }",
"public String getProductid() {\n return productid;\n }",
"io.dstore.values.IntegerValue getCampaignId();",
"io.dstore.values.IntegerValue getCampaignId();",
"public String getProductId() {\r\n\t\treturn productId;\r\n\t}",
"public String getid_prod(int row){\n DefaultTableModel dt =(DefaultTableModel)this.jTable1.getModel();\n String id_prod=\"\";\n id_prod = jTable1.getModel().getValueAt(row, 0).toString().trim();\n return id_prod;\n }",
"@Override\n\tpublic long getContent_id() {\n\t\treturn _buySellProducts.getContent_id();\n\t}",
"public int getId() {\n return parameter.getId();\n }",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}"
] | [
"0.681804",
"0.65866524",
"0.6543882",
"0.62012047",
"0.57416975",
"0.5710557",
"0.5710557",
"0.5647798",
"0.5647798",
"0.5647798",
"0.5647798",
"0.5647798",
"0.5647798",
"0.56259894",
"0.55966747",
"0.558912",
"0.5573978",
"0.55622894",
"0.55325335",
"0.55026716",
"0.5501097",
"0.54922336",
"0.54921764",
"0.5476658",
"0.54645485",
"0.546276",
"0.54555535",
"0.54521346",
"0.5445094",
"0.5442914",
"0.5423828",
"0.5410264",
"0.5357871",
"0.53452843",
"0.53257173",
"0.53236425",
"0.53236425",
"0.53234184",
"0.53234184",
"0.53234184",
"0.5313991",
"0.5284661",
"0.5283725",
"0.52835906",
"0.52751195",
"0.52697176",
"0.52697176",
"0.526949",
"0.52431226",
"0.5238106",
"0.5226052",
"0.52260333",
"0.52260333",
"0.52260333",
"0.52260333",
"0.52260333",
"0.52242047",
"0.5216059",
"0.52142197",
"0.5210989",
"0.5207604",
"0.5207604",
"0.52061486",
"0.5205351",
"0.5198006",
"0.51970047",
"0.5193953",
"0.51925254",
"0.51925254",
"0.5185692",
"0.5180526",
"0.51794255",
"0.51732254",
"0.51732254",
"0.5171553",
"0.5167923",
"0.5160836",
"0.5157855",
"0.5157731",
"0.5157731",
"0.5157731",
"0.51503175",
"0.5148472",
"0.513943",
"0.5137002",
"0.51324844",
"0.5130186",
"0.51287615",
"0.5128643",
"0.5125433",
"0.5125433",
"0.51249665",
"0.51214945",
"0.5119372",
"0.5118277",
"0.5111671",
"0.5111671",
"0.5111671",
"0.5111671",
"0.5111671"
] | 0.68897057 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.value_id | public void setValueId(Integer valueId) {
this.valueId = valueId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}",
"public void setValue_id(java.lang.String value_id) {\n this.value_id = value_id;\n }",
"public void setIdProducto(int value) {\n this.idProducto = value;\n }",
"private void setBId(int value) {\n \n bId_ = value;\n }",
"@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }",
"public void setProduct(entity.APDProduct value);",
"public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}",
"@Override\r\n\tpublic void setId( java.math.BigDecimal value ) {\r\n\t\tthis.unwrapModel().setId( value );\r\n\t}",
"public void setConvertedProductQty (BigDecimal ConvertedProductQty)\n{\nset_Value (\"ConvertedProductQty\", ConvertedProductQty);\n}",
"public Integer getValueId() {\n return valueId;\n }",
"public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public Builder setVariantId(int value) {\n\n variantId_ = value;\n onChanged();\n return this;\n }",
"public void setId(Long value) {\r\n this.id = value;\r\n }",
"public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}",
"public void setIdBoleta(int value) {\n this.idBoleta = value;\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setConvertedSplitQty (BigDecimal ConvertedSplitQty)\n{\nset_Value (\"ConvertedSplitQty\", ConvertedSplitQty);\n}",
"public void setPlmnIdValue(String plmnIdValue) throws JNCException {\n setPlmnIdValue(new YangString(plmnIdValue));\n }",
"public Integer getValueId() {\n return this.valueId;\n }",
"public void setId(Long value) {\n this.id = value;\n }",
"private void setOtherId(int value) {\n \n otherId_ = value;\n }",
"public void setConvertedShrinkQty (BigDecimal ConvertedShrinkQty)\n{\nset_Value (\"ConvertedShrinkQty\", ConvertedShrinkQty);\n}",
"private void setAId(int value) {\n \n aId_ = value;\n }",
"public void setBpoId(Number value) {\n setAttributeInternal(BPOID, value);\n }",
"public Builder setPackageid(long value) {\n bitField0_ |= 0x00000001;\n packageid_ = value;\n onChanged();\n return this;\n }",
"public void setShrinkQty (BigDecimal ShrinkQty)\n{\nset_Value (\"ShrinkQty\", ShrinkQty);\n}",
"public Builder setPackageid(long value) {\n bitField0_ |= 0x00000002;\n packageid_ = value;\n onChanged();\n return this;\n }",
"public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}",
"public void setC_Conversion_UOM_ID (int C_Conversion_UOM_ID)\n{\nset_Value (\"C_Conversion_UOM_ID\", new Integer(C_Conversion_UOM_ID));\n}",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setM_Production_ID (int M_Production_ID);",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"void setValue(String childID, Object value) throws ConverterException, IllegalAccessException;",
"public void setPCatgryId(Number value) {\n\t\tsetNumber(P_CATGRY_ID, value);\n\t}",
"public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}",
"@Override\n public void setField(int id, int value) {\n \n }",
"public void setProdLId(Number value) {\n setAttributeInternal(PRODLID, value);\n }",
"public void setProductId(String productId) ;",
"public void setPlmnIdValue(YangString plmnIdValue) throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"plmn-id\",\n plmnIdValue,\n childrenNames());\n }",
"public void setM_Splitting_ID (int M_Splitting_ID)\n{\nset_ValueNoCheck (\"M_Splitting_ID\", new Integer(M_Splitting_ID));\n}",
"public void setId(long value) {\r\n this.id = value;\r\n }",
"public void setId(long value) {\r\n this.id = value;\r\n }",
"public void setId(Integer value) {\n this.id = value;\n }",
"public void setId(Integer value) {\n this.id = value;\n }",
"@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }",
"public void setId(int value) {\r\n this.id = value;\r\n }",
"private void smem_variable_set(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_set = db.var_set;\n \n var_set.setLong(1, variable_value);\n var_set.setInt(2, variable_id.ordinal());\n \n var_set.execute();\n }",
"public abstract BaseQuantityDt setValue(BigDecimal theValue);",
"public void setId(int value) {\n this.id = value;\n }",
"String getValueId();",
"public void setProductQty (BigDecimal ProductQty)\n{\nif (ProductQty == null) throw new IllegalArgumentException (\"ProductQty is mandatory\");\nset_Value (\"ProductQty\", ProductQty);\n}",
"public void setId1(int value) {\n this.id1 = value;\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setId(long value) {\n this.id = value;\n }",
"public void setProduct(final String productValue) {\n this.product = productValue;\n }",
"public void setId(Integer value) {\n set(0, value);\n }",
"public java.lang.String getValue_id() {\n return value_id;\n }",
"@Override\n\tpublic void setField(int id, int value) {\n\t\t\n\t}",
"@Override\n\tpublic void setField(int id, int value) {\n\t\t\n\t}",
"@Override\n public void setModelValue(HasDataValue widget, DataModel model, String path) {\n hasDataValueBinding.setModelValue(widget, model, path);\n\n QueryPath qPath = QueryPath.parse(path);\n Value value = ((KSSelectedList) widget).getValueWithTranslations();\n\n Data idsData = null;\n Data idsDataStruct = null;\n\n if (value != null) {\n idsData = value.get();\n }\n if (idsData != null) {\n for (Data.Property p : idsData) {\n if (!\"_runtimeData\".equals(p.getKey())) {\n String id = p.getValue();\n // old translation path path/_runtimeData/0/id-translation\n QueryPath translationPath = new QueryPath();\n translationPath.add(new Data.StringKey(qPath.toString()));\n translationPath.add(new Data.StringKey(\"_runtimeData\"));\n translationPath.add(new Data.IntegerKey((Integer) p.getKey()));\n translationPath.add(new Data.StringKey(\"id-translation\"));\n\n Data idItem = new Data();\n String translation = model.get(translationPath.toString());\n Data idItemRuntime = new Data();\n Data idItemTranslation = new Data();\n idsDataStruct = (idsDataStruct == null) ? new Data() : idsDataStruct;\n idItem.set(this.key, id);\n // new translation path/0/_runtimeData/<key>/id-translation\n idItemTranslation.set(\"id-translation\", translation);\n idItemRuntime.set(this.key, idItemTranslation);\n idItem.set(\"_runtimeData\", idItemRuntime);\n idsDataStruct.add(idItem);\n }\n }\n }\n\n model.set(qPath, idsDataStruct);\n }",
"public void setPromoProdukId(Number value) {\n setAttributeInternal(PROMOPRODUKID, value);\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setProductId(int v) throws TorqueException\n {\n \n if (this.productId != v)\n {\n this.productId = v;\n setModified(true);\n }\n \n \n if (aProductRelatedByProductId != null && !(aProductRelatedByProductId.getProductId() == v))\n {\n aProductRelatedByProductId = null;\n }\n \n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public int getM_Product_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Product_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"public void setId(Integer value) {\n this.id = value;\n }"
] | [
"0.65941215",
"0.6262428",
"0.62418085",
"0.6165951",
"0.6089552",
"0.6045381",
"0.60205096",
"0.59943205",
"0.5800032",
"0.5660369",
"0.5625845",
"0.56153077",
"0.56153077",
"0.55988",
"0.5572981",
"0.55694175",
"0.5525227",
"0.5521975",
"0.5521975",
"0.5521975",
"0.55205667",
"0.5520238",
"0.5505541",
"0.55030316",
"0.54975176",
"0.54789025",
"0.54669327",
"0.5449599",
"0.5446657",
"0.5441532",
"0.54405695",
"0.54396576",
"0.5428428",
"0.5426681",
"0.540937",
"0.54076105",
"0.5401851",
"0.5401851",
"0.5401851",
"0.5401851",
"0.5401851",
"0.5401851",
"0.5401851",
"0.53889674",
"0.5374008",
"0.53667474",
"0.53648067",
"0.53361064",
"0.53224784",
"0.53146756",
"0.5286445",
"0.5276463",
"0.5276463",
"0.5275211",
"0.5275211",
"0.52706",
"0.52522314",
"0.5239279",
"0.523902",
"0.5225984",
"0.52240884",
"0.52230734",
"0.52199423",
"0.5214508",
"0.5214508",
"0.520806",
"0.520806",
"0.520806",
"0.520806",
"0.520806",
"0.520806",
"0.520806",
"0.5203386",
"0.51905197",
"0.51899004",
"0.51871526",
"0.51871526",
"0.5181451",
"0.51795906",
"0.51735264",
"0.51735264",
"0.51735264",
"0.51735264",
"0.51735264",
"0.51735264",
"0.51735264",
"0.51735264",
"0.51735264",
"0.5170957",
"0.5169248",
"0.5169248",
"0.51590955",
"0.5158586",
"0.5158586",
"0.5158586",
"0.5158586",
"0.5158586",
"0.5158586",
"0.51563317"
] | 0.67432857 | 1 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.add_time | public LocalDateTime getAddTime() {
return addTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getAddTime() {\n return addTime;\n }",
"public Date getAddtime() {\r\n return addtime;\r\n }",
"public Date getAddtime() {\n return addtime;\n }",
"public Date getAddTime() {\n return addTime;\n }",
"@ApiModelProperty(value = \"添加时间\")\n\tpublic Date getRowAddTime() {\n\t\treturn rowAddTime;\n\t}",
"@Override\n\tpublic Date getAddTime() {\n\t\treturn null;\n\t}",
"@ApiModelProperty(value = \"创建时间\")\n public Date getRowAddTime() {\n return rowAddTime;\n }",
"public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }",
"public void setAddtime(Date addtime) {\r\n this.addtime = addtime;\r\n }",
"public void setAddtime(Date addtime) {\n this.addtime = addtime;\n }",
"public Date getBuy_time() {\r\n\t\treturn buy_time;\r\n\t}",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public Criteria andAddTimeEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setRowAddTime(Date rowAddTime) {\n this.rowAddTime = rowAddTime;\n }",
"public java.util.Date getAddedTime() {\n return addedTime;\n }",
"public Criteria andAddTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setRowAddTime(Date rowAddTime) {\n\t\tthis.rowAddTime = rowAddTime;\n\t}",
"public String getInserttime() {\n\t\treturn inserttime;\n\t}",
"@AutoEscape\n\tpublic String getEntityAddDate();",
"public Criteria andAddTimeEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@Override\n\tpublic void setAddTime(Date addTime) {\n\t\t\n\t}",
"long getTimeBoltABoltB();",
"long getTimeBoltDBoltH();",
"public Date getInsertTime() {\r\n return insertTime;\r\n }",
"@ResponseBody\n @RequestMapping(value=\"/course/addtime\")\n public String addTime(@RequestParam(\"duration\") String DURATION, @RequestParam(\"time\") String time){\n\n int duration=Integer.parseInt(DURATION);\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n SimpleDateFormat secondFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n try{\n Timestamp newTime=new Timestamp(formatter.parse(time).getTime());\n Calendar cal = Calendar.getInstance();\n cal.setTime(newTime);\n cal.add(Calendar.DAY_OF_WEEK, duration);\n newTime.setTime(cal.getTime().getTime());\n return formatter.format(newTime)+\",\"+secondFormatter.format(newTime)+\" 23:59\";\n }\n catch (ParseException e){\n System.err.println(\"Parse Fail\");\n }\n return \"\";\n }",
"public Date getInsertTime() {\n return insertTime;\n }",
"@Override\r\n\tpublic Log add(Log log) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tLog l = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(Add, PreparedStatement.RETURN_GENERATED_KEYS);\r\n\t\t\tps.setTimestamp(1, log.getTime());\r\n\t\t\tps.setInt(2, log.getEmpId());\r\n\t\t\tps.setString(3, log.getEmpName());\r\n\t\t\tps.setString(4, log.getTopName());\r\n\t\t\tps.setString(5, log.getTopUsername());\r\n\t\t\tps.setString(6, log.getBottomName());\r\n\t\t\tps.setString(7, log.getBottomUsername());\r\n\t\t\tps.setString(8, log.getOperation());\r\n\t\t\tps.setString(9, log.getType());\r\n\t\t\tint cnt = ps.executeUpdate();\r\n\t\t\tif (cnt > 0) {\r\n\t\t\t\tResultSet rs = ps.getGeneratedKeys();\r\n\t\t\t\tif (rs.next()) {\r\n\t\t\t\t\tl = get(rs.getInt(1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcon.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}\r\n\t\treturn l;\r\n\t}",
"public long getTime(){\n return this.time;\n }",
"@ApiModelProperty(value = \"The timestamp that the `last_price` represents.\")\n public OffsetDateTime getTime() {\n return time;\n }",
"public Date getOrderTime();",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"long getTimeBoltHBoltE();",
"public int getTime() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getTime();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"time\"));\n }\n }",
"public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }",
"@Override\n\tpublic Seconds addTime() {\n\t\treturn new HTLSeconds();\n\n\t}",
"public Criteria andAddTimeGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public gov.ucore.ucore._2_0.TimeType addNewTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().add_element_user(TIME$2);\n return target;\n }\n }",
"public M csmiAddTimeNull(){if(this.get(\"csmiAddTimeNot\")==null)this.put(\"csmiAddTimeNot\", \"\");this.put(\"csmiAddTime\", null);return this;}",
"public String getADD_DATE2_MAND() {\r\n return ADD_DATE2_MAND;\r\n }",
"public String getADD_DATE2_MAND() {\r\n return ADD_DATE2_MAND;\r\n }",
"public Date getDateAdded();",
"public Date getActualBuyingTime() {\n return actualBuyingTime;\n }",
"public String getUpdTime() {\n return updTime;\n }",
"public Long getTime() {\n return time;\n }",
"public String getTime(){\n return time;\n }",
"public int getAdditionalRunTime() {\n return additionalRunTime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public Date getOrdertime() {\n return ordertime;\n }",
"public abstract TimeObject add(long time, int val);",
"long getTimeBoltBBoltC();",
"public Date getUpdatetime() {\r\n return updatetime;\r\n }",
"long getTimeBoltCBoltD();",
"public String getAdjustedTime() {\n\t}",
"public Criteria andAddTimeLessThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private long baseTime() {\n return Bytes.getUnsignedInt(row, tsdb.metrics.width());\n }",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public String getTime() {\n return this.time;\n }",
"public java.sql.Time getTime(String attr) {\n return (java.sql.Time) super.get(attr);\n }",
"public Date getaTime() {\r\n return aTime;\r\n }",
"long getTsUpdate();",
"public long getTime() {\n\t\tDate _date = new Date();\n\t\tlong _time = _date.getTime();\n\t\t_time = _time + getDeltaDate();\n\t\treturn _time;\n\t}",
"public String getTotalTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime() + recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }",
"public String getExtTime() {\n\t\treturn extTime.getText();\n\t}",
"Date getTimeField();",
"public Date getOPER_TIME() {\n return OPER_TIME;\n }",
"public int getTime() { return _time; }",
"public static String addTime(String time, int increase)\r\n/* 96: */ {\r\n/* 97:129 */ SimpleDateFormat format = new SimpleDateFormat(\"HH:mm\");\r\n/* 98:130 */ String retTime = \"\";\r\n/* 99: */ try\r\n/* 100: */ {\r\n/* 101:133 */ Date date = format.parse(time);\r\n/* 102:134 */ long Time = date.getTime() / 1000L + increase * 60;\r\n/* 103:135 */ date.setTime(Time * 1000L);\r\n/* 104:136 */ retTime = format.format(date);\r\n/* 105: */ }\r\n/* 106: */ catch (Exception localException) {}\r\n/* 107:141 */ return retTime;\r\n/* 108: */ }",
"public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }",
"public Date getTimeUpdate() {\n return timeUpdate;\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"public String LastEndTimePlus() {\n int _hour = Integer.parseInt(lastEndTime.substring(0, lastEndTime.indexOf(':')));\n int _minute = Integer.parseInt(lastEndTime.substring(lastEndTime.indexOf(':') + 1));\n\n if (_minute == 59) {\n _hour++;\n _minute = 0;\n } else {\n _minute++;\n }\n\n String resultHour = _hour < 10 ? '0' + Integer.toString(_hour) : Integer.toString(_hour);\n String resultMinute = _minute < 10 ? '0' + Integer.toString(_minute) : Integer.toString(_minute);\n\n return resultHour + \":\" + resultMinute;\n }",
"@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}",
"public Long getAddUser() {\n return addUser;\n }",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeGreaterThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}",
"@XmlElement(name = \"starttime\")\n public Long getStartTime() {\n return startTime;\n }",
"public double getTime() {return _time;}",
"public void addStoredTime(long timeInMilliseconds){\n mStoredTime += timeInMilliseconds;\n }",
"public int getMatchTime() {\n return getIntegerProperty(\"Time\");\n }",
"public long getTimeBoltABoltB() {\n return timeBoltABoltB_;\n }",
"java.lang.String getTimestamp();",
"java.lang.String getTimestamp();",
"Timestamp nowDb() {\n return getJdbcOperations().queryForObject(getDialect().sqlSelectNow(), Timestamp.class);\n }",
"@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}",
"public long getTimeBoltABoltB() {\n return timeBoltABoltB_;\n }",
"@Override\n public long getTime() {\n return time;\n }",
"public long getTime() {\r\n \treturn time;\r\n }",
"public String getDateAdded() {\n return dateAdded;\n }",
"@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }"
] | [
"0.68518245",
"0.6794099",
"0.6792615",
"0.6774775",
"0.64155865",
"0.63445926",
"0.6209533",
"0.583646",
"0.5641106",
"0.56257874",
"0.5564474",
"0.555941",
"0.555941",
"0.555941",
"0.5555202",
"0.55471295",
"0.5485914",
"0.546538",
"0.54454297",
"0.5411457",
"0.5411221",
"0.53968245",
"0.53723717",
"0.5344843",
"0.5309506",
"0.5304144",
"0.52945894",
"0.52891946",
"0.52429",
"0.52348644",
"0.5234112",
"0.52107847",
"0.51854",
"0.51854",
"0.51631653",
"0.51511174",
"0.51405334",
"0.5123206",
"0.51208663",
"0.51101553",
"0.5106969",
"0.5106256",
"0.5082472",
"0.5082472",
"0.5070983",
"0.5066997",
"0.506432",
"0.5056847",
"0.5043951",
"0.5036233",
"0.50293016",
"0.50293016",
"0.5028352",
"0.5028352",
"0.5025316",
"0.5025019",
"0.5017327",
"0.5009741",
"0.50079197",
"0.4997905",
"0.49969494",
"0.4994639",
"0.49881244",
"0.49874258",
"0.49851495",
"0.49803936",
"0.497932",
"0.49756896",
"0.4973067",
"0.4966715",
"0.49634886",
"0.49629462",
"0.49623936",
"0.49623546",
"0.49586943",
"0.49580243",
"0.49574587",
"0.49483725",
"0.49411836",
"0.4940515",
"0.49376205",
"0.49353388",
"0.4933739",
"0.49267948",
"0.49191856",
"0.49189186",
"0.49148038",
"0.49017864",
"0.48962563",
"0.48900542",
"0.48900542",
"0.48885366",
"0.48767078",
"0.48655516",
"0.4865387",
"0.4865319",
"0.48633993",
"0.4863132"
] | 0.6402679 | 6 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.add_time | public void setAddTime(LocalDateTime addTime) {
this.addTime = addTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAddtime(Date addtime) {\r\n this.addtime = addtime;\r\n }",
"public void setAddtime(Date addtime) {\n this.addtime = addtime;\n }",
"public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }",
"@Override\n\tpublic void setAddTime(Date addTime) {\n\t\t\n\t}",
"public void setRowAddTime(Date rowAddTime) {\n this.rowAddTime = rowAddTime;\n }",
"public void setRowAddTime(Date rowAddTime) {\n\t\tthis.rowAddTime = rowAddTime;\n\t}",
"public Date getAddtime() {\r\n return addtime;\r\n }",
"public Date getAddtime() {\n return addtime;\n }",
"public Date getAddTime() {\n return addTime;\n }",
"public Integer getAddTime() {\n return addTime;\n }",
"@Override\n\tpublic Date getAddTime() {\n\t\treturn null;\n\t}",
"@ApiModelProperty(value = \"添加时间\")\n\tpublic Date getRowAddTime() {\n\t\treturn rowAddTime;\n\t}",
"public LocalDateTime getAddTime() {\n return addTime;\n }",
"public LocalDateTime getAddTime() {\n return addTime;\n }",
"public LocalDateTime getAddTime() {\n return addTime;\n }",
"public void setEntityAddDate(String entityAddDate);",
"public Criteria andAddTimeEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"net.opengis.gml.x32.TimeInstantPropertyType addNewBegin();",
"net.opengis.gml.x32.TimeInstantPropertyType addNewEnd();",
"public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }",
"public abstract TimeObject add(long time, int val);",
"public void addStoredTime(long timeInMilliseconds){\n mStoredTime += timeInMilliseconds;\n }",
"@ApiModelProperty(value = \"创建时间\")\n public Date getRowAddTime() {\n return rowAddTime;\n }",
"public void addTime(long time)\r\n {\r\n listOfTimes.add(time);\r\n }",
"public Criteria andAddTimeEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }",
"public void addDelayTime(int add)\r\n\t{\r\n\t\tString[] parts = departureTime.split(\":\");\r\n\t\tString[] parts1 = arrivalTime.split(\":\");\r\n\t\tString departureHour = parts[0];\r\n\t\tString departureMin = parts[1];\r\n\t\tString arrivalHour = parts1[0];\r\n\t\tString arrivalMin = parts1[1];\r\n\t\t// converting string to integer\r\n\t\tint departureHour1 = Integer.parseInt(departureHour);\r\n\t\tint arrivalHour1 = Integer.parseInt(arrivalHour);\r\n\t\t// adding delay time and start form 0 if it is 24\r\n\t\tint departHour = (departureHour1 + add)%24;\r\n\t\tint arriveHour = (arrivalHour1+add)%24;\r\n\t\tString dHour = String.format(\"%02d\",departHour);\r\n\t\tString aHour = String.format(\"%02d\",arriveHour);\r\n\t\t// combining hour and minute.\r\n\t\tthis.departureTime = dHour + \":\" + departureMin;\r\n\t\tthis.arrivalTime = aHour + \":\" + arrivalMin;\r\n\t\t\r\n\t}",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public void setAddedTime(java.util.Date newAddedTime) {\n this.addedTime = newAddedTime;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public M csmiAddTimeNull(){if(this.get(\"csmiAddTimeNot\")==null)this.put(\"csmiAddTimeNot\", \"\");this.put(\"csmiAddTime\", null);return this;}",
"public void addValueTime(IValueTime vt){\n \tthis.generator.addValueTime(vt);\n }",
"public M csolAddTimeStart(Object start){this.put(\"csolAddTimeStart\", start);return this;}",
"public void addExtraTime (int t) {\n\t\textraTime += t;\n\t\textTime.setText(String.valueOf(extraTime));\n\t}",
"public void addTime(Time a){\n\t\ttimes.add(a);\n\t}",
"@DSSafe(DSCat.UTIL_FUNCTION)\n \n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:11.275 -0500\", hash_original_method = \"58DD96CFC8DDA00016DEC24CC6519017\", hash_generated_method = \"1F810C618BA62488684578EB05C3C6A1\")\n \n@Override\n public void setTime(long theTime) {\n /*\n * Store the Date based on the supplied time after removing any time\n * elements finer than the day based on zero GMT\n */\n super.setTime(normalizeTime(theTime));\n }",
"public Date getBuy_time() {\r\n\t\treturn buy_time;\r\n\t}",
"public void setTime(long time)\n {\n this.time = time;\n\n }",
"public void addTime( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), TIME, value);\r\n\t}",
"public static void AddFlight(Flight flight){\n\n //java.sql.Date sqlDate = new java.sql.Date(flight.getDatetime());\n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM flight\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateString(\"FlightNumber\", flight.getFlightNumber());\n resultSet.updateString(\"DepartureAirport\", flight.getDepartureAirport());\n resultSet.updateString(\"DestinationAirport\", flight.getDestinationAirport());\n resultSet.updateDouble(\"Price\", flight.getPrice());\n\n //Ask Andrew\n// java.sql.Date sqlDate = new java.sql.Date();\n// resultSet.updateDate(\"datetime\", flight.getDatetime());\n resultSet.updateString(\"Plane\", flight.getPlane());\n resultSet.updateInt(\"SeatsTaken\", flight.getSeatsTaken());\n \n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n }",
"public void addTime(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), TIME, value);\r\n\t}",
"public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }",
"public void setTime(Long time) {\n this.time = time;\n }",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"public void setTime(long time) {\r\n this.time = time;\r\n }",
"public void setBuildTime(int time)\n{\n\t_buildTime = time;\n}",
"public void setTime(long time) {\n this.time = time;\n }",
"public void setTime(long time) {\r\n this.time.setTime(time);\r\n }",
"void setReportTime(long time);",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"public void setTime(long time) {\r\n\t\tthis.time = time;\r\n\t}",
"public abstract void setFecha_ingreso(java.sql.Timestamp newFecha_ingreso);",
"public void setInsertTime(Date insertTime) {\r\n this.insertTime = insertTime;\r\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"protected void setTimestamp(long time) \n {\n\t\tlTimestamp = time;\n\t}",
"@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}",
"public void setInserttime(String inserttime) {\n\t\tthis.inserttime = inserttime;\n\t}",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@ResponseBody\n @RequestMapping(value=\"/course/addtime\")\n public String addTime(@RequestParam(\"duration\") String DURATION, @RequestParam(\"time\") String time){\n\n int duration=Integer.parseInt(DURATION);\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n SimpleDateFormat secondFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n try{\n Timestamp newTime=new Timestamp(formatter.parse(time).getTime());\n Calendar cal = Calendar.getInstance();\n cal.setTime(newTime);\n cal.add(Calendar.DAY_OF_WEEK, duration);\n newTime.setTime(cal.getTime().getTime());\n return formatter.format(newTime)+\",\"+secondFormatter.format(newTime)+\" 23:59\";\n }\n catch (ParseException e){\n System.err.println(\"Parse Fail\");\n }\n return \"\";\n }",
"public static void addMealtime(Week w) {\n\t\tMealTime mt = null;\n\t\t\n\t\tint day = Utility.askInt(\"Which week day(1-7): \");\n\t\t\n\t\tCLI.printMealTitles();\n\t\t\n\t\tint mid = Utility.askInt(\"Select meal id: \");\n\t\t\n\t\tmt = amt.add(new MealTime(0, ameal.get(mid), 0, w.getDay(day).getId()));\n\t\t\n\t\tUtility.printString(\"Mealtime added\\n\");\n\t}",
"public void setInsertTime(Date insertTime) {\n this.insertTime = insertTime;\n }",
"public void addPlayTime(final long playTime) {\n\t\tthis.playTime += playTime;\n\t}",
"public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }",
"@Override\r\n public void addCloth(Cloth cloth) throws SQLException {\n try {\r\n preparedStatement.setString(1, cloth.getName());\r\n preparedStatement.setDate(2, new java.sql.Date(cloth.getProductionDate().getTime()));\r\n preparedStatement.setDouble(3, cloth.getPrice());\r\n if(cloth.isWaterproof())\r\n preparedStatement.setBoolean(4, true);\r\n else\r\n preparedStatement.setBoolean(4, false);\r\n preparedStatement.executeUpdate();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void setConvertedProductQty (BigDecimal ConvertedProductQty)\n{\nset_Value (\"ConvertedProductQty\", ConvertedProductQty);\n}",
"public void addTimeTable(TimeTable timetable) {\n\t\t\n\t}",
"public void setSetupTimeReal(BigDecimal SetupTimeReal) {\n\t\tset_Value(\"SetupTimeReal\", SetupTimeReal);\n\t}",
"public void setUpdTime(String updTime) {\n this.updTime = updTime;\n }",
"public void setTime(String time) {\n }",
"public static String addTime(String time, int increase)\r\n/* 96: */ {\r\n/* 97:129 */ SimpleDateFormat format = new SimpleDateFormat(\"HH:mm\");\r\n/* 98:130 */ String retTime = \"\";\r\n/* 99: */ try\r\n/* 100: */ {\r\n/* 101:133 */ Date date = format.parse(time);\r\n/* 102:134 */ long Time = date.getTime() / 1000L + increase * 60;\r\n/* 103:135 */ date.setTime(Time * 1000L);\r\n/* 104:136 */ retTime = format.format(date);\r\n/* 105: */ }\r\n/* 106: */ catch (Exception localException) {}\r\n/* 107:141 */ return retTime;\r\n/* 108: */ }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime( Date time ) {\n this.time = time;\n }",
"public void setTime(long time,int ento){ \r\n\t}",
"@Test\n public void addTimeTest() {\n // TODO: test addTime\n }",
"public M csolAddTimeNull(){if(this.get(\"csolAddTimeNot\")==null)this.put(\"csolAddTimeNot\", \"\");this.put(\"csolAddTime\", null);return this;}",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"public void updateActualTime() {\n if (role.getText().equals(\"Member\")) {\n warning.setText(\"\");\n String orderNumber = orderNo.getText();\n int orderNum = 0;\n String realTime = actualTime.getText();\n int actlTime = 0;\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else if (actualTime.getText().isEmpty() || !Validation.isValidActualTime(realTime)) {\n warning.setText(invalidActualTime);\n } else {\n orderNum = Integer.parseInt(orderNo.getText());\n actlTime = Integer.parseInt(actualTime.getText());\n\n UserDAO userDAO = new UserDAO();\n User user = userDAO.getUser(logname.getText());\n PlanDAO planDAO = new PlanDAO();\n int userId = user.getId();\n Plan plan = new Plan(orderNum, actlTime);\n planDAO.editActualTime(plan, userId);\n updateTableFromDB(orderNumber);\n warning.setText(\"Actual time of order \" + orderNum + \" updated successfully \");\n }\n } else {\n warning.setText(\"Please use Update button\");\n }\n }",
"public Criteria andAddTimeLessThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setTime(){\n Date currentDate = new Date();\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putLong(\"WAIT_TIME\", currentDate.getTime() + 1800000); //30 min\n editor.commit();\n }",
"public void setTime(double time) {_time = time;}",
"public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }",
"public gov.ucore.ucore._2_0.TimeType addNewTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().add_element_user(TIME$2);\n return target;\n }\n }",
"public M csseAddTimeNull(){if(this.get(\"csseAddTimeNot\")==null)this.put(\"csseAddTimeNot\", \"\");this.put(\"csseAddTime\", null);return this;}",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}",
"public void setTime(){\r\n \r\n }",
"org.hl7.fhir.DateTime addNewAppliesDateTime();"
] | [
"0.6587438",
"0.6551035",
"0.65059817",
"0.6494577",
"0.61541957",
"0.6071914",
"0.5987789",
"0.5930295",
"0.5863836",
"0.57153016",
"0.56132674",
"0.553324",
"0.5516001",
"0.5516001",
"0.5516001",
"0.5477592",
"0.5426105",
"0.5425919",
"0.54074603",
"0.54050696",
"0.5400036",
"0.5379437",
"0.53138405",
"0.5293473",
"0.5272696",
"0.52579457",
"0.52315336",
"0.52258706",
"0.51911944",
"0.5173552",
"0.51592034",
"0.51592034",
"0.51426524",
"0.5142109",
"0.5137024",
"0.51179105",
"0.51173025",
"0.5110338",
"0.5071672",
"0.5068656",
"0.50493467",
"0.50465894",
"0.50274897",
"0.50230575",
"0.5021666",
"0.5016763",
"0.5001939",
"0.49917328",
"0.49832693",
"0.49803257",
"0.49722204",
"0.4961039",
"0.4957288",
"0.4943892",
"0.49384382",
"0.4917425",
"0.4917425",
"0.49146223",
"0.49134797",
"0.49054614",
"0.4899225",
"0.48833987",
"0.48816782",
"0.4879863",
"0.48737285",
"0.48650628",
"0.48526782",
"0.4842713",
"0.48170364",
"0.4815654",
"0.48063186",
"0.48056415",
"0.4803591",
"0.4789425",
"0.4789425",
"0.4789425",
"0.47860852",
"0.4785447",
"0.47811946",
"0.47803193",
"0.47771606",
"0.47739127",
"0.47677553",
"0.4766286",
"0.47647765",
"0.47616625",
"0.47586346",
"0.47480825",
"0.47433257",
"0.47433257",
"0.47433257",
"0.47415903",
"0.47415903",
"0.47415903",
"0.47415903",
"0.4739342",
"0.4734551",
"0.47325125"
] | 0.63462394 | 5 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.update_time | public LocalDateTime getUpdateTime() {
return updateTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}",
"public Long getUpdateDatetime() {\n return updateDatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\r\n return updatetime;\r\n }",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }",
"public Date getTimeUpdate() {\n return timeUpdate;\n }",
"public Date getUpdateTime()\n {\n return data.updateTime;\n }",
"public java.lang.Long getTsUpdate() {\n return ts_update;\n }",
"public Timestamp getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateDatetime();",
"long getTsUpdate();",
"public Date getUpdateDatime() {\r\n return updateDatime;\r\n }",
"public Date getUpdateDatime() {\r\n return updateDatime;\r\n }",
"public java.lang.Long getTsUpdate() {\n return ts_update;\n }",
"public Integer getUpdateTime() {\n return updateTime;\n }",
"public Long getUpdateTime() {\n return updateTime;\n }",
"public Long getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdatedTime() {\n return updatedTime;\n }",
"public Date getUpdatedTime() {\n return updatedTime;\n }",
"public Date getUpdatedTime() {\n return updatedTime;\n }",
"public Long getUpdateTime() {\n\t\treturn updateTime;\n\t}",
"public String getUpdateTime() {\r\n return updateTime;\r\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}",
"public Date getUpdateTime() {\n return this.updateTime;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }",
"public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }",
"public long getTsUpdate() {\n return tsUpdate_;\n }",
"public long getTsUpdate() {\n return tsUpdate_;\n }",
"public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\n\t\treturn this.updateTime;\n\t}",
"public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}",
"int getUpdateTriggerTime();",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();"
] | [
"0.7179101",
"0.7179101",
"0.71175265",
"0.7108892",
"0.7083201",
"0.7083201",
"0.7070784",
"0.7070358",
"0.7070358",
"0.6905855",
"0.6869178",
"0.68463534",
"0.6831169",
"0.67882454",
"0.67754966",
"0.6774997",
"0.6759544",
"0.6759544",
"0.6750064",
"0.67257315",
"0.6714091",
"0.6714091",
"0.67005146",
"0.67005146",
"0.67005146",
"0.66945696",
"0.66818595",
"0.6654332",
"0.6654332",
"0.6654332",
"0.6654332",
"0.664044",
"0.6611123",
"0.660868",
"0.6591023",
"0.6586395",
"0.6585148",
"0.6584986",
"0.65822506",
"0.6566856",
"0.6566856",
"0.6566856",
"0.6566856",
"0.6566845",
"0.6561142",
"0.65335286",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65334237",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205",
"0.65306205"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.update_time | public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}",
"public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"public void setUpdateTime(DateTime updateTime) {\n this.updated = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Timestamp updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }",
"@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}",
"public void setUpdateTime(Date updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTimeDb(Date updateTimeDb) {\r\n\t\tthis.updateTimeDb = updateTimeDb;\r\n\t}",
"public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }",
"public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }",
"public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(Long updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(Integer updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(com.flexnet.opsembedded.webservices.DateTimeQueryType updateTime) {\n this.updateTime = updateTime;\n }",
"public Long getUpdateDatetime() {\n return updateDatetime;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(java.util.Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }",
"public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }",
"public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }",
"public Date getUpdatetime() {\r\n return updatetime;\r\n }",
"public void setUpdateDatetime(Date updateDatetime);",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public void setUpdateTime(Date updateTime) {\n\t\tsetField(\"updateTime\", updateTime);\n\t}",
"public void setUpdateTime(String updateTime) {\n\t\t\tthis.updateTime = updateTime;\n\t\t}",
"public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}",
"private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }",
"public void setUpdateTime(java.util.Calendar updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdTime(String updTime) {\n this.updTime = updTime;\n }",
"public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }",
"public void setUpdateDatetime(Date updateDatetime) {\r\n\t\tthis.updateDatetime = updateDatetime;\r\n\t}",
"public Date getUpdateDatetime();",
"void setLastUpdatedTime();",
"public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}",
"public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }",
"public void setUpdateTimestamp(Date updateTimestamp) {\r\n this.updateTimestamp = updateTimestamp;\r\n }"
] | [
"0.715536",
"0.715536",
"0.68975705",
"0.6861853",
"0.6861853",
"0.68457216",
"0.669763",
"0.65700877",
"0.6565579",
"0.65493083",
"0.65493083",
"0.65493083",
"0.65493083",
"0.653625",
"0.65163255",
"0.6505701",
"0.6478953",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.6476627",
"0.64626265",
"0.64626265",
"0.64417946",
"0.64393085",
"0.64393085",
"0.64284325",
"0.64284325",
"0.64284325",
"0.6422289",
"0.6419802",
"0.6403953",
"0.63176614",
"0.6312128",
"0.6312128",
"0.6304279",
"0.6304279",
"0.6301757",
"0.6298749",
"0.6298749",
"0.6298749",
"0.6278501",
"0.62558955",
"0.6246401",
"0.6246401",
"0.6227368",
"0.6226415",
"0.62066793",
"0.61473966",
"0.61237",
"0.60807055",
"0.6059782",
"0.6044481",
"0.6020462",
"0.6017162",
"0.6002547",
"0.6001002",
"0.59974265"
] | 0.63417715 | 74 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public void andLogicalDeleted(boolean deleted) {
setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.deleted | public Boolean getDeleted() {
return deleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long deleted() {\n return this.deleted;\n }",
"public Integer getDeleted() {\n return deleted;\n }",
"public java.lang.Boolean getDeleted();",
"public Byte getDeleted() {\n return deleted;\n }",
"public Boolean getDeleted() {\n return deleted;\n }",
"public Boolean getDeleted() {\r\n\t\treturn deleted;\r\n\t}",
"public Integer getIsdeleted() {\n return isdeleted;\n }",
"public Boolean getDeleted() {\n return mDeleted;\n }",
"public boolean getDeleted() {\n return deleted;\n }",
"public Byte getIsDeleted() {\n return isDeleted;\n }",
"public Byte getIsDeleted() {\n return isDeleted;\n }",
"@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }",
"public Integer getIsDeleted() {\n return isDeleted;\n }",
"public Byte getIsDeleted() {\r\n return isDeleted;\r\n }",
"@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }",
"public Integer getDeleteflag() {\n return deleteflag;\n }",
"public String getIsDeleted() {\n return isDeleted;\n }",
"public String getIsDeleted() {\n return isDeleted;\n }",
"public Integer getDeleteTag() {\n return deleteTag;\n }",
"public CustomSql getCustomSqlDelete();",
"@Nullable\n public TupleExpr getDeleteExpr() {\n return this.deleteExpr;\n }",
"public boolean isDeleted()\r\n {\r\n return getSemanticObject().getBooleanProperty(swb_deleted);\r\n }",
"@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tboolean deleted();",
"@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}",
"public Boolean getIsDeleted() {\r\n return isDeleted;\r\n }",
"public Integer getIsdelete() {\n return isdelete;\n }",
"public Integer getIsDeleted() {\r\n\t\treturn isDeleted;\r\n\t}",
"public Boolean getIsDeleted() {\n return isDeleted;\n }",
"public Integer getIsdelete() {\r\n return isdelete;\r\n }",
"@Override\n\tpublic int delete(ProductDTO dto) {\n\t\treturn 0;\n\t}",
"public Boolean getDeleted() throws NotLoadedException {\n return deleted.getValue();\n }",
"public Byte getDeleteFlag() {\n return deleteFlag;\n }",
"@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}",
"public String getIs_delete() {\n return is_delete;\n }",
"public String getDeleteStatus() {\n return deleteStatus;\n }",
"public boolean getDelete() {\n\t\treturn delete;\n\t}",
"protected String getDeleteSQL() {\n\t\treturn queryData.getString(\"DeleteSQL\");\n\t}",
"public Byte getIsDelete() {\n return isDelete;\n }",
"public Byte getIsDelete() {\n return isDelete;\n }",
"public String getDeleteFlag() {\r\n return deleteFlag;\r\n }",
"public String getIsDeleted() {\n\t\treturn isDeleted;\n\t}",
"public Integer getIsdelete() {\n\t\treturn isdelete;\n\t}",
"public String getDeleteFlag() {\n return deleteFlag;\n }",
"public Criteria andLogicalDeleted(boolean deleted) {\n return deleted ? andDeletedEqualTo(YoungSeckillPromotionProductRelation.IS_DELETED) : andDeletedNotEqualTo(YoungSeckillPromotionProductRelation.IS_DELETED);\n }",
"public String getIsdelete() {\n return isdelete;\n }",
"public String getIsdelete() {\n return isdelete;\n }",
"public boolean getDeleted() {\n\t\treturn _primarySchoolStudent.getDeleted();\n\t}",
"@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}",
"public boolean getDelete() {\n\t\t\treturn delete.get();\n\t\t}",
"public boolean isDeleted();",
"public Boolean getIsdelete() {\r\n return isdelete;\r\n }",
"@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGTShipPosition.getIsDelete();\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }",
"@Column(name = \"isDelete\")\r\n\tpublic Boolean getIsDelete() {\r\n\t\treturn this.isDelete;\r\n\t}",
"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 String deletedBy() {\n return this.deletedBy;\n }",
"public java.lang.String getDelete() {\n return instance.getDelete();\n }",
"public Delete getDelete() {\n\t\treturn this.delete;\n\t}",
"public boolean isDeleted() {\r\n\treturn isDeleted;\r\n}",
"public Boolean getIsDeleted() {\n\t\treturn isDeleted;\n\t}",
"public Boolean isDeleted() {\n\t\treturn this.deleted;\n\t\t\n\t}",
"public java.lang.Boolean getIsDeleted() {\r\n return isDeleted;\r\n }",
"public Criteria andDeletedEqualToColumn(YoungSeckillPromotionProductRelation.Column column) {\n addCriterion(new StringBuilder(\"deleted = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public String getDeleteFlag() {\r\n\t\treturn deleteFlag;\r\n\t}",
"boolean isDeleted();",
"@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"public boolean isDeleted() {\n return deleted;\n }",
"@Override\n\tpublic int delete(int id) {\n\t\treturn jdbcTemplate.update(\"call PKG_ALM_CRUD_PRODUNIDADMED.pa_mat_produnidadmed_Del(?)\",id);\n\t}",
"@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGtStatus.getMarkedAsDelete();\n\t}",
"public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }",
"io.dstore.values.IntegerValue getForceDelete();",
"@Override\r\n\tpublic boolean deleteProduct(ProductDAO product) {\n\t\treturn false;\r\n\t}",
"public void setDeleted(boolean deleted);",
"public boolean isDeleted()\r\n\t{\r\n\t\treturn deletedFlag;\r\n\t}",
"@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(80)\r\n\tboolean isDeleted();",
"public Integer getDel() {\r\n\t\treturn del;\r\n\t}",
"public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}",
"public void setDeleted(Byte deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(java.lang.Boolean deleted);",
"public void setDeleted(boolean deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }",
"@Override\n\tpublic boolean delete(String sql) {\n\t\treturn false;\n\t}",
"private String getDeleteQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeDeleteQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }",
"public TaskProtobufWrapper.DeleteTaskPackOrBuilder getDeleteTaskPackOrBuilder() {\n if ((packCase_ == 4) && (deleteTaskPackBuilder_ != null)) {\n return deleteTaskPackBuilder_.getMessageOrBuilder();\n } else {\n if (packCase_ == 4) {\n return (TaskProtobufWrapper.DeleteTaskPack) pack_;\n }\n return TaskProtobufWrapper.DeleteTaskPack.getDefaultInstance();\n }\n }",
"public boolean productDelete(Product product) {\n\t\t\n\t\tLOGGER.debug(\"execution started\");\n\n\n\t\tboolean status = false;\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\tString sql=\"DELETE FROM products_information WHERE product_id=?\";\n\t\t\n\t\ttry {\n\t\t\tcon = datasource.getConnection();\n\t\t\tstmt = openPreparedStatement(con,sql);\n\t\t\t\n\t\t\tstmt.setInt(1, product.getPid());\n\n\t\t\tint rows = stmt.executeUpdate();\n\t\t\tif(rows != 0) {\n\t\t\t\tstatus = true;\n\t\t\t}\n\t\t} catch(SQLException sqle) {\n\t\t\tLOGGER.error(\"EXCEPTION OCCURED\",sqle);\n\n\t\t} finally {\n\t\t\tcloseStatement(stmt);\n\t\t\tcloseConnection(con);\n\t\t}\n\t\tLOGGER.debug(\"execution ended\");\n\t\treturn status;\n\t\t\n\t\t\n\t}",
"public void delete(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;",
"public void setDeleted(Boolean deleted) {\r\n\t\tthis.deleted = deleted;\r\n\t}",
"@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGTShipPosition.getMarkedAsDelete();\n\t}",
"public String getDelFlag() {\n return delFlag;\n }",
"public String getDelFlag() {\n return delFlag;\n }",
"public String getDelFlag() {\n return delFlag;\n }",
"@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid deleted(boolean pVal);",
"@Transient\n\tpublic String getToDeleteFlg() {\n\t\treturn toDeleteFlg;\n\t}"
] | [
"0.687574",
"0.6670799",
"0.65947694",
"0.6512848",
"0.6418728",
"0.63681346",
"0.6343329",
"0.62871045",
"0.628667",
"0.62376934",
"0.62376934",
"0.6231806",
"0.622487",
"0.6213952",
"0.61643183",
"0.6094504",
"0.6072251",
"0.6072251",
"0.60488576",
"0.604029",
"0.6028485",
"0.60059553",
"0.59607816",
"0.5957845",
"0.5942288",
"0.593703",
"0.5934365",
"0.5921756",
"0.59057206",
"0.58350056",
"0.5832609",
"0.5823898",
"0.5822049",
"0.5821544",
"0.58161056",
"0.5812439",
"0.578488",
"0.57834095",
"0.57834095",
"0.57799935",
"0.5769493",
"0.5768885",
"0.57637525",
"0.5756996",
"0.57539815",
"0.57539815",
"0.57326555",
"0.5727422",
"0.57118416",
"0.57104445",
"0.57045037",
"0.568779",
"0.56869763",
"0.56808263",
"0.5675232",
"0.56728387",
"0.56581074",
"0.56539917",
"0.56295955",
"0.56280565",
"0.5625129",
"0.5612118",
"0.5608431",
"0.55990076",
"0.55568504",
"0.55524844",
"0.5549898",
"0.55484676",
"0.55409706",
"0.55378276",
"0.55310655",
"0.55288005",
"0.5511229",
"0.55051434",
"0.5502167",
"0.5500881",
"0.54860586",
"0.54858756",
"0.5473366",
"0.5472902",
"0.5471168",
"0.5471168",
"0.5471168",
"0.5471168",
"0.5471168",
"0.5454728",
"0.54380226",
"0.5435893",
"0.5435319",
"0.5433511",
"0.5429196",
"0.5424719",
"0.5424674",
"0.5424674",
"0.5424674",
"0.542349",
"0.54015744"
] | 0.64033926 | 8 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.deleted | public void setDeleted(Boolean deleted) {
this.deleted = deleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void markProductAsDeleted(int productCode) throws SQLException {\n\t\tPreparedStatement productSt = null;\n\t\tString productSql = \"UPDATE PRODOTTO SET ELIMINATO = ?, DATAELIMINAZIONE = ? WHERE CODICE = ?;\";\n\t\t\n\t\ttry{\n\t\t\tproductSt = connection.prepareStatement(productSql);\n\t\t\tproductSt.setBoolean(1, true);\n\t\t\tproductSt.setString(2, LocalDateTime.now().toString());\n\t\t\tproductSt.setInt(3, productCode);\n\t\t\tproductSt.executeUpdate();\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"Product deletion failed.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\tfinally{\n\t\t\tif(productSt != null){\n\t\t\t\tproductSt.close();\n\t\t\t}\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }",
"public void setDeleted(java.lang.Boolean deleted);",
"public void setDeleted(boolean deleted);",
"public void setDeleted();",
"@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}",
"public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Byte deleted) {\n this.deleted = deleted;\n }",
"public void setDeleted(Boolean deleted) {\r\n\t\tthis.deleted = deleted;\r\n\t}",
"public void setDeleted(boolean deleted) {\n this.deleted = deleted;\n }",
"@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"public void setDeleted(boolean value)\r\n {\r\n getSemanticObject().setBooleanProperty(swb_deleted, value);\r\n }",
"@Override\r\n\tpublic boolean deleteProduct(ProductDAO product) {\n\t\treturn false;\r\n\t}",
"public void setIsdeleted( Boolean isdeleted )\n {\n this.isdeleted = isdeleted;\n }",
"public void setDeleted(boolean deleted) {\n\t\tthis.deleted = deleted;\n\t}",
"public void delete(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;",
"@Override\n\tpublic int delete(ProductDTO dto) {\n\t\treturn 0;\n\t}",
"public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}",
"public void setDeleted(final boolean deleted) {\n this.deleted = deleted;\n }",
"public void setIsdeleted(Integer isdeleted) {\n this.isdeleted = isdeleted;\n }",
"public void setIsDeleted(Byte isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }",
"public void setIsDeleted(Byte isDeleted) {\n this.isDeleted = isDeleted;\n }",
"public void setIsDeleted(Byte isDeleted) {\n this.isDeleted = isDeleted;\n }",
"@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}",
"public void setDeleted(final Boolean deleted) {\n\t\tthis.deleted = deleted;\n\t}",
"@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid deleted(boolean pVal);",
"public void Deleteproduct(Product objproduct) {\n\t\t\n\t}",
"public void setIsDeleted(Integer isDeleted) {\n this.isDeleted = isDeleted;\n }",
"@Override\n\tpublic void delete(Product product) {\n\t\t\n\t\tTransaction txTransaction = session.beginTransaction();\n\t\tsession.delete(product);\n\t\ttxTransaction.commit();\n\t\tSystem.out.println(\"Product Deleted\");\n\t}",
"public void setDeleted(boolean deleted) {\n\t\t_primarySchoolStudent.setDeleted(deleted);\n\t}",
"public void setIsDeleted(Integer isDeleted) {\r\n\t\tthis.isDeleted = isDeleted;\r\n\t}",
"public void setIsDeleted(Boolean isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }",
"@Writer\n int deleteByPrimaryKey(Integer productId);",
"public void deleteFoodBill(Bill deleteFood) {\nString sql =\"DELETE FROM bills WHERE Id_food = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteFood.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}",
"public void deleteProduct(Supplier entity) {\n\t\t\r\n\t}",
"void deleteProduct(Long id);",
"public boolean deleteProduct(Product productToDelete){\r\n\t\tString sqlCommand = \"Delete FROM ProductTable \\n\"\r\n + \"WHERE Barcode=\"+productToDelete.getBarcodeProduct(); \r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase);\r\n Statement stmt = conn.createStatement()) {\r\n\t\t\tconn.createStatement().execute(\"PRAGMA foreign_keys = ON;\");\r\n stmt.execute(sqlCommand);\r\n return true;\r\n } catch (SQLException e) {\r\n System.out.println(\"deleteProduct: \"+e.getMessage());\r\n return false;\r\n }\r\n\t}",
"public void setIsDeleted(Boolean isDeleted) {\n this.isDeleted = isDeleted;\n }",
"public Long deleted() {\n return this.deleted;\n }",
"public void setDEL(boolean DEL) {\n this.DEL = DEL;\n }",
"public void deleteProduto(int cd_Produto) {\n pdao.deleteProduto(cd_Produto);\n }",
"public void setIsDeleted(boolean isDeleted) {\n this.isDeleted = isDeleted;\n }",
"public Criteria andDeletedEqualToColumn(YoungSeckillPromotionProductRelation.Column column) {\n addCriterion(new StringBuilder(\"deleted = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\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 }",
"@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}",
"public void deleteProduct(Product product) throws BackendException;",
"public void setDeleteTag(Integer deleteTag) {\n this.deleteTag = deleteTag;\n }",
"@Override\n\tpublic int delete(int id) {\n\t\treturn jdbcTemplate.update(\"call PKG_ALM_CRUD_PRODUNIDADMED.pa_mat_produnidadmed_Del(?)\",id);\n\t}",
"public Criteria andLogicalDeleted(boolean deleted) {\n return deleted ? andDeletedEqualTo(YoungSeckillPromotionProductRelation.IS_DELETED) : andDeletedNotEqualTo(YoungSeckillPromotionProductRelation.IS_DELETED);\n }",
"public void markAsDeleted() {\n\t\tthis.setDeleted(true);\t\t\n\t}",
"void deleteProduct(Integer productId);",
"public void setIsDeleted(Boolean isDeleted) {\n\t\tthis.isDeleted = isDeleted;\n\t}",
"public final native void setForDelete(boolean del) /*-{\n\t\tthis.forDelete = del;\n\t}-*/;",
"public void setDelete(boolean d) {\n\t\t\tdelete.set(d);\n\t\t}",
"public void deleteProduct(Product product_1) {\n\r\n\t}",
"public java.lang.Boolean getDeleted();",
"@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 }",
"public void setIsDeleted(String isDeleted) {\n this.isDeleted = isDeleted;\n }",
"public void setDeleteflag(Integer deleteflag) {\n this.deleteflag = deleteflag;\n }",
"@Override\r\n\tpublic int delete(BigDecimal pk) throws SQLException {\n\t\tList params = new ArrayList();\r\n\t\tint rows = 0;\r\n\t\tdeptConn = this.getConnection();\r\n\t\tparams.add(pk);\r\n\t\trows = this.executeUpdate(deptConn,SQL_DELETE,params.toArray());\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn rows;\r\n\t}",
"@Override\r\n\tpublic void delete(Plate entity) {\n\t\t\r\n\t}",
"public void setIsDelete( Integer isDelete ) {\n this.isDelete = isDelete;\n }",
"public void setIsDeleted(java.lang.Boolean isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }",
"public void setDelete(boolean delete) {\n\t\tthis.delete = delete;\n\t}",
"CamelJpaConsumerBindingModel setConsumeDelete(Boolean consumeDelete);",
"@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 Boolean getDeleted() {\n return deleted;\n }",
"public Boolean getDeleted() {\n return deleted;\n }",
"public Boolean getDeleted() {\n return deleted;\n }",
"public Boolean getDeleted() {\n return deleted;\n }",
"public Boolean getDeleted() {\n return deleted;\n }",
"public void andLogicalDeleted(boolean deleted) {\n setIsDelete(deleted ? IS_DELETED : NOT_DELETED);\n }",
"public void DeleteProductById(String pid) {\r\n String query = \"delete from Trungnxhe141261_Product\\n\"\r\n + \"where id=?\";\r\n\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, pid);\r\n ps.executeUpdate();\r\n } catch (Exception e) {\r\n }\r\n\r\n }",
"@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tboolean deleted();",
"public void setIsDeleted(String isDeleted) {\n\t\tthis.isDeleted = isDeleted;\n\t}",
"public Byte getDeleted() {\n return deleted;\n }",
"public void setIsDelete(Byte isDelete) {\n this.isDelete = isDelete;\n }",
"public void setIsDelete(Byte isDelete) {\n this.isDelete = isDelete;\n }",
"public void delete(MakerBean maker) {\n\t\ttry {\r\n\r\n\t\t\tString query = \"update tb_maker set activeFlag = 2, updateBy=?, updateDate=getdate() Where maker_ID=?\";\r\n\t\t\t\r\n\t\t\tint updateRecord = jdbcTemplate.update(query,\r\n\t\t\t\t\tnew Object[] { \r\n\t\t\t\t\t\t\tmaker.getUpdateBy(),\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tmaker.getMaker_ID()\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}",
"@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}",
"public void setPropertyOnDelete(String propertyOnDelete) {\n \t\tpropertyOnDelete = propertyOnDelete;\n }",
"public Boolean deleteGroupProduct(GroupProduct sm){\n\t\tTblGroupProduct tblsm = new TblGroupProduct();\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\ttblsm.convertToTable(sm);\n\t\t\ttx = session.beginTransaction();\n\t\t\tsession.delete(tblsm);\n\t\t\ttx.commit();\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\tif (tx!= null) tx.rollback();\n\t\t\te.printStackTrace();\n\t\t\tsession.close();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"public Integer getDeleted() {\n return deleted;\n }",
"@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGtStatus.setIsDelete(isDelete);\n\t}",
"public void delete() {\n\t\tdeleted = true;\n\t}",
"public boolean productDelete(Product product) {\n\t\t\n\t\tLOGGER.debug(\"execution started\");\n\n\n\t\tboolean status = false;\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\tString sql=\"DELETE FROM products_information WHERE product_id=?\";\n\t\t\n\t\ttry {\n\t\t\tcon = datasource.getConnection();\n\t\t\tstmt = openPreparedStatement(con,sql);\n\t\t\t\n\t\t\tstmt.setInt(1, product.getPid());\n\n\t\t\tint rows = stmt.executeUpdate();\n\t\t\tif(rows != 0) {\n\t\t\t\tstatus = true;\n\t\t\t}\n\t\t} catch(SQLException sqle) {\n\t\t\tLOGGER.error(\"EXCEPTION OCCURED\",sqle);\n\n\t\t} finally {\n\t\t\tcloseStatement(stmt);\n\t\t\tcloseConnection(con);\n\t\t}\n\t\tLOGGER.debug(\"execution ended\");\n\t\treturn status;\n\t\t\n\t\t\n\t}",
"public void setIs_delete(String is_delete) {\n this.is_delete = is_delete;\n }",
"public Boolean getDeleted() {\r\n\t\treturn deleted;\r\n\t}",
"public void setItDelete(boolean itDelete) {\n\t\t\n\t}",
"@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void delete(Field entity) {\n\t\t\n\t}",
"@Override\r\n\tpublic int delete(Integer pk) throws SQLExceptionIFOpenDoors {\n\t\treturn 0;\r\n\t}",
"public void setIsdelete(Integer isdelete) {\n\t\tthis.isdelete = isdelete;\n\t}",
"@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGTShipPosition.setIsDelete(isDelete);\n\t}",
"public void setIsdelete(Integer isdelete) {\n this.isdelete = isdelete;\n }",
"public Boolean getDeleted() {\n return mDeleted;\n }"
] | [
"0.6310927",
"0.62721777",
"0.6202093",
"0.6146866",
"0.6146296",
"0.6042941",
"0.6023053",
"0.5986129",
"0.5932007",
"0.59308326",
"0.58801013",
"0.584455",
"0.5765533",
"0.5760887",
"0.57559156",
"0.5728147",
"0.5726504",
"0.5713189",
"0.56849897",
"0.56757563",
"0.566828",
"0.5666473",
"0.5666473",
"0.5661556",
"0.56599104",
"0.5655339",
"0.5652465",
"0.56307197",
"0.5618042",
"0.5600212",
"0.55912817",
"0.5591114",
"0.55843306",
"0.5558773",
"0.55438423",
"0.55319464",
"0.55312353",
"0.5527732",
"0.55242264",
"0.55146646",
"0.54963094",
"0.54750353",
"0.5458038",
"0.545609",
"0.54499704",
"0.5439377",
"0.5439111",
"0.5417601",
"0.54160225",
"0.54145473",
"0.54131585",
"0.5410966",
"0.5404262",
"0.5404167",
"0.5397742",
"0.5397623",
"0.5395709",
"0.538515",
"0.5384714",
"0.53815055",
"0.5381077",
"0.53606015",
"0.53574234",
"0.5356698",
"0.53428656",
"0.53392977",
"0.53232163",
"0.53232163",
"0.53232163",
"0.53232163",
"0.53181523",
"0.53130174",
"0.5295633",
"0.52920485",
"0.52916193",
"0.5270775",
"0.52656096",
"0.52656096",
"0.5261819",
"0.52589595",
"0.525424",
"0.5253408",
"0.52473634",
"0.5244189",
"0.5239415",
"0.52390003",
"0.5230405",
"0.522968",
"0.5209883",
"0.52094865",
"0.52035654",
"0.5203233",
"0.5193158",
"0.51924336",
"0.51901096",
"0.51852316"
] | 0.60056335 | 10 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.reason | public String getReason() {
return reason;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getReason() {\n return this.reason;\n }",
"public String getReason() {\n\t\treturn this.reason;\n\t}",
"public String getReason() {\n\t\treturn(m_reason);\n\t}",
"public Reason getReason() {\n return this.reason;\n }",
"public String getReason() {\n\t\treturn getProperty(\"reason\");\n\t}",
"public String reason() {\n return this.reason;\n }",
"public String getReason() {\n return reason;\n }",
"public String getReason() {\n\n return reason;\n }",
"public String getReason() {\n\t\treturn reason;\n\t}",
"public String getReason() {\n return reason;\n }",
"public String getReason()\n {\n return reason;\n }",
"@JsonProperty(\"reason\")\n public String getReason() {\n return reason;\n }",
"public String reason() {\n if(reason == null) reason = standardReason(code);\n\n return reason;\n \n }",
"org.hl7.fhir.String getReason();",
"public java.lang.String getReason() {\r\n return reason;\r\n }",
"@AutoEscape\n\tpublic String getReason();",
"private String getReason(){\r\n\t\tString reason=null;\r\n\t\tswitch (mReason) {\r\n\t\tcase TRANSPORTER_NOT_READY:\r\n\t\t\treason=\"Transporter not ready\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase INVALID_KEY:\r\n\t\t\treason=\"Invalid key\";\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase VALUE_NOT_FOUND:\r\n\t\t\treason=\"Value not found\";\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treason=\"Unknown\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn reason;\r\n\t}",
"java.lang.String getReason();",
"public String reason() {\n return reason;\n }",
"@java.lang.Override\n public java.lang.String getReason() {\n java.lang.Object ref = reason_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n reason_ = s;\n return s;\n }\n }",
"public java.lang.String getReason() {\n java.lang.Object ref = reason_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n reason_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getReason();",
"public int reason() {\r\n return Integer.parseInt(getParm(1));\r\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getReasonBytes() {\n java.lang.Object ref = reason_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n reason_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.math.BigInteger getReasonCode() {\r\n return reasonCode;\r\n }",
"public void setReason(String value) {\n this.reason = value;\n }",
"public com.google.protobuf.ByteString getReasonBytes() {\n java.lang.Object ref = reason_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n reason_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"bridged\", value = \"The reason for leaving the queue\")\n @JsonProperty(JSON_PROPERTY_REASON)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public ReasonEnum getReason() {\n return reason;\n }",
"public String getDealReason() {\r\n return dealReason;\r\n }",
"@ApiModelProperty(value = \"The merchant-specified reason for the refund.\")\n public String getReason() {\n return reason;\n }",
"@Override\n public String getReason()\n {\n return null;\n }",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"public void setReason(String aReason) {\n\t\tthis.reason = aReason;\n\t}",
"public String getREASON_DESC() {\r\n return REASON_DESC;\r\n }",
"public String toString(){\n\t return reason;\n\t }",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"public java.lang.String getReasonText() {\n return reasonText;\n }",
"public String toString() {\n return reason;\n }",
"public String getDescription() {\n\t\tif (iDescription == null) {\n\n\t\t\tif (iExtendedReason != null) {\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tint i = 0;\n\n\t\t\t\tsb.append('(');\n\t\t\t\tsb.append(iReason);\n\t\t\t\tsb.append(\": \");\n\t\t\t\tfor (; i < iExtendedReason.length - 1; i++) {\n\t\t\t\t\tif (iExtendedReason[i] != null) {\n\t\t\t\t\t\tsb.append(iExtendedReason[i].toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsb.append(\"null\");\n\t\t\t\t\t}\n\t\t\t\t\tsb.append(',');\n\t\t\t\t}\n\t\t\t\tsb.append(iExtendedReason[i]);\n\t\t\t\tsb.append(')');\n\t\t\t\tsb.insert(0, iReason);\n\t\t\t\treturn sb.toString();\n\t\t\t}\n\t\t\treturn iReason;\n\t\t}\n\t\treturn iDescription;\n\t}",
"public CommonExceptionConstants getReason() {\n return this.reason;\n }",
"com.google.protobuf.ByteString\n getReasonBytes();",
"public DEDependencyReason getReason() {\n\t\treturn reason;\n\t}",
"public String getChangeReason() {\n return changeReason;\n }",
"public String getID() {\n\t\treturn iReason;\n\t}",
"public String getLstReason() {\n return lstReason;\n }",
"@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _buySellProducts.getDescription();\n\t}",
"public String textReason() {\r\n return getParm(2).trim();\r\n }",
"public java.util.List<CodeableConcept> reasonCode() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_REASON_CODE);\n }",
"public java.util.List<CodeableConcept> reasonCode() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_REASON_CODE);\n }",
"public String getLastChgReasonCd() {\n\t\treturn null;\n\t}",
"public String getReasonPhrase() {\n return toString();\n }",
"java.lang.String getProductDescription();",
"public void setReason(java.lang.String reason) {\r\n this.reason = reason;\r\n }",
"public String getProductPackDesc() {\n return (String)getAttributeInternal(PRODUCTPACKDESC);\n }",
"public String getAuditReason() {\n return auditReason;\n }",
"public java.lang.String getStatusreason() {\n return statusreason;\n }",
"public void setReason(String reason);",
"public String getProductDescription() {\r\n/* 221 */ return this._productDescription;\r\n/* */ }",
"public String getReasonList() {\r\n return reasonList;\r\n }",
"@JsonProperty(\"failureReason\")\n public String getFailureReason() {\n return failureReason;\n }",
"public String getReasonRemove() {\r\n return reasonRemove;\r\n }",
"@Schema(example = \"Refunded 10.00 for broken product.\", description = \"Description of the refund.\")\n public String getDescription() {\n return description;\n }",
"public abstract String getDB2ProductTypeTestSql();",
"public PaymentStatusReason getStatusReason() {\n return paymentStatusReason;\n }",
"public void setReasonCode(java.math.BigInteger reasonCode) {\r\n this.reasonCode = reasonCode;\r\n }",
"public java.lang.String getNotOkForPickupReasonDescription() {\r\n return notOkForPickupReasonDescription;\r\n }",
"protected String getCodeDescription(ResolvedConceptReference ref) throws LBException {\r\n EntityDescription desc = ref.getEntityDescription();\r\n if (desc != null)\r\n return desc.getContent();\r\n return \"<Not assigned>\";\r\n }",
"@ApiModelProperty(value = \"Contains codes that combined with some other fields such as the BAI (Business Application Id) identify some unique use cases. For Sales Tax rebates this field should be populated with the value 5120 (Value-added tax/Sales Tax) along with the businessApplicationId field set to the value 'FD' which indicates this push funds transfer is being conducted in order to facilitate a sales tax refund.\")\n public Integer getMessageReasonCode() {\n return messageReasonCode;\n }",
"public String disabledReasonMessage() {\n return this.disabledReasonMessage;\n }",
"@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:12.110 -0500\", hash_original_method = \"8E1778B505008D9459C329AADF141931\", hash_generated_method = \"01C0C67BB9AF9328133D03E5E8E174ED\")\n \npublic String getReason() {\n return getMessage();\n }",
"@Column(name = \"DESCRIPTION\", length = 200 )\n public String getDescription() {\n return description;\n }",
"@Override\n\t@Column(name = \"leadTypeDescription\", length = 128, nullable = true)\n\tpublic String getDescription()\n\t{\n\t\treturn super.getDescription();\n\t}",
"public String getRejectReason() {\n\t\treturn rejectReason;\n\t}",
"public String getReasonRejection()\n\t{\n\t\treturn reasonRejection;\n\t}",
"@Column(name = \"description\", nullable = false)\n public String getDescription() {\n\treturn this.description;\n }",
"public String getDetailedReason() {\n return detailedReason;\n }",
"public String getFailureReason() {\n return this.failureReason;\n }",
"public String getFailureReason() {\n return this.failureReason;\n }",
"public String getLongDescription() {\n StringBuilder s = new StringBuilder();\n s.append(ChatColor.WHITE).append(getChanceDescription());\n s.append(ChatColor.YELLOW).append(getCountDescription());\n s.append(ChatColor.GOLD).append(_dropType).append(' ');\n\n if (_dropType == DropType.ITEM) {\n Item item = BeastMaster.ITEMS.getItem(_id);\n s.append((item == null) ? ChatColor.RED : (item.isImplicit() ? ChatColor.YELLOW : ChatColor.GREEN));\n s.append(_id);\n\n // Only items can have an associated objective.\n if (_objectiveType != null) {\n s.append(ChatColor.GREEN).append(\"(objective: \").append(_objectiveType).append(\") \");\n }\n } else if (_dropType == DropType.MOB) {\n MobType mobType = BeastMaster.MOBS.getMobType(_id);\n s.append((mobType == null) ? ChatColor.RED : ChatColor.GREEN);\n s.append(_id);\n }\n\n if (_restricted) {\n s.append(ChatColor.LIGHT_PURPLE).append(\" restricted\");\n }\n\n if (_alwaysFits) {\n s.append(ChatColor.YELLOW).append(\" always-fits\");\n }\n\n if (_logged) {\n s.append(ChatColor.GOLD).append(\" logged\");\n }\n\n if (getExperience() > 0 || getSound() != null || isInvulnerable() || isGlowing() || isDirect()) {\n s.append(\"\\n \");\n\n if (getExperience() > 0) {\n s.append(' ');\n s.append(ChatColor.GOLD).append(\"xp \");\n s.append(ChatColor.YELLOW).append(getExperience());\n }\n\n if (getSound() != null) {\n s.append(' ').append(getSoundDescription());\n }\n\n if (isGlowing()) {\n s.append(ChatColor.GOLD).append(\" glowing\");\n }\n\n if (isInvulnerable()) {\n s.append(ChatColor.GOLD).append(\" invulnerable\");\n }\n\n if (isDirect()) {\n s.append(ChatColor.GOLD).append(\" direct-to-inv\");\n }\n\n }\n return s.toString();\n }",
"java.lang.String getProductCode();",
"@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }",
"@Override\n public void setReason( String arg0)\n {\n \n }",
"String failureReason();",
"@ApiModelProperty(value = \"The reason this auto order failed during the last rebill attempt\")\r\n public String getFailureReason() {\r\n return failureReason;\r\n }",
"public Optional<String> reasonPhrase() {\n return header.reasonPhrase();\n }",
"@Override\n public List<ImageRejectReason> getImageRejectReasons(){\n LOGGER.info(\"inside getImageRejectReasons() method\");\n List<ImageRejectReason> imageRejectReasons = new ArrayList<ImageRejectReason>();\n Session session = this.sessionFactory.openSession();\n \n Query query = session.createSQLQuery(xqueryConstants.getImageRejectReasonsQuery());\n List<Object[]> rows = query.list();\n try{\n \tImageRejectReason imageRejectReason = null ;\n for(Object[] row : rows){\n \n \timageRejectReason = new ImageRejectReason();\n \timageRejectReason.setReasonCode(row[0].toString());\n \timageRejectReason.setRejectReason(row[1].toString()); \n \n imageRejectReasons.add(imageRejectReason);\n }\n }catch(Exception e){\n LOGGER.error(\"Exception in getImageRejectReasons() method DAO layer. -- \",e);\n }\n \n finally{\n \tsession.close();\n }\n LOGGER.info(\"Exiting getImageRejectReasons\");\n return imageRejectReasons;\n }",
"public CodeableConcept dataAbsentReason() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_DATA_ABSENT_REASON);\n }",
"public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}",
"private static String reasonToString(int reasonCode) {\n switch (reasonCode) {\n case 0:\n return \"unspecified\";\n case 1:\n return \"key compromise\";\n case 2:\n return \"CA compromise\";\n case 3:\n return \"affiliation changed\";\n case 4:\n return \"superseded\";\n case 5:\n return \"cessation of operation\";\n case 6:\n return \"certificate hold\";\n case 8:\n return \"remove from CRL\";\n default:\n return \"unrecognized reason code\";\n }\n }",
"public static String getBanReason(String ip) {\n String query = \"SELECT `reason` FROM `\" + mysql_db + \"`.`banlist` WHERE `ip` = ?\";\n try (Connection con = getConnection(); PreparedStatement pst = con.prepareStatement(query)) {\n pst.setString(1, ip);\n ResultSet r = pst.executeQuery();\n return r.getString(\"reason\");\n } catch (SQLException e) {\n\n logMessage(LOGLEVEL_IMPORTANT, \"Could not get ban reason.\");\n return \"null reason\";\n }\n }",
"private static String fetchTerminationReason(PsJob psJob, String terminationCode) {\n\t\tlogger.debug(\"*** EmployeeTermination.fetchTerminationReason()\");\n\t\tString terminationReason = null;\n\t\tif(\"O\".equalsIgnoreCase(terminationCode) && \"TER\".equalsIgnoreCase(psJob.getAction())) {\n\t\t\tterminationReason = PsActionReason.findReasonDescriptionByActionAndActionReason(psJob.getAction(), psJob.getActionReason());\n\t\t}\n\t\tif(terminationReason != null) {\n\t\t\t//remove non-alphanumeric characters, except for space\n\t\t\tterminationReason = terminationReason.replaceAll(\"[^a-zA-Z0-9] \", \"\");\n\t\t}\n\t\treturn terminationReason;\n\t}",
"public String product() {\n return this.product;\n }",
"public String getFeeReason() {\n return feeReason;\n }",
"java.lang.String getCouponDescription();"
] | [
"0.6199377",
"0.61729175",
"0.6134382",
"0.61223793",
"0.61193264",
"0.6093419",
"0.6053237",
"0.6038279",
"0.6022119",
"0.5991336",
"0.5980234",
"0.597102",
"0.5965378",
"0.59640133",
"0.59313935",
"0.5861243",
"0.585101",
"0.5833578",
"0.57479763",
"0.5737758",
"0.57302463",
"0.57040197",
"0.5699541",
"0.5648275",
"0.56227565",
"0.5621439",
"0.56136954",
"0.55940235",
"0.55883056",
"0.5559962",
"0.5542758",
"0.55401254",
"0.5501847",
"0.5488095",
"0.5452625",
"0.5445046",
"0.54425687",
"0.54425687",
"0.54425687",
"0.5441257",
"0.54363185",
"0.53889793",
"0.5371653",
"0.5366661",
"0.5340883",
"0.5315618",
"0.5268106",
"0.5259258",
"0.5252972",
"0.5208112",
"0.5185825",
"0.5185825",
"0.51671445",
"0.5159349",
"0.51415795",
"0.5138414",
"0.5109816",
"0.5087553",
"0.50759816",
"0.50478476",
"0.50471485",
"0.50465214",
"0.5028142",
"0.50233847",
"0.5019002",
"0.4997095",
"0.49772564",
"0.49725062",
"0.49599877",
"0.49579877",
"0.4957518",
"0.49193767",
"0.48962352",
"0.48885483",
"0.48862028",
"0.48735926",
"0.4872188",
"0.48488176",
"0.48480573",
"0.4847867",
"0.4847867",
"0.48450568",
"0.4839814",
"0.48237783",
"0.48219237",
"0.48172",
"0.47846958",
"0.47771943",
"0.4776051",
"0.47685304",
"0.4762187",
"0.47551125",
"0.47508478",
"0.47308952",
"0.47292483",
"0.47265923",
"0.4726251"
] | 0.6040058 | 8 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.reason | public void setReason(String reason) {
this.reason = reason;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setReason(String value) {\n this.reason = value;\n }",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"public void setReason(String aReason) {\n\t\tthis.reason = aReason;\n\t}",
"public void setReason(String reason);",
"public void setReason(String reason) {\n this.reason = reason;\n }",
"@Override\n public void setReason( String arg0)\n {\n \n }",
"public void setReason(java.lang.String reason) {\r\n this.reason = reason;\r\n }",
"@Modifying\n\t @Transactional\n\t @Query(\"update Products p set p.productName = :productName,p.productLine = :productLine,p.productScale = :productScale,p.productVendor = :productVendor,p.productDescription = :productDescription,p.quantityInStock = :quantityInStock,p.buyPrice = :buyPrice,p.MSRP = :MSRP where p.productCode = :productCode\")\n\t Integer setNewDescriptionForProduct(@Param(\"productCode\") String productCode,@Param(\"productName\") String productName,@Param(\"productLine\") String productLine,@Param(\"productScale\") String productScale,@Param(\"productVendor\") String productVendor,@Param(\"productDescription\") String productDescription,@Param(\"quantityInStock\") int quantityInStock,@Param(\"buyPrice\") double buyPrice,@Param(\"MSRP\") double MSRP);",
"public void setReasonCode(java.math.BigInteger reasonCode) {\r\n this.reasonCode = reasonCode;\r\n }",
"public void setProductDescription(String productDescription) {\r\n/* 438 */ this._productDescription = productDescription;\r\n/* */ }",
"void setProductDescription(java.lang.String productDescription);",
"public String getReason() {\n return this.reason;\n }",
"@JsonProperty(\"reason\")\n public String getReason() {\n return reason;\n }",
"public String getReason() {\n\t\treturn this.reason;\n\t}",
"public Reason getReason() {\n return this.reason;\n }",
"public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }",
"public String getReason() {\n return reason;\n }",
"@Override\r\n\tpublic void setReasoncode(String code) {\r\n\t\tif(code==null) return; \r\n\t\tAllowanceChargeReasonCodeType allowanceChargeReasonCode = new AllowanceChargeReasonCodeType();\r\n\t\tallowanceChargeReasonCode.setValue(code);\r\n\t\tsuper.setReasonCode(allowanceChargeReasonCode);\r\n\t}",
"public String reason() {\n return this.reason;\n }",
"public String getReason() {\n\t\treturn reason;\n\t}",
"public String getReason() {\n return reason;\n }",
"public String getReason() {\n return reason;\n }",
"public String getReason() {\n return reason;\n }",
"public String getReason() {\n return reason;\n }",
"public String getReason() {\n\n return reason;\n }",
"void setProductCode(java.lang.String productCode);",
"public void setProductPackDesc(String value) {\n setAttributeInternal(PRODUCTPACKDESC, value);\n }",
"public String getReason() {\n return reason;\n }",
"@Override\r\n\tpublic void setReasonText(String text) {\r\n\t\tif(text==null) return;\t\t\r\n\t\tText allowanceChargeReasonCode = Text.create(text);\r\n\t\tsuper.setReason(allowanceChargeReasonCode);\r\n\t}",
"public void setDealReason(String dealReason) {\r\n this.dealReason = dealReason == null ? null : dealReason.trim();\r\n }",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public void setRespondingProductId(java.lang.CharSequence value) {\n this.responding_product_id = value;\n }",
"public String getReason() {\n\t\treturn getProperty(\"reason\");\n\t}",
"public void setDatabaseProduct(String sDatabaseProduct) throws IOException;",
"public String getReason()\n {\n return reason;\n }",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setLBR_ProductSource (String LBR_ProductSource);",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"bridged\", value = \"The reason for leaving the queue\")\n @JsonProperty(JSON_PROPERTY_REASON)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public ReasonEnum getReason() {\n return reason;\n }",
"@Override\n\tpublic void setDescription(java.lang.String description) {\n\t\t_buySellProducts.setDescription(description);\n\t}",
"public void setChangeReason(String changeReason) {\n this.changeReason = changeReason;\n }",
"public void setStateReason(String stateReason) {\n this.stateReason = stateReason;\n }",
"public String getReason() {\n\t\treturn(m_reason);\n\t}",
"public void setDescricaoPotencialUse(String descricaoPotencialUse) {\n this.descricaoPotencialUse = descricaoPotencialUse;\n }",
"public void setReasonText(java.lang.String reasonText) {\n this.reasonText = reasonText;\n }",
"@Override\n public String getReason()\n {\n return null;\n }",
"public void setProduct(java.lang.String product) {\n this.product = product;\n }",
"@AutoEscape\n\tpublic String getReason();",
"public void setReasonRemove(String reasonRemove) {\r\n this.reasonRemove = reasonRemove;\r\n }",
"public void setAccommodationPledgeBo(AccommodationPledgeBo accommodationPledgeBo){\n \tthis.accommodationPledgeBo = accommodationPledgeBo;\n }",
"public Builder setReason(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n reason_ = value;\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }",
"public void setM_Production_ID (int M_Production_ID);",
"public Builder clearReason() {\n reason_ = getDefaultInstance().getReason();\n bitField0_ &= ~0x00000010;\n onChanged();\n return this;\n }",
"@ApiModelProperty(value = \"The merchant-specified reason for the refund.\")\n public String getReason() {\n return reason;\n }",
"public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }",
"public void changeDescription(Product p, String description){\r\n\t\tp.description = description;\r\n\t}",
"public java.lang.String getReason() {\r\n return reason;\r\n }",
"public abstract void setProductResponseMessage(int paramInt, String paramString);",
"public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }",
"public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }",
"public void setAfterReason(String afterReason) {\r\n this.afterReason = afterReason;\r\n }",
"public String getDealReason() {\r\n return dealReason;\r\n }",
"public void setStateReasonCode(String stateReasonCode) {\n this.stateReasonCode = stateReasonCode;\n }",
"public void setRejectReason(String rejectReason) {\n\t\tthis.rejectReason = rejectReason == null ? null : rejectReason.trim();\n\t}",
"@Override\n\tpublic void modifypro(ProductBean p) {\n\t\tsession.update(namespace+\".modifypro\", p);\n\t}",
"public void setNotOkForPickupReasonCode(java.math.BigInteger notOkForPickupReasonCode) {\r\n this.notOkForPickupReasonCode = notOkForPickupReasonCode;\r\n }",
"public void setProduct(entity.APDProduct value);",
"public String reason() {\n if(reason == null) reason = standardReason(code);\n\n return reason;\n \n }",
"public com.autodesk.ws.avro.Call.Builder setRespondingProductId(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this.responding_product_id = value;\n fieldSetFlags()[0] = true;\n return this; \n }",
"public void setProduct(Product product) {\n this.product = product;\n }",
"public void setBucd(String bucd) {\r\n this.bucd = bucd;\r\n }",
"public void setFteReasonCode(java.lang.String param){\n localFteReasonCodeTracker = true;\n \n this.localFteReasonCode=param;\n \n\n }",
"public static Boolean upate_product_packID(int prodID,int packID){\n String sql = \"UPDATE Product SET PackageID = ?, Status = ? WHERE ID = ? \";\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setInt(1,packID);\n if (prodID==-1) pstmt.setInt(2,0);\n else pstmt.setInt(2,1);\n pstmt.setInt(3,prodID);\n if(pstmt.executeUpdate()!=0)\n return true;\n }catch (SQLException e){\n System.out.println(e.getMessage());\n }\n return false;\n }",
"public void setIsBillOfMaterial (boolean IsBillOfMaterial)\n\t{\n\t\tthrow new IllegalArgumentException (\"IsBillOfMaterial is virtual column\");\t}",
"public void setProduct(Product product) {\n mProduct = product;\n mBeaut = mProduct.getBeaut();\n }",
"public void setLBR_ProtestCode (String LBR_ProtestCode);",
"public void setParams(Object[] pReason) {\n\t\tthis.iExtendedReason = pReason;\n\t}",
"public void setReasonList(String reasonList) {\r\n this.reasonList = reasonList;\r\n }",
"public void setStatusreason(java.lang.String statusreason) {\n this.statusreason = statusreason;\n }",
"public void setQuantityToNull(DrinkItem drinkItem) throws SQLException{\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity = null where drink_code =?\");\n\t\t\tmyStmt.setInt(1, drinkItem.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t}",
"public String reason() {\n return reason;\n }",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"public void setProductOff(double productOff) {\n\t\tthis.productOff = productOff;\n\t}",
"public void rejectProduct() {\n self.increaseRejectCount();\n env.updateMachine(self);\n }",
"public PriceModelException(Reason reason) {\n super(reason.toString());\n setMessageKey(getMessageKey() + \".\" + reason.toString());\n }",
"public void setProductPack(String value) {\n setAttributeInternal(PRODUCTPACK, value);\n }",
"public void setOldProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldProperty_descriptionType=param;\n \n\n }",
"public void setDescription(String newVal) {\n if ((newVal != null && this.description != null && (newVal.compareTo(this.description) == 0)) || \n (newVal == null && this.description == null && description_is_initialized)) {\n return; \n } \n this.description = newVal; \n\n description_is_modified = true; \n description_is_initialized = true; \n }",
"public void setProdPainel(List<Tb_Prod_Painel_PromoBeans> lpb) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"insert into tb_prod_painel_promo(codigo,descricao,unid,valor1,valor2,oferta,terminal,painel) values \"; \r\n String sql2 = null;\r\n for (Tb_Prod_Painel_PromoBeans pb : lpb) { \r\n String sql3 = \"('\" +pb.getCodigo()+ \"','\" +pb.getDescricao() + \"','\" + pb.getUnid() + \"','\" + pb.getValor1() + \"','\" + pb.getValor2() + \"',\"\r\n + \"\" + pb.getOferta() + \",\" + pb.getTerminal() + \",\" + pb.getPainel() + \") \"; \r\n if (sql2==null) { \r\n sql2=sql+sql3;\r\n }else{ \r\n sql2=sql2+\",\"+sql3;\r\n }\r\n } \r\n PreparedStatement pstm = conexao.prepareStatement(sql2);\r\n pstm.execute();\r\n pstm.close();\r\n conexao.close();\r\n }\r\n }",
"void setProductPlan(final ProductPlan productPlan);",
"@Override\n public void modificarConfiguracion(Entity e) throws SQLException {\n Connection conexion;\n ResultSet result = null;\n String select= \"UPDATE config_notificacion SET \" +\n \"con_not_boletin = ?, con_not_recibir =? , \" +\n \"con_not_preferencias = ?, con_not_suscripciones = ?, \" +\n \"con_not_etiquetado = ?, con_not_estadisticas =? \" +\n \"WHERE con_not_id = ?;\";\n PreparedStatement ps = null;\n Entity config = (ConfiguracionNotificaciones) e;\n try {\n conexion = getBdConnect();\n ps = conexion.prepareStatement(select);\n ps.setInt(1, config.get_id());\n }\n catch (SQLException error){\n error.printStackTrace();\n }\n finally {\n closeConnection();\n }\n }",
"public void setLstReason(String lstReason) {\n this.lstReason = lstReason == null ? null : lstReason.trim();\n }",
"public void setProductId(String productId) ;",
"@Override\n\tpublic String updateProduct() throws AdminException {\n\t\treturn null;\n\t}",
"public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}",
"public void setDescription(String newDesc){\n\n //assigns the value of newDesc to the description field\n this.description = newDesc;\n }",
"java.lang.String getReason();",
"public void setReasonRejection(String reasonRejection)\n\t{\n\t\tthis.reasonRejection = Toolbox.trim(reasonRejection, 70);\n\t}"
] | [
"0.59356785",
"0.5923655",
"0.58945197",
"0.58941674",
"0.5836557",
"0.57434034",
"0.56295615",
"0.5543636",
"0.54628974",
"0.53772634",
"0.5219776",
"0.5161841",
"0.51485926",
"0.5095142",
"0.5054989",
"0.5047198",
"0.50305957",
"0.5024458",
"0.5005981",
"0.50047076",
"0.49967122",
"0.49967122",
"0.49967122",
"0.49967122",
"0.49925843",
"0.4985968",
"0.4977383",
"0.4976337",
"0.49693722",
"0.49638274",
"0.49467474",
"0.4941256",
"0.49405783",
"0.49292123",
"0.49248603",
"0.4920531",
"0.4920531",
"0.49107772",
"0.48952526",
"0.48944893",
"0.48917127",
"0.48910472",
"0.48825017",
"0.48753366",
"0.48624423",
"0.48545292",
"0.48379043",
"0.48204172",
"0.48179546",
"0.48161846",
"0.4809484",
"0.48054174",
"0.48014608",
"0.4794719",
"0.47869155",
"0.47858584",
"0.47815892",
"0.47785178",
"0.4771232",
"0.4771232",
"0.47710052",
"0.4761448",
"0.4741123",
"0.47386652",
"0.4730165",
"0.4729313",
"0.47283524",
"0.47265136",
"0.47233558",
"0.47080994",
"0.46997896",
"0.46991658",
"0.46976495",
"0.46924984",
"0.46866345",
"0.46855634",
"0.4682745",
"0.46686083",
"0.4663308",
"0.4654378",
"0.4641074",
"0.46401832",
"0.46231002",
"0.4622893",
"0.4617172",
"0.46048954",
"0.46046147",
"0.46017435",
"0.4597885",
"0.45962048",
"0.4588226",
"0.45881754",
"0.4576208",
"0.45745704",
"0.4574447",
"0.45622057",
"0.4553369",
"0.45523217"
] | 0.5834129 | 6 |
This method was generated by MyBatis Generator. This method returns the value of the database column ball_pack_product.ball_pack_id | public Integer getBallPackId() {
return ballPackId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getShopBasketId();",
"public void setBallPackId(Integer ballPackId) {\n this.ballPackId = ballPackId;\n }",
"public long getItemShopBasketId();",
"long getPackageid();",
"long getPackageid();",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public String getPackageId()\n {\n return packageId;\n }",
"public Integer getBlId() {\n return blId;\n }",
"int getBId();",
"public PxProductInfo getComboId() {\n return comboId;\n }",
"public Integer getId()\r\n\t\t{ return mapping.getId(); }",
"public abstract Integer getCompteId();",
"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 int getBId() {\n return bId_;\n }",
"public int getBId() {\n return instance.getBId();\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}",
"@Override\r\n\tpublic Long getID(ProductIngredientParam param) {\n\t\treturn param.getId();\r\n\t}",
"@Override\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\t@Column(name = \"pepe_sq_id\")\n\tpublic Long getId() {\n\t\treturn super.getId();\n\t}",
"public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) 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 id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }",
"public int getId() {\n return parameter.getId();\n }",
"public Integer getId() {\n\t\treturn loanId; //changed LoAn_Id to loanId\r\n\t}",
"default String getPackageId() {\n return getIdentifier().getPackageId();\n }",
"public int getM_Production_ID();",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"@Override\r\n\tpublic String getId() {\n\t\treturn mProductionId;\r\n\t}",
"public Integer getPlatId() {\n return platId;\n }",
"@Override\n\tpublic Pack getPackByPackId(long id) throws WebApplicationException{\n\t\tPack pack=null;\n\t\t\n\t\ttry {\n\t\t\tpack = storeBusiness.getPackByPackId(id);\n\t\t} catch (StoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn pack;\n\t}",
"public int getIdBoleta() {\n return idBoleta;\n }",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"public Integer getPlateId() {\r\n return plateId;\r\n }",
"public int get_Bag_id() {\r\n return this.bag_id;\r\n }",
"public Integer getGoodsPkId() {\n\t\treturn goodsPkId;\n\t}",
"public Number getBpoId() {\n return (Number) getAttributeInternal(BPOID);\n }",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"public String getProductPack() {\n return (String)getAttributeInternal(PRODUCTPACK);\n }",
"public abstract Integer getTemplId();",
"public Integer getBcId() {\n return bcId;\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"@Id\n @WhereSQL(sql = \"id=:WxPayconfig_id\")\n public java.lang.String getId() {\n return this.id;\n }",
"public int getPack() {\r\n\t\treturn pack;\r\n\t}",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public String getProductID(Integer randomeProductPlateNumber) {\n\t\t By currentProductLinkField = By.xpath(\"//*[@id='product-list']/div/div[\"+ randomeProductPlateNumber + \"]/a[1]\");\n\t\treturn driver.findElement(currentProductLinkField).getAttribute(\"data-linkproductid\");\n\t}",
"public int getBoatId() {\n return boatId;\n }",
"public int getBackpack() {\n return backpack_;\n }",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public Integer getBillId() {\n return billId;\n }",
"public int getBackpack() {\n return backpack_;\n }",
"public int getProduct_id() {\n\t\treturn product_id;\n\t}",
"public String getComponentId();",
"public double getPk()\n {\n return this.pk;\n }",
"public Integer getProductionId() {\n return productionId;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t}",
"Long getDbId();",
"public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}",
"public abstract Long getId();",
"public int getBoltingID() {\r\n\t\treturn boltingID;\r\n\t}",
"public Integer getId() {\n return (Integer) get(\"id\");\n }",
"public Long getProductionId() {\n return productionId;\n }",
"@Import(\"id\")\n\tint getId();",
"private static int getJarId(String jarName, AclId[] ownerRet)\n\tthrows SQLException\n\t{\n\t\tPreparedStatement stmt = SQLUtils\n\t\t\t.getDefaultConnection()\n\t\t\t.prepareStatement(\n\t\t\t\t\"SELECT jarId, jarOwner FROM sqlj.jar_repository WHERE jarName = ?\");\n\t\ttry\n\t\t{\n\t\t\treturn getJarId(stmt, jarName, ownerRet);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSQLUtils.close(stmt);\n\t\t}\n\t}",
"@Override\n\tpublic Number getId() {\n\t\treturn this.id;\n\t}",
"public Integer getBuildingid() {\r\n return buildingid;\r\n }",
"public int getFirstPack() {\n return packs.first().getNumber();\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public Integer getGoodsId() {\n return goodsId;\n }",
"public int getBigId () { return bigId; }",
"public Long getGoodsId() {\r\n return goodsId;\r\n }",
"public String getPkgId() {\n return pkgId;\n }",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}",
"public BigDecimal getStatementId() {\n return getStatementIdProperty().getValue();\n }",
"public Long getId() {\n return super.getId();\n }",
"public Integer getId() {\r\n return this.id;\r\n }",
"public Integer getId()\n\t{\n\t\treturn this.id; \n\t}",
"Product getProductByID(Long id);",
"public BigDecimal getId() {\n\t\treturn id;\n\t}",
"public int findBiggestId() throws SQLException {\n\t\tString sqlSentence = sqlLoader.getProperty(\"SQL_GET_BIGGEST_ID_SUPPLIER_ORDERS\");\n\t\tConnection con = Jdbc.getCurrentConnection();\n\t\tStatement st = con.createStatement();\n\n\t\tResultSet rs = st.executeQuery(sqlSentence);\n\t\tint id = 0;\n\n\t\tif (rs.next()) {\n\t\t\tid = rs.getInt(1);\n\t\t}\n\t\tJdbc.close(rs, st);\n\n\t\treturn id;\n\t}",
"public Integer getId() { return this.id; }"
] | [
"0.6183268",
"0.6108579",
"0.6029676",
"0.5963369",
"0.5963369",
"0.5709685",
"0.5691994",
"0.56834984",
"0.5618676",
"0.5610982",
"0.559149",
"0.5547447",
"0.5466268",
"0.54616576",
"0.54556906",
"0.54490054",
"0.5432335",
"0.5432335",
"0.5414132",
"0.5414132",
"0.5406338",
"0.5402794",
"0.5370595",
"0.53680986",
"0.535805",
"0.5350683",
"0.5348674",
"0.5342944",
"0.5294315",
"0.5294315",
"0.5290577",
"0.5284861",
"0.5281528",
"0.5279443",
"0.5254697",
"0.5250552",
"0.5241785",
"0.523591",
"0.5210416",
"0.5195145",
"0.5190991",
"0.5187724",
"0.5183031",
"0.516183",
"0.5157774",
"0.5157774",
"0.51322263",
"0.51096904",
"0.5109347",
"0.5109347",
"0.5109347",
"0.5109347",
"0.5109347",
"0.5109347",
"0.5109288",
"0.51074535",
"0.51035273",
"0.509988",
"0.509988",
"0.509988",
"0.50944257",
"0.5091695",
"0.508837",
"0.50603664",
"0.5058484",
"0.5054592",
"0.5050761",
"0.5050761",
"0.50494677",
"0.504746",
"0.5043418",
"0.503065",
"0.50145054",
"0.5009998",
"0.5005892",
"0.5002171",
"0.499968",
"0.49992388",
"0.49981907",
"0.49969783",
"0.49947795",
"0.49947795",
"0.49947795",
"0.49947795",
"0.49947795",
"0.49947795",
"0.49947795",
"0.49930188",
"0.49867252",
"0.49843973",
"0.49841985",
"0.4980315",
"0.49776965",
"0.4975584",
"0.49740225",
"0.49709126",
"0.49699625",
"0.49664062",
"0.49642605",
"0.4962143"
] | 0.7069185 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column ball_pack_product.ball_pack_id | public void setBallPackId(Integer ballPackId) {
this.ballPackId = ballPackId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getBallPackId() {\n return ballPackId;\n }",
"public void setShopBasketId(long shopBasketId);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Production_ID (int M_Production_ID);",
"private void setBId(int value) {\n \n bId_ = value;\n }",
"public void setItemShopBasketId(long itemShopBasketId);",
"public void setPackageId( String packageId )\n {\n this.packageId = packageId;\n }",
"public Builder setPackageid(long value) {\n bitField0_ |= 0x00000002;\n packageid_ = value;\n onChanged();\n return this;\n }",
"public Builder setPackageid(long value) {\n bitField0_ |= 0x00000001;\n packageid_ = value;\n onChanged();\n return this;\n }",
"public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}",
"@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}",
"public void setIdBoleta(int value) {\n this.idBoleta = value;\n }",
"public static Boolean upate_product_packID(int prodID,int packID){\n String sql = \"UPDATE Product SET PackageID = ?, Status = ? WHERE ID = ? \";\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setInt(1,packID);\n if (prodID==-1) pstmt.setInt(2,0);\n else pstmt.setInt(2,1);\n pstmt.setInt(3,prodID);\n if(pstmt.executeUpdate()!=0)\n return true;\n }catch (SQLException e){\n System.out.println(e.getMessage());\n }\n return false;\n }",
"public void setBlId(Integer blId) {\n this.blId = blId;\n }",
"public abstract void setCompteId(Integer pCompteId);",
"public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }",
"@Override\r\n\tpublic void setId(String id) {\n\t\tmProductionId = id;\r\n\t}",
"protected abstract void setId(P object, Long id);",
"public long getShopBasketId();",
"public void setBigId (int bigId) { this.bigId = bigId; }",
"public void setProductId(String productId) ;",
"public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}",
"public void setPk(double pk)\n {\n this.pk = pk;\n }",
"public void setPicklistBinId(String setPicklistBinId) {\n this.picklistBinId = setPicklistBinId;\n }",
"public void setIdProducto(int value) {\n this.idProducto = value;\n }",
"public void setPCatgryId(Number value) {\n\t\tsetNumber(P_CATGRY_ID, value);\n\t}",
"public void setPK(IEntityPK pk) {\r\n\tthis.pk = (DispenserPK) pk;\r\n }",
"public long getItemShopBasketId();",
"public void setProduct(entity.APDProduct value);",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_buySellProducts.setPrimaryKey(primaryKey);\n\t}",
"public void setId(Long pid) {\n this.pid = pid;\n }",
"@Override\n\tpublic void baja(Integer pk) {\n\t\t\n\t}",
"@Override\n public void setPrimaryKey(java.lang.Object key) {\n\n mnDbmsType = ((int[]) key)[0];\n mnPkYearId = ((int[]) key)[1];\n mnPkTypeCostObjectId = ((int[]) key)[2];\n mnPkRefCompanyBranchId = ((int[]) key)[3];\n mnPkRefReferenceId = ((int[]) key)[4];\n mnPkRefEntityId = ((int[]) key)[5];\n mnPkBizPartnerId = ((int[]) key)[6];\n mtDbmsDateStart = ((java.util.Date[]) key)[7];\n mtDbmsDateEnd = ((java.util.Date[]) key)[8];\n }",
"public void setBundleID(long param){\n localBundleIDTracker = true;\n \n this.localBundleID=param;\n \n\n }",
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public void setProductRelatedByRelProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProductId(((NumberKey) key).intValue());\n }",
"void updateOfProductById(long id);",
"long getPackageid();",
"long getPackageid();",
"public String getPackageId()\n {\n return packageId;\n }",
"@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }",
"public void setProductPack(String value) {\n setAttributeInternal(PRODUCTPACK, value);\n }",
"public Integer getBlId() {\n return blId;\n }",
"@Override\n public final void setItsId(final Long pId) {\n //stub\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\r\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttableObjects.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tableObjects.getItem(data);\r\n\t\t\t\t\t\t\t\tObject rowId = tablePacks.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Valor \" + tablePacks.getContainerProperty(rowId,\"IdPack\").getValue());\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//venEditarObjects.init(\"UPDATE\",itemClickEvent, tablePacks.getContainerProperty(rowId,\"PackName\").getValue().toString(),(Integer)tablePacks.getContainerProperty(rowId,\"IdPack\").getValue() );\r\n\t\t\t\t\t\t\t\tUI.getCurrent().addWindow(venEditarPacks);\r\n\t\t\r\n\t\t\t\t\t\t\t}",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public PxProductInfo getComboId() {\n return comboId;\n }",
"public void setId(long id) {\n id_ = id;\n }",
"public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}",
"public int getBId() {\n return bId_;\n }",
"public void setBoard_id(int Board_id){\n this.Board_id=Board_id;\n }",
"public void setProductionId(Long productionId) {\n this.productionId = productionId;\n }",
"public void setJP_BankData_ID (int JP_BankData_ID);",
"public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"@Override\n public void setId(int pintId) {\n this.intDynaGraphId = pintId;\n }",
"final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}",
"public void setPknum(Integer pknum) {\n this.pknum = pknum;\n }",
"public void setId(Long value) {\r\n this.id = value;\r\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public long getPackageid() {\n return packageid_;\n }",
"protected void setProductId(String productId) {\n this.productId = productId;\n }",
"@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setjId(Integer jId) {\n this.jId = jId;\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"@Override\n\tpublic void setId(Integer arg0) {\n\n\t}",
"public void setProductionId(Integer productionId) {\n this.productionId = productionId;\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public void setBpoId(Number value) {\n setAttributeInternal(BPOID, value);\n }",
"public int get_Bag_id() {\r\n return this.bag_id;\r\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public long getPackageid() {\n return packageid_;\n }",
"public void setId (long id)\r\n {\r\n _id = id;\r\n }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"@Override\n\tpublic void setContent_id(long content_id) {\n\t\t_buySellProducts.setContent_id(content_id);\n\t}",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"public void setPkId(Integer pkId) {\n\t\tthis.pkId = pkId;\n\t}",
"@Override\n\tpublic Pack getPackByPackId(long id) throws WebApplicationException{\n\t\tPack pack=null;\n\t\t\n\t\ttry {\n\t\t\tpack = storeBusiness.getPackByPackId(id);\n\t\t} catch (StoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn pack;\n\t}",
"public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);",
"public void setPropertyBuyerId(int propertyBuyerId) {\n\t\tthis.propertyBuyerId = propertyBuyerId;\n\t}",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public void setStatementId(BigDecimal statementId) {\n getStatementIdProperty().setValue(statementId);\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }"
] | [
"0.6579621",
"0.5672116",
"0.55692697",
"0.55692697",
"0.5543104",
"0.5501743",
"0.5364879",
"0.5360417",
"0.5344333",
"0.53298205",
"0.53215057",
"0.531145",
"0.53108853",
"0.52791995",
"0.52611285",
"0.52596503",
"0.51724666",
"0.51552355",
"0.5122476",
"0.50886863",
"0.5076859",
"0.50560534",
"0.5045106",
"0.5014302",
"0.49788806",
"0.4978034",
"0.49733752",
"0.49703625",
"0.4965098",
"0.4960535",
"0.49542385",
"0.49536762",
"0.4944676",
"0.49445578",
"0.49363714",
"0.49234334",
"0.49189213",
"0.4915883",
"0.4899463",
"0.4899463",
"0.48916",
"0.4872315",
"0.486743",
"0.48632035",
"0.48410457",
"0.48373622",
"0.48345906",
"0.48345906",
"0.48237193",
"0.47874725",
"0.47857273",
"0.47815695",
"0.47751328",
"0.47720662",
"0.4740907",
"0.47397152",
"0.47281805",
"0.47281805",
"0.47281805",
"0.47281805",
"0.47281805",
"0.47281805",
"0.47275576",
"0.47264352",
"0.472396",
"0.4723862",
"0.47202983",
"0.47202983",
"0.4720009",
"0.47150412",
"0.4711655",
"0.4711655",
"0.4704574",
"0.47037175",
"0.47033",
"0.47019455",
"0.47008288",
"0.47008288",
"0.4692973",
"0.46904272",
"0.46866986",
"0.46866986",
"0.46797687",
"0.46769947",
"0.46769947",
"0.46768332",
"0.46747217",
"0.4659501",
"0.4655582",
"0.4651691",
"0.46502024",
"0.46496555",
"0.46439368",
"0.46436432",
"0.46417984",
"0.46391597",
"0.46391597",
"0.46391597",
"0.46391597",
"0.46391597"
] | 0.692742 | 0 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", IS_DELETED=").append(IS_DELETED);
sb.append(", NOT_DELETED=").append(NOT_DELETED);
sb.append(", id=").append(id);
sb.append(", valueId=").append(valueId);
sb.append(", addTime=").append(addTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", deleted=").append(deleted);
sb.append(", reason=").append(reason);
sb.append(", ballPackId=").append(ballPackId);
sb.append("]");
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | @Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BallPackProduct other = (BallPackProduct) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getValueId() == null ? other.getValueId() == null : this.getValueId().equals(other.getValueId()))
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
&& (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
&& (this.getBallPackId() == null ? other.getBallPackId() == null : this.getBallPackId().equals(other.getBallPackId()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getValueId() == null) ? 0 : getValueId().hashCode());
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
result = prime * result + ((getBallPackId() == null) ? 0 : getBallPackId().hashCode());
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public void setProduct(entity.APDProduct value);",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public String getProductId();",
"Product selectByPrimaryKey(Long id);",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"public String getProduct() {\r\n return this.product;\r\n }",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.5797155",
"0.57874024",
"0.5777821",
"0.5724395",
"0.56678903",
"0.560831",
"0.5605571",
"0.5604123",
"0.5598447",
"0.5547181",
"0.5544748",
"0.5530436",
"0.55098486",
"0.5508721",
"0.550488",
"0.5492648",
"0.5489038",
"0.54772735",
"0.5467213",
"0.5456925",
"0.54222345",
"0.5421278",
"0.5399413",
"0.5378587",
"0.53762734",
"0.5373031",
"0.53691816",
"0.5366516",
"0.5361687",
"0.5352605",
"0.53522104",
"0.53498435",
"0.5343083",
"0.5338712",
"0.5338712",
"0.5333404",
"0.532292",
"0.53200155",
"0.53166246",
"0.5315863",
"0.53148896",
"0.53124225",
"0.5311051",
"0.52955115",
"0.5286327",
"0.5280291",
"0.52754825",
"0.52703214",
"0.52693415",
"0.52645075",
"0.52556986",
"0.52470315",
"0.52470315",
"0.5244397",
"0.5244267",
"0.52399164",
"0.5238786",
"0.5237794",
"0.5231138",
"0.52250594",
"0.5223675",
"0.5217197",
"0.520999",
"0.51971734",
"0.51961154",
"0.51961154",
"0.51961154",
"0.5190389",
"0.51896876",
"0.5188737",
"0.51860255",
"0.51626253",
"0.51544166",
"0.5153653",
"0.51534903",
"0.51522636",
"0.5150963",
"0.51485723",
"0.5142502",
"0.5139326",
"0.51367235",
"0.51346606",
"0.513132",
"0.5125925",
"0.5124656",
"0.512396",
"0.5122026",
"0.51215714",
"0.51180184",
"0.5116755",
"0.5112614",
"0.51090544",
"0.51090544",
"0.51081157",
"0.510378",
"0.5103563",
"0.5098473",
"0.50970745",
"0.50965226",
"0.5092561",
"0.5089259"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | Deleted(Boolean value, String name) {
this.value = value;
this.name = name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public Boolean getValue() {
return this.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public Boolean value() {
return this.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String getName() {
return this.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public void setProduct(entity.APDProduct value);",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public String getProductId();",
"Product selectByPrimaryKey(Long id);",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"public String getProduct() {\r\n return this.product;\r\n }",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.5797155",
"0.57874024",
"0.5777821",
"0.5724395",
"0.56678903",
"0.560831",
"0.5605571",
"0.5604123",
"0.5598447",
"0.5547181",
"0.5544748",
"0.5530436",
"0.55098486",
"0.5508721",
"0.550488",
"0.5492648",
"0.5489038",
"0.54772735",
"0.5467213",
"0.5456925",
"0.54222345",
"0.5421278",
"0.5399413",
"0.5378587",
"0.53762734",
"0.5373031",
"0.53691816",
"0.5366516",
"0.5361687",
"0.5352605",
"0.53522104",
"0.53498435",
"0.5343083",
"0.5338712",
"0.5338712",
"0.5333404",
"0.532292",
"0.53200155",
"0.53166246",
"0.5315863",
"0.53148896",
"0.53124225",
"0.5311051",
"0.52955115",
"0.5286327",
"0.5280291",
"0.52754825",
"0.52703214",
"0.52693415",
"0.52645075",
"0.52556986",
"0.52470315",
"0.52470315",
"0.5244397",
"0.5244267",
"0.52399164",
"0.5238786",
"0.5237794",
"0.5231138",
"0.52250594",
"0.5223675",
"0.5217197",
"0.520999",
"0.51971734",
"0.51961154",
"0.51961154",
"0.51961154",
"0.5190389",
"0.51896876",
"0.5188737",
"0.51860255",
"0.51626253",
"0.51544166",
"0.5153653",
"0.51534903",
"0.51522636",
"0.5150963",
"0.51485723",
"0.5142502",
"0.5139326",
"0.51367235",
"0.51346606",
"0.513132",
"0.5125925",
"0.5124656",
"0.512396",
"0.5122026",
"0.51215714",
"0.51180184",
"0.5116755",
"0.5112614",
"0.51090544",
"0.51090544",
"0.51081157",
"0.510378",
"0.5103563",
"0.5098473",
"0.50970745",
"0.50965226",
"0.5092561",
"0.5089259"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String value() {
return this.column;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String getValue() {
return this.column;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String getJavaProperty() {
return this.javaProperty;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String getJdbcType() {
return this.jdbcType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public void setProduct(entity.APDProduct value);",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public String getProductId();",
"Product selectByPrimaryKey(Long id);",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"public String getProduct() {\r\n return this.product;\r\n }",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.5797155",
"0.57874024",
"0.5777821",
"0.5724395",
"0.56678903",
"0.560831",
"0.5605571",
"0.5604123",
"0.5598447",
"0.5547181",
"0.5544748",
"0.5530436",
"0.55098486",
"0.5508721",
"0.550488",
"0.5492648",
"0.5489038",
"0.54772735",
"0.5467213",
"0.5456925",
"0.54222345",
"0.5421278",
"0.5399413",
"0.5378587",
"0.53762734",
"0.5373031",
"0.53691816",
"0.5366516",
"0.5361687",
"0.5352605",
"0.53522104",
"0.53498435",
"0.5343083",
"0.5338712",
"0.5338712",
"0.5333404",
"0.532292",
"0.53200155",
"0.53166246",
"0.5315863",
"0.53148896",
"0.53124225",
"0.5311051",
"0.52955115",
"0.5286327",
"0.5280291",
"0.52754825",
"0.52703214",
"0.52693415",
"0.52645075",
"0.52556986",
"0.52470315",
"0.52470315",
"0.5244397",
"0.5244267",
"0.52399164",
"0.5238786",
"0.5237794",
"0.5231138",
"0.52250594",
"0.5223675",
"0.5217197",
"0.520999",
"0.51971734",
"0.51961154",
"0.51961154",
"0.51961154",
"0.5190389",
"0.51896876",
"0.5188737",
"0.51860255",
"0.51626253",
"0.51544166",
"0.5153653",
"0.51534903",
"0.51522636",
"0.5150963",
"0.51485723",
"0.5142502",
"0.5139326",
"0.51367235",
"0.51346606",
"0.513132",
"0.5125925",
"0.5124656",
"0.512396",
"0.5122026",
"0.51215714",
"0.51180184",
"0.5116755",
"0.5112614",
"0.51090544",
"0.51090544",
"0.51081157",
"0.510378",
"0.5103563",
"0.5098473",
"0.50970745",
"0.50965226",
"0.5092561",
"0.5089259"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String desc() {
return this.getEscapedColumnName() + " DESC";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String asc() {
return this.getEscapedColumnName() + " ASC";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public void setProduct(entity.APDProduct value);",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public String getProductId();",
"Product selectByPrimaryKey(Long id);",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"public String getProduct() {\r\n return this.product;\r\n }",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.5797155",
"0.57874024",
"0.5777821",
"0.5724395",
"0.56678903",
"0.560831",
"0.5605571",
"0.5604123",
"0.5598447",
"0.5547181",
"0.5544748",
"0.5530436",
"0.55098486",
"0.5508721",
"0.550488",
"0.5492648",
"0.5489038",
"0.54772735",
"0.5467213",
"0.5456925",
"0.54222345",
"0.5421278",
"0.5399413",
"0.5378587",
"0.53762734",
"0.5373031",
"0.53691816",
"0.5366516",
"0.5361687",
"0.5352605",
"0.53522104",
"0.53498435",
"0.5343083",
"0.5338712",
"0.5338712",
"0.5333404",
"0.532292",
"0.53200155",
"0.53166246",
"0.5315863",
"0.53148896",
"0.53124225",
"0.5311051",
"0.52955115",
"0.5286327",
"0.5280291",
"0.52754825",
"0.52703214",
"0.52693415",
"0.52645075",
"0.52556986",
"0.52470315",
"0.52470315",
"0.5244397",
"0.5244267",
"0.52399164",
"0.5238786",
"0.5237794",
"0.5231138",
"0.52250594",
"0.5223675",
"0.5217197",
"0.520999",
"0.51971734",
"0.51961154",
"0.51961154",
"0.51961154",
"0.5190389",
"0.51896876",
"0.5188737",
"0.51860255",
"0.51626253",
"0.51544166",
"0.5153653",
"0.51534903",
"0.51522636",
"0.5150963",
"0.51485723",
"0.5142502",
"0.5139326",
"0.51367235",
"0.51346606",
"0.513132",
"0.5125925",
"0.5124656",
"0.512396",
"0.5122026",
"0.51215714",
"0.51180184",
"0.5116755",
"0.5112614",
"0.51090544",
"0.51090544",
"0.51081157",
"0.510378",
"0.5103563",
"0.5098473",
"0.50970745",
"0.50965226",
"0.5092561",
"0.5089259"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table ball_pack_product | public String getAliasedEscapedColumnName() {
return this.getEscapedColumnName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}",
"public interface AlmacenMapper {\n @Select(value = \"select tipo,descripcion from tipoproducto\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n })\n List<Producto> listarTipoProducto();\n\n @Insert(value = \"INSERT \" +\n \"INTO producto \" +\n \" ( \" +\n \" codigo, \" +\n \" nombre, \" +\n \" tipo, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" producto_seq.nextval, \" +\n \" #{produ.nombre}, \" +\n \" #{produ.tipo}, \" +\n \" #{produ.porc_precio}, \" +\n \" #{produ.uni_medida}, \" +\n \" #{produ.cantidad} \" +\n \" )\")\n void GuardarProducto(@Param(\"produ\") Producto producto);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre, \" +\n \" p.tipo, \" +\n \" tp.descripcion, \" +\n \" porc_precio, \" +\n \" uni_medida, \" +\n \" cantidad \" +\n \"FROM producto p \" +\n \"INNER JOIN tipoproducto tp \" +\n \"ON(p.tipo=tp.tipo)\")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n @Result(property = \"tipo\",column = \"tipo\"),\n @Result(property = \"descripcion\",column = \"descripcion\"),\n @Result(property = \"porc_precio\",column = \"porc_precio\"),\n @Result(property = \"uni_medida\",column = \"uni_medida\"),\n @Result(property = \"cantidad\",column = \"cantidad\"),\n })\n List<Producto> listarProductos();\n\n @Update(value =\"UPDATE producto \" +\n \"SET nombre =#{produ.nombre}, \" +\n \" porc_precio=#{produ.porc_precio}, \" +\n \" tipo= \" +\n \" #{produ.tipo} \" +\n \"WHERE codigo=#{produ.codigo}\" )\n void ActualizarProducto(@Param(\"produ\") Producto producto);\n\n @Delete(value=\"DELETE FROM PRODUCTO WHERE codigo=#{id}\")\n void EliminarProducto(@Param(\"id\") Integer id);\n\n @Select(value = \"SELECT codigo, \" +\n \" nombre \" +\n \"FROM producto p where tipo=#{id} \")\n @Results(value = {\n @Result(javaType = Producto.class),\n @Result(property = \"codigo\",column = \"codigo\"),\n @Result(property = \"nombre\",column = \"nombre\"),\n })\n List<Producto> ListarProductosxCategoria(@Param(\"id\") Integer id);\n\n @Insert(value = \"INSERT \" +\n \"INTO entrada_productos \" +\n \" ( \" +\n \" n_entrada, \" +\n \" fecha, \" +\n \" costo_total \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" entrada_seq.nextval , \" +\n \" sysdate, \" +\n \" #{entrada.costo_total} \" +\n \" )\")\n void insertEntradaProducto(@Param(\"entrada\") EntradaProducto entrada);\n\n @Insert(value = \"INSERT \" +\n \"INTO detalle_entrada_productos \" +\n \" ( \" +\n \" N_ENTRADA, \" +\n \" COD_PRODUCTO, \" +\n \" COD_PROVEEDOR, \" +\n \" CANTIDAD, \" +\n \" PRECIO_COMPRA, \" +\n \" COSTO_TOTAL_PRODUCTO \" +\n \" ) \" +\n \" VALUES \" +\n \" ( \" +\n \" (select max(n_entrada) from entrada_productos), \" +\n \" #{entrada.cod_producto}, \" +\n \" #{entrada.cod_proveedor}, \" +\n \" #{entrada.cantidad}, \" +\n \" #{entrada.precio_compra}, \" +\n \" #{entrada.costo_total_producto} \" +\n \" )\")\n void inserDetalleEntradaProductos(@Param(\"entrada\") EntradaProducto entrada);\n\n @Update(value =\"UPDATE producto \" +\n \"SET cantidad=(select cantidad+#{entrada.cantidad} from producto where codigo=#{entrada.cod_producto}) \"+\n \"WHERE codigo=#{entrada.cod_producto}\" )\n void updateStockProducto(@Param(\"entrada\")EntradaProducto entrada);\n}",
"ProductSellerGoods selectByPrimaryKey(Integer productId);",
"public static ArrayList<Product> selectProducts() {\n \n ArrayList<Product> products = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n PreparedStatement ps2 = null;\n ResultSet rs = null;\n ResultSet rs2 = null;\n int count = 0;\n\n String query = \"SELECT * FROM product ORDER BY catalogCategory, productName ASC \";\n \n String query2 = \"SELECT * FROM product\"; \n \n try {\n ps = connection.prepareStatement(query);\n ps2 = connection.prepareStatement(query2);\n rs = ps.executeQuery();\n rs2 = ps2.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n Product p = null;\n System.out.println(\"DBSetup@line448 \" + colCount);\n \n while( rs2.next() ) {\n ++count;\n } \n ///////For test purposes // System.out.println(\"DBSetup @ line 363 \" + count); \n for (int i = 0; i < count; i++) {\n if (rs.next()) {\n p = new Product();\n p.setProductCode(rs.getString(\"productCode\"));\n p.setProductName(rs.getString(\"productName\"));\n p.setCatalogCategory(rs.getString(\"catalogCategory\"));\n p.setDescription(rs.getString(\"description\"));\n p.setPrice(Float.parseFloat(rs.getString(\"price\")));\n p.setImageURL(rs.getString(\"imageURL\"));\n System.out.println(\"DBSetup @ line 461 \" + p.getProductCode());\n products.add(p);\n }\n }\n return products;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"Product getPProducts();",
"public List<Object> getProductSKU(NpProduct beanParam) {\r\n \r\n Connection conn=null;\r\n String storedProcedure;\r\n CallableStatement stmt=null;\r\n String av_message; \r\n \r\n ResultSet rs = null;\r\n av_message = null;\r\n storedProcedure = \"begin NpProduct_PKG.SP_GET_NpProductSKU_LST(?,?,?); end;\";\r\n List<Object> lstAllEntities = new ArrayList<Object>();\r\n try{\r\n conn = ConnectionDB.getConnection();\r\n stmt = conn.prepareCall(storedProcedure);\r\n\r\n //Se registra el parámetro de salida\r\n stmt.registerOutParameter(2, OracleTypes.VARCHAR);\r\n stmt.registerOutParameter(3, OracleTypes.CURSOR);\r\n //Se configuran los demás parámetros del stored\r\n stmt = configureProductSKU(stmt,beanParam.getNpproductid());\r\n\r\n //Se ejecuta el statement\r\n stmt.execute();\r\n\r\n //Se obtiene la respuesta error/exito del stored\r\n av_message = (String)stmt.getObject(2);\r\n boolean resultado=false;\r\n resultado=this.handleErrorResult(av_message);\r\n\r\n if(resultado){\r\n //Se obtiene el objeto del cursor\r\n rs = (ResultSet)stmt.getObject(3);\r\n\r\n while(rs.next()){\r\n Object npAddress = setEntityAttributes(rs);\r\n lstAllEntities.add(npAddress);\r\n }\r\n }else{\r\n logger.error(\"[NPProductDAO][Metodo: getProductSKU][SP: \"+storedProcedure+\"][MensajeError: \"+av_message+\"]\");\r\n }\r\n\r\n \r\n }catch (Exception e){\r\n throw new UnhandledException( \"getProductSKU [ \"+ Constant.PARAMETER_ERROREXCEPTION +\" ] \"+ e.getMessage(),e);\r\n }finally{\r\n //Se limpian las variables de conexión\r\n ConnectionDB.close(conn, rs, stmt);\r\n }\r\n return(lstAllEntities);\r\n }",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\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\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@Mapper\npublic interface ProductMapper {\n\t@Select({\n\t\t\t\"select id, name, introduce, number, price, stock, is_deleted, create_time, update_time\" +\n\t\t\t\t\t\" from product where is_deleted and id = #{id} limit 1\"\n\t})\n\t@Results({\n\t\t\t@Result(column = \"id\", property = \"id\"),\n\t\t\t@Result(column = \"name\", property = \"name\"),\n\t\t\t@Result(column = \"introduce\", property = \"introduce\"),\n\t\t\t@Result(column = \"number\", property = \"number\"),\n\t\t\t@Result(column = \"price\", property = \"price\"),\n\t\t\t@Result(column = \"stock\", property = \"stock\"),\n\t\t\t@Result(column = \"is_deleted\", property = \"isDeleted\"),\n\t\t\t@Result(column = \"create_time\", property = \"createTime\"),\n\t\t\t@Result(column = \"update_time\", property = \"updateTime\")\n\t})\n\tProduct selectByPrimaryKey(@Param(\"id\") Long id);\n}",
"@Override\n\tpublic boolean showAddProduct(final int catalog)\n\t{\n\t\tint count = 0;\n\t\tString sql = \"Select it.item_type, it.level from item_type it inner join (select q1.level, q1.item_type from (with recursive sumthis(item_type, super_type_fk, level) as (\"\n\t\t\t\t+ \"select item_type, super_type_fk, level from item_type \"\n\t\t\t\t+ \"where item_type =? \"\n\t\t\t\t+ \"union all select C.item_type, C.super_type_fk, C.level from sumthis P \"\n\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk) \"\n\t\t\t\t+ \"select item_type, level from sumthis) q1) q2 on q2.level = it.level and it.item_type = q2.item_type and q2.level>2\";\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tps.setInt(1, catalog);\n\t\t\tProductRset = ps.executeQuery();\n\n\n\n\t\t\twhile ( ProductRset.next() )\n\t\t\t{\n\t\t\t // Process the row.\n\t\t\t count++;\n\t\t\t}\n\n\t\t\tMyLogger.LogMessage(\"showAddProduct SQL\" + sql);\n\t\t\tMyLogger.LogMessage(\"showAddProduct COUNT\" + count);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tMyLogger.LogMessage(\"error occured when retrievin showAddProduct button\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (count > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"List<ProductItem> findByProduct_Id(Long productId);",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"public String getDatabaseProduct();",
"@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\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 GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"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\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@Override\r\n\tpublic List<Product> findProduct() {\n\t\treturn iImportSalesRecordDao.findProduct();\r\n\t}",
"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}",
"public interface CProductoMapper {\r\n \r\n // <editor-fold defaultstate=\"collapsed\" desc=\"CONSULTAS DEFINIDAS\">\r\n \r\n static final String FIND_ALL = \"SELECT \"\r\n + \" productos.id as recid,\"\r\n + \" productos.codigo,\"\r\n + \" productos.descripcion,\"\r\n + \" productos.unidad_produccion as unidadProductiva, \"\r\n + \" unidades_productivas.codigo AS codigoUnidadProduccion \"\r\n + \"FROM productos \"\r\n + \"LEFT JOIN unidades_productivas ON \"\r\n + \"unidades_productivas.id = productos.unidad_produccion\";\r\n \r\n static final String FIND_BY_CODE = \"SELECT \"\r\n + \" productos.id \"\r\n + \"FROM productos WHERE productos.codigo = #{code}\";\r\n \r\n // </editor-fold>\r\n \r\n /**\r\n * Query que regresa todos los productos existentes\r\n * @return lista de productos\r\n */\r\n @Select(FIND_ALL)\r\n public List<CProducto> findAll(); \r\n \r\n /**\r\n * Query que me permite ubicar un registro de la tabla de productos a partir de\r\n * un código. \r\n * @param code el código bajo el cual se busca\r\n * @return el id del registro.\r\n */\r\n @Select(FIND_BY_CODE)\r\n public Long findByCode(String code);\r\n}",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getByNew() throws SQLException {\n\t\treturn productDao.getByNew();\n\t}",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"public String getDatabaseName()\n {\n return \"product\";\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"List<Product> getAllProducts() throws PersistenceException;",
"Product getProductByID(Long id);",
"public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}",
"public HashMap<Integer, Product> getProductsTable() {\n\t\treturn productTable;\n\t}",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public String getProductId() ;",
"Object getProduct();",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"public List<Product> findProductIncreaseMoreThan100() {\n\t\tString hql = \"select prod from Product prod join prod.prices prc where (prc.startDate in (select min(pr.startDate) from Product p join p.prices pr where p.id=prod.id) and (prc.price*2<prod.price))\";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tList<Product> products = query.getResultList();\n//\t\tfor (Product p : products) {\n//\t\t\tSystem.out.println(p.getName()+\" - \"+p.getPrice()+\" - \"+p.getId()); \n//\t\t}\n return products;\n\t}",
"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}",
"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 ShowProductInJTable(){\n ArrayList<Product> list = getProductList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getPid();\n row[1] = list.get(i).getPname();\n row[2] = \"Rp. \" + list.get(i).getPprice();\n row[3] = list.get(i).getPstock();\n row[4] = list.get(i).getPcatid();\n \n model1.addRow(row);\n }\n }",
"Product getProductById(Integer productId);",
"Product getProductById(Integer productId);",
"public Product() { \n initComponents();\n table();\n \n }",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}",
"@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}",
"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 UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public JavaproductModel getproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }",
"public String prepareSql(ProductDTO product){\n String SQL_SELECT = \"SELECT * FROM products \";\n String SQL_WHERE = \" WHERE quantity>0 \";\n String SQL_NAME = \"\";\n String SQL_PRICE = \"\";\n String SQL_CATEGORY = \"\";\n StringBuilder SQL_PRODUCT_DETAILS =new StringBuilder();\n List<String> product_details = new ArrayList<>();\n if (product.getName() != null) {\n SQL_NAME = \" AND name LIKE '%\" + product.getName() + \"%'\";\n }\n if (product.getMinPrice() != 0 || product.getMaxPrice() != 0) {\n if (product.getMaxPrice() == 0 && product.getMinPrice() != 0) {\n SQL_PRICE = \" AND price > \" + product.getMinPrice();\n } else if (product.getMinPrice() == 0 && product.getMaxPrice() != 0) {\n SQL_PRICE = \" AND price < \" + product.getMaxPrice();\n } else {\n SQL_PRICE = \" AND price BETWEEN \" + product.getMinPrice() + \" AND \" + product.getMaxPrice() + \" \";\n }\n }\n\n if (product.getCategory() != null) {\n SQL_CATEGORY = \" AND id_category=\" + product.getCategory().getId() + \" \";\n }\n if (!product.getProductDetailsList().isEmpty()) {\n int count=1;\n for (ProductDetails pd : product.getProductDetailsList()) {\n product_details.add(\" SELECT id_product FROM product_details WHERE id_parameter=\"\n + pd.getParameter().getId() + \" AND value='\" + pd.getValue() + \"'\");\n }\n SQL_PRODUCT_DETAILS.append(\" AND id IN (SELECT T1.id_product FROM (\"+product_details.get(0)+\") AS T1 \");\n product_details.remove(0);\n Iterator iterator = product_details.iterator();\n while (iterator.hasNext()) {\n count++;\n SQL_PRODUCT_DETAILS.append(\" JOIN ( \"+iterator.next()+\") AS T\"+count+\" ON T\"+(count-1)+\".id_product=T\"+count+\".id_product \");\n }\n SQL_PRODUCT_DETAILS.append(\" )\");\n }\n return SQL_SELECT + SQL_WHERE+SQL_NAME + SQL_PRICE + SQL_CATEGORY + SQL_PRODUCT_DETAILS;\n }",
"public void setProduct(entity.APDProduct value);",
"int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;",
"public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }",
"Product selectByPrimaryKey(Long id);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\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 e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public String getProductId();",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigDecimal.TEN);\n\n\t\tproduct2 = new Product();\n\t\tproduct2.setId(2L);\n\t\tproduct2.setName(LENOVO);\n\t\tproduct2.setDescription(LENOVO);\n\t\tproduct2.setPrice(new BigDecimal(20));\n\n\t}",
"public Set<ProductBarcode> getProducts();",
"@Override\n\tpublic Product getProduct() {\n\t\tSystem.out.println(\"B生产成功\");\n\t\treturn product;\n\t}",
"public static void main(String[] args) {\n\n\t\tEntityManagerFactory emf =Persistence.createEntityManagerFactory(\"s\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(\"-- Product which price between 5000 to 10000 --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\t\n\t\tQuery query1 = em.createQuery(\"Select p from Product p where p.price between 5000 and 20000\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList1 = (List<Product>)query1 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p :prodList1)\n\t\t{\n\t\t\tSystem.out.print(p.getId());\n\t\t\tSystem.out.print(\"\\t\"+p.getName());\n\t\t\tSystem.out.print(\"\\t\"+p.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details of Electronics catergory --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query2 = em.createQuery(\"Select p from Product p where p.category ='Electronics'\");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList2 = (List<Product>)query2 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p2 :prodList2)\n\t\t{\n\t\t\tSystem.out.print(p2.getId());\n\t\t\tSystem.out.print(\"\\t\"+p2.getName());\n\t\t\tSystem.out.print(\"\\t\"+p2.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p2.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-- Products details have 'a' --\");\n\t\tSystem.out.println(\"==================================================\");\n\t\tQuery query3 = em.createQuery(\"Select p from Product p where p.name like '%a%' \");\n\t\t@SuppressWarnings(\"unchecked\") \n\t\tList<Product> prodList3 = (List<Product>)query3 .getResultList();\n\t\t\n\t\tSystem.out.print(\"ID\");\n\t\tSystem.out.print(\"\\tName\");\n\t\tSystem.out.print(\"\\tCategory\");\n\t\tSystem.out.println(\"\\tPrice\");\n\t\t\n\t\tfor(Product p3 :prodList3)\n\t\t{\n\t\t\tSystem.out.print(p3.getId());\n\t\t\tSystem.out.print(\"\\t\"+p3.getName());\n\t\t\tSystem.out.print(\"\\t\"+p3.getCategory());\n\t\t\tSystem.out.print(\"\\t\"+p3.getPrice());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"==================================================\");\n\t\tem.getTransaction().commit(); \n\t\t\n\t\t emf.close(); \n\t em.close(); \n\t}",
"public void StockSelect() {\n try {\n stat = cnct.createStatement();\n resst = stat.executeQuery(\"select product_ID, product_name, quantity from product\");\n tbStock.setModel(DbUtils.resultSetToTableModel(resst));\n } catch (SQLException ex) {\n Logger.getLogger(Others.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Query(value = \"SELECT * FROM merchant_product WHERE product_id=?1\",nativeQuery = true)\n public List<MerchantProduct> getMerchantFromProductId(String productId);",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"String getProduct();",
"public static void insertProduct(Product product){\n\n Connection myConnection = ConnectionFactory.getConnection();\n PreparedStatement insertStatement = null;\n ResultSet rs = null;\n\n int afterId = verify(product);\n int cantitate = 0;\n if(afterId == -1) {//----------daca nu exista deja in tabel\n\n try {\n insertStatement = myConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getId());\n insertStatement.setInt(2, product.getCantitate());\n insertStatement.setString(3, product.getDenumire());\n insertStatement.setDouble(4, product.getPret());\n insertStatement.setInt(5, 0);\n\n int rowsAffected = insertStatement.executeUpdate();\n\n rs = insertStatement.getGeneratedKeys();\n\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n else{//---------------daca deja exista updatam canntitatea\n try {\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(\"Select * from product where id = \" + afterId);\n insertStatement.executeQuery();\n rs = insertStatement.getResultSet();\n if(rs.next()){\n cantitate = rs.getInt(2);\n }\n myConnection = ConnectionFactory.getConnection();\n insertStatement = myConnection.prepareStatement(updateQuantityString, Statement.RETURN_GENERATED_KEYS);\n insertStatement.setInt(1, product.getCantitate() + cantitate);\n insertStatement.setInt(2, afterId);\n int rowsAffected = insertStatement.executeUpdate();\n System.out.println(\"(\" + rowsAffected + \") rows affected\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"Product getProductById(Integer productID);",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\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\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\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}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public List<Product> getSortedProducts(String sql) {\n Connection connection = null;\n List<Product> products = new ArrayList<>();\n try {\n connection = db.getConnection();\n ResultSet resultSet = null;\n Statement statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n products.add(new Product(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8)));\n }\n return products;\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert connection!= null;\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"public int getM_Product_ID();",
"public int getM_Product_ID();",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public List<VehicleBrand> listBrandByProduct(long productId);",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"List<Product> getProductByCategory(String category) throws DataBaseException;",
"@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public String product() {\n return this.product;\n }"
] | [
"0.57962185",
"0.5788106",
"0.5778795",
"0.57243097",
"0.5666483",
"0.5607855",
"0.56045663",
"0.5604259",
"0.55992246",
"0.55459267",
"0.5544637",
"0.55294514",
"0.55085397",
"0.5507834",
"0.5505174",
"0.54930735",
"0.54896396",
"0.54775786",
"0.546712",
"0.54560053",
"0.54239154",
"0.54207397",
"0.5400077",
"0.53773",
"0.5375158",
"0.5372622",
"0.5369798",
"0.53653026",
"0.5362206",
"0.53529614",
"0.5351558",
"0.53484225",
"0.53422177",
"0.53374296",
"0.53374296",
"0.53329337",
"0.5322998",
"0.5320665",
"0.53157705",
"0.53148365",
"0.5313433",
"0.53120947",
"0.5311177",
"0.5294543",
"0.5284733",
"0.5278819",
"0.52749157",
"0.5269746",
"0.5269334",
"0.5264965",
"0.52555573",
"0.5245599",
"0.5245599",
"0.5244388",
"0.5244373",
"0.5239475",
"0.5239178",
"0.5238313",
"0.5230579",
"0.5222945",
"0.52213037",
"0.521606",
"0.52105343",
"0.5196092",
"0.51952064",
"0.51952064",
"0.51952064",
"0.5189912",
"0.5188461",
"0.5187154",
"0.5185632",
"0.5164271",
"0.5153822",
"0.5153258",
"0.51522523",
"0.5152129",
"0.51508904",
"0.5147583",
"0.51411945",
"0.51378757",
"0.51352173",
"0.51338756",
"0.51324487",
"0.51247746",
"0.51238906",
"0.51228285",
"0.5121364",
"0.51203555",
"0.51172054",
"0.51164013",
"0.5111426",
"0.5108272",
"0.5108272",
"0.5107495",
"0.5102628",
"0.5102109",
"0.5097493",
"0.50952005",
"0.5094963",
"0.5091428",
"0.508723"
] | 0.0 | -1 |
/ renamed from: a | public static CardGiftInfo m84652a(C15317ao c15317ao) {
LinkedList linkedList;
AppMethodBeat.m2504i(87788);
CardGiftInfo cardGiftInfo = new CardGiftInfo();
cardGiftInfo.toUserName = c15317ao.vBE;
cardGiftInfo.cKE = c15317ao.vBF;
cardGiftInfo.kcl = c15317ao.vBG;
cardGiftInfo.kcm = c15317ao.content;
cardGiftInfo.kcn = c15317ao.vBH;
cardGiftInfo.kco = c15317ao.vBI;
cardGiftInfo.kcp = c15317ao.vBJ;
cardGiftInfo.kcq = c15317ao.vBK;
cardGiftInfo.kcs = c15317ao.vBM;
cardGiftInfo.kcr = c15317ao.vBL;
cardGiftInfo.kct = c15317ao.vBN;
cardGiftInfo.kcu = c15317ao.vBO;
cardGiftInfo.kcv = c15317ao.kcU;
cardGiftInfo.kcw = c15317ao.kcV;
cardGiftInfo.kcx = c15317ao.vBP;
cardGiftInfo.color = c15317ao.color;
cardGiftInfo.kcy = c15317ao.vBQ;
cardGiftInfo.kcz = c15317ao.vBR;
cardGiftInfo.kcA = c15317ao.vBS;
cardGiftInfo.kcB = c15317ao.vBT;
cardGiftInfo.kcC = c15317ao.vBU;
cardGiftInfo.kcD = c15317ao.vBV;
cardGiftInfo.kcE = c15317ao.vBW;
cardGiftInfo.kcF = c15317ao.vBX;
cardGiftInfo.kcG = c15317ao.vBY;
cardGiftInfo.kcH = c15317ao.vBZ;
cardGiftInfo.kcI = c15317ao.vCa;
cardGiftInfo.kcJ = c15317ao.vCb;
cardGiftInfo.kcK = c15317ao.vCc;
cardGiftInfo.kcL = c15317ao.vCd;
cardGiftInfo.kcM = c15317ao.kbU;
cardGiftInfo.kcN = c15317ao.vCe;
Iterator it = c15317ao.kcO.iterator();
while (it.hasNext()) {
C7250ap c7250ap = (C7250ap) it.next();
linkedList = cardGiftInfo.kcO;
AcceptedCardItem acceptedCardItem = new AcceptedCardItem();
acceptedCardItem.kcV = c7250ap.kcV;
acceptedCardItem.kcU = c7250ap.kcU;
linkedList.add(acceptedCardItem);
}
it = c15317ao.kcP.iterator();
while (it.hasNext()) {
C35902aq c35902aq = (C35902aq) it.next();
linkedList = cardGiftInfo.kcP;
AccepterItem accepterItem = new AccepterItem();
accepterItem.kcV = c35902aq.kcV;
accepterItem.kcU = c35902aq.kcU;
accepterItem.kcX = c35902aq.kcX;
accepterItem.kcW = c35902aq.kcW;
linkedList.add(accepterItem);
}
cardGiftInfo.kcQ = c15317ao.kcQ;
cardGiftInfo.kcR = c15317ao.kcR;
cardGiftInfo.kcS = c15317ao.kcS;
cardGiftInfo.kcT = c15317ao.kcT;
AppMethodBeat.m2505o(87788);
return cardGiftInfo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
/ renamed from: a | public static CardGiftInfo m84651a(agk agk) {
AppMethodBeat.m2504i(87789);
CardGiftInfo cardGiftInfo = new CardGiftInfo();
cardGiftInfo.toUserName = agk.vBE;
cardGiftInfo.cKE = agk.vBF;
cardGiftInfo.kcl = agk.vBG;
cardGiftInfo.kcm = agk.content;
cardGiftInfo.kcn = agk.vBH;
cardGiftInfo.kco = agk.vBI;
cardGiftInfo.kcp = agk.vBJ;
cardGiftInfo.kcq = agk.vBK;
cardGiftInfo.kcs = agk.vBM;
cardGiftInfo.kcr = agk.vBL;
cardGiftInfo.kct = agk.vBN;
cardGiftInfo.kcu = agk.vBO;
cardGiftInfo.kcv = agk.kcU;
cardGiftInfo.kcw = agk.kcV;
cardGiftInfo.kcx = agk.vBP;
cardGiftInfo.color = agk.color;
cardGiftInfo.kcy = agk.vBQ;
cardGiftInfo.kcz = agk.vBR;
cardGiftInfo.kcA = agk.vBS;
cardGiftInfo.kcB = agk.vBT;
cardGiftInfo.kcC = agk.vBU;
cardGiftInfo.kcD = agk.vBV;
cardGiftInfo.kcE = agk.vBW;
cardGiftInfo.kcF = agk.vBX;
cardGiftInfo.kcG = agk.vBY;
cardGiftInfo.kcH = agk.vBZ;
cardGiftInfo.kcI = agk.vCa;
cardGiftInfo.kcJ = agk.vCb;
cardGiftInfo.kcK = agk.vCc;
cardGiftInfo.kcL = agk.vCd;
cardGiftInfo.kcM = agk.kbU;
cardGiftInfo.kcN = agk.vCe;
AppMethodBeat.m2505o(87789);
return cardGiftInfo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
Paints the forward move of this pawn to yellow | public void getFMove(Chessboard c) {
Chesspiece forward = c.FindChessPiece(this.getXCoordinate()-1, this.getYCoordinate());
Chesspiece more_forward = c.FindChessPiece(this.getXCoordinate()-2, this.getYCoordinate());
if (forward != null && forward.getIcon() == null) {
forward.setBackground(Color.YELLOW);
forward.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLACK));
}
if (this.getMoves() == 0 && more_forward != null && more_forward.getIcon() == null) {
more_forward.setBackground(Color.YELLOW);
more_forward.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, Color.BLACK));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lightMove() {\n movePawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public PieceColor colorGoing()\n {\n if (turn%2==0)\n return PieceColor.WHITE;\n else return PieceColor.BLACK;\n }",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"private void makeMove(){\r\n\t\tif(cornerColorIs(GREEN)){\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tif(()) {\r\n//\t\t if(cornerColorIs(GREEN)) {\r\n//\t\t move();\r\n//\t\t paintCorner(GREEN);\r\n//\t\t } else {\r\n//\t\t move();\r\n//\t\t paintCorner(RED);\r\n//\t\t }\r\n//\t\t}noBeepersPresent\r\n\t}",
"public void green() {\n g2.setPaint(Color.green);\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 }",
"public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }",
"public DrawingPanel(Color color, Color backColor)\r\n {\r\n\r\n /**********************************************************\r\n To be completed\r\n**********************************************************/\r\n\t currentColor = color;\r\n\t this.setBackground(backColor);\r\n\t currentX = 0;\r\n\t currentY = 0;\r\n\t moveX = 3;\r\n\t moveY = 3;\r\n\t diameter = 5;\r\n\t delay = 20;\r\n\t dotList = new ArrayList();\r\n\t MoveListener task = new MoveListener();\r\n\t timer = new Timer(delay, task);\r\n\t timer.start();\r\n }",
"@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\tif(_StartFinish)\r\n\t\t\tsetBackground(Color.WHITE);\r\n\t\telse\r\n\t\t\tsetBackground(Color.DARK_GRAY);\r\n\t\t\r\n\t\tsuper.paintComponent(g);\r\n\t}",
"@Override\n public void drawValidMove() {\n if(this.getPlayer().getPlayerID() % 2 != 0) {\n //Pawn can move one space forwards if no piece is in front\n if (board.getSquare(x-1, y).getPiece()== null) {\n board.getSquare(x-1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x-2, y).getPiece() == null && board.getSquare(x-1, y).getPiece() == null) {\n board.getSquare(x-2, y).drawOutline();\n }\n \n //If there is an enemy piece in the diagonal forward square of the pawn, the pawn can move (capture the piece)\n if (y-1 > 0) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y-1) != null && board.getSquare(x-1, y-1).getPiece() != null &&\n board.getSquare(x-1, y-1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x-1, y-1).drawOutline();\n }\n }\n \n if(y+1<SIZE) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y+1) != null && board.getSquare(x-1, y+1).getPiece() != null &&\n board.getSquare(x-1, y+1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x-1, y+1).drawOutline();\n }\n }\n \n System.out.println(\"\");\n //En passant\n if (y - 1 > 0) {\n \n System.out.println();\n if (board.getSquare(x, y-1).getPiece() != null) { \n System.out.println(\"the piece's enPassant is: \" + board.getSquare(x, y-1).getPiece().getEnPassant());\n System.out.println(\"The game's turn counter is: \" + board.getTurnCounter());\n }\n else {\n System.out.println(\"Null piece when checking for en passent.\");\n }\n \n if (board.getSquare(x, y-1).getPiece() != null && board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y-1).drawOutline();\n board.getSquare(x-1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y+1).drawOutline();\n board.getSquare(x-1, y+1).setEnPassent(true);\n }\n }\n }\n \n //If this pawn belongs to player 2:\n else {\n \n if (board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x+2, y).getPiece() == null && board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+2, y).drawOutline();\n \n }\n \n if(y-1 > 0) {\n if (board.getSquare(x+1, y-1) != null && board.getSquare(x+1, y-1).getPiece() != null &&\n board.getSquare(x+1, y-1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x+1, y-1).drawOutline();\n }\n }\n \n if(y+1 < SIZE) {\n if (board.getSquare(x+1, y+1) != null && board.getSquare(x+1, y+1).getPiece() != null &&\n board.getSquare(x+1, y+1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x+1, y+1).drawOutline();\n }\n }\n \n //En passant\n if (y - 1 > 0) {\n if (board.getSquare(x, y-1).getPiece() != null &&board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y-1).drawOutline();\n board.getSquare(x+1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y+1).drawOutline();\n board.getSquare(x+1, y+1).setEnPassent(true);\n }\n }\n }\n }",
"void moveForward(Lawn lawn);",
"public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\n }",
"void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }",
"@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 }",
"public Pawn(Point location, Color color) {\n this.numMoves = 0;\n this.color = color;\n this.location = location;\n }",
"public void act()\n {\n if(canMove() && turns == 0)\n {\n move();\n }\n else if(!canMove() && turns == 0)\n {\n turns++;\n }\n else if(turns == 1 || turns == 9)\n {\n turn();\n setColor(Color.BLUE);\n turns++;\n }\n else if(turns == 2 || turns == 10)\n {\n turn();\n setColor(Color.RED);\n turns++;\n }\n else if(turns == 3 || turns == 11)\n {\n turn();\n setColor(Color.GREEN);\n turns++;\n }\n else if(turns == 4 || turns == 12)\n {\n turn();\n setColor(Color.YELLOW);\n turns++;\n }\n else if(turns == 5 || turns == 13)\n {\n turn();\n setColor(Color.ORANGE);\n turns++;\n }\n else if(turns == 6 || turns == 14)\n {\n turn();\n setColor(Color.CYAN);\n turns++;\n }\n else if(turns == 7 || turns == 15)\n {\n turn();\n setColor(Color.PINK);\n turns++;\n }\n else if(turns == 8)\n {\n turn();\n setColor(Color.MAGENTA);\n turns++;\n }\n else if(turns == 16 && corner == 1)\n {\n setDirection(315);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 2)\n {\n setDirection(45);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 3)\n {\n setDirection(135);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 4)\n {\n setDirection(225);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n }",
"public Pawn(int x, int y, String ID, String color) {\n\t\tsuper(x,y,ID);\n\t\tif (color == \"white\") {\n\t\t\txrange = -2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 1;\n\t\t}\n\t\tif (color == \"black\") {\n\t\t\txrange = 2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 0;\n\t\t}\n\t\tfirstMove = true;\n\t}",
"@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}",
"public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }",
"public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }",
"public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}",
"@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}",
"@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }",
"public void red() {\n g2.setPaint(Color.red);\r\n }",
"public Direction moveBlinky(Ghost g);",
"public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\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}",
"public void act() {\t\n\t\twhile (true) { \n\t\t\tleft(60); \n\t\t\t\n\t\t\t// draw a rectangle \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t}\n\t}",
"public void paintComponent(Graphics g) {\r\n\t\t((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\tg.setColor(Color.WHITE);\r\n\t\tg.clearRect(0, 0, getWidth(), getHeight());\r\n\t\t\r\n\t\t//Drawn the board\r\n\t\tfor (int i = 0; i < 17; i++) {\r\n\t\t\tfor (int j = 0; j < 17; j++) {\r\n\t\t\t\tif (board[i][j] != -1) {\r\n\t\t\t\t\tint x = (int) (getWidth() / 2 - WIDTH / 2 + 4 * SPACE / 2 - DIAMETER / 2) + (j * SPACE - i * SPACE / 2);\r\n\t\t\t\t\tint y = (int) ((getHeight() / 2 - HEIGHT / 2) + (i * SPACE * Math.sqrt(3) / 2));\r\n\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\tg.fillOval(x - BORDER, y - BORDER, DIAMETER + 2 * BORDER, DIAMETER + 2 * BORDER);\r\n\t\t\t\t\t// 0 = empty position\r\n\t\t\t\t\tif (board[i][j] == 0)\r\n\t\t\t\t\t\tg.setColor(Color.LIGHT_GRAY);\r\n\t\t\t\t\t// 1-6 player positions\r\n\t\t\t\t\telse if (board[i][j] == 1)\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\telse if (board[i][j] == 2)\r\n\t\t\t\t\t\tg.setColor(Color.ORANGE);\r\n\t\t\t\t\telse if (board[i][j] == 3)\r\n\t\t\t\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\t\t\telse if (board[i][j] == 4)\r\n\t\t\t\t\t\tg.setColor(Color.GREEN);\r\n\t\t\t\t\telse if (board[i][j] == 5)\r\n\t\t\t\t\t\tg.setColor(Color.BLUE);\r\n\t\t\t\t\telse if (board[i][j] == 6)\r\n\t\t\t\t\t\tg.setColor(Color.MAGENTA.darker());\r\n\t\t\t\t\tg.fillOval(x, y, DIAMETER, DIAMETER);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Display the current player\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.PLAIN, 32));\r\n\t\tg.drawString(\"Current player: \" + (turn), 5, 36);\r\n\t\tg.drawString(\"Total Turns: \" + (totalTurn), 5, 76);\r\n\t}",
"private Pawn(Point location, Color color, int moves, boolean captureableEnPassant) {\n enPassantOk = captureableEnPassant;\n this.numMoves = moves;\n this.color = color;\n this.location = location;\n }",
"protected void renderMoves(Graphics g) {\n\t\tfor (Point move : moves) {\n\t\t\tg.setColor(team == 1 ? Color.red : Color.blue);\n\t\t\tPoint p = board.locationOfSquare(move);\n\t\t\tp.x += board.getSquareSize() / 4;\n\t\t\tp.y += board.getSquareSize() / 4;\n\t\t\tg.fillOval(p.x, p.y, board.getSquareSize() / 2, board.getSquareSize() / 2);\n\t\t}\n\t}",
"protected void drawPossibleMoves(){\n if (selectedPiece == null) return;\n Pair<Integer,Integer> coord = getJButtonCoord(selectedPiece);\n int startRow = coord.getKey();\n int startCol = coord.getValue();\n for(int row = 0;row < ROWS;row ++){\n for(int col = 0; col < COLS ;col++){\n if (board.canMove(startRow,startCol,row,col)){\n buttonGrid[row][col].setBackground(Color.GREEN);\n }\n }\n }\n\n\n }",
"private void highlightLegalMoves(final Board board) {\n if (shouldHighlightLegalMoves) {\n // running calculatePieceToBeMovedLegalMoves(board) ensures\n // 1. there is a clicked piece\n // 2. clicked piece belongs to current player\n for (final Move move : calculatePieceToBeMovedLegalMoves(board)) {\n MoveTransition transition = board.currentPlayer().makeMove(move);\n if(!transition.getMoveStatus().isDone()){\n continue;\n }\n if (move.getDestinationCoordinate() == this.tileCoordinate) {\n try {\n ImageIcon greenDot = new ImageIcon(ImageIO.read(new File(\"art/misc/green_dot.png\")));\n add(new JLabel(greenDot));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }",
"private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\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 paintComponent(Graphics arg0) {\n\t\tsuper.paintComponent(arg0);\n\t\targ0.setColor(Color.BLACK); \n\t\tboard(arg0); \n\t\tdrawStone(arg0);\n\t}",
"public void drawTheImage(Graphics g)\r\n\t{\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.fillOval(theX, theY, 10,10);\r\n\t\ttheX+=velX;\r\n\t\ttheY+=velY;\r\n\t}",
"public void moveAndDraw(Graphics window)\r\n {\n Color temp = getColor();\r\n\t\tdraw(window, Color.WHITE);\r\n\t\tsetPos(getXSpeed()+xSpeed, getYSpeed()+ySpeed);\r\n\t\tdraw(window, temp);\r\n\t\t//setY\r\n\r\n\t\t//draw the ball at its new location\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.RED;\n\t\t\t}",
"public Pawn(String color){\r\n this.color=color; \r\n }",
"public void display() {\t\t\n\t\tparent.pushStyle();\n\t\t\n\t\t//parent.noStroke();\n\t\t//parent.fill(255);\n\t\tparent.noFill();\n\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\tnodeSpin.drawNode(pos.x, pos.y, diam);\n\t\t\n\t\t//This should match what happens in the hover animation\n\t\tif (focused && userId >= 0) {\n\t\t\tparent.fill(Sequencer.colors[userId]);\n\t\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\t}\n\t\t\n\t\trunAnimations();\n\t\t\n\t\tparent.popStyle();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLACK;\n\t\t\t}",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"public void paint (Graphics g)\n {\n g.setColor(color);\n for(Point pellet : pellets)\n {\n g.fillOval(5+MunchGame.SEGMENT_SIZE*pellet.x+2,\n 15+MunchGame.SEGMENT_SIZE*pellet.y+2, \n MunchGame.SEGMENT_SIZE-4,\n MunchGame.SEGMENT_SIZE-4);\n }\n }",
"public void draw() {\n p.pushMatrix(); // save old visual style for other sprites\n p.translate(pos.x, pos.y); \n if (localpen) p.image(pen.get(0,0,p.width,p.height),p.width/2-pos.x, p.height/2-pos.y);\n if (visible) {\n // locked left-right rotation\n if (((direction%360<=270) & (direction%360>=90)) & rotationStyle==rotationStyle_leftRight) p.scale(-1.0f,1.0f);\n if (rotationStyle==rotationStyle_allAround) p.rotate(p.radians(-direction));\n if (ghostEffect > 0) {\n int calculatedAlpha = (int)p.map(ghostEffect,100,0,0,255);\n \n int[] alpha = new int[costumes.get(costumeNumber).width*costumes.get(costumeNumber).height];\n for (int i=0; i<alpha.length; i++) {\n // only fade non-zero pixels; 0 is full-transparency\n if (costumes.get(costumeNumber).pixels[i]!=0) alpha[i]=calculatedAlpha;\n }\n costumes.get(costumeNumber).mask(alpha);\n }\n p.image(costumes.get(costumeNumber), 0, 0, costumes.get(costumeNumber).width*(size/100),\n costumes.get(costumeNumber).height*(size/100));\n }\n p.popMatrix(); // restore default visual style\n }",
"@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}",
"@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }",
"@Override\r\n\tpublic void placePiece(JumpInButton[][] square) {\r\n\t\tsquare[this.x][this.y].setBackground(Color.RED);\r\n\t}",
"@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}",
"public Pawn(Player player, Board board, char color, int xpos, int ypos) {\n\t\tsuper(player, board, color, xpos, ypos);\n\t\tthis.name = 'p';\n\t\tthis.enpassant = false;\n\t\thasMovedTwo = false;\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}",
"@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}",
"@Override\n\tpublic void draw(Graphics2D window) {\n\t\twindow.setColor(SnobbyGreen);\n\t\twindow.fillRect(getXPos(), getYPos(), size, height);\n\t\t//System.out.println(\"transition\");\n\t}",
"@Override\n public void paintPedestrian(Graphics g) {\n g.setColor(Color.BLUE);\n g.fillOval(x, y, 10, 10);\n g.setColor(Color.BLACK);\n g.drawOval(x, y, 10, 10);\n }",
"private void drawTurnIndicator(Graphics2D g2, int player, int horizontalDisplacement)\n\t{\n\t\tif (player == curTurn)\n\t\t{\n\t\t\tg2.setColor(Color.WHITE);\n\t\t\tg2.fillOval(frameWidth / 2 - TURN_INDICATOR_SIZE / 2 + horizontalDisplacement,\n\t\t\t\t\tframeHeight - CARD_HEIGHT / 2 - DISTANCE_FROM_BOTTOM * 2, TURN_INDICATOR_SIZE,\n\t\t\t\t\tTURN_INDICATOR_SIZE);\n\t\t\tg2.setColor(Color.RED);\n\t\t\tg2.drawOval(frameWidth / 2 - TURN_INDICATOR_SIZE / 2 + horizontalDisplacement,\n\t\t\t\t\tframeHeight - CARD_HEIGHT / 2 - DISTANCE_FROM_BOTTOM * 2, TURN_INDICATOR_SIZE,\n\t\t\t\t\tTURN_INDICATOR_SIZE);\n\t\t}\n\t}",
"public void displayMove(int x, int y) {\n grid[x][y].setBackground(Color.RED);\n grid[x][y].setEnabled(false);\n }",
"@Override\n public void paintPedestrian(Graphics g) {\n\n g.setColor(Color.RED);\n g.fillOval(x, y, 10, 10);\n g.setColor(Color.BLACK);\n g.drawOval(x, y, 10, 10);\n }",
"private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }",
"void advance() {\n myGameTicks--;\n myScore += myManager.advance(myGameTicks);\n if (myGameTicks == 0) {\n setGameOver();\n }\n // paint the display\n try {\n paint(getGraphics());\n flushGraphics();\n } catch (Exception e) {\n myJump.errorMsg(e);\n }\n }",
"public void addPawn(Pawn.Color c) { pawn = new Pawn(c, Pawn.Type.BASIC); }",
"@Override\r\n\tpublic void execute(Graphics2D g) {\r\n\t\tg.setColor(drawColor);\r\n\t}",
"void go() {\n while (!gameOver) {\n try {\n Thread.sleep(showDelay);\n } catch (Exception e) {\n e.printStackTrace();\n }\n canvas.repaint();\n checkFilling();\n if (figure.isTouchGround()) {\n figure.leaveOnTheGround();\n figure = new Shapes(this);\n gameOver = figure.isCrossGround(); // Is there space for a new figure?\n } else\n figure.stepDown();\n }\n }",
"protected void drawNight(java.awt.Graphics2D g, float a) {\r\n Color oldColor = g.getColor();\r\n g.setColor(Color.BLUE);\r\n g.setComposite(AlphaComposite.SrcOver.derive(a));\r\n g.fillRect(0, 0, GamePanel.WIDTH, GamePanel.HEIGHT);\r\n g.setComposite(AlphaComposite.SrcOver.derive(1.0f));\r\n g.setColor(oldColor);\r\n }",
"public void draw(Graphics2D g2)\n {\n Rectangle grassLawn = new Rectangle(xCord,yCord,xLength,yWidth);\n \n g2.setPaint(Color.GREEN);\n g2.fill(grassLawn);\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetBackground(color);\t\r\n\t\t\t\tvazioSouth.setBackground(color);\r\n\t\t\t\tvazioEast.setBackground(color);\r\n\t\t\t\tbtsPaintJPanel.setBackground(color);\r\n\t\t\t\tbotaoJPanel.setBackground(color);\r\n\t\t\t}",
"public void updateYellowPawn(int positionPawn, int i) {\r\n\t\tyellowpawns[i].setBounds(array[positionPawn].getX(), array[positionPawn].getY(), 40, 40);\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}",
"public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }",
"protected void paintMoves(Graphics2D g2d) {\r\n\t\tif (!parent.showMoves) return;\r\n\t\tArrayList<Pose> poses = model.getPoses();\r\n\t\tArrayList<Move> moves = model.getMoves();\r\n\t\t//parent.log(poses.size() + \" poses\");\r\n\t //parent.log(moves.size() + \" moves\");\r\n\t\tif (poses == null || poses.size() < 2) return;\r\n\t\tPose previousPose = null;\r\n\t\t\r\n\t\tg2d.setColor(colors[MOVE_COLOR_INDEX]);\r\n\t\tIterator<Move> iter = moves.iterator();\r\n\t\tfor(Pose pose: poses) {\t\r\n\t\t\tif (previousPose == null) previousPose = pose;\r\n\t\t\telse {\r\n\t\t\t\tMove move = iter.next();\r\n\t\t\t\tif (move.getMoveType() == Move.MoveType.ARC) {\r\n\t\t\t\t\t//parent.log(\"Move = \" + move);\r\n\t\t\t\t\tint radius = Math.round(move.getArcRadius());\r\n\t\t\t\t\tint diameter = radius*2;\r\n\t\t\t\t\tint startAngle = Math.round(previousPose.getHeading() - 90);\r\n\t\t\t\t\tint angleTurned = Math.round(move.getAngleTurned());\r\n \r\n\t\t\t\t\tif (radius < 0) {\r\n\t\t\t\t\t\tstartAngle -= 180;\r\n\t\t\t\t\t\tradius = -radius;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tint startX = (int) Math.round(previousPose.getX() - radius - radius*Math.cos(Math.toRadians(startAngle)));\r\n\t\t\t\t\tint startY = (int) Math.round(previousPose.getY() + radius - radius*Math.sin(Math.toRadians(startAngle)));\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (angleTurned < 0) {\r\n\t\t\t\t\t\tstartAngle += angleTurned;\r\n\t\t\t\t\t\tangleTurned =- angleTurned;\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\tdiameter = Math.abs(diameter);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//parent.log(\"Drawing arc:\" + startX + \",\" + startY + \",\" + diameter + \",\" + diameter + \",\" + startAngle + \",\" + angleTurned);\r\n\t\t\t\t\tg2d.drawArc((int) getX(startX), (int) getY(startY), (int) getDistance(diameter),(int) getDistance(diameter), startAngle, angleTurned);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//parent.log(\"Drawing line from \" + previousPose.getX() + \",\" + previousPose.getY() + \" to \" + pose.getX() + \",\" + pose.getY());\r\n\t\t\t\t\tg2d.drawLine((int) getX(previousPose.getX()), (int) getY(previousPose.getY()), (int) getX(pose.getX()), (int) getY(pose.getY())); \r\n\t\t\t\t}\r\n\t\t\t\tpreviousPose = pose;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(indicateColor);\n\t\tg.fillOval(0, 0, checkerSize, checkerSize);\t\n\t\t\n\t}",
"public void highlight(){\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\t//if(!clicked){\t\n\t\t\t\t\n\t\t\t\tfirsttime=true;\n\t\t\t\tclicked=true;\n\t\t\t\tif(piece!=null){\n\t\t\t\t\txyMovment=piece.xyPossibleMovments(xPosition, yPosition);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public JButton drawButton ()\n {\n\n if (isAlive())\n {\n button.setBackground(ALIVE_COLOUR);\n }\n else \n {\n button.setBackground(DEAD_COLOUR);\n }\n\n button.addActionListener(this);\n return button;\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}",
"public void battleMode() {\n\t\tif (!inBattle) {\n\t\t\tinBattle = true;\n\t\t\tJPanel thisPanel = this;\n\n\t\t\tnew Timer(3, new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tred -= 1;\n\t\t\t\t\tgreen -= 1;\n\t\t\t\t\tblue -= 1;\n\n\t\t\t\t\tthisPanel.setBackground(new Color(red, green, blue));\n\n\t\t\t\t\tif (red == 0) {\n\t\t\t\t\t\t((Timer) e.getSource()).stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\n\t\t}\n\t}",
"@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}",
"@Override\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\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 }",
"void go() {\n\t\ttry {\n\t\t\twhile(x + 60 < getWidth()) {\n\t\t\t\tx += 10;\n\t\t\t\twin.repaint();\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t\twhile(y + 60 < getHeight()) {\n\t\t\t\ty += 10;\n\t\t\t\twin.repaint();\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t\twhile(x > 10) {\n\t\t\t\tx -= 10;\n\t\t\t\twin.repaint();\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t\twhile(y > 10) {\n\t\t\t\ty -= 10;\n\t\t\t\twin.repaint();\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t} catch(InterruptedException e) {\n\t\t\tSystem.out.println(\"Thread sleep interrupted\");\n\t\t}\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}",
"@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tGraphics2D ga = (Graphics2D) g; \n\t\t\tif (currentColor == color) {\n\t\t\t\tShape check = factory.getShape(ShapeFactory.CHECK);\n\t\t\t\tcheck.setPosition(new Point2D.Double(point.getX() + getPreferredSize().width/2 - 7, point.getY()+ 25));\n\t\t\t\tga.setColor(currentColor);\n\t\t\t\tcheck.draw(ga);\n\t\t\t}\n\t\t}",
"public Direction movePinky(Ghost g);",
"@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tanimateFace((int)circle.x, (int)circle.y, (int)circle2.x, (int)circle2.y);\n\t\tdrawFace(g);\n\t}",
"public void takeTurn() {\n world.updateLinkedList();\n repaint();\n }",
"public void paint(Graphics g){\n\t\t\r\n\t\tgfx.setColor(Color.black);\r\n gfx.fillRect(0, 0, WIDTH, HEIGHT);\r\n if(b1.getX()<-10 || b1.getY() >710){\r\n \tgfx.setColor(Color.red);\r\n \tgfx.drawString(\"Game Over\", 300, 250);\r\n } else{\r\n \tp1.draw(gfx);\r\n \tb1.draw(gfx);\r\n \tp2.draw(gfx);\r\n if(!gamestart){\r\n \tgfx.setColor(Color.white);\r\n \tgfx.drawString(\"You Have Requested a Space War...\", 270, 100);\r\n \tgfx.drawString(\"Press Enter to Battle!\", 300, 120);\r\n }\r\n g.drawImage(img, 0, 0, this);\r\n }\r\n \r\n\t}",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"public void black() {\n g2.setPaint(Color.black);\r\n }",
"@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}",
"public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}",
"void drawCurrentToBoard () {\n board.clearTemp();\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }",
"public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\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 }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"@Override\n public void excute() {\n drawable.setColor(color);\n }",
"@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 public void paintComponent(Graphics g){\n // Paint the well\n g.setColor(Color.DARK_GRAY);\n g.fillRoundRect(0, 0, 338, 546, 8, 8);\n\n for (int i = 1; i < 21; i++){\n for (int j = 1; j < 13; j++){\n g.setColor(Color.BLACK);\n g.fillRoundRect(26 * j - 13, 26 * i - 13, 25, 25, 2, 2);\n }\n }\n\n drawPiece(g);\n }",
"public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}",
"public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }",
"@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}",
"public void draw() { \n\t\tbackground(255); // Clear the screen with a white background\n\t\tfill(0);\n\t\ttextAlign(LEFT);\n\t\ttextSize(12);\n\t\t\n\t\tif (runCount == 0) {\n\t\t\tboard.onClick();\n\t\t} else if (runCount > 0) {\n\t\t\trunCount--;\n\t\t}\n\t\t\n\t\tif (board != null) {\n\t\t\tboard.draw(this, 0, 0, height, height);\n\t\t}\n\t\t\n\t}",
"protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }",
"@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}"
] | [
"0.64992166",
"0.6302171",
"0.62940615",
"0.6256341",
"0.6205193",
"0.61981225",
"0.61543566",
"0.61447704",
"0.61325896",
"0.6110157",
"0.6103826",
"0.6103424",
"0.6080414",
"0.6041097",
"0.6039081",
"0.6023923",
"0.60238904",
"0.6019381",
"0.6016361",
"0.5988382",
"0.5969215",
"0.59676623",
"0.5951735",
"0.59297156",
"0.5895179",
"0.5853475",
"0.5852875",
"0.5847307",
"0.58388424",
"0.58318436",
"0.58314574",
"0.58275825",
"0.58273625",
"0.5826599",
"0.5816485",
"0.5815873",
"0.58092",
"0.5803051",
"0.58007634",
"0.5800155",
"0.57974756",
"0.5788284",
"0.5786613",
"0.57662493",
"0.5762267",
"0.57606244",
"0.5760321",
"0.5759886",
"0.5759311",
"0.5752008",
"0.57451624",
"0.5732199",
"0.57316935",
"0.5721705",
"0.5718475",
"0.57147855",
"0.5710208",
"0.57083225",
"0.57077086",
"0.5704218",
"0.5696426",
"0.5682445",
"0.5680653",
"0.56748056",
"0.5666512",
"0.566543",
"0.56631994",
"0.5650033",
"0.564387",
"0.56372184",
"0.5632973",
"0.5614481",
"0.56117725",
"0.5611218",
"0.56072783",
"0.5606274",
"0.5599304",
"0.5597834",
"0.5593675",
"0.55892676",
"0.55888736",
"0.5586839",
"0.55804896",
"0.55771387",
"0.5576907",
"0.55761987",
"0.5569899",
"0.55692613",
"0.5568539",
"0.5565271",
"0.5565205",
"0.5559116",
"0.5553669",
"0.5552111",
"0.5549311",
"0.5546926",
"0.554257",
"0.553927",
"0.5538953",
"0.5538693",
"0.55383277"
] | 0.0 | -1 |
Paints the RD move of this pawn to yellow | public void getRDMove(Chessboard c) {
Chesspiece right_diagonal = c.FindChessPiece(this.getXCoordinate()-1, this.getYCoordinate()+1);
if (right_diagonal != null && right_diagonal.getPieceColor() == Color.BLACK && right_diagonal.getIcon() != null) {
right_diagonal.setBackground(Color.YELLOW);
right_diagonal.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLACK));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lightMove() {\n movePawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void red() {\n g2.setPaint(Color.red);\r\n }",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\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 }",
"public Pawn(int x, int y, String ID, String color) {\n\t\tsuper(x,y,ID);\n\t\tif (color == \"white\") {\n\t\t\txrange = -2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 1;\n\t\t}\n\t\tif (color == \"black\") {\n\t\t\txrange = 2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 0;\n\t\t}\n\t\tfirstMove = true;\n\t}",
"public void green() {\n g2.setPaint(Color.green);\r\n }",
"@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }",
"private void makeMove(){\r\n\t\tif(cornerColorIs(GREEN)){\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tif(()) {\r\n//\t\t if(cornerColorIs(GREEN)) {\r\n//\t\t move();\r\n//\t\t paintCorner(GREEN);\r\n//\t\t } else {\r\n//\t\t move();\r\n//\t\t paintCorner(RED);\r\n//\t\t }\r\n//\t\t}noBeepersPresent\r\n\t}",
"public PieceColor colorGoing()\n {\n if (turn%2==0)\n return PieceColor.WHITE;\n else return PieceColor.BLACK;\n }",
"@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}",
"private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}",
"private void RedWin() {\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 9; col++) {\n buttons[row][col].setClickable(false);\n }\n }\n redPoints++;\n Toast redWins = Toast.makeText(this, \"Red Wins!\", Toast.LENGTH_SHORT);\n redWins.setGravity(Gravity.TOP, 0, 200);\n redWins.show();\n updatePoints();\n reset();\n }",
"@Override\n public void excute() {\n drawable.setColor(color);\n }",
"public void updateRedPawn(int positionPawn, int i) {\r\n\t\tredpawns[i].setBounds(array[positionPawn].getX(), array[positionPawn].getY(), 40, 40);\r\n\r\n\t}",
"public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }",
"private void red(){\n\t\tthis.arretes_fR();\n\t\tthis.coins_fR();\n\t\tthis.coins_a1R();\n\t\tthis.coins_a2R();\n\t\tthis.aretes_aR();\n\t\tthis.cube[13] = \"R\";\n\t}",
"private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }",
"void draw() {\n\n // SeamInfo lowestSeam = this.lowestSeamVert();\n // lowestSeam.changeColor();\n\n ComputedPixelImage seamRemovedImg = new ComputedPixelImage(this.newImg.width,\n this.newImg.height);\n int countRow = 0;\n int countCol = 0;\n\n Pixel current = this.curPixel;\n Pixel temp;\n\n while (current.down != null) {\n temp = current.down;\n while (current.right != null) {\n Color c = Color.MAGENTA;\n if (current.highlighted) {\n c = Color.RED;\n }\n else {\n c = current.color;\n }\n if (this.showType.equals(\"e\")) {\n int energy = (int) (current.energy * 100);\n if (energy > 255) {\n System.out.println(\"energy: \" + energy + \" to 255\");\n energy = 255;\n }\n c = new Color(energy, energy, energy);\n }\n else if (this.showType.equals(\"w\")) {\n int weight = (int) (current.seam.totalWeight);\n if (weight > 255) {\n System.out.println(\"weight: \" + weight + \" to 255\");\n weight = 255;\n }\n c = new Color(weight, weight, weight);\n }\n\n seamRemovedImg.setColorAt(countCol, countRow, c);\n countCol += 1;\n current = current.right;\n }\n countCol = 0;\n countRow += 1;\n current = temp;\n }\n countCol = 0;\n\n this.newImg = seamRemovedImg;\n\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}",
"protected void drawPossibleMoves(){\n if (selectedPiece == null) return;\n Pair<Integer,Integer> coord = getJButtonCoord(selectedPiece);\n int startRow = coord.getKey();\n int startCol = coord.getValue();\n for(int row = 0;row < ROWS;row ++){\n for(int col = 0; col < COLS ;col++){\n if (board.canMove(startRow,startCol,row,col)){\n buttonGrid[row][col].setBackground(Color.GREEN);\n }\n }\n }\n\n\n }",
"public Pawn(String color){\r\n this.color=color; \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.RED;\n\t\t\t}",
"public void draw(Graphics2D g2)\n {\n Rectangle grassLawn = new Rectangle(xCord,yCord,xLength,yWidth);\n \n g2.setPaint(Color.GREEN);\n g2.fill(grassLawn);\n }",
"@Override\n\tpublic void onRed() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t}",
"private void highlightLegalMoves(final Board board) {\n if (shouldHighlightLegalMoves) {\n // running calculatePieceToBeMovedLegalMoves(board) ensures\n // 1. there is a clicked piece\n // 2. clicked piece belongs to current player\n for (final Move move : calculatePieceToBeMovedLegalMoves(board)) {\n MoveTransition transition = board.currentPlayer().makeMove(move);\n if(!transition.getMoveStatus().isDone()){\n continue;\n }\n if (move.getDestinationCoordinate() == this.tileCoordinate) {\n try {\n ImageIcon greenDot = new ImageIcon(ImageIO.read(new File(\"art/misc/green_dot.png\")));\n add(new JLabel(greenDot));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }",
"public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }",
"public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}",
"private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"@Override\n public void drawValidMove() {\n if(this.getPlayer().getPlayerID() % 2 != 0) {\n //Pawn can move one space forwards if no piece is in front\n if (board.getSquare(x-1, y).getPiece()== null) {\n board.getSquare(x-1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x-2, y).getPiece() == null && board.getSquare(x-1, y).getPiece() == null) {\n board.getSquare(x-2, y).drawOutline();\n }\n \n //If there is an enemy piece in the diagonal forward square of the pawn, the pawn can move (capture the piece)\n if (y-1 > 0) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y-1) != null && board.getSquare(x-1, y-1).getPiece() != null &&\n board.getSquare(x-1, y-1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x-1, y-1).drawOutline();\n }\n }\n \n if(y+1<SIZE) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y+1) != null && board.getSquare(x-1, y+1).getPiece() != null &&\n board.getSquare(x-1, y+1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x-1, y+1).drawOutline();\n }\n }\n \n System.out.println(\"\");\n //En passant\n if (y - 1 > 0) {\n \n System.out.println();\n if (board.getSquare(x, y-1).getPiece() != null) { \n System.out.println(\"the piece's enPassant is: \" + board.getSquare(x, y-1).getPiece().getEnPassant());\n System.out.println(\"The game's turn counter is: \" + board.getTurnCounter());\n }\n else {\n System.out.println(\"Null piece when checking for en passent.\");\n }\n \n if (board.getSquare(x, y-1).getPiece() != null && board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y-1).drawOutline();\n board.getSquare(x-1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y+1).drawOutline();\n board.getSquare(x-1, y+1).setEnPassent(true);\n }\n }\n }\n \n //If this pawn belongs to player 2:\n else {\n \n if (board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x+2, y).getPiece() == null && board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+2, y).drawOutline();\n \n }\n \n if(y-1 > 0) {\n if (board.getSquare(x+1, y-1) != null && board.getSquare(x+1, y-1).getPiece() != null &&\n board.getSquare(x+1, y-1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x+1, y-1).drawOutline();\n }\n }\n \n if(y+1 < SIZE) {\n if (board.getSquare(x+1, y+1) != null && board.getSquare(x+1, y+1).getPiece() != null &&\n board.getSquare(x+1, y+1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x+1, y+1).drawOutline();\n }\n }\n \n //En passant\n if (y - 1 > 0) {\n if (board.getSquare(x, y-1).getPiece() != null &&board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y-1).drawOutline();\n board.getSquare(x+1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y+1).drawOutline();\n board.getSquare(x+1, y+1).setEnPassent(true);\n }\n }\n }\n }",
"public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"@Override\r\n\tpublic void execute(Graphics2D g) {\r\n\t\tg.setColor(drawColor);\r\n\t}",
"protected void paintMoves(Graphics2D g2d) {\r\n\t\tif (!parent.showMoves) return;\r\n\t\tArrayList<Pose> poses = model.getPoses();\r\n\t\tArrayList<Move> moves = model.getMoves();\r\n\t\t//parent.log(poses.size() + \" poses\");\r\n\t //parent.log(moves.size() + \" moves\");\r\n\t\tif (poses == null || poses.size() < 2) return;\r\n\t\tPose previousPose = null;\r\n\t\t\r\n\t\tg2d.setColor(colors[MOVE_COLOR_INDEX]);\r\n\t\tIterator<Move> iter = moves.iterator();\r\n\t\tfor(Pose pose: poses) {\t\r\n\t\t\tif (previousPose == null) previousPose = pose;\r\n\t\t\telse {\r\n\t\t\t\tMove move = iter.next();\r\n\t\t\t\tif (move.getMoveType() == Move.MoveType.ARC) {\r\n\t\t\t\t\t//parent.log(\"Move = \" + move);\r\n\t\t\t\t\tint radius = Math.round(move.getArcRadius());\r\n\t\t\t\t\tint diameter = radius*2;\r\n\t\t\t\t\tint startAngle = Math.round(previousPose.getHeading() - 90);\r\n\t\t\t\t\tint angleTurned = Math.round(move.getAngleTurned());\r\n \r\n\t\t\t\t\tif (radius < 0) {\r\n\t\t\t\t\t\tstartAngle -= 180;\r\n\t\t\t\t\t\tradius = -radius;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tint startX = (int) Math.round(previousPose.getX() - radius - radius*Math.cos(Math.toRadians(startAngle)));\r\n\t\t\t\t\tint startY = (int) Math.round(previousPose.getY() + radius - radius*Math.sin(Math.toRadians(startAngle)));\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (angleTurned < 0) {\r\n\t\t\t\t\t\tstartAngle += angleTurned;\r\n\t\t\t\t\t\tangleTurned =- angleTurned;\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\tdiameter = Math.abs(diameter);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//parent.log(\"Drawing arc:\" + startX + \",\" + startY + \",\" + diameter + \",\" + diameter + \",\" + startAngle + \",\" + angleTurned);\r\n\t\t\t\t\tg2d.drawArc((int) getX(startX), (int) getY(startY), (int) getDistance(diameter),(int) getDistance(diameter), startAngle, angleTurned);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//parent.log(\"Drawing line from \" + previousPose.getX() + \",\" + previousPose.getY() + \" to \" + pose.getX() + \",\" + pose.getY());\r\n\t\t\t\t\tg2d.drawLine((int) getX(previousPose.getX()), (int) getY(previousPose.getY()), (int) getX(pose.getX()), (int) getY(pose.getY())); \r\n\t\t\t\t}\r\n\t\t\t\tpreviousPose = pose;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}",
"@Override\r\n public final void draw(final Diamond d, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(d.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(d.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(d.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(d.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(d.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(d.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(d.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(d.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(d.getBorderColor().getBlue());\r\n } \r\n String color = \"#\" + red + green + blue;\r\n draw(new Line((String.valueOf(d.getX())),\r\n String.valueOf(d.getY() - (d.getDiagVerticala() / 2)),\r\n String.valueOf(d.getX() - (d.getDiagOrizontala() / 2)), String.valueOf(d.getY()),\r\n color, String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX() - (d.getDiagOrizontala() / 2))),\r\n String.valueOf(d.getY()), String.valueOf(d.getX()),\r\n String.valueOf(d.getY() + (d.getDiagVerticala() / 2)), color,\r\n String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX())),\r\n String.valueOf(d.getY() + (d.getDiagVerticala() / 2)),\r\n String.valueOf(d.getX() + (d.getDiagOrizontala() / 2)), String.valueOf(d.getY()),\r\n color, String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX() + (d.getDiagOrizontala() / 2))),\r\n String.valueOf(d.getY()), String.valueOf(d.getX()),\r\n String.valueOf(d.getY() - (d.getDiagVerticala() / 2)), color,\r\n String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n floodFill(d.getX(), d.getY(), d.getFillColor(), d.getBorderColor(), paper);\r\n }",
"void drawGrass()\n {\n \tPaint color = canvas.getFill();\n \tcanvas.setFill(Color.GREEN);\n \tcanvas.fillRect(0, mainCanvas.getHeight()-30, mainCanvas.getWidth(), 30);\n \tcanvas.setFill(color);\n }",
"public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}",
"public Pawn(Point location, Color color) {\n this.numMoves = 0;\n this.color = color;\n this.location = location;\n }",
"private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\n }",
"public void PRCRender() {\n if(rollOver) {\n object.getStyle().setFillColorFloat(20);\n } else if(dragging) {\n object.getStyle().setFillColorFloat(5);\n } else {\n object.style.setFillColorFloat(100);\n }\n object.render();\n }",
"public void wipe(){\n\t \tg2d.setColor(Color.yellow);\n g2d.fillRect(0,0, width, height);\n\t\t\n\n\t }",
"public void paintComponent(Graphics arg0) {\n\t\tsuper.paintComponent(arg0);\n\t\targ0.setColor(Color.BLACK); \n\t\tboard(arg0); \n\t\tdrawStone(arg0);\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tSystem.out.println(e.getX()/100 + \", \" + e.getY()/100);\r\n\t\tif (board[e.getX()/100][e.getY()/100].equals(Color.blue)) {\r\n\t\t\tif (turn%2 == 0) {\r\n\t\t\t\tboard[e.getX()/100][e.getY()/100] = Color.yellow;\r\n\t\t\t} else {\r\n\t\t\t\tboard[e.getX()/100][e.getY()/100] = Color.red;\r\n\t\t\t}\r\n\t\t\tturn++;\r\n\t\t\t\r\n\t\t\t//win condition\r\n\t\t\tif(board[0][0] == Color.yellow && board[0][1] == Color.yellow && board[0][2] == Color.yellow && board[0][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[1][0] == Color.yellow && board[1][1] == Color.yellow && board[1][2] == Color.yellow && board[1][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[2][0] == Color.yellow && board[2][1] == Color.yellow && board[2][2] == Color.yellow && board[2][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.yellow && board[1][0] == Color.yellow && board[2][0] == Color.yellow && board[3][0] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][1] == Color.yellow && board[1][1] == Color.yellow && board[2][1] == Color.yellow && board[3][1] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][2] == Color.yellow && board[1][2] == Color.yellow && board[2][2] == Color.yellow && board[3][2] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.yellow && board[1][1] == Color.yellow && board[2][2] == Color.yellow && board[3][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[3][0] == Color.yellow && board[1][2] == Color.yellow && board[2][1] == Color.yellow && board[0][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[0][1] == Color.red && board[0][2] == Color.red && board[0][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[1][0] == Color.red && board[1][1] == Color.red && board[1][2] == Color.red && board[1][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[2][0] == Color.red && board[2][1] == Color.red && board[2][2] == Color.red && board[2][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[1][0] == Color.red && board[2][0] == Color.red && board[3][0] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][1] == Color.red && board[1][1] == Color.red && board[2][1] == Color.red && board[3][1] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][2] == Color.red && board[1][2] == Color.red && board[2][2] == Color.red && board[3][2] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[1][1] == Color.red && board[2][2] == Color.red && board[3][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[3][0] == Color.red && board[1][2] == Color.red && board[2][1] == Color.red && board[0][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}",
"protected void drawNight(java.awt.Graphics2D g, float a) {\r\n Color oldColor = g.getColor();\r\n g.setColor(Color.BLUE);\r\n g.setComposite(AlphaComposite.SrcOver.derive(a));\r\n g.fillRect(0, 0, GamePanel.WIDTH, GamePanel.HEIGHT);\r\n g.setComposite(AlphaComposite.SrcOver.derive(1.0f));\r\n g.setColor(oldColor);\r\n }",
"@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }",
"public void updateYellowPawn(int positionPawn, int i) {\r\n\t\tyellowpawns[i].setBounds(array[positionPawn].getX(), array[positionPawn].getY(), 40, 40);\r\n\t}",
"@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}",
"public void blue() {\n g2.setPaint(Color.blue);\r\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\t\t\t//This if statement isolates all conditions in which a square would appear white\n\t\t\t//(and one condition which would make it red). \n if (revealed || (gameLost && ((mine && !flagged) || (!mine && flagged))))\n {\n setBackground(Color.WHITE);\n if (mine || flagged) //All conditions which would show a mine icon.\n {\t\t\t\t\t\t\t//Any flagged square that fit the first if statement must be a falsely flagged\n if (revealed)\t\t//non-mine after the game is lost, so it does fit this category.\n {\n setBackground(Color.RED); //Just for the specific mine that was clicked on to lose the game.\n }\n g.fillOval(SHIFT - 1, SHIFT - 1, \n SQUARE_SIZE - 2*SHIFT + 1, SQUARE_SIZE - 2*SHIFT + 1);\n g.drawLine(SQUARE_SIZE/2, 0, SQUARE_SIZE/2, SQUARE_SIZE);\n g.drawLine(0, SQUARE_SIZE/2, SQUARE_SIZE, SQUARE_SIZE/2);\n g.drawLine(SHIFT, SQUARE_SIZE - SHIFT - 1, SQUARE_SIZE - SHIFT - 1, SHIFT);\n g.drawLine(SHIFT, SHIFT, SQUARE_SIZE - SHIFT - 1, SQUARE_SIZE - SHIFT - 1);\n g.setColor(Color.WHITE);\n g.fillRect(GLARE_LOC, GLARE_LOC, GLARE_SIZE, GLARE_SIZE);\n if (flagged) //Just mistakenly flagged non-mines after the game is lost.\n {\n g.setColor(Color.RED);\n g.drawLine(0, 0, SQUARE_SIZE, SQUARE_SIZE);\n g.drawLine(1, 0, SQUARE_SIZE, SQUARE_SIZE - 1);\n g.drawLine(0, 1, SQUARE_SIZE - 1, SQUARE_SIZE);\n g.drawLine(0, SQUARE_SIZE - 1, SQUARE_SIZE - 1, 0);\n g.drawLine(1, SQUARE_SIZE - 1, SQUARE_SIZE - 1, 1);\n g.drawLine(0, SQUARE_SIZE - 2, SQUARE_SIZE - 2, 0);\n }\n }\n else //Revealed non-mines\n {\n if (adjacentMines != 0)\n {\n g.setColor(COLORS[adjacentMines - 1]);\n Font f = g.getFont();\n g.setFont(new Font(f.getName(), Font.BOLD, f.getSize()));\n g.drawString(\"\" + adjacentMines, \n \t\tSHIFT, SQUARE_SIZE - SHIFT);\n }\n }\n }\n else //Unrevealed\n {\n setBackground(Color.GREEN);\n if (flagged)\n {\n g.fillPolygon(FLAG_BASE_X, FLAG_BASE_Y, FLAG_BASE_X.length);\n g.drawLine(FLAG_BASE_X[2], FLAG_BASE_Y[2], \n \t\tFLAG_BASE_X[2], FLAG_BASE_Y[2] - POLE_LENGTH);\n g.setColor(Color.RED);\n g.fillPolygon(FLAG_X, FLAG_Y, FLAG_X.length);\n }\n }\n }",
"public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}",
"@Override\n public void drawScreen(int n, int n2) {\n void mouseY;\n void mouseX;\n super.drawScreen((int)mouseX, (int)mouseY);\n float[] hsb = Color.RGBtoHSB(this.setting.getValue().getRed(), this.setting.getValue().getGreen(), this.setting.getValue().getBlue(), null);\n Color color = Color.getHSBColor(hsb[0], Float.intBitsToFloat(Float.floatToIntBits(6.4887953f) ^ 0x7F4FA436), Float.intBitsToFloat(Float.floatToIntBits(4.629535f) ^ 0x7F142527));\n Gui.drawRect((int)this.getX(), (int)this.getY(), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 14), (int)new Color(40, 40, 40).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 2), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 12), (int)this.setting.getValue().getRGB());\n RenderUtils.drawOutline(this.getX() + this.getWidth() - 12, this.getY() + 2, this.getX() + this.getWidth() - 2, this.getY() + 12, Float.intBitsToFloat(Float.floatToIntBits(2.7144578f) ^ 0x7F2DB9AD), new Color(20, 20, 20).getRGB());\n if (this.open) {\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 14), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 28), (int)new Color(40, 40, 40).getRGB());\n float i = Float.intBitsToFloat(Float.floatToIntBits(1.3378998E38f) ^ 0x7EC94E07);\n while (i + Float.intBitsToFloat(Float.floatToIntBits(13.8331995f) ^ 0x7EDD54C9) < Float.intBitsToFloat(Float.floatToIntBits(0.07128618f) ^ 0x7F51FE7D)) {\n RenderUtils.drawRecta((float)(this.getX() + 2) + i, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(7.249331f) ^ 0x7F67FA85), Float.intBitsToFloat(Float.floatToIntBits(1.7045807f) ^ 0x7EEA2FB3), Color.getHSBColor(i / Float.intBitsToFloat(Float.floatToIntBits(0.115068644f) ^ 0x7F2BA91C), Float.intBitsToFloat(Float.floatToIntBits(4.3161592f) ^ 0x7F0A1DFA), Float.intBitsToFloat(Float.floatToIntBits(21.075346f) ^ 0x7E289A4F)).getRGB());\n i += Float.intBitsToFloat(Float.floatToIntBits(3.807338f) ^ 0x7E95CD0B);\n }\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 16, this.getX() + 2 + this.getWidth() - 4, this.getY() + 27, Float.intBitsToFloat(Float.floatToIntBits(2.7503529f) ^ 0x7F3005C8), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.hueWidth, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(5.200255f) ^ 0x7F26687D), Float.intBitsToFloat(Float.floatToIntBits(1.2665411f) ^ 0x7E921E05), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 28), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 42), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 29, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.19645536f) ^ 0x7F792B98), new Color(255, 255, 255), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 29, this.getX() + 2 + this.getWidth() - 4, this.getY() + 40, Float.intBitsToFloat(Float.floatToIntBits(103.69628f) ^ 0x7DCF647F), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.satWidth, this.getY() + 29, Float.intBitsToFloat(Float.floatToIntBits(7.3489017f) ^ 0x7F6B2A34), Float.intBitsToFloat(Float.floatToIntBits(0.1948352f) ^ 0x7F7782E1), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 42), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 56), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 42, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(1.5246161f) ^ 0x7EF3269F), new Color(0, 0, 0), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 42, this.getX() + 2 + this.getWidth() - 4, this.getY() + 53, Float.intBitsToFloat(Float.floatToIntBits(3.7803736f) ^ 0x7F71F1A4), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.briWidth, this.getY() + 42, Float.intBitsToFloat(Float.floatToIntBits(8.346171f) ^ 0x7E8589EB), Float.intBitsToFloat(Float.floatToIntBits(0.08925866f) ^ 0x7C86CD3F), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 56), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 70), (int)new Color(40, 40, 40).getRGB());\n this.renderAlphaBG(this.getX() + 2, this.getY() + 55, this.alphaBG);\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 55, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.13166903f) ^ 0x7F36D43F), new Color(0, 0, 0), color, 0, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 55, this.getX() + 2 + this.getWidth() - 4, this.getY() + 66, Float.intBitsToFloat(Float.floatToIntBits(19.69502f) ^ 0x7E9D8F67), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.alphaWidth, this.getY() + 55, Float.intBitsToFloat(Float.floatToIntBits(6.702013f) ^ 0x7F5676E4), Float.intBitsToFloat(Float.floatToIntBits(0.13652846f) ^ 0x7F3BCE1E), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 70), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 84), (int)new Color(40, 40, 40).getRGB());\n Europa.FONT_MANAGER.drawString(\"Rainbow\", this.getX() + 3, (float)(this.getY() + 78) - Europa.FONT_MANAGER.getHeight() / Float.intBitsToFloat(Float.floatToIntBits(0.8730777f) ^ 0x7F5F8205), Color.WHITE);\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 72), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 82), (int)new Color(30, 30, 30).getRGB());\n if (this.setting.getRainbow().booleanValue()) {\n RenderUtils.prepareGL();\n GL11.glShadeModel((int)7425);\n GL11.glEnable((int)2848);\n GL11.glLineWidth((float)Float.intBitsToFloat(Float.floatToIntBits(0.2713932f) ^ 0x7EAAF40D));\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015137452f) ^ 0x7F070313)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(1.1948546f) ^ 0x7CE7F0FF)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.36357376f) ^ 0x7DC52657)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015521388f) ^ 0x7F014D6B)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.01025841f) ^ 0x7F5712E4)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.10675689f) ^ 0x7EA5A35B)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8 + 4), (double)(this.getY() + 74));\n GL11.glEnd();\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.009417259f) ^ 0x7F654AD9)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.07014828f) ^ 0x7EF0A9E7)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.013465701f) ^ 0x7F239F3E)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.0155056f) ^ 0x7F010B33)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.011914493f) ^ 0x7F3C3501)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.012230922f) ^ 0x7F376434)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 10), (double)(this.getY() + 77));\n GL11.glEnd();\n RenderUtils.releaseGL();\n }\n }\n Gui.drawRect((int)(this.getX() - 1), (int)this.getY(), (int)this.getX(), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth()), (int)this.getY(), (int)(this.getX() + this.getWidth() + 1), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Europa.FONT_MANAGER.drawString(this.setting.getName(), this.getX() + 3, this.getY() + 3, Color.WHITE);\n }",
"@Override\r\n\tpublic void placePiece(JumpInButton[][] square) {\r\n\t\tsquare[this.x][this.y].setBackground(Color.RED);\r\n\t}",
"public void draw() {\n\t\tbackground(51);\n\t\tfill(35);\n\t\trect(0, 0, 599, 40);\n\t\tif (this.buttonOver()) {\n\t\t\tfill(100);\n\t\t\trect(513, 7, 73, 29, 7);\n\t\t}\n\t\telse {\n\t\t\tfill(60);\n\t\t\trect(513, 7, 73, 29, 7);\n\t\t}\n\t\t\n\t\t//create the appropriate writing/texts\n\t\tfill(255);\n\t\ttextSize(20);\n\t\ttext(\"SCORE:\", 20, 30);\n\t\ttext(mySnake.score, 94, 30);\n\t\tif (mySnake.isPaused == true) {\n\t\t\ttext(\"PLAY\", 520, 30);\n\t\t}\n\t\telse {\n\t\t\ttext(\"PAUSE\", 520, 30);\n\t\t}\n\t\t\n\t\tmySnake.checkIfDead();\n\t\t\n\t\tif (mySnake.alive) { //if alive \n\t\t\t\n\t\t\tif (mySnake.isPaused == false) {\n\t\t\t\tmySnake.update();\n\t\t\t}\n\t\t\t\n\t\t\tmySnake.printSnake();\n\t\t\tmySnake.printFood();\n\t\t\t\t\n\t\t\tif (mySnake.eatFood()) {\n\t\t\t\tmySnake.createFood();\n\t\t\t}\n\t\t}\n\t\telse { //it must be dead\n\t\t\t//print the food and only the tail of the snake (as head went off board)\n\t\t\tfor (int i=0; i<mySnake.tail.length; i++) { //will only print the tail if there is any tail to begin with\n\t\t\t\trect(mySnake.tail[i][0], mySnake.tail[i][1], boxSize, boxSize);\n\t\t\t}\n\t\t\tmySnake.printFood();\n\t\n\t\t\t//write Game Over\n\t\t\tfill(40);\n\t\t\trect(50, 190, 510, 100, 7);\n\t\t\t\n\t\t\tfill(255);\n\t\t\ttextSize(80);\n\t\t\ttext(\"GAME OVER!\", 60, 270);\n\t\t}\n\t}",
"void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }",
"public void act()\n {\n if(canMove() && turns == 0)\n {\n move();\n }\n else if(!canMove() && turns == 0)\n {\n turns++;\n }\n else if(turns == 1 || turns == 9)\n {\n turn();\n setColor(Color.BLUE);\n turns++;\n }\n else if(turns == 2 || turns == 10)\n {\n turn();\n setColor(Color.RED);\n turns++;\n }\n else if(turns == 3 || turns == 11)\n {\n turn();\n setColor(Color.GREEN);\n turns++;\n }\n else if(turns == 4 || turns == 12)\n {\n turn();\n setColor(Color.YELLOW);\n turns++;\n }\n else if(turns == 5 || turns == 13)\n {\n turn();\n setColor(Color.ORANGE);\n turns++;\n }\n else if(turns == 6 || turns == 14)\n {\n turn();\n setColor(Color.CYAN);\n turns++;\n }\n else if(turns == 7 || turns == 15)\n {\n turn();\n setColor(Color.PINK);\n turns++;\n }\n else if(turns == 8)\n {\n turn();\n setColor(Color.MAGENTA);\n turns++;\n }\n else if(turns == 16 && corner == 1)\n {\n setDirection(315);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 2)\n {\n setDirection(45);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 3)\n {\n setDirection(135);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 4)\n {\n setDirection(225);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n }",
"public void endYellow() {\n if (System.currentTimeMillis() - lastAttack > 200) {\n isYellow = false;\n ((Geometry)model.getChild(\"Sphere\")).getMaterial().setColor(\"Color\", ColorRGBA.Red);\n }\n }",
"public abstract void drawFill();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLACK;\n\t\t\t}",
"public void addPawn(Pawn.Color c) { pawn = new Pawn(c, Pawn.Type.BASIC); }",
"public static void main(String [] args)\n{\n //this is something to memorize \n\nDrawingTool pencil;\nSketchPad paper;\n//these two were object declarations \npaper = new SketchPad (300,300); \npencil = new DrawingTool(paper); \n//these two were to create instances of the DrawingTool and SketchPad that are in the library today \n\n//now, directions: memorize the format for the instructions \npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (45);\npencil.forward (142);\npencil.turnRight (90); \npencil.forward (142);\npencil.turnRight (45);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (80);\npencil.turnRight (90);\npencil.forward (40);\npencil.turnLeft (90);\npencil.forward (20);\npencil.turnLeft (90);\npencil.forward (40);\n/*a few questions I have: can I change the color of the pencil, can I lift\n * it or choose where to start\n */\npencil.turnRight(90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (160);\npencil.turnRight (90);\npencil.forward (30);\npencil.turnRight (90);\npencil.forward (30);\n\n\n\n \n\n//how can I add a new color in this? I requested access for the video \n//that the logo team made\n \n \n}",
"public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }",
"@Override\n\tpublic void mousePressed(MouseEvent me) {\n\t\tint x = me.getX();\n\t\tint y = me.getY();\n\t\tx = (int)( (x-mrg_x+spc_x/2) / spc_x) + nWALL;\n\t\ty = (int)( (y-mrg_y+spc_y/2) / spc_y) + nWALL;\n\t\t\n\t\tif (isPlaying && arr[x][y] == NONE) {\n\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\n\t\t\tint t = (n+isWhiteWin+1) %2 ;\n\t\t\t\n\t\t\tif ( is33(x, y, (t%2==0)? WHITE:BLACK) ) {\n\t\t\t\t\n\t\t\t\tGraphics g = cvBoard.getGraphics();\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.drawOval((int) (mrg_x + (x-nWALL) * spc_x - spc_x/2) ,\n\t\t\t\t\t\t(int) (mrg_y + (y-nWALL) * spc_y -spc_y/2),\n\t\t\t\t\t\t(int) spc_x-1, (int) spc_y-1);\n\t\t\t\tg.fillOval((int) (mrg_x + (x-nWALL) * spc_x - spc_x/2) ,\n\t\t\t\t\t\t(int) (mrg_y + (y-nWALL) * spc_y -spc_y/2),\n\t\t\t\t\t\t(int) spc_x, (int) spc_y);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"public void magenta() {\n g2.setPaint(Color.magenta);\r\n }",
"public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }",
"boolean moveRed(int piece) {\n\t\treturn ((piece == 1 || piece == 3) && curPlayer == 1);\n\t}",
"public DrawingPanel(Color color, Color backColor)\r\n {\r\n\r\n /**********************************************************\r\n To be completed\r\n**********************************************************/\r\n\t currentColor = color;\r\n\t this.setBackground(backColor);\r\n\t currentX = 0;\r\n\t currentY = 0;\r\n\t moveX = 3;\r\n\t moveY = 3;\r\n\t diameter = 5;\r\n\t delay = 20;\r\n\t dotList = new ArrayList();\r\n\t MoveListener task = new MoveListener();\r\n\t timer = new Timer(delay, task);\r\n\t timer.start();\r\n }",
"public void drawOn(Graphics g){\r\n\t\tif (ignoreStrokes > 0){\r\n\t\t\tg.setColor(Color.cyan); \t//to show the player that they are frozen\r\n\t\t} else {\r\n\t\t\tg.setColor(Color.white);\r\n\t\t}\r\n\t\tmySnake.drawOn(g);\r\n\t\tfor (Mushroom m : shrooms){\r\n\t\t\tm.drawOn(g);\r\n\t\t}\r\n\t}",
"public void mouseMoved(MouseEvent ev)\n\t{\n\t if (timer!=null || manim==null || manim.snoopGeneration()!=null) return;\n\t Node n = manim.getNodeCloseToBottom(ev.getX(),ev.getY());\n\t if (n!=null) {\n\t\thilitNode(n,Color.red);\n\t\treturn;\n\t }\n\t n = manim.getNodeCloseToTop(ev.getX(),ev.getY());\n\t if (n!=null) {\n\t\thilitNode(n,Color.blue);\n\t\treturn;\n\t }\n\t unhilitNode();\n\t}",
"@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"public int draw()\n {\n //Lack of mating material draw\n if (getPieces().size()<3)\n return TWO_KINGS;\n \n //stalemate\n PieceColor color = colorGoing();\n if (inCheck(color))\n return NOT_DRAW;\n boolean draw = true;\n for (Piece p: getPieces(color))\n if (!getMoveLocations(p).isEmpty())\n draw = false;\n if (draw)\n return STALEMATE;\n \n //Fifty move draw\n if (fiftyMove>=100)\n return FIFTY_MOVE;\n \n //three move repetition\n String pos = positions.get(positions.size()-1);\n int counter = 0;\n for (String temp: positions)\n {\n if (temp.substring(4).equals(pos.substring(4)))\n counter++;\n }\n if (counter>=3)\n return THREE_MOVE;\n \n return NOT_DRAW;\n }",
"private void drawWhite() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw white the list of stones\n boardComponent.drawWhite(list);\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }",
"@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}",
"private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }",
"@Override\n public void paintPedestrian(Graphics g) {\n g.setColor(Color.BLUE);\n g.fillOval(x, y, 10, 10);\n g.setColor(Color.BLACK);\n g.drawOval(x, y, 10, 10);\n }",
"public void paintComponent(final Graphics the_graphics)\n {\n super.paintComponent(the_graphics);\n final Graphics2D g2d = (Graphics2D) the_graphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setFont(my_font);\n g2d.setColor(Color.WHITE);\n g2d.setStroke(new BasicStroke(STROKE_SIZE));\n g2d.drawString(PIECE_STRING, (getWidth() / (STROKE_SIZE * STROKE_SIZE)) - \n (PIECE_STRING.length() / STROKE_SIZE), (int) (getHeight() * LABEL_STARTING_Y));\n \n for (int y = Piece.NUMBER_OF_BLOCKS - 1; 0 <= y; y--) \n {\n for (int x = 0; x < Piece.NUMBER_OF_BLOCKS; x++) \n {\n for (int i = 0; i < Piece.NUMBER_OF_BLOCKS; i++) \n {\n final Point block = my_board.nextPiece().blocks()[i];\n if (block.x() == x && block.y() == y) \n {\n g2d.setColor(my_board.nextPiece().color());\n g2d.fill(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n g2d.setColor(Color.DARK_GRAY);\n g2d.draw(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n } \n }\n }\n }\n }",
"public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"yellow\");\n window.changeColor(\"black\");\n roof.changeColor(\"red\");\n sun.changeColor(\"yellow\");\n }\n }",
"private void drawBoard(int N) {\n\t\tfor (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if ((i + j) % 2 == 0) StdDrawPlus.setPenColor(StdDrawPlus.GRAY);\n else StdDrawPlus.setPenColor(StdDrawPlus.BLACK);\n StdDrawPlus.filledSquare(i + .5, j + .5, .5);\n StdDrawPlus.setPenColor(StdDrawPlus.WHITE);\n }\n }\n\n if (hasSelected) {\n StdDrawPlus.setPenColor(StdDrawPlus.WHITE);\n \tStdDrawPlus.filledSquare(prevSelectedX + .5, prevSelectedY + .5, .5);\n }\n\n // Drawing pieces\n for (int x = 0; x < 8; x++) {\n \tfor (int y = 0; y < 8; y++) {\n \t\tPiece p = pieceAt(x, y);\n \t\tif (p != null) {\n\t \t\t\tif (p.isFire() && p.isShield() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-fire.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (p.isFire() && p.isBomb() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-fire.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (!p.isFire() && p.isBomb() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-water.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (!p.isFire() && p.isShield() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-water.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (!p.isFire() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-water.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (p.isFire() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-fire.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (p.isFire() && p.isBomb() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (p.isFire() && p.isShield() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (p.isFire() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (!p.isFire() && p.isBomb() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-water-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (!p.isFire() && p.isShield() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (!p.isFire() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-water-crowned.png\", 1, 1);\n\t \t\t}\n\t \t}\n \t}\n }\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 }",
"@Override\r\n\tpublic void howToColor() {\r\n\t\tSystem.out.println(\"Color all sides of the rectangle.\");\r\n\t}",
"public static void setBoard() {\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.filledCircle(200, 800, 35);\n\t\tStdDraw.filledCircle(500, 800, 35);\n\t\tStdDraw.filledCircle(800, 800, 35);\n\t\tStdDraw.filledCircle(200, 200, 35);\n\t\tStdDraw.filledCircle(500, 200, 35);\n\t\tStdDraw.filledCircle(800, 200, 35);\n\t\tStdDraw.filledCircle(200, 500, 35);\n\t\tStdDraw.filledCircle(800, 500, 35);\n\t\tStdDraw.filledCircle(350, 650, 35);\n\t\tStdDraw.filledCircle(500, 650, 35);\n\t\tStdDraw.filledCircle(650, 650, 35);\n\t\tStdDraw.filledCircle(350, 350, 35);\n\t\tStdDraw.filledCircle(500, 350, 35);\n\t\tStdDraw.filledCircle(650, 350, 35);\n\t\tStdDraw.filledCircle(350, 500, 35);\n\t\tStdDraw.filledCircle(650, 500, 35);\n\n\t\tStdDraw.setPenRadius(0.01);\n\t\tStdDraw.line(200, 200, 800, 200);\n\t\tStdDraw.line(200, 800, 800, 800);\n\t\tStdDraw.line(350, 350, 650, 350);\n\t\tStdDraw.line(350, 650, 650, 650);\n\t\tStdDraw.line(200, 500, 350, 500);\n\t\tStdDraw.line(650, 500, 800, 500);\n\t\tStdDraw.line(200, 800, 200, 200);\n\t\tStdDraw.line(800, 800, 800, 200);\n\t\tStdDraw.line(350, 650, 350, 350);\n\t\tStdDraw.line(650, 650, 650, 350);\n\t\tStdDraw.line(500, 800, 500, 650);\n\t\tStdDraw.line(500, 200, 500, 350);\n\n\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\tStdDraw.filledCircle(80, 200, 35);\n\t\tStdDraw.filledCircle(80, 300, 35);\n\t\tStdDraw.filledCircle(80, 400, 35);\n\t\tStdDraw.filledCircle(80, 500, 35);\n\t\tStdDraw.filledCircle(80, 600, 35);\n\t\tStdDraw.filledCircle(80, 700, 35);\n\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledCircle(920, 200, 35);\n\t\tStdDraw.filledCircle(920, 300, 35);\n\t\tStdDraw.filledCircle(920, 400, 35);\n\t\tStdDraw.filledCircle(920, 500, 35);\n\t\tStdDraw.filledCircle(920, 600, 35);\n\t\tStdDraw.filledCircle(920, 700, 35);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\n\t}",
"@Override\n public void paintPedestrian(Graphics g) {\n\n g.setColor(Color.RED);\n g.fillOval(x, y, 10, 10);\n g.setColor(Color.BLACK);\n g.drawOval(x, y, 10, 10);\n }",
"private void colorFoundNode(String s, double x, double y, double delay) {\n Text nn = new Text(x + 18 - s.length(), y + 30, s);\n nn.setFill(Color.WHITE);\n nn.setFont(Font.font(\"Verdana\", FontWeight.EXTRA_BOLD, 14));\n\n Rectangle rect = new Rectangle(x, y, 50, 50); // Draw a node\n rect.setFill(Color.rgb(140, 211, 255));\n rect.setStroke(Color.rgb( 245, 245, 245));\n rect.setArcHeight(15); rect.setArcWidth(20);\n\n //adding the created box to tree's node\n this.getChildren().addAll(rect, nn);\n\n // make fill transition ...this makes node change its colors when it is traversed on\n FillTransition fill = new FillTransition();\n\n\n //Setting auto reverse value to false //The transition will set to be auto reserved by setting this to true\n //Simply it is done so that colour does not turn back to blue.\n fill.setAutoReverse(true);\n\n //setting cycle count for the fill transition\n //making it 1 cause we don't want it ot change again back to blue\n fill.setCycleCount(1);\n //setting the time to be taken for transition\n fill.setDelay(Duration.seconds(delay));\n fill.setDuration(Duration.seconds(.5));\n\n //setting the first colour\n fill.setFromValue(Color.rgb(140, 211, 255));\n //setting the final colour\n fill.setToValue(Color.rgb(255, 206, 10));\n\n //adding the fill \"characteristic\" to rectangular box created before\n fill.setShape(rect);\n\n //starting the transition\n fill.play();\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}",
"@Override\n\tpublic void yellow() {\n\t\tSystem.out.println(\"Yellow Light\");\n\t\t\n\t}",
"@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }",
"public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }",
"@Override\r\n public final void draw(final Rectangle r, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(r.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(r.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(r.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(r.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(r.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(r.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(r.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n\r\n draw(new Line((String.valueOf(r.getxSus())), String.valueOf(r.getySus()),\r\n String.valueOf(r.getxSus() + r.getLungime() - 1), String.valueOf(r.getySus()),\r\n color, String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus()), String.valueOf(r.getxSus() + r.getLungime() - 1),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus())),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus()), color, String.valueOf(r.getBorderColor().getAlpha()),\r\n paper), paper);\r\n\r\n for (int i = r.getxSus() + 1; i < r.getxSus() + r.getLungime() - 1; i++) {\r\n for (int j = r.getySus() + 1; j < r.getySus() + r.getInaltime() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, r.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n }",
"@Override\n\tpublic String howtocolor() {\n\t\treturn \"Color all four sides\";\n\t}",
"@Override\n public Paint getPaint() {\n if (illegal()){\n Paint temp = new Paint(super.getPaint());\n temp.setColor(Color.RED);\n return temp;\n }\n return super.getPaint();\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}",
"public void paint() {\n for (int row = 0; row < ROWS; ++row) {\n for (int col = 0; col < COLS; ++col) {\n cells[row][col].paint();\n if (col < COLS - 1) System.out.print(\"|\");\n }\n System.out.println();\n if (row < ROWS - 1) {\n System.out.println(\"-----------\");\n }\n }\n }",
"public Pawn(Player player, Board board, char color, int xpos, int ypos) {\n\t\tsuper(player, board, color, xpos, ypos);\n\t\tthis.name = 'p';\n\t\tthis.enpassant = false;\n\t\thasMovedTwo = false;\n\t}",
"public void paintStone( Graphics g, int w, int h, Stone s, boolean highlight )\n {\n int cx = (int) (w/2 + s.getX() * w/15);\n int cy = (int) (21 * h/27 - s.getY() * h/27);\n if (highlight) g.setColor(s.getColor());\n else g.setColor(s.getColor().darker().darker());\n \n g.fillOval(cx - w/30, cy - h/54, w/15, h/27);\n g.drawOval(cx - w/30, cy - h/54, w/15, h/27);\n }",
"private void switchColor(Node node) {\n Circle temp = (Circle) node;\n\n if (isRed) {\n temp.setFill(Paint.valueOf(\"Red\"));\n turnCircle.setFill(Paint.valueOf(\"Blue\"));\n turnDisplay.setText(aiTurn);\n isRed = false;\n } else {\n temp.setFill(Paint.valueOf(\"Blue\"));\n turnCircle.setFill(Paint.valueOf(\"Red\"));\n turnDisplay.setText(humanTurn);\n isRed = true;\n }\n }",
"PieceColor whoseMove() {\n return _whoseMove;\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 }"
] | [
"0.6664058",
"0.64404696",
"0.63004905",
"0.62784386",
"0.6251377",
"0.62243503",
"0.6132376",
"0.60658973",
"0.60288143",
"0.60244584",
"0.60106313",
"0.60063636",
"0.6000231",
"0.59975684",
"0.59931004",
"0.5959636",
"0.59575397",
"0.59469485",
"0.59440553",
"0.59440017",
"0.59417427",
"0.5919316",
"0.5917469",
"0.5881075",
"0.58798647",
"0.5859184",
"0.583793",
"0.5829969",
"0.58221006",
"0.5811162",
"0.5782225",
"0.5780149",
"0.5761637",
"0.5738856",
"0.57282114",
"0.5718582",
"0.5717967",
"0.5715362",
"0.57047826",
"0.5700039",
"0.5688882",
"0.56874216",
"0.56863916",
"0.56777376",
"0.5662743",
"0.56507206",
"0.5650335",
"0.5642781",
"0.56407815",
"0.5636732",
"0.56309706",
"0.5629391",
"0.5626742",
"0.5624355",
"0.5622235",
"0.5618408",
"0.5613487",
"0.5611106",
"0.56066614",
"0.56053805",
"0.55944073",
"0.5593499",
"0.55905664",
"0.5575355",
"0.55749786",
"0.5567958",
"0.55669624",
"0.5562272",
"0.55601835",
"0.55596805",
"0.555827",
"0.5555133",
"0.55550164",
"0.554488",
"0.5534898",
"0.5534401",
"0.5534032",
"0.5533633",
"0.55331045",
"0.5530411",
"0.5529872",
"0.5528182",
"0.5527361",
"0.55232334",
"0.5522103",
"0.5520789",
"0.5514446",
"0.55137074",
"0.5511279",
"0.551038",
"0.5506487",
"0.55055374",
"0.5503588",
"0.550329",
"0.5501453",
"0.5499867",
"0.54969954",
"0.54959106",
"0.549276",
"0.5492553"
] | 0.5897593 | 23 |
Paints the LD move of this pawn to yellow | public void getLDMove(Chessboard c) {
Chesspiece left_diagonal = c.FindChessPiece(this.getXCoordinate()-1, this.getYCoordinate()-1);
if (left_diagonal != null && left_diagonal.getPieceColor() == Color.BLACK && left_diagonal.getIcon() != null) {
left_diagonal.setBackground(Color.YELLOW);
left_diagonal.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLACK));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lightMove() {\n movePawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\n }",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void draw(Graphics2D g2)\n {\n Rectangle grassLawn = new Rectangle(xCord,yCord,xLength,yWidth);\n \n g2.setPaint(Color.GREEN);\n g2.fill(grassLawn);\n }",
"public void red() {\n g2.setPaint(Color.red);\r\n }",
"@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\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 }",
"public void green() {\n g2.setPaint(Color.green);\r\n }",
"public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public Pawn(int x, int y, String ID, String color) {\n\t\tsuper(x,y,ID);\n\t\tif (color == \"white\") {\n\t\t\txrange = -2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 1;\n\t\t}\n\t\tif (color == \"black\") {\n\t\t\txrange = 2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 0;\n\t\t}\n\t\tfirstMove = true;\n\t}",
"public Pawn(Point location, Color color) {\n this.numMoves = 0;\n this.color = color;\n this.location = location;\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}",
"public void paint (Graphics g)\n {\n g.setColor(color);\n for(Point pellet : pellets)\n {\n g.fillOval(5+MunchGame.SEGMENT_SIZE*pellet.x+2,\n 15+MunchGame.SEGMENT_SIZE*pellet.y+2, \n MunchGame.SEGMENT_SIZE-4,\n MunchGame.SEGMENT_SIZE-4);\n }\n }",
"private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}",
"@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}",
"private void highlightLegalMoves(final Board board) {\n if (shouldHighlightLegalMoves) {\n // running calculatePieceToBeMovedLegalMoves(board) ensures\n // 1. there is a clicked piece\n // 2. clicked piece belongs to current player\n for (final Move move : calculatePieceToBeMovedLegalMoves(board)) {\n MoveTransition transition = board.currentPlayer().makeMove(move);\n if(!transition.getMoveStatus().isDone()){\n continue;\n }\n if (move.getDestinationCoordinate() == this.tileCoordinate) {\n try {\n ImageIcon greenDot = new ImageIcon(ImageIO.read(new File(\"art/misc/green_dot.png\")));\n add(new JLabel(greenDot));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }",
"private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }",
"public Pawn(String color){\r\n this.color=color; \r\n }",
"public void updateYellowPawn(int positionPawn, int i) {\r\n\t\tyellowpawns[i].setBounds(array[positionPawn].getX(), array[positionPawn].getY(), 40, 40);\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.RED;\n\t\t\t}",
"public void magenta() {\n g2.setPaint(Color.magenta);\r\n }",
"public DrawingPanel(Color color, Color backColor)\r\n {\r\n\r\n /**********************************************************\r\n To be completed\r\n**********************************************************/\r\n\t currentColor = color;\r\n\t this.setBackground(backColor);\r\n\t currentX = 0;\r\n\t currentY = 0;\r\n\t moveX = 3;\r\n\t moveY = 3;\r\n\t diameter = 5;\r\n\t delay = 20;\r\n\t dotList = new ArrayList();\r\n\t MoveListener task = new MoveListener();\r\n\t timer = new Timer(delay, task);\r\n\t timer.start();\r\n }",
"public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }",
"public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }",
"@Override\r\n\tpublic void execute(Graphics2D g) {\r\n\t\tg.setColor(drawColor);\r\n\t}",
"public void addPawn(Pawn.Color c) { pawn = new Pawn(c, Pawn.Type.BASIC); }",
"@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}",
"public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }",
"private Pawn(Point location, Color color, int moves, boolean captureableEnPassant) {\n enPassantOk = captureableEnPassant;\n this.numMoves = moves;\n this.color = color;\n this.location = location;\n }",
"@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}",
"public PieceColor colorGoing()\n {\n if (turn%2==0)\n return PieceColor.WHITE;\n else return PieceColor.BLACK;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLUE;\n\t\t\t}",
"public void blue() {\n g2.setPaint(Color.blue);\r\n }",
"@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 }",
"void drawGrass()\n {\n \tPaint color = canvas.getFill();\n \tcanvas.setFill(Color.GREEN);\n \tcanvas.fillRect(0, mainCanvas.getHeight()-30, mainCanvas.getWidth(), 30);\n \tcanvas.setFill(color);\n }",
"public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}",
"@Override\n\tpublic void yellow() {\n\t\tSystem.out.println(\"Yellow Light\");\n\t\t\n\t}",
"public void endYellow() {\n if (System.currentTimeMillis() - lastAttack > 200) {\n isYellow = false;\n ((Geometry)model.getChild(\"Sphere\")).getMaterial().setColor(\"Color\", ColorRGBA.Red);\n }\n }",
"private void makeMove(){\r\n\t\tif(cornerColorIs(GREEN)){\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tif(()) {\r\n//\t\t if(cornerColorIs(GREEN)) {\r\n//\t\t move();\r\n//\t\t paintCorner(GREEN);\r\n//\t\t } else {\r\n//\t\t move();\r\n//\t\t paintCorner(RED);\r\n//\t\t }\r\n//\t\t}noBeepersPresent\r\n\t}",
"public void display() {\t\t\n\t\tparent.pushStyle();\n\t\t\n\t\t//parent.noStroke();\n\t\t//parent.fill(255);\n\t\tparent.noFill();\n\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\tnodeSpin.drawNode(pos.x, pos.y, diam);\n\t\t\n\t\t//This should match what happens in the hover animation\n\t\tif (focused && userId >= 0) {\n\t\t\tparent.fill(Sequencer.colors[userId]);\n\t\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\t}\n\t\t\n\t\trunAnimations();\n\t\t\n\t\tparent.popStyle();\n\t}",
"@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\tif(_StartFinish)\r\n\t\t\tsetBackground(Color.WHITE);\r\n\t\telse\r\n\t\t\tsetBackground(Color.DARK_GRAY);\r\n\t\t\r\n\t\tsuper.paintComponent(g);\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawColor = Color.BLACK;\n\t\t\t}",
"@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }",
"protected void drawNight(java.awt.Graphics2D g, float a) {\r\n Color oldColor = g.getColor();\r\n g.setColor(Color.BLUE);\r\n g.setComposite(AlphaComposite.SrcOver.derive(a));\r\n g.fillRect(0, 0, GamePanel.WIDTH, GamePanel.HEIGHT);\r\n g.setComposite(AlphaComposite.SrcOver.derive(1.0f));\r\n g.setColor(oldColor);\r\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}",
"@Override\n public void paintPedestrian(Graphics g) {\n g.setColor(Color.BLUE);\n g.fillOval(x, y, 10, 10);\n g.setColor(Color.BLACK);\n g.drawOval(x, y, 10, 10);\n }",
"public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\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 }",
"public void moveAndDraw(Graphics window)\r\n {\n Color temp = getColor();\r\n\t\tdraw(window, Color.WHITE);\r\n\t\tsetPos(getXSpeed()+xSpeed, getYSpeed()+ySpeed);\r\n\t\tdraw(window, temp);\r\n\t\t//setY\r\n\r\n\t\t//draw the ball at its new location\r\n }",
"protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}",
"public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }",
"public Direction moveBlinky(Ghost g);",
"@Override\n\tpublic void onRed() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t}",
"public void updateRedPawn(int positionPawn, int i) {\r\n\t\tredpawns[i].setBounds(array[positionPawn].getX(), array[positionPawn].getY(), 40, 40);\r\n\r\n\t}",
"public void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D)g;\n\n\n g.setColor(Color.black);\n g2d.drawRect(clock_x, clock_y, clock_width, clock_height);\n Font fontClock = new Font(\"Courier\", Font.PLAIN, 130);\n g.setFont(fontClock);\n g.drawString(Long.toString(gameClock.displayTime()), clock_x, clock_y + clock_height);\n \n //enemy area\n //g.setColor(Color.black);\n //g2d.drawRect(enemy_x, enemy_y, enemy_width, enemy_height);\n if(enemyImage != null) {\n g2d.drawImage(enemyImage,\n enemy_x, enemy_y, enemy_width+enemy_x, enemy_height+enemy_y,\n 0, 0, enemyImage.getWidth(null),\n enemyImage.getHeight(null), null); \n } else {\n System.out.println(\"Enemy image is null\");\n }\n \n //draw targets\n for(target t : targets) {\n g.setColor(t.getColor());\n Ellipse2D.Double targ = new Ellipse2D.Double(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n g2d.fill(targ);\n //g.drawRect(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n Ellipse2D.Double hitCircle = new Ellipse2D.Double(t.get_x() - target_radius / 2, t.get_y() - target_radius / 2, t.get_diam() + target_radius, t.get_diam() + target_radius);\n g2d.draw(hitCircle);\n }\n\n //draw bullet holes\n for(bulletHole b : bullets) {\n //translate circle so that it\n //displays at correct coordinates\n //double translation = Math.sqrt(2 * (Math.pow(bullet_diam / 2, 2)));\n double translation = bullet_diam / 2;\n g.setColor(bulletHole);\n Ellipse2D.Double hole = new Ellipse2D.Double(b.get_x() - translation, b.get_y() - translation, b.get_diam(), b.get_diam());\n g2d.fill(hole);\n }\n\n //end of game\n //... or next round\n switch(end_round()) {\n case(1):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 150));\n current_round++;\n g.drawString(\"Round \"+current_round, 253, 350);\n refreshAll(false);\n break;\n \n case(2):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 135));\n g.drawString(\"You Lose!\", 240, 350);\n \n g.setColor(Color.black);\n Font fontPlayAgain = new Font(\"Mool Boran\", Font.PLAIN, 20);\n g.setFont(fontPlayAgain);\n g.drawString(\"Right Click to play again!\", 400, 400);\n //show score\n //then prompt to replay\n break;\n \n default:\n break;\n }\n }",
"@Override\r\n\tpublic void placePiece(JumpInButton[][] square) {\r\n\t\tsquare[this.x][this.y].setBackground(Color.RED);\r\n\t}",
"@Override\n public void paintPedestrian(Graphics g) {\n\n g.setColor(Color.RED);\n g.fillOval(x, y, 10, 10);\n g.setColor(Color.BLACK);\n g.drawOval(x, y, 10, 10);\n }",
"public void paintComponent(final Graphics the_graphics)\n {\n super.paintComponent(the_graphics);\n final Graphics2D g2d = (Graphics2D) the_graphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setFont(my_font);\n g2d.setColor(Color.WHITE);\n g2d.setStroke(new BasicStroke(STROKE_SIZE));\n g2d.drawString(PIECE_STRING, (getWidth() / (STROKE_SIZE * STROKE_SIZE)) - \n (PIECE_STRING.length() / STROKE_SIZE), (int) (getHeight() * LABEL_STARTING_Y));\n \n for (int y = Piece.NUMBER_OF_BLOCKS - 1; 0 <= y; y--) \n {\n for (int x = 0; x < Piece.NUMBER_OF_BLOCKS; x++) \n {\n for (int i = 0; i < Piece.NUMBER_OF_BLOCKS; i++) \n {\n final Point block = my_board.nextPiece().blocks()[i];\n if (block.x() == x && block.y() == y) \n {\n g2d.setColor(my_board.nextPiece().color());\n g2d.fill(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n g2d.setColor(Color.DARK_GRAY);\n g2d.draw(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n } \n }\n }\n }\n }",
"@Override\n public void excute() {\n drawable.setColor(color);\n }",
"public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\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}",
"protected void paintMoves(Graphics2D g2d) {\r\n\t\tif (!parent.showMoves) return;\r\n\t\tArrayList<Pose> poses = model.getPoses();\r\n\t\tArrayList<Move> moves = model.getMoves();\r\n\t\t//parent.log(poses.size() + \" poses\");\r\n\t //parent.log(moves.size() + \" moves\");\r\n\t\tif (poses == null || poses.size() < 2) return;\r\n\t\tPose previousPose = null;\r\n\t\t\r\n\t\tg2d.setColor(colors[MOVE_COLOR_INDEX]);\r\n\t\tIterator<Move> iter = moves.iterator();\r\n\t\tfor(Pose pose: poses) {\t\r\n\t\t\tif (previousPose == null) previousPose = pose;\r\n\t\t\telse {\r\n\t\t\t\tMove move = iter.next();\r\n\t\t\t\tif (move.getMoveType() == Move.MoveType.ARC) {\r\n\t\t\t\t\t//parent.log(\"Move = \" + move);\r\n\t\t\t\t\tint radius = Math.round(move.getArcRadius());\r\n\t\t\t\t\tint diameter = radius*2;\r\n\t\t\t\t\tint startAngle = Math.round(previousPose.getHeading() - 90);\r\n\t\t\t\t\tint angleTurned = Math.round(move.getAngleTurned());\r\n \r\n\t\t\t\t\tif (radius < 0) {\r\n\t\t\t\t\t\tstartAngle -= 180;\r\n\t\t\t\t\t\tradius = -radius;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tint startX = (int) Math.round(previousPose.getX() - radius - radius*Math.cos(Math.toRadians(startAngle)));\r\n\t\t\t\t\tint startY = (int) Math.round(previousPose.getY() + radius - radius*Math.sin(Math.toRadians(startAngle)));\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (angleTurned < 0) {\r\n\t\t\t\t\t\tstartAngle += angleTurned;\r\n\t\t\t\t\t\tangleTurned =- angleTurned;\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\tdiameter = Math.abs(diameter);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//parent.log(\"Drawing arc:\" + startX + \",\" + startY + \",\" + diameter + \",\" + diameter + \",\" + startAngle + \",\" + angleTurned);\r\n\t\t\t\t\tg2d.drawArc((int) getX(startX), (int) getY(startY), (int) getDistance(diameter),(int) getDistance(diameter), startAngle, angleTurned);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//parent.log(\"Drawing line from \" + previousPose.getX() + \",\" + previousPose.getY() + \" to \" + pose.getX() + \",\" + pose.getY());\r\n\t\t\t\t\tg2d.drawLine((int) getX(previousPose.getX()), (int) getY(previousPose.getY()), (int) getX(pose.getX()), (int) getY(pose.getY())); \r\n\t\t\t\t}\r\n\t\t\t\tpreviousPose = pose;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"@Override\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\n }",
"public void createPurpleBanHighlight() {\n\t\tpurpleBanHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tpurpleBanHighlight.setBackground(new Color(255, 217, 0, 120));\n\t\tbottomPanel.add(purpleBanHighlight, new Integer(1));\n\t\tpurpleBanHighlight.setBounds(1014, 29, 245, 168);\n\t\tpurpleBanHighlight.setVisible(false);\n\t}",
"@Override\r\n protected void paintComponent(Graphics g) {\n paintWater(g);\r\n \r\n g.setColor(new Color(255, 255, 255, 70));\r\n g.fillRect(0, 0, 500, 500);\r\n \r\n \r\n // Paint the Grid ------------------------------------------\r\n g.setColor(Color.BLACK);\r\n \r\n for (int i = -1; i < 500; i += 50) {\r\n \r\n g.fillRect(i, 0, 2, 500);\r\n g.fillRect(0, i, 500, 2);\r\n \r\n }\r\n \r\n paintShips(g);\r\n paintHits(g);\r\n \r\n \r\n if (isPainted && shortBoard == ATTACK_BOARD && newGD.isMyTurn() && !missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, mouseX, mouseY, null);\r\n }\r\n \r\n if (shortBoard == ATTACK_BOARD && newGD.isMyTurn() && missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, missile.getPosition().x, missile.getPosition().y, null);\r\n }\r\n \r\n // Paint square under mouse pointer (also for testing)\r\n /*if (isPainted) {\r\n \r\n g.setColor(colorSquare);\r\n g.fillRect(mouseX, mouseY, 50, 50);\r\n \r\n }*/\r\n \r\n }",
"public void draw(float dt, Graphics g) {\n\t\t// Graphics.gl.glTranslatef(-.25f * Values.RESOLUTIONS[Values.X], -.25f\n\t\t// * Values.RESOLUTIONS[Values.Y], 1);\n\t\t// super.drawNew(g);\n\t\tg.setColor(1);\n\t\tsynchronized (this) {\n\t\t\tdrawBottom(dt, g);\n\t\t\tdrawTop(dt, g, sprites);\n\t\t}\n\t\t// if (Math.random() < .01f) {\n\t\t// color[3] = 0;\n\t\t// }\n\t\t// if (color[3] <= .5f) {\n\t\t// color[3]+=.08f;\n\t\t// g.fadeOldSchoolColorWhite(1, .9f, 0, .3f - color[3]);\n\t\t// } else {\n\t\t// g.fadeOldSchoolColor(color[0], color[1], color[2], color[3]);\n\t\t// }\n\t\tsuper.checkMenu();\n\t\tsuper.draw(dt, g);\n\t}",
"@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}",
"void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }",
"@Override\n\tpublic void draw(Graphics2D window) {\n\t\twindow.setColor(SnobbyGreen);\n\t\twindow.fillRect(getXPos(), getYPos(), size, height);\n\t\t//System.out.println(\"transition\");\n\t}",
"public Pawn(Player player, Board board, char color, int xpos, int ypos) {\n\t\tsuper(player, board, color, xpos, ypos);\n\t\tthis.name = 'p';\n\t\tthis.enpassant = false;\n\t\thasMovedTwo = false;\n\t}",
"public void paintComponent(Graphics arg0) {\n\t\tsuper.paintComponent(arg0);\n\t\targ0.setColor(Color.BLACK); \n\t\tboard(arg0); \n\t\tdrawStone(arg0);\n\t}",
"@Override\n\tprotected void display(Coordination c) {\n\t\tSystem.out.println(\"白棋,颜色是:\" + color + \"位置是:\" + c.getX() + \"--\" + c.getY());\n\t}",
"public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"yellow\");\n window.changeColor(\"black\");\n roof.changeColor(\"red\");\n sun.changeColor(\"yellow\");\n }\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\t\t\t//This if statement isolates all conditions in which a square would appear white\n\t\t\t//(and one condition which would make it red). \n if (revealed || (gameLost && ((mine && !flagged) || (!mine && flagged))))\n {\n setBackground(Color.WHITE);\n if (mine || flagged) //All conditions which would show a mine icon.\n {\t\t\t\t\t\t\t//Any flagged square that fit the first if statement must be a falsely flagged\n if (revealed)\t\t//non-mine after the game is lost, so it does fit this category.\n {\n setBackground(Color.RED); //Just for the specific mine that was clicked on to lose the game.\n }\n g.fillOval(SHIFT - 1, SHIFT - 1, \n SQUARE_SIZE - 2*SHIFT + 1, SQUARE_SIZE - 2*SHIFT + 1);\n g.drawLine(SQUARE_SIZE/2, 0, SQUARE_SIZE/2, SQUARE_SIZE);\n g.drawLine(0, SQUARE_SIZE/2, SQUARE_SIZE, SQUARE_SIZE/2);\n g.drawLine(SHIFT, SQUARE_SIZE - SHIFT - 1, SQUARE_SIZE - SHIFT - 1, SHIFT);\n g.drawLine(SHIFT, SHIFT, SQUARE_SIZE - SHIFT - 1, SQUARE_SIZE - SHIFT - 1);\n g.setColor(Color.WHITE);\n g.fillRect(GLARE_LOC, GLARE_LOC, GLARE_SIZE, GLARE_SIZE);\n if (flagged) //Just mistakenly flagged non-mines after the game is lost.\n {\n g.setColor(Color.RED);\n g.drawLine(0, 0, SQUARE_SIZE, SQUARE_SIZE);\n g.drawLine(1, 0, SQUARE_SIZE, SQUARE_SIZE - 1);\n g.drawLine(0, 1, SQUARE_SIZE - 1, SQUARE_SIZE);\n g.drawLine(0, SQUARE_SIZE - 1, SQUARE_SIZE - 1, 0);\n g.drawLine(1, SQUARE_SIZE - 1, SQUARE_SIZE - 1, 1);\n g.drawLine(0, SQUARE_SIZE - 2, SQUARE_SIZE - 2, 0);\n }\n }\n else //Revealed non-mines\n {\n if (adjacentMines != 0)\n {\n g.setColor(COLORS[adjacentMines - 1]);\n Font f = g.getFont();\n g.setFont(new Font(f.getName(), Font.BOLD, f.getSize()));\n g.drawString(\"\" + adjacentMines, \n \t\tSHIFT, SQUARE_SIZE - SHIFT);\n }\n }\n }\n else //Unrevealed\n {\n setBackground(Color.GREEN);\n if (flagged)\n {\n g.fillPolygon(FLAG_BASE_X, FLAG_BASE_Y, FLAG_BASE_X.length);\n g.drawLine(FLAG_BASE_X[2], FLAG_BASE_Y[2], \n \t\tFLAG_BASE_X[2], FLAG_BASE_Y[2] - POLE_LENGTH);\n g.setColor(Color.RED);\n g.fillPolygon(FLAG_X, FLAG_Y, FLAG_X.length);\n }\n }\n }",
"@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }",
"private void colorFoundNode(String s, double x, double y, double delay) {\n Text nn = new Text(x + 18 - s.length(), y + 30, s);\n nn.setFill(Color.WHITE);\n nn.setFont(Font.font(\"Verdana\", FontWeight.EXTRA_BOLD, 14));\n\n Rectangle rect = new Rectangle(x, y, 50, 50); // Draw a node\n rect.setFill(Color.rgb(140, 211, 255));\n rect.setStroke(Color.rgb( 245, 245, 245));\n rect.setArcHeight(15); rect.setArcWidth(20);\n\n //adding the created box to tree's node\n this.getChildren().addAll(rect, nn);\n\n // make fill transition ...this makes node change its colors when it is traversed on\n FillTransition fill = new FillTransition();\n\n\n //Setting auto reverse value to false //The transition will set to be auto reserved by setting this to true\n //Simply it is done so that colour does not turn back to blue.\n fill.setAutoReverse(true);\n\n //setting cycle count for the fill transition\n //making it 1 cause we don't want it ot change again back to blue\n fill.setCycleCount(1);\n //setting the time to be taken for transition\n fill.setDelay(Duration.seconds(delay));\n fill.setDuration(Duration.seconds(.5));\n\n //setting the first colour\n fill.setFromValue(Color.rgb(140, 211, 255));\n //setting the final colour\n fill.setToValue(Color.rgb(255, 206, 10));\n\n //adding the fill \"characteristic\" to rectangular box created before\n fill.setShape(rect);\n\n //starting the transition\n fill.play();\n }",
"public void setDataColor(Color c)\r\n/* 48: */ {\r\n/* 49: 36 */ this.ballColor = c;repaint();\r\n/* 50: */ }",
"@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tGraphics2D ga = (Graphics2D) g; \n\t\t\tif (currentColor == color) {\n\t\t\t\tShape check = factory.getShape(ShapeFactory.CHECK);\n\t\t\t\tcheck.setPosition(new Point2D.Double(point.getX() + getPreferredSize().width/2 - 7, point.getY()+ 25));\n\t\t\t\tga.setColor(currentColor);\n\t\t\t\tcheck.draw(ga);\n\t\t\t}\n\t\t}",
"public void setColor()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"yellow\");\n eyeR.changeColor(\"yellow\");\n nose.changeColor(\"green\");\n mouthM.changeColor(\"red\");\n mouthL.changeColor(\"red\");\n mouthR.changeColor(\"red\");\n }\n }",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\n }",
"public void takeTurn() {\n world.updateLinkedList();\n repaint();\n }",
"public void paintComponent(Graphics g) {\n \n g.setColor(Color.yellow);\n g.fillRect(0, 0, 150, 250);\n\n //rondeur des couleurs (taille et position)\n \n g.setColor(rouge);\n g.fillOval(50, 30, 50, 50);\n \n g.setColor(jaune);\n g.fillOval(50, 100, 50, 50);\n \n g.setColor(vert);\n g.fillOval(50, 170, 50, 50); \n }",
"public void paintComponent(Graphics g) \r\n {\r\n super.paintComponent(g);\r\n Graphics2D g2d = (Graphics2D) g;\r\n //inital light is red\r\n String intLight = \"Red\";\r\n \r\n \r\n //loops through the 2d array of the intersection and draws a sqare for each value that is colored dependnig \r\n //on the value inisde the array\r\n for(int i = 0; i < 10; i++)\r\n {\r\n for(int j = 0; j < 10; j++)\r\n {\r\n if ( board[i][j].equals(\"l\")) //land aka not where i can can drive\r\n {\r\n g.setColor(Color.gray);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"vr\")) // vertical right lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 1, 50);\r\n }\r\n else if ( board[j][i].equals(\"vl\")) //vertical left lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"hb\")) //horizontal bottom lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 50, 1);\r\n }\r\n \r\n else if ( board[j][i].equals(\"ht\")) //horizontal top lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"i\")) //intersection\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if (board[j][i].equals(\"vri\")) //the space before the intersection for the vertical right lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50+5, 50, 45);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 1, 50);\r\n //light\r\n if(light.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, j*50, 50, 5);\r\n }\r\n else if (board[j][i].equals(\"vli\")) //the space before the intersection for the vertical left lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 45);\r\n //light\r\n if(light.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, (j+1)*50-5, 50, 5);\r\n }\r\n else if (board[j][i].equals(\"hbi\")) //the space before the intersection for the horizontal bottom lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 45, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 50, 1);\r\n //light2\r\n if(light2.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light2.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light2.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect((i+1)*50-5, j*50, 5, 50);\r\n }\r\n else if (board[j][i].equals(\"hti\")) //the space before the intersection for the horizontal top lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50+5, j*50, 45, 50);\r\n //light2\r\n if(light2.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light2.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light2.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, j*50, 5, 50);\r\n }\r\n }\r\n } \r\n //screates a linked list that is ach lane, every node inside the list will either have a car or be empty\r\n Map scan;\r\n scan = saveHB;\r\n while(scan != null)\r\n {\r\n //each ehicle tpye is a different color so its easy to see which vehicle is which\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n //if there is a vehicle in this space draw the vehicle\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n scan = saveHT;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n \r\n scan = saveVR;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n scan = saveVL;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n }",
"public void drawTheImage(Graphics g)\r\n\t{\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.fillOval(theX, theY, 10,10);\r\n\t\ttheX+=velX;\r\n\t\ttheY+=velY;\r\n\t}",
"public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }",
"public void draw(Graphics g) {\n g.setColor(COLOR);\n g.fillOval(x, y, WIDTH, HEIGHT);\n g.setColor(Color.BLUE);\n g.drawOval(x, y, WIDTH, HEIGHT);\n \n }",
"@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tSystem.out.println(e.getX()/100 + \", \" + e.getY()/100);\r\n\t\tif (board[e.getX()/100][e.getY()/100].equals(Color.blue)) {\r\n\t\t\tif (turn%2 == 0) {\r\n\t\t\t\tboard[e.getX()/100][e.getY()/100] = Color.yellow;\r\n\t\t\t} else {\r\n\t\t\t\tboard[e.getX()/100][e.getY()/100] = Color.red;\r\n\t\t\t}\r\n\t\t\tturn++;\r\n\t\t\t\r\n\t\t\t//win condition\r\n\t\t\tif(board[0][0] == Color.yellow && board[0][1] == Color.yellow && board[0][2] == Color.yellow && board[0][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[1][0] == Color.yellow && board[1][1] == Color.yellow && board[1][2] == Color.yellow && board[1][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[2][0] == Color.yellow && board[2][1] == Color.yellow && board[2][2] == Color.yellow && board[2][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.yellow && board[1][0] == Color.yellow && board[2][0] == Color.yellow && board[3][0] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][1] == Color.yellow && board[1][1] == Color.yellow && board[2][1] == Color.yellow && board[3][1] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][2] == Color.yellow && board[1][2] == Color.yellow && board[2][2] == Color.yellow && board[3][2] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.yellow && board[1][1] == Color.yellow && board[2][2] == Color.yellow && board[3][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[3][0] == Color.yellow && board[1][2] == Color.yellow && board[2][1] == Color.yellow && board[0][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[0][1] == Color.red && board[0][2] == Color.red && board[0][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[1][0] == Color.red && board[1][1] == Color.red && board[1][2] == Color.red && board[1][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[2][0] == Color.red && board[2][1] == Color.red && board[2][2] == Color.red && board[2][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[1][0] == Color.red && board[2][0] == Color.red && board[3][0] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][1] == Color.red && board[1][1] == Color.red && board[2][1] == Color.red && board[3][1] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][2] == Color.red && board[1][2] == Color.red && board[2][2] == Color.red && board[3][2] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[1][1] == Color.red && board[2][2] == Color.red && board[3][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[3][0] == Color.red && board[1][2] == Color.red && board[2][1] == Color.red && board[0][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"public void draw(Graphics2D g2)\n {\n Rectangle2D.Double land= new Rectangle2D.Double(xleft, ybottom, 10000, 100);\n Color mycolor= new Color(255, 222, 156);\n g2.setColor(mycolor);\n g2.draw(land);\n g2.fill(land);\n g2.draw(land);\n \n }",
"private void drawPiece(int row, int col, Graphics g, Color color){\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\r\n g.setColor(color);\r\n g.fillOval((col*tileSize)+2, (row*tileSize)+2, tileSize-4, tileSize-4);\r\n }",
"@Override\n public void paintComponent(Graphics g){\n // Paint the well\n g.setColor(Color.DARK_GRAY);\n g.fillRoundRect(0, 0, 338, 546, 8, 8);\n\n for (int i = 1; i < 21; i++){\n for (int j = 1; j < 13; j++){\n g.setColor(Color.BLACK);\n g.fillRoundRect(26 * j - 13, 26 * i - 13, 25, 25, 2, 2);\n }\n }\n\n drawPiece(g);\n }",
"@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(indicateColor);\n\t\tg.fillOval(0, 0, checkerSize, checkerSize);\t\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}",
"protected void renderMoves(Graphics g) {\n\t\tfor (Point move : moves) {\n\t\t\tg.setColor(team == 1 ? Color.red : Color.blue);\n\t\t\tPoint p = board.locationOfSquare(move);\n\t\t\tp.x += board.getSquareSize() / 4;\n\t\t\tp.y += board.getSquareSize() / 4;\n\t\t\tg.fillOval(p.x, p.y, board.getSquareSize() / 2, board.getSquareSize() / 2);\n\t\t}\n\t}",
"public void setColor()\n {\n if (wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }",
"public void setTurn(PieceColor color) {\n \tturn = color;\n }",
"@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}",
"public static void main(String [] args)\n{\n //this is something to memorize \n\nDrawingTool pencil;\nSketchPad paper;\n//these two were object declarations \npaper = new SketchPad (300,300); \npencil = new DrawingTool(paper); \n//these two were to create instances of the DrawingTool and SketchPad that are in the library today \n\n//now, directions: memorize the format for the instructions \npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (45);\npencil.forward (142);\npencil.turnRight (90); \npencil.forward (142);\npencil.turnRight (45);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (80);\npencil.turnRight (90);\npencil.forward (40);\npencil.turnLeft (90);\npencil.forward (20);\npencil.turnLeft (90);\npencil.forward (40);\n/*a few questions I have: can I change the color of the pencil, can I lift\n * it or choose where to start\n */\npencil.turnRight(90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (160);\npencil.turnRight (90);\npencil.forward (30);\npencil.turnRight (90);\npencil.forward (30);\n\n\n\n \n\n//how can I add a new color in this? I requested access for the video \n//that the logo team made\n \n \n}",
"public void black() {\n g2.setPaint(Color.black);\r\n }"
] | [
"0.6883351",
"0.6707893",
"0.6402258",
"0.6303712",
"0.62829524",
"0.62459767",
"0.6241529",
"0.6213773",
"0.61123776",
"0.6104432",
"0.60862654",
"0.60700583",
"0.60449773",
"0.6019771",
"0.60140157",
"0.60107636",
"0.60101134",
"0.5991901",
"0.59906006",
"0.5984774",
"0.59529865",
"0.5952947",
"0.58934265",
"0.58904237",
"0.58855325",
"0.5880578",
"0.5866913",
"0.58520645",
"0.5849403",
"0.5844914",
"0.58348817",
"0.5813935",
"0.5808593",
"0.5800408",
"0.579459",
"0.57882583",
"0.5782165",
"0.57804763",
"0.57719755",
"0.577054",
"0.57648504",
"0.57628065",
"0.5761673",
"0.57475877",
"0.5733501",
"0.5730574",
"0.57289404",
"0.5724344",
"0.5722519",
"0.5714584",
"0.5714325",
"0.57115877",
"0.56971294",
"0.56968814",
"0.5690978",
"0.5685077",
"0.5678711",
"0.5677513",
"0.5677431",
"0.5675315",
"0.56735367",
"0.5669867",
"0.5668089",
"0.5657764",
"0.56519264",
"0.5633053",
"0.5631991",
"0.5622791",
"0.5616057",
"0.5615697",
"0.5614326",
"0.5608833",
"0.5606452",
"0.5594085",
"0.5591623",
"0.55886614",
"0.55872613",
"0.55837184",
"0.5578126",
"0.5577988",
"0.55757517",
"0.55744845",
"0.5555139",
"0.5552574",
"0.55504346",
"0.5542769",
"0.5542631",
"0.55421495",
"0.5541942",
"0.5538086",
"0.55251926",
"0.55200934",
"0.5516115",
"0.5515792",
"0.55088884",
"0.5507566",
"0.5502475",
"0.55019146",
"0.5499389",
"0.54992205",
"0.54973596"
] | 0.0 | -1 |
Paints all possible moves by this pawn to Yellow | public void allMoves(Chessboard c) {
if (this.getIcon() != null) {
this.getLDMove(c);
this.getRDMove(c);
this.getFMove(c);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void drawPossibleMoves(){\n if (selectedPiece == null) return;\n Pair<Integer,Integer> coord = getJButtonCoord(selectedPiece);\n int startRow = coord.getKey();\n int startCol = coord.getValue();\n for(int row = 0;row < ROWS;row ++){\n for(int col = 0; col < COLS ;col++){\n if (board.canMove(startRow,startCol,row,col)){\n buttonGrid[row][col].setBackground(Color.GREEN);\n }\n }\n }\n\n\n }",
"public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }",
"protected void renderMoves(Graphics g) {\n\t\tfor (Point move : moves) {\n\t\t\tg.setColor(team == 1 ? Color.red : Color.blue);\n\t\t\tPoint p = board.locationOfSquare(move);\n\t\t\tp.x += board.getSquareSize() / 4;\n\t\t\tp.y += board.getSquareSize() / 4;\n\t\t\tg.fillOval(p.x, p.y, board.getSquareSize() / 2, board.getSquareSize() / 2);\n\t\t}\n\t}",
"public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }",
"private void highlightLegalMoves(final Board board) {\n if (shouldHighlightLegalMoves) {\n // running calculatePieceToBeMovedLegalMoves(board) ensures\n // 1. there is a clicked piece\n // 2. clicked piece belongs to current player\n for (final Move move : calculatePieceToBeMovedLegalMoves(board)) {\n MoveTransition transition = board.currentPlayer().makeMove(move);\n if(!transition.getMoveStatus().isDone()){\n continue;\n }\n if (move.getDestinationCoordinate() == this.tileCoordinate) {\n try {\n ImageIcon greenDot = new ImageIcon(ImageIO.read(new File(\"art/misc/green_dot.png\")));\n add(new JLabel(greenDot));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }",
"public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }",
"public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }",
"private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }",
"public static void main( String[] args ) {\n for( int i = 0; i < 8; i++ ){\n for( int i1 = 0; i1 < 8; i1++ ){\n gamepieces[i][i1] = BACKGROUND_COLOR;\n }\n }\n //setup initial center game pieces\n gamepieces[3][3] = Color.WHITE;\n gamepieces[4][4] = Color.WHITE;\n gamepieces[3][4] = Color.BLACK;\n gamepieces[4][3] = Color.BLACK;\n gameFrame.setTitle( \"Othello\" );\n //make sure the process exits when window is closed\n gameFrame.setDefaultCloseOperation( WindowConstants.EXIT_ON_CLOSE );\n //make a pane to display everything in\n JPanel pane = new JPanel(){\n @Override\n protected void paintComponent( Graphics g ){\n super.paintComponent(g);\n //draw the game board\n drawGameboard( g );\n //draw individual game pieces\n g.setColor( Color.BLACK );\n for( int row = 0; row < 8; row++){\n for( int column = 0; column < 8; column ++ ){\n if (gamepieces[ row ][ column ] == BACKGROUND_COLOR && isMoveValid(row, column)) {\n //show available moves\n drawGamePiece( g, row, column, Color.BLUE );\n }else {\n drawGamePiece(g, row, column, gamepieces[row][column]);\n }\n }\n }\n }\n };\n\n pane.addMouseListener( new MouseListener(){\n final ActionListener aiMove = new ActionListener(){\n public void actionPerformed(ActionEvent e) {\n //we don't need to do this more than once in a row; stop the timer\n timer.stop();\n //get all the available moves\n ArrayList<Point> possibleMoves = getCurrentlyValidMoves();\n canLastPlayerMove = false;\n try {\n //check if we can move\n if( possibleMoves.size() == 0 ){\n return;\n }\n //make an array to store the best moves available\n ArrayList<Point> bestMoves = new ArrayList<Point>();\n //the lower the level, the higher priority is assigned to the move\n //a move of level 10 is the absolute lowest\n //this heuristic follows the strategy I use, omitting situation-specific content\n int level = 10;\n for (Point p : possibleMoves) {\n int x = (int) p.getX();\n int y = (int) p.getY();\n if ((x == 0 || x == 7) && (y == 0 || y == 7)) {\n if (level > 0) {\n bestMoves.clear();\n level = 0;\n }\n bestMoves.add( p );\n } else if (level >= 1 && (x == 0 || y == 0 || x == 7 || y == 7)) {\n if (level > 1) {\n bestMoves.clear();\n level = 1;\n }\n bestMoves.add( p );\n } else if (level >= 2 && (x > 2 && x < 6 && y > 2 && y < 6)) {\n if ( level > 2) {\n bestMoves.clear();\n level = 2;\n }\n bestMoves.add( p );\n } else if (level >= 3 && x != 1 && x != 6 && y != 1 && y != 6) {\n if (level > 3) {\n bestMoves.clear();\n level = 3;\n }\n bestMoves.add(p);\n } else if (level >= 4) {\n bestMoves.add(p);\n }\n }\n //for debugging purposes, output the level of move chosen by the ai\n System.out.println(level);\n //select a random move from the pool of best moves\n Point move = bestMoves.get((int) (Math.random() * bestMoves.size()));\n int aix = (int) move.getX();\n int aiy = (int) move.getY();\n //move there\n attemptMove(aix, aiy);\n gamepieces[aix][aiy] = currentPlayer;\n //the ai moved, so this is true\n canLastPlayerMove = true;\n } finally { //if the ai moved or if it didn't\n //change the player\n currentPlayer = Color.WHITE;\n gameFrame.repaint();\n //if the human player has no moves left\n if( getCurrentlyValidMoves().size() == 0 ){\n if( canLastPlayerMove ){ //... and the ai could move\n //switch players, enable the ai to move again in 1 second\n currentPlayer = Color.BLACK;\n timer.start();\n }else{ //... and the ai couldn't move\n gameOver();\n }\n }\n }\n }\n };\n //timer allows the ai to move 1 second after the player\n private final Timer timer = new Timer( 1000, aiMove );\n\n public void mouseClicked(MouseEvent e) {\n\n }\n\n //mousePressed is used to avoid clicks not registering if the mouse is moving\n public void mousePressed(MouseEvent e) {\n //transpose the coordinates to the gameboard (each tile is 100x100 px)\n int x = (int)(e.getX() * 0.01 );\n int y = (int)(e.getY() * 0.01 );\n //if the ai isn't moving and the move is valid\n if( !timer.isRunning() && attemptMove( x, y ) ) {\n //move there\n gamepieces[x][y] = currentPlayer;\n gameFrame.repaint();\n //switch to the ai\n currentPlayer = Color.BLACK;\n timer.start();\n //the player could move\n canLastPlayerMove = true;\n }\n }\n\n public void mouseReleased(MouseEvent e) {\n\n }\n\n public void mouseEntered(MouseEvent e) {\n\n }\n\n public void mouseExited(MouseEvent e) {\n\n }\n });\n //add the pane to the frame and set size\n gameFrame.add( pane );\n gameFrame.setSize( WINDOW_BOUNDS, WINDOW_BOUNDS );\n gameFrame.setVisible( true );\n //the insets take up room, so we have to account for them\n //this includes the draggable edges of the window, and the title bar\n Insets insets = gameFrame.getInsets();\n gameFrame.setSize( WINDOW_BOUNDS + insets.right + insets.left, WINDOW_BOUNDS + insets.top + insets.bottom );\n }",
"public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }",
"public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }",
"@Override\n public void drawValidMove() {\n if(this.getPlayer().getPlayerID() % 2 != 0) {\n //Pawn can move one space forwards if no piece is in front\n if (board.getSquare(x-1, y).getPiece()== null) {\n board.getSquare(x-1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x-2, y).getPiece() == null && board.getSquare(x-1, y).getPiece() == null) {\n board.getSquare(x-2, y).drawOutline();\n }\n \n //If there is an enemy piece in the diagonal forward square of the pawn, the pawn can move (capture the piece)\n if (y-1 > 0) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y-1) != null && board.getSquare(x-1, y-1).getPiece() != null &&\n board.getSquare(x-1, y-1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x-1, y-1).drawOutline();\n }\n }\n \n if(y+1<SIZE) { //ensures no arrayoutofbounds error\n if (board.getSquare(x-1, y+1) != null && board.getSquare(x-1, y+1).getPiece() != null &&\n board.getSquare(x-1, y+1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x-1, y+1).drawOutline();\n }\n }\n \n System.out.println(\"\");\n //En passant\n if (y - 1 > 0) {\n \n System.out.println();\n if (board.getSquare(x, y-1).getPiece() != null) { \n System.out.println(\"the piece's enPassant is: \" + board.getSquare(x, y-1).getPiece().getEnPassant());\n System.out.println(\"The game's turn counter is: \" + board.getTurnCounter());\n }\n else {\n System.out.println(\"Null piece when checking for en passent.\");\n }\n \n if (board.getSquare(x, y-1).getPiece() != null && board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y-1).drawOutline();\n board.getSquare(x-1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x-1, y+1).drawOutline();\n board.getSquare(x-1, y+1).setEnPassent(true);\n }\n }\n }\n \n //If this pawn belongs to player 2:\n else {\n \n if (board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+1, y).drawOutline();\n }\n \n //if first move, pawn can move 2 spaces forward\n if (!hasMoved && board.getSquare(x+2, y).getPiece() == null && board.getSquare(x+1, y).getPiece() == null) {\n board.getSquare(x+2, y).drawOutline();\n \n }\n \n if(y-1 > 0) {\n if (board.getSquare(x+1, y-1) != null && board.getSquare(x+1, y-1).getPiece() != null &&\n board.getSquare(x+1, y-1).getPiece().getPlayer() != this.getPlayer() ) {\n board.getSquare(x+1, y-1).drawOutline();\n }\n }\n \n if(y+1 < SIZE) {\n if (board.getSquare(x+1, y+1) != null && board.getSquare(x+1, y+1).getPiece() != null &&\n board.getSquare(x+1, y+1).getPiece().getPlayer() != this.getPlayer()) {\n board.getSquare(x+1, y+1).drawOutline();\n }\n }\n \n //En passant\n if (y - 1 > 0) {\n if (board.getSquare(x, y-1).getPiece() != null &&board.getSquare(x, y-1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y-1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y-1).drawOutline();\n board.getSquare(x+1, y-1).setEnPassent(true);\n }\n }\n \n if (y + 1 < SIZE) {\n if (board.getSquare(x, y+1).getPiece() != null && board.getSquare(x, y+1).getPiece().getPlayer() != this.player &&\n board.getSquare(x, y+1).getPiece().getEnPassant() == board.getTurnCounter() - 1) {\n board.getSquare(x+1, y+1).drawOutline();\n board.getSquare(x+1, y+1).setEnPassent(true);\n }\n }\n }\n }",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\t\t\t\t\t\t\t\t\t// If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from http://docs.oracle.com/javase/7/docs/api/java/awt/Container.html#paint(java.awt.Graphics)\n\t\t\n\t\tif (newGame) newGoGame();\t\t\t\t\t\t// if new go game: setup goBoard array, goHistory, black player first\n\t\tif (checkWin) \t\t\t\t\t\t\t\t\t// if checkWin is true - check to see if the last move was a win\n\t\t\tif ((k=gameWin())!=0) {\n\t\t\t\tif (k==1)\n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"White player has won!\", \"Gomoku Winner\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\telse \n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"Black player has won!\", \"Gomoku Winner\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tnewGoGame();\n\t\t\t}\n\t\t\n\t\t// Draw Background Image, depending on the index of bgNum\n\t\tg.drawImage(imgBackground[bgNum], 0, 54, Color.BLACK, null); // 44\n\t\t\n\t\t// Draw Grid\n\t\tg.setColor(Color.BLACK);\n\t\tfor (i=0; i<525; i+=35) {\t\t\t\t\t\t// 15x15 grid - 35 pixels per side - offset by 75 pixels on x, 75 pixels on y\n\t\t\tg.drawLine(75, 75+i, 565, 75+i);\t\t// draws horizontal lines\n\t\t\tg.drawLine(75+i, 75+0, 75+i, 565); \t// draws vertical lines\n\t\t} // end loop for drawing lines\n\t\t\n\t\t// draw pieces on board\n\t\tfor (i=0; i<15; ++i) {\n\t\t\tfor (j=0; j<15; ++j) {\n\t\t\t\tif ((k=goBoard[i][j])!=0) {\n\t\t\t\t\tif (k==1) { g.setColor(Color.WHITE); g.fillOval(61+(i*35),62+(j*35),30,30); }\n\t\t\t\t\telse { g.setColor(Color.BLACK); g.fillOval(61+(i*35),62+(j*35),30,30); }\n\t\t\t\t} // end if goBoard\n\t\t\t} // end j - inner loop for drawing game pieces\n\t\t} // end i - outer loop for drawing game pieces\n\n\t\t\n\t\t// To Do list\n\t\t// Check move - 5 in a row - (not with stack, but with int Array)\n\n\t\t\n\t}",
"public void paintComponent(Graphics g) {\r\n\t\t((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\tg.setColor(Color.WHITE);\r\n\t\tg.clearRect(0, 0, getWidth(), getHeight());\r\n\t\t\r\n\t\t//Drawn the board\r\n\t\tfor (int i = 0; i < 17; i++) {\r\n\t\t\tfor (int j = 0; j < 17; j++) {\r\n\t\t\t\tif (board[i][j] != -1) {\r\n\t\t\t\t\tint x = (int) (getWidth() / 2 - WIDTH / 2 + 4 * SPACE / 2 - DIAMETER / 2) + (j * SPACE - i * SPACE / 2);\r\n\t\t\t\t\tint y = (int) ((getHeight() / 2 - HEIGHT / 2) + (i * SPACE * Math.sqrt(3) / 2));\r\n\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\tg.fillOval(x - BORDER, y - BORDER, DIAMETER + 2 * BORDER, DIAMETER + 2 * BORDER);\r\n\t\t\t\t\t// 0 = empty position\r\n\t\t\t\t\tif (board[i][j] == 0)\r\n\t\t\t\t\t\tg.setColor(Color.LIGHT_GRAY);\r\n\t\t\t\t\t// 1-6 player positions\r\n\t\t\t\t\telse if (board[i][j] == 1)\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\telse if (board[i][j] == 2)\r\n\t\t\t\t\t\tg.setColor(Color.ORANGE);\r\n\t\t\t\t\telse if (board[i][j] == 3)\r\n\t\t\t\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\t\t\telse if (board[i][j] == 4)\r\n\t\t\t\t\t\tg.setColor(Color.GREEN);\r\n\t\t\t\t\telse if (board[i][j] == 5)\r\n\t\t\t\t\t\tg.setColor(Color.BLUE);\r\n\t\t\t\t\telse if (board[i][j] == 6)\r\n\t\t\t\t\t\tg.setColor(Color.MAGENTA.darker());\r\n\t\t\t\t\tg.fillOval(x, y, DIAMETER, DIAMETER);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Display the current player\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.PLAIN, 32));\r\n\t\tg.drawString(\"Current player: \" + (turn), 5, 36);\r\n\t\tg.drawString(\"Total Turns: \" + (totalTurn), 5, 76);\r\n\t}",
"public void paint(Graphics graphics){\n\n\t\tsetSize(BOARD_SIZE, BOARD_SIZE);\n\n\t\tint iWidth = getWidth();\n\t\tint iHeight = getHeight();\n\n\t\t// print the cells of the game board\n\t\tfor(int i = 0; i< BOARD_LENGTH; i+=2){\n\t\t\tfor(int j = 0; j<BOARD_LENGTH; j+=2){\n\n\t\t\t\tgraphics.setColor(BOARD_FIELD_COLOR);\n\t\t\t\tgraphics.fillRect(j * iWidth / BOARD_LENGTH, (1 + i) * iWidth / BOARD_LENGTH, iWidth / BOARD_LENGTH, iHeight / BOARD_LENGTH); \n\t\t\t\tgraphics.fillRect((1 + j) * iWidth / BOARD_LENGTH, i * iWidth / BOARD_LENGTH, iWidth / BOARD_LENGTH, iHeight / BOARD_LENGTH);\n\t\t\t}\n\t\t}\n\n\t\t// print the pieces on the gameboard\n\t\tfor(int i = 0; i<BOARD_NUM_PIECES; i++){\n\t\t\tpieces[i].getPosition().x = rowToX(pieces[i].getColumnRow().y);\n\t\t\tpieces[i].getPosition().y = colToY(pieces[i].getColumnRow().x);\n\t\t\tif (pieces[i].isVisible())\n\t\t\t\tgraphics.drawImage(\n\t\t\t\t\t\tpieces[i].getPieceIcon(), \n\t\t\t\t\t\tpieces[i].getPosition().x,\n\t\t\t\t\t\tpieces[i].getPosition().y, \n\t\t\t\t\t\tiWidth / BOARD_LENGTH, \n\t\t\t\t\t\tiHeight / BOARD_LENGTH, this);\n\n\t\t} \n\t\t// this is a square hightlighted\n\t\tif(this.okToMove){\n\t\t\tgraphics.setColor(Color.green.darker());\n\t\t\tgraphics.drawRect(pieces[pieceChosen].getPosition().x,\n\t\t\t\t\tpieces[pieceChosen].getPosition().y, BOARD_PIECE_LENGTH, BOARD_PIECE_LENGTH);\n\n\t\t\tgraphics.setColor(Color.green.brighter().brighter());\n\t\t\tgraphics.drawRect(pieces[pieceChosen].getPosition().x + 1,\n\t\t\t\t\tpieces[pieceChosen].getPosition().y + 1, BOARD_PIECE_LENGTH-2, BOARD_PIECE_LENGTH-2);\n\n\t\t\tgraphics.setColor(Color.green.darker());\n\t\t\tgraphics.drawRect(pieces[pieceChosen].getPosition().x + 2,\n\t\t\t\t\tpieces[pieceChosen].getPosition().y + 2, BOARD_PIECE_LENGTH-4, BOARD_PIECE_LENGTH-4);\n\n\t\t} \n\t}",
"@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }",
"public void paint(Graphics g) {\n int rad = 30;\n int x = border;\n int y = border;\n size = 400/n;\n\n for (int i = 0; i < n; i++) {\n y = i * size + border;\n for (int j = 0; j < n; j++) {\n x = j * size + border;\n int z = matrix[i][j].getColor();\n\n if (matrix[i][j].isClicked()) {\n setRectColor(g, z); \n }\n\n else {\n g.setColor(Color.white);\n }\n\n g.fillRect(x, y, size, size);\n g.setColor(Color.black);\n g.drawRect(x, y, size, size);\n\n if (matrix[i][j].isDot()) {\n setDotColor(g, z);\n drawCircle(g, x, y, rad);\n }\n }\n }\n\n if (isOver()==true) { //Draw win screen if entire board is filled\n g.setColor(Color.white);\n g.fillRect(70, 70, 300, 225);\n g.setColor(Color.black);\n g.drawRect(70, 70, 300, 225);\n \n youWin(g, 110, 160, game.getMoves());\n }\n\n\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tSystem.out.println(e.getX()/100 + \", \" + e.getY()/100);\r\n\t\tif (board[e.getX()/100][e.getY()/100].equals(Color.blue)) {\r\n\t\t\tif (turn%2 == 0) {\r\n\t\t\t\tboard[e.getX()/100][e.getY()/100] = Color.yellow;\r\n\t\t\t} else {\r\n\t\t\t\tboard[e.getX()/100][e.getY()/100] = Color.red;\r\n\t\t\t}\r\n\t\t\tturn++;\r\n\t\t\t\r\n\t\t\t//win condition\r\n\t\t\tif(board[0][0] == Color.yellow && board[0][1] == Color.yellow && board[0][2] == Color.yellow && board[0][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[1][0] == Color.yellow && board[1][1] == Color.yellow && board[1][2] == Color.yellow && board[1][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[2][0] == Color.yellow && board[2][1] == Color.yellow && board[2][2] == Color.yellow && board[2][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.yellow && board[1][0] == Color.yellow && board[2][0] == Color.yellow && board[3][0] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][1] == Color.yellow && board[1][1] == Color.yellow && board[2][1] == Color.yellow && board[3][1] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][2] == Color.yellow && board[1][2] == Color.yellow && board[2][2] == Color.yellow && board[3][2] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.yellow && board[1][1] == Color.yellow && board[2][2] == Color.yellow && board[3][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[3][0] == Color.yellow && board[1][2] == Color.yellow && board[2][1] == Color.yellow && board[0][3] == Color.yellow){\r\n\t\t\t\tboard[0][0] = Color.yellow;\r\n\t\t\t\tboard[0][1] = Color.yellow;\r\n\t\t\t\tboard[0][2] = Color.yellow;\r\n\t\t\t\tboard[0][3] = Color.yellow;\r\n\t\t\t\tboard[1][0] = Color.yellow;\r\n\t\t\t\tboard[1][1] = Color.yellow;\r\n\t\t\t\tboard[1][2] = Color.yellow;\r\n\t\t\t\tboard[1][3] = Color.yellow;\r\n\t\t\t\tboard[2][0] = Color.yellow;\r\n\t\t\t\tboard[2][1] = Color.yellow;\r\n\t\t\t\tboard[2][2] = Color.yellow;\r\n\t\t\t\tboard[2][3] = Color.yellow;\r\n\t\t\t\tboard[3][0] = Color.yellow;\r\n\t\t\t\tboard[3][1] = Color.yellow;\r\n\t\t\t\tboard[3][2] = Color.yellow;\r\n\t\t\t\tboard[3][3] = Color.yellow;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[0][1] == Color.red && board[0][2] == Color.red && board[0][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[1][0] == Color.red && board[1][1] == Color.red && board[1][2] == Color.red && board[1][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[2][0] == Color.red && board[2][1] == Color.red && board[2][2] == Color.red && board[2][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[1][0] == Color.red && board[2][0] == Color.red && board[3][0] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][1] == Color.red && board[1][1] == Color.red && board[2][1] == Color.red && board[3][1] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][2] == Color.red && board[1][2] == Color.red && board[2][2] == Color.red && board[3][2] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[0][0] == Color.red && board[1][1] == Color.red && board[2][2] == Color.red && board[3][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(board[3][0] == Color.red && board[1][2] == Color.red && board[2][1] == Color.red && board[0][3] == Color.red){\r\n\t\t\t\tboard[0][0] = Color.red;\r\n\t\t\t\tboard[0][1] = Color.red;\r\n\t\t\t\tboard[0][2] = Color.red;\r\n\t\t\t\tboard[0][3] = Color.red;\r\n\t\t\t\tboard[1][0] = Color.red;\r\n\t\t\t\tboard[1][1] = Color.red;\r\n\t\t\t\tboard[1][2] = Color.red;\r\n\t\t\t\tboard[1][3] = Color.red;\r\n\t\t\t\tboard[2][0] = Color.red;\r\n\t\t\t\tboard[2][1] = Color.red;\r\n\t\t\t\tboard[2][2] = Color.red;\r\n\t\t\t\tboard[2][3] = Color.red;\r\n\t\t\t\tboard[3][0] = Color.red;\r\n\t\t\t\tboard[3][1] = Color.red;\r\n\t\t\t\tboard[3][2] = Color.red;\r\n\t\t\t\tboard[3][3] = Color.red;\r\n\t\t\t}\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"public void paint (Graphics g)\n {\n g.setColor(color);\n for(Point pellet : pellets)\n {\n g.fillOval(5+MunchGame.SEGMENT_SIZE*pellet.x+2,\n 15+MunchGame.SEGMENT_SIZE*pellet.y+2, \n MunchGame.SEGMENT_SIZE-4,\n MunchGame.SEGMENT_SIZE-4);\n }\n }",
"void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }",
"private void drawBoard(int N) {\n\t\tfor (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if ((i + j) % 2 == 0) StdDrawPlus.setPenColor(StdDrawPlus.GRAY);\n else StdDrawPlus.setPenColor(StdDrawPlus.BLACK);\n StdDrawPlus.filledSquare(i + .5, j + .5, .5);\n StdDrawPlus.setPenColor(StdDrawPlus.WHITE);\n }\n }\n\n if (hasSelected) {\n StdDrawPlus.setPenColor(StdDrawPlus.WHITE);\n \tStdDrawPlus.filledSquare(prevSelectedX + .5, prevSelectedY + .5, .5);\n }\n\n // Drawing pieces\n for (int x = 0; x < 8; x++) {\n \tfor (int y = 0; y < 8; y++) {\n \t\tPiece p = pieceAt(x, y);\n \t\tif (p != null) {\n\t \t\t\tif (p.isFire() && p.isShield() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-fire.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (p.isFire() && p.isBomb() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-fire.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (!p.isFire() && p.isBomb() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-water.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (!p.isFire() && p.isShield() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-water.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (!p.isFire() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-water.png\", 1, 1);\n\t \t\t\t}\n\t \t\t\telse if (p.isFire() && !p.isKing()) {\n\t \t\t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-fire.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (p.isFire() && p.isBomb() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (p.isFire() && p.isShield() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (p.isFire() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (!p.isFire() && p.isBomb() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/bomb-water-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (!p.isFire() && p.isShield() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/shield-fire-crowned.png\", 1, 1);\n\t \t\t}\n\t \t\telse if (!p.isFire() && p.isKing()) {\n\t \t\t\tStdDrawPlus.picture(x + .5, y + .5, \"img/pawn-water-crowned.png\", 1, 1);\n\t \t\t}\n\t \t}\n \t}\n }\n\t}",
"public void paintComponent(Graphics g)\r\n {\r\n super.paintComponent(g);\r\n g2 = (Graphics2D) g;\r\n this.setBackground(Color.black);\r\n\r\n this.addMouseListener(this);\r\n this.addMouseMotionListener(this);\r\n Image chPieces;\r\n chPieces = new ImageIcon(\"C:/Users/eolochr/Desktop/backup/own/code/Ch/ChessPieces.png\").getImage();\r\n for (int x = 0; x < 8; x++)\r\n {\r\n for (int y = 0; y < 8; y++)\r\n {\r\n if ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\r\n {\r\n g.setColor(Color.white);\r\n }\r\n else if ((x % 2 == 0 && y % 2 == 1) || (x % 2 == 1 && y % 2 == 0))\r\n {\r\n g.setColor(Color.gray);\r\n }\r\n else\r\n {}\r\n g.fillRect(sizeOfSquare * x, sizeOfSquare * y, sizeOfSquare, sizeOfSquare);\r\n\r\n g.drawString(y + \"\", 420, 24 + (sizeOfSquare * y));\r\n g.drawString(x + \"\", 24 + (sizeOfSquare * x), 420);\r\n }\r\n\r\n }\r\n\r\n for (int i = 0; i < 64; i++) //taken, not my logic\r\n {\r\n int j = -1, k = -1;\r\n switch (Movements.chessBoard[i / 8][i % 8])\r\n {\r\n\r\n case \"R\":\r\n j = 2;\r\n k = 0;\r\n break;\r\n case \"P\":\r\n j = 5;\r\n k = 0;\r\n break;\r\n case \"K\":\r\n j = 4;\r\n k = 0;\r\n break;\r\n case \"B\":\r\n j = 3;\r\n k = 0;\r\n break;\r\n case \"Q\":\r\n j = 1;\r\n k = 0;\r\n break;\r\n case \"A\":\r\n j = 0;\r\n k = 0;\r\n break;\r\n\r\n case \"p\":\r\n j = 5;\r\n k = 1;\r\n break;\r\n case \"r\":\r\n j = 2;\r\n k = 1;\r\n break;\r\n case \"k\":\r\n j = 4;\r\n k = 1;\r\n break;\r\n case \"b\":\r\n j = 3;\r\n k = 1;\r\n break;\r\n case \"q\":\r\n j = 1;\r\n k = 1;\r\n break;\r\n case \"a\":\r\n j = 0;\r\n k = 1;\r\n break;\r\n\r\n }\r\n if (j != -1 && k != -1)\r\n {\r\n g.drawImage(chPieces, (i % 8) * sizeOfSquare, (i / 8) * sizeOfSquare, (i % 8 + 1) * sizeOfSquare, (i / 8 + 1) * sizeOfSquare, j * 64, k * 64, (j + 1) * 64,\r\n (k + 1) * 64, this);\r\n }\r\n }\r\n g.setColor(Color.GREEN);\r\n\r\n if (Movements.turnC)\r\n {\r\n g.drawString(\"White turn\", 150, 440);\r\n }\r\n else\r\n {\r\n g.drawString(\"Black turn\", 150, 440);\r\n }\r\n\r\n if(movement.length() > 3)\r\n {\r\n g.drawString(\"Selected square: \" + movement.charAt(0) + movement.charAt(1), 120, 460);\r\n }\r\n\r\n\r\n if (Movements.checkC)\r\n {\r\n g.drawString(\"Check white\", 240, 440);\r\n }\r\n else if (Movements.checkL)\r\n {\r\n g.drawString(\"Check black\", 240, 440);\r\n }\r\n\r\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 }",
"private Pawn(Point location, Color color, int moves, boolean captureableEnPassant) {\n enPassantOk = captureableEnPassant;\n this.numMoves = moves;\n this.color = color;\n this.location = location;\n }",
"@Override\r\n\tpublic void getLegalMoves() {\r\n\t\tint pawnX = this.getX();\r\n\t\tint pawnY = this.getY();\r\n\t\tchar pawnColor = getColor();\r\n\t\tTile[][] chessBoard = SimpleChess.getChessBoard();\r\n\t\tcheckInFront(chessBoard,pawnX,pawnY,pawnColor);\r\n\t\tcheckDiagonal(chessBoard,pawnX,pawnY,pawnColor);\r\n\t}",
"private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }",
"@Override\n public void paintComponent(Graphics g){\n // Paint the well\n g.setColor(Color.DARK_GRAY);\n g.fillRoundRect(0, 0, 338, 546, 8, 8);\n\n for (int i = 1; i < 21; i++){\n for (int j = 1; j < 13; j++){\n g.setColor(Color.BLACK);\n g.fillRoundRect(26 * j - 13, 26 * i - 13, 25, 25, 2, 2);\n }\n }\n\n drawPiece(g);\n }",
"public void paintComponent(final Graphics the_graphics)\n {\n super.paintComponent(the_graphics);\n final Graphics2D g2d = (Graphics2D) the_graphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setFont(my_font);\n g2d.setColor(Color.WHITE);\n g2d.setStroke(new BasicStroke(STROKE_SIZE));\n g2d.drawString(PIECE_STRING, (getWidth() / (STROKE_SIZE * STROKE_SIZE)) - \n (PIECE_STRING.length() / STROKE_SIZE), (int) (getHeight() * LABEL_STARTING_Y));\n \n for (int y = Piece.NUMBER_OF_BLOCKS - 1; 0 <= y; y--) \n {\n for (int x = 0; x < Piece.NUMBER_OF_BLOCKS; x++) \n {\n for (int i = 0; i < Piece.NUMBER_OF_BLOCKS; i++) \n {\n final Point block = my_board.nextPiece().blocks()[i];\n if (block.x() == x && block.y() == y) \n {\n g2d.setColor(my_board.nextPiece().color());\n g2d.fill(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n g2d.setColor(Color.DARK_GRAY);\n g2d.draw(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n } \n }\n }\n }\n }",
"public void updateYellowPawn(int positionPawn, int i) {\r\n\t\tyellowpawns[i].setBounds(array[positionPawn].getX(), array[positionPawn].getY(), 40, 40);\r\n\t}",
"public void changeBoard(int columnnumber, int whoseTurn, Color color1, Color color2){ //changes the colour of the circles on the board\r\n \r\n if(whoseTurn==1){ \r\n if(erase>0){ //this if statement runs if a checker needs to be erased; (because AI was checking future game states)\r\n for(int i = 0; i<=5; i++){ //going from top to bottom to change the last entered checker\r\n if(arrayCircles[i][erase-1].getColor()==color1){\r\n arrayCircles[i][erase-1].setColor(Color.white); //removing the checker that was previously placed\r\n repaint();\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n for(int i = 5; i>=0; i--){\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){ //starting from row 5 (the bottom one) see if any of those within the column is null\r\n arrayCircles[i][columnnumber-1].setColor(color1); //if so, set that value to the colour of the player who inputted that columnnumber\r\n repaint(); //repainting the board so that it updates and is visible to viewers\r\n break; //break once the colour has been changed and a move has been made\r\n }\r\n }\r\n }\r\n }\r\n \r\n else if(whoseTurn==2){\r\n for(int i = 5; i>=0; i--){\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){ //if there is an open space, set its colour to the desired colour \r\n arrayCircles[i][columnnumber-1].setColor(color2);\r\n repaint();\r\n break;\r\n }\r\n }\r\n }\r\n \r\n else if(whoseTurn==3||whoseTurn==4){ //either the easyAI or the hardAI\r\n \r\n \r\n if(erase>0){ //this if statement erases the last placed coloured checker\r\n for(int i = 0; i<=5; i++){ //going from top to bottom to change the last entered checker to white\r\n if(arrayCircles[i][erase-1].getColor()==Color.magenta){\r\n arrayCircles[i][erase-1].setColor(Color.white); //sets it back to white\r\n repaint(); //repaints and breaks\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n for(int i = 5; i>=0; i--){ //setting the colour of the column to magenta (for the AI)\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){\r\n arrayCircles[i][columnnumber-1].setColor(color2);\r\n repaint();\r\n break;\r\n }\r\n }\r\n } \r\n }\r\n }",
"public PieceColor colorGoing()\n {\n if (turn%2==0)\n return PieceColor.WHITE;\n else return PieceColor.BLACK;\n }",
"private void enPassant(Board board, List<Move> moves) {\n int x = location.x;\n int y = location.y; \n \n if (this.color == Color.White && this.location.y == 3) {\n if(canCaptureEnPassant(board, new Point(x - 1, y)))\n moves.add(new Move(this, new Point(x - 1, y - 1),\n board.getPieceAt(new Point(x - 1, y))));\n if(canCaptureEnPassant(board, new Point(x + 1, y)))\n moves.add(new Move(this, new Point(x + 1, y - 1),\n board.getPieceAt(new Point(x + 1, y)))); \n }\n if (this.color == Color.Black && this.location.y == 4) {\n if(canCaptureEnPassant(board, new Point(x - 1, y)))\n moves.add(new Move(this, new Point(x - 1, y + 1),\n board.getPieceAt(new Point(x - 1, y))));\n if(canCaptureEnPassant(board, new Point(x + 1, y)))\n moves.add(new Move(this, new Point(x + 1, y + 1),\n board.getPieceAt(new Point(x + 1, y)))); \n }\n }",
"private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"public Pawn(Point location, Color color) {\n this.numMoves = 0;\n this.color = color;\n this.location = location;\n }",
"private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}",
"void changepos(MouseEvent e, pieces chessPiece) \n { \n for(int beta : chessPiece.movnum)\n { \n if (chessPiece.color == 0 && e.getSource()== panel[beta-1 ]&& chessPiece.select == true && Checkerboard.allWhitePositions.contains(beta-1) == false)\n {\n if(this.getPiece(beta-1) != null)\n { \n getPiece(beta-1).alive = false;\n \n \n \n panel[beta-1].removeAll();/*getPiece(beta-1).position = 64;*/\n }\n chessPiece.position = beta-1;\n chessPiece.movnum.clear();\n chessPiece.mov.clear();\n chessPiece.select = false;\n chessPiece.timesMoved++;\n whiteToPlay = false;\n }\n else if (chessPiece.color == 1 && e.getSource()== panel[beta-1 ]&& chessPiece.select == true && Checkerboard.allBlackPositions.contains(beta-1) == false)\n {\n if(this.getPiece(beta-1) != null)\n { \n getPiece(beta-1).alive = false; \n panel[beta-1].removeAll();/*getPiece(beta-1).position = 64;*/}\n chessPiece.position = beta-1;\n chessPiece.movnum.clear();\n chessPiece.mov.clear();\n chessPiece.select = false;\n chessPiece.timesMoved++;\n whiteToPlay = true;\n }\n }//for ends\n \n }",
"public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}",
"private void setValidMoves() {\n\t\tl.getValidMoves();\n\n\t\tif(l.upValid) {\t// Update upward movement\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\n\t\tif(l.leftValid) {\t// Update leftward movement\n\t\t\ttmp=layout_Circle[l.y][l.x-1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\n\t\tif(l.rightValid) {\t// Update rightward movement\n\t\t\ttmp=layout_Circle[l.y][l.x+1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\t}",
"public void reset() {\n // White Pieces\n placePiece(new Rook(Player.White), new Position(\"a1\"));\n placePiece(new Knight(Player.White), new Position(\"b1\"));\n placePiece(new Bishop(Player.White), new Position(\"c1\"));\n placePiece(new Queen(Player.White), new Position(\"d1\"));\n placePiece(new King(Player.White), new Position(\"e1\"));\n placePiece(new Bishop(Player.White), new Position(\"f1\"));\n placePiece(new Knight(Player.White), new Position(\"g1\"));\n placePiece(new Rook(Player.White), new Position(\"h1\"));\n placePiece(new Pawn(Player.White), new Position(\"a2\"));\n placePiece(new Pawn(Player.White), new Position(\"b2\"));\n placePiece(new Pawn(Player.White), new Position(\"c2\"));\n placePiece(new Pawn(Player.White), new Position(\"d2\"));\n placePiece(new Pawn(Player.White), new Position(\"e2\"));\n placePiece(new Pawn(Player.White), new Position(\"f2\"));\n placePiece(new Pawn(Player.White), new Position(\"g2\"));\n placePiece(new Pawn(Player.White), new Position(\"h2\"));\n\n // Black Pieces\n placePiece(new Rook(Player.Black), new Position(\"a8\"));\n placePiece(new Knight(Player.Black), new Position(\"b8\"));\n placePiece(new Bishop(Player.Black), new Position(\"c8\"));\n placePiece(new Queen(Player.Black), new Position(\"d8\"));\n placePiece(new King(Player.Black), new Position(\"e8\"));\n placePiece(new Bishop(Player.Black), new Position(\"f8\"));\n placePiece(new Knight(Player.Black), new Position(\"g8\"));\n placePiece(new Rook(Player.Black), new Position(\"h8\"));\n placePiece(new Pawn(Player.Black), new Position(\"a7\"));\n placePiece(new Pawn(Player.Black), new Position(\"b7\"));\n placePiece(new Pawn(Player.Black), new Position(\"c7\"));\n placePiece(new Pawn(Player.Black), new Position(\"d7\"));\n placePiece(new Pawn(Player.Black), new Position(\"e7\"));\n placePiece(new Pawn(Player.Black), new Position(\"f7\"));\n placePiece(new Pawn(Player.Black), new Position(\"g7\"));\n placePiece(new Pawn(Player.Black), new Position(\"h7\"));\n }",
"public void mousePressed(MouseEvent e){\r\n\t //reset the label\r\n\t if(isBlack) label.setText(\"\t\tWhite's Turn\");\r\n\t else label.setText(\"\t\tBlack's Turn\");\r\n\t \r\n //Do nothing when game is over\r\n if(gameOver) return;\r\n \r\n String colorName=isBlack?\"Black\":\"White\";\r\n\r\n //Convert coordinate to index \r\n xIndex=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n yIndex=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n\r\n //Do nothing when outside the board\r\n if(xIndex<0||xIndex>ROWS||yIndex<0||yIndex>COLS)\r\n return;\r\n\r\n //Do nothing when current position already occupied\r\n if(findChess(xIndex,yIndex))return;\r\n\r\n //if valid, Draw a new chess at current position and add index to the chessList \r\n Point ch=new Point(xIndex,yIndex,isBlack?Color.black:Color.white);\r\n chessList[chessCount++]=ch;\r\n repaint();//run paintComponent\r\n\r\n\r\n //if someone wins, give a message\r\n if(isWin()){\r\n String msg=String.format(\"Congratulations��%s won��\", colorName); \r\n JOptionPane.showMessageDialog(this, msg);\r\n gameOver=true;\r\n }\r\n isBlack=!isBlack;\r\n }",
"protected abstract void paintBoard() throws TilePixelOutOfRangeException;",
"private void drawGame() {\r\n //For each each cell of the grid if there is a snake draw green,\r\n //an apple draw red or nothing draw white.\r\n for (int x = 0; x < gridWidth; x++) {\r\n for (int y = 0; y < gridHeight; y++) {\r\n if (isSnakeAt(new Coordinates(x, y))) {\r\n drawCell(x, y, Color.GREEN);\r\n } else if (apple.equals(new Coordinates(x, y))) {\r\n drawCell(x, y, Color.RED);\r\n } else {\r\n drawCell(x, y, Color.WHITE);\r\n }\r\n }\r\n }\r\n //Draw a grid around the game grid\r\n gc.strokeRect(0, 0, gridWidth * cellSize, gridHeight * cellSize); \r\n }",
"public void initiateBoardSecondaryColors(){\n\t\tremoveAllSeconderyColorsFromBoard();\n\t\tColoredTilesFactory coloredTilesFactory = new ColoredTilesFactory();\n\t\t// add 3 yellow tiles\n\t\tfor(int i=0 ; i<YELLOW_TILES_AMOUNT;i++) {\n\t\t\tTile randTile=null;\n\t\t\tdo {\n\t\t\t\trandTile= getRandomFreeTile();\n\t\t\t}while(coloredTilesList.contains(randTile));\n\t\t\tYellowTile yTile= (YellowTile) coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.YELLOW);\n\t\t\treplaceTileInSameTileLocation(yTile);\n\t\t\tcoloredTilesList.add(yTile);\n\n\t\t}\n\n\n\t\t//add red tiles\n\t\tif(canAddRedTile() && isThereLegalTilesNotColored()){\n\t\t\tArrayList<Tile> possibleRed=getPossibleRedTiles();\n\t\t\tTile randTile=null;\n\t\t\tif(possibleRed.size() > 0) {\n\t\t\t\tRandom rand=new Random();\n\t\t\t\tdo {\n\t\t\t\t\tint tempp = rand.nextInt(possibleRed.size());\n\t\t\t\t\trandTile= possibleRed.get(tempp);\n\t\t\t\t\tpossibleRed.remove(tempp);\n\t\t\t\t}while(coloredTilesList.contains(randTile) && !possibleRed.isEmpty());\n\t\t\t\tTile rTile =coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.RED);\n\t\t\t\treplaceTileInSameTileLocation(rTile);\n\t\t\t\tcoloredTilesList.add(rTile);\n\t\t\t}\n\t\t}\n\n\n\t\t// add blue tiles\n\t\tif(canAddBlueTile()){\n\n\t\t\tTile randTile=null;\n\t\t\tdo {\n\t\t\t\trandTile = getRandomFreeTile();\n\t\t\t}while(coloredTilesList.contains(randTile));\n\t\t\tBlueTile bTile =(BlueTile)coloredTilesFactory.getColoredTile(randTile, SeconderyTileColor.BLUE);\n\t\t\treplaceTileInSameTileLocation(bTile);\n\t\t\tcoloredTilesList.add(bTile);\n\t\t}\n\n\t}",
"public void paint() {\n for (int row = 0; row < ROWS; ++row) {\n for (int col = 0; col < COLS; ++col) {\n cells[row][col].paint();\n if (col < COLS - 1) System.out.print(\"|\");\n }\n System.out.println();\n if (row < ROWS - 1) {\n System.out.println(\"-----------\");\n }\n }\n }",
"@Override\r\n\t\tpublic void paintComponent(Graphics g) {\r\n\r\n\t\t\tsuper.paintComponent(g); // Fills the background color.\r\n\r\n\t\t\tg.setColor(Color.DARK_GRAY);\r\n\t\t\tg.fillRect(10, 10, columns * squareSize + 1, rows * squareSize + 1);\r\n\r\n\t\t\tfor (int r = 0; r < rows; r++) {\r\n\t\t\t\tfor (int c = 0; c < columns; c++) {\r\n\t\t\t\t\tif (grid[r][c] == EMPTY) {\r\n\t\t\t\t\t\tg.setColor(Color.WHITE);\r\n\t\t\t\t\t} else if (grid[r][c] == ROBOT) {\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t} else if (grid[r][c] == TARGET) {\r\n\t\t\t\t\t\tg.setColor(Color.GREEN);\r\n\t\t\t\t\t} else if (grid[r][c] == OBST) {\r\n\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t} else if (grid[r][c] == FRONTIER) {\r\n\t\t\t\t\t\tg.setColor(Color.BLUE);\r\n\t\t\t\t\t} else if (grid[r][c] == CLOSED) {\r\n\t\t\t\t\t\tg.setColor(Color.CYAN);\r\n\t\t\t\t\t} else if (grid[r][c] == ROUTE) {\r\n\t\t\t\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tg.fillRect(11 + c * squareSize, 11 + r * squareSize, squareSize - 1, squareSize - 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (drawArrows.isSelected()) {\r\n\t\t\t\t// We draw all arrows from each open or closed state\r\n\t\t\t\t// to its predecessor.\r\n\t\t\t\tfor (int r = 0; r < rows; r++) {\r\n\t\t\t\t\tfor (int c = 0; c < columns; c++) {\r\n\t\t\t\t\t\t// If the current cell is the goal and the solution has\r\n\t\t\t\t\t\t// been found,\r\n\t\t\t\t\t\t// or belongs in the route to the target,\r\n\t\t\t\t\t\t// or is an open state,\r\n\t\t\t\t\t\t// or is a closed state but not the initial position of\r\n\t\t\t\t\t\t// the robot\r\n\t\t\t\t\t\tif ((grid[r][c] == TARGET && found) || grid[r][c] == ROUTE || grid[r][c] == FRONTIER\r\n\t\t\t\t\t\t\t\t|| (grid[r][c] == CLOSED && !(r == robotStart.row && c == robotStart.col))) {\r\n\t\t\t\t\t\t\t// The tail of the arrow is the current cell, while\r\n\t\t\t\t\t\t\t// the arrowhead is the predecessor cell.\r\n\t\t\t\t\t\t\tCell head;\r\n\t\t\t\t\t\t\tif (grid[r][c] == FRONTIER) {\r\n\t\t\t\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\t\t\t\thead = findPrev(graph, new Cell(r, c));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\thead = findPrev(openSet, new Cell(r, c));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\thead = findPrev(closedSet, new Cell(r, c));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// The coordinates of the center of the current cell\r\n\t\t\t\t\t\t\tint tailX = 11 + c * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\tint tailY = 11 + r * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\t// The coordinates of the center of the predecessor\r\n\t\t\t\t\t\t\t// cell\r\n\t\t\t\t\t\t\tint headX = 11 + head.col * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\tint headY = 11 + head.row * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\t// If the current cell is the target\r\n\t\t\t\t\t\t\t// or belongs to the path to the target ...\r\n\t\t\t\t\t\t\tif (grid[r][c] == TARGET || grid[r][c] == ROUTE) {\r\n\t\t\t\t\t\t\t\t// ... draw a red arrow directing to the target.\r\n\t\t\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t\t\t\tdrawArrow(g, tailX, tailY, headX, headY);\r\n\t\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... draw a black arrow to the predecessor\r\n\t\t\t\t\t\t\t\t// cell.\r\n\t\t\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\t\t\tdrawArrow(g, headX, headY, tailX, tailY);\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}",
"private void makeMove(){\r\n\t\tif(cornerColorIs(GREEN)){\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(noBeepersPresent()){\r\n\t\t\t\tmove();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tif(()) {\r\n//\t\t if(cornerColorIs(GREEN)) {\r\n//\t\t move();\r\n//\t\t paintCorner(GREEN);\r\n//\t\t } else {\r\n//\t\t move();\r\n//\t\t paintCorner(RED);\r\n//\t\t }\r\n//\t\t}noBeepersPresent\r\n\t}",
"public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}",
"public Pawn(int x, int y, String ID, String color) {\n\t\tsuper(x,y,ID);\n\t\tif (color == \"white\") {\n\t\t\txrange = -2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 1;\n\t\t}\n\t\tif (color == \"black\") {\n\t\t\txrange = 2;\n\t\t\tyrange = 1;\n\t\t\tthis.color = 0;\n\t\t}\n\t\tfirstMove = true;\n\t}",
"public void draw()\n\t{\n\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t\n\t\tfor (int i = 0; i < board_size; i++)\n\t\t{\n\t\t\tSystem.out.print(board_size - i + \" |\");\n\t\t\t\n\t\t\tfor (int j = 0; j < board_size; j++)\n\t\t\t{\n\t\t\t\tif (getPiece(i,j) == null) {System.out.print(\" |\");}\n\t\t\t\telse {System.out.print(\" \" + getPiece(i,j).getSymbol().toChar() + \" |\");}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" A B C D E F G H \\n\");\n\t}",
"public Pawn(String color){\r\n this.color=color; \r\n }",
"public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}",
"@Override\r\n protected void paintComponent(Graphics g) {\n paintWater(g);\r\n \r\n g.setColor(new Color(255, 255, 255, 70));\r\n g.fillRect(0, 0, 500, 500);\r\n \r\n \r\n // Paint the Grid ------------------------------------------\r\n g.setColor(Color.BLACK);\r\n \r\n for (int i = -1; i < 500; i += 50) {\r\n \r\n g.fillRect(i, 0, 2, 500);\r\n g.fillRect(0, i, 500, 2);\r\n \r\n }\r\n \r\n paintShips(g);\r\n paintHits(g);\r\n \r\n \r\n if (isPainted && shortBoard == ATTACK_BOARD && newGD.isMyTurn() && !missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, mouseX, mouseY, null);\r\n }\r\n \r\n if (shortBoard == ATTACK_BOARD && newGD.isMyTurn() && missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, missile.getPosition().x, missile.getPosition().y, null);\r\n }\r\n \r\n // Paint square under mouse pointer (also for testing)\r\n /*if (isPainted) {\r\n \r\n g.setColor(colorSquare);\r\n g.fillRect(mouseX, mouseY, 50, 50);\r\n \r\n }*/\r\n \r\n }",
"public final void initialPosition() {\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.RED, Type.PAWN), new PositionImpl( 38 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.BLACK, Type.PAWN), new PositionImpl( 12 + i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.YELLOW, Type.PAWN), new PositionImpl( 1 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.GREEN, Type.PAWN), new PositionImpl( 48 + i));\n\t\t}\n\t\t\n\t\tsetPiece( new PieceImpl( Color.RED, Type.BOAT), new PositionImpl( 63 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KNIGHT), new PositionImpl( 55 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.ELEPHANT), new PositionImpl( 47 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KING), new PositionImpl( 39 ));\n\t\t\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.BOAT), new PositionImpl( 7 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KNIGHT), new PositionImpl( 6 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.ELEPHANT), new PositionImpl( 5 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KING), new PositionImpl( 4 ));\n\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.BOAT), new PositionImpl( 0 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KNIGHT), new PositionImpl( 8 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.ELEPHANT), new PositionImpl( 16 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KING), new PositionImpl( 24 ));\n\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.BOAT), new PositionImpl( 56 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KNIGHT), new PositionImpl( 57 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.ELEPHANT), new PositionImpl( 58 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KING), new PositionImpl( 59 ));\n\t\t\n }",
"private void revealTiles() {\n\n for (int i = 0; i < minefield.getRows(); i++) {\n for (int j = 0; j < minefield.getCols(); j++) {\n if (minefield.getMinefield()[i][j].isRevealed()\n && !minefield.getMinefield()[i][j].isMined()) {\n tileLabel[i][j].setText(\"<html><b>\" + minefield.getMinefield()[i][j].getMinedNeighbours() + \"</html></b>\");\n tile[i][j].setBackground(new Color(208, 237, 243));\n switch (tileLabel[i][j].getText()) {\n case \"<html><b>0</html></b>\":\n tileLabel[i][j].setText(\"\");\n break;\n case \"<html><b>1</html></b>\":\n tileLabel[i][j].setForeground(Color.blue);\n break;\n case \"<html><b>2</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 100, 0));\n break;\n case \"<html><b>3</html></b>\":\n tileLabel[i][j].setForeground(Color.red);\n break;\n case \"<html><b>4</html></b>\":\n tileLabel[i][j].setForeground(new Color(75, 0, 130));\n break;\n case \"<html><b>5</html></b>\":\n tileLabel[i][j].setForeground(new Color(130, 0, 0));\n break;\n case \"<html><b>6</html></b>\":\n tileLabel[i][j].setForeground(new Color(0, 153, 153));\n break;\n case \"<html><b>7</html></b>\":\n tileLabel[i][j].setForeground(Color.black);\n break;\n case \"<html><b>8</html></b>\":\n tileLabel[i][j].setForeground(Color.darkGray);\n break;\n }\n }\n }\n }\n frame.repaint();\n }",
"public void refreshDisplay(){\r\n for (int i = 0; i < 6; i++) {\r\n for (int j = 0; j < 7; j++) {\r\n switch (boardRep[i][j]) { //maybe not best style to have default red but whatever (change board\r\n case 0:\r\n boardSquares[i][j].setBackground(Color.WHITE);\r\n break;\r\n case 1:\r\n boardSquares[i][j].setBackground(Color.BLACK);\r\n break;\r\n default:\r\n boardSquares[i][j].setBackground(Color.RED);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n if (blackToPlay){ //change to move squares\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.BLACK);\r\n }\r\n } else{\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.RED);\r\n }\r\n }\r\n \r\n \r\n }",
"public void paint(Graphics g) {\n\n super.paint(g);\n \n //Fill the board with black if 0, red if 1\n for(int x = 0; x < gameBoard.length; x++) {\n for (int y = 0; y < gameBoard[0].length; y++) {\n \n //Draw red\n if (gameBoard[x][y] == 1) {\n\n g.setColor(Color.BLACK);\n g.fillRect(x*24, y*24, 24, 24);\n g.setColor(Color.RED);\n g.fillRect(x*24+1, y*24+1, 22, 22);\n\n //Draw black\n } else {\n\n g.setColor(Color.BLACK);\n g.fillRect(x*24, y*24, 24, 24);\n }\n }\n } \n }",
"interface Cnst {\r\n\r\n /////////////////////////////////////////////////////////////\r\n // These constants can be changed to edit the big bang ran //\r\n /////////////////////////////////////////////////////////////\r\n\r\n //full size is eight, scales the size of the board\r\n int scale = 8;\r\n\r\n //numbers of blocks in a row and a column\r\n int blocks = 10;\r\n\r\n //number of colors the game will use, between 2-8 inclusive\r\n int numOfColors = 8;\r\n\r\n //the number of turns you have to win the game\r\n int maxTurns = 25;\r\n\r\n\r\n ////////////////////////////////////////\r\n // Please do not edit these constants //\r\n ////////////////////////////////////////\r\n\r\n //the visible board width, scales with scale\r\n int boardWidth = 70 * scale;\r\n\r\n //the visible board height, scales with scale\r\n int boardHeight = 70 * scale;\r\n\r\n //cell width scales with the board and scale\r\n int cellWidth = boardWidth / blocks;\r\n\r\n //cell height scales with board and scale\r\n int cellHeight = boardHeight / blocks;\r\n\r\n //new constant for text on the board\r\n int textHeight = boardWidth / 12;\r\n\r\n //the 8 colors that can be selected by the user\r\n ArrayList<Color> colorsToChoose =\r\n new ArrayList<Color>(Arrays.asList(\r\n Color.CYAN, Color.PINK, Color.ORANGE,\r\n Color.BLUE, Color.RED, Color.GREEN,\r\n Color.MAGENTA, Color.YELLOW));\r\n}",
"public void changeColourSquare(int i) {\n //determines the y-index of the move, set to 0 as a default\n int colourPlace = 0;\n //searches from the top (bottom of the display) down to 0 (the top of the display)\n for (int y = currentBoard.getSizeY() - 1; y >= 0; y--) {\n //saves y + 1 to colourPlace ( + 1 offset is due to using a board where the \n //move at int i was made before this function call) when the piece is 0 and exits the loop\n if (currentBoard.getBoardValue(i, y) == 0) {\n colourPlace = y + 1;\n y = -1;\n }\n }\n\n //determines which colour to use based on the value of turn\n if (turn) {\n squares[i][colourPlace].setBackground(Color.red);\n } else {\n squares[i][colourPlace].setBackground(Color.blue);\n }\n\n }",
"@Override\r\n\tpublic void placePiece(JumpInButton[][] square) {\r\n\t\tsquare[this.x][this.y].setBackground(Color.RED);\r\n\t}",
"void processNextMove(List<Coordinates> moves, Ball color);",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\t\t\t//This if statement isolates all conditions in which a square would appear white\n\t\t\t//(and one condition which would make it red). \n if (revealed || (gameLost && ((mine && !flagged) || (!mine && flagged))))\n {\n setBackground(Color.WHITE);\n if (mine || flagged) //All conditions which would show a mine icon.\n {\t\t\t\t\t\t\t//Any flagged square that fit the first if statement must be a falsely flagged\n if (revealed)\t\t//non-mine after the game is lost, so it does fit this category.\n {\n setBackground(Color.RED); //Just for the specific mine that was clicked on to lose the game.\n }\n g.fillOval(SHIFT - 1, SHIFT - 1, \n SQUARE_SIZE - 2*SHIFT + 1, SQUARE_SIZE - 2*SHIFT + 1);\n g.drawLine(SQUARE_SIZE/2, 0, SQUARE_SIZE/2, SQUARE_SIZE);\n g.drawLine(0, SQUARE_SIZE/2, SQUARE_SIZE, SQUARE_SIZE/2);\n g.drawLine(SHIFT, SQUARE_SIZE - SHIFT - 1, SQUARE_SIZE - SHIFT - 1, SHIFT);\n g.drawLine(SHIFT, SHIFT, SQUARE_SIZE - SHIFT - 1, SQUARE_SIZE - SHIFT - 1);\n g.setColor(Color.WHITE);\n g.fillRect(GLARE_LOC, GLARE_LOC, GLARE_SIZE, GLARE_SIZE);\n if (flagged) //Just mistakenly flagged non-mines after the game is lost.\n {\n g.setColor(Color.RED);\n g.drawLine(0, 0, SQUARE_SIZE, SQUARE_SIZE);\n g.drawLine(1, 0, SQUARE_SIZE, SQUARE_SIZE - 1);\n g.drawLine(0, 1, SQUARE_SIZE - 1, SQUARE_SIZE);\n g.drawLine(0, SQUARE_SIZE - 1, SQUARE_SIZE - 1, 0);\n g.drawLine(1, SQUARE_SIZE - 1, SQUARE_SIZE - 1, 1);\n g.drawLine(0, SQUARE_SIZE - 2, SQUARE_SIZE - 2, 0);\n }\n }\n else //Revealed non-mines\n {\n if (adjacentMines != 0)\n {\n g.setColor(COLORS[adjacentMines - 1]);\n Font f = g.getFont();\n g.setFont(new Font(f.getName(), Font.BOLD, f.getSize()));\n g.drawString(\"\" + adjacentMines, \n \t\tSHIFT, SQUARE_SIZE - SHIFT);\n }\n }\n }\n else //Unrevealed\n {\n setBackground(Color.GREEN);\n if (flagged)\n {\n g.fillPolygon(FLAG_BASE_X, FLAG_BASE_Y, FLAG_BASE_X.length);\n g.drawLine(FLAG_BASE_X[2], FLAG_BASE_Y[2], \n \t\tFLAG_BASE_X[2], FLAG_BASE_Y[2] - POLE_LENGTH);\n g.setColor(Color.RED);\n g.fillPolygon(FLAG_X, FLAG_Y, FLAG_X.length);\n }\n }\n }",
"public void lightMove() {\n movePawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void act()\n {\n if(canMove() && turns == 0)\n {\n move();\n }\n else if(!canMove() && turns == 0)\n {\n turns++;\n }\n else if(turns == 1 || turns == 9)\n {\n turn();\n setColor(Color.BLUE);\n turns++;\n }\n else if(turns == 2 || turns == 10)\n {\n turn();\n setColor(Color.RED);\n turns++;\n }\n else if(turns == 3 || turns == 11)\n {\n turn();\n setColor(Color.GREEN);\n turns++;\n }\n else if(turns == 4 || turns == 12)\n {\n turn();\n setColor(Color.YELLOW);\n turns++;\n }\n else if(turns == 5 || turns == 13)\n {\n turn();\n setColor(Color.ORANGE);\n turns++;\n }\n else if(turns == 6 || turns == 14)\n {\n turn();\n setColor(Color.CYAN);\n turns++;\n }\n else if(turns == 7 || turns == 15)\n {\n turn();\n setColor(Color.PINK);\n turns++;\n }\n else if(turns == 8)\n {\n turn();\n setColor(Color.MAGENTA);\n turns++;\n }\n else if(turns == 16 && corner == 1)\n {\n setDirection(315);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 2)\n {\n setDirection(45);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 3)\n {\n setDirection(135);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n else if(turns == 16 && corner == 4)\n {\n setDirection(225);\n setColor(Color.MAGENTA);\n turns = 0;\n }\n }",
"private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }",
"public void initializeDebugBoard() {\n\t\tboolean hasNotMoved = false;\n\t\tboolean hasMoved = true;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set empty rows\n\t\tfor (int row = 0; row < 8; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\tboard[5][4] = new Piece('k', white, hasMoved, 5, 4, PieceArray.E_kingId);\n//\t\tboard[1][4] = new Piece(\"rook\", white, hasMoved, 1, 4);\n\t\tboard[2][2] = new Piece('q', black, hasMoved, 2, 2, PieceArray.A_rookId);\n//\t\tboard[3][2] = new Piece('q', black, hasMoved, 3, 2, PieceArray.H_rookId);\n\t\t\n\n\t\tboard[0][0] = new Piece('k', black, hasMoved, 0, 0, PieceArray.E_kingId);\n//\t\tboard[7][7] = new Piece('r', black, hasNotMoved, 7, 7, PieceArray.A_rookId);\n//\t\tboard[6][7] = new Piece('p', black, hasNotMoved, 6, 7, PieceArray.A_pawnId);\n//\t\tboard[6][6] = new Piece('p', black, hasNotMoved, 6, 6, PieceArray.B_pawnId);\n//\t\tboard[6][5] = new Piece('p', black, hasNotMoved, 6, 5, PieceArray.C_pawnId);\n//\t\tboard[6][4] = new Piece('p', black, hasNotMoved, 6, 4, PieceArray.D_pawnId);\n\t\n//\t\tboard[6][6] = new Piece(\"pawn\", black, hasMoved, 6, 6);\n//\t\tboard[6][7] = new Piece(\"pawn\", black, hasMoved, 6, 7);\n//\t\tboard[6][4] = new Piece(\"pawn\", black, hasMoved, 6, 4);\n//\t\t\t\n//\t\t\n//\t\tboard[4][4] = new Piece(\"pawn\", black, hasMoved, 4,4);\n//\t\tboard[3][5] = new Piece(\"rook\", white,hasMoved,3,5);\n//\t\tboard[1][7] = new Piece(\"pawn\",black,hasMoved,1,7);\n\n\t}",
"@Override\n\tpublic void mousePressed(MouseEvent me) {\n\t\tint x = me.getX();\n\t\tint y = me.getY();\n\t\tx = (int)( (x-mrg_x+spc_x/2) / spc_x) + nWALL;\n\t\ty = (int)( (y-mrg_y+spc_y/2) / spc_y) + nWALL;\n\t\t\n\t\tif (isPlaying && arr[x][y] == NONE) {\n\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\n\t\t\tint t = (n+isWhiteWin+1) %2 ;\n\t\t\t\n\t\t\tif ( is33(x, y, (t%2==0)? WHITE:BLACK) ) {\n\t\t\t\t\n\t\t\t\tGraphics g = cvBoard.getGraphics();\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.drawOval((int) (mrg_x + (x-nWALL) * spc_x - spc_x/2) ,\n\t\t\t\t\t\t(int) (mrg_y + (y-nWALL) * spc_y -spc_y/2),\n\t\t\t\t\t\t(int) spc_x-1, (int) spc_y-1);\n\t\t\t\tg.fillOval((int) (mrg_x + (x-nWALL) * spc_x - spc_x/2) ,\n\t\t\t\t\t\t(int) (mrg_y + (y-nWALL) * spc_y -spc_y/2),\n\t\t\t\t\t\t(int) spc_x, (int) spc_y);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}",
"public int[][] getMovesWhitePawn(Pawn p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n if (!p.isDrawn()) { //Sjekker om brikken er brukt før.\n for (int i = (y - 1); i > (y - 3); i--) { //Brikken er brukt før, og sjekker om den kan plasseres\n if (b.getPieceAt(i, x) != null) {//på plassen ovenfor, for så å sjekke om 2 plasser ovenfor.\n break;//Setter plassene som lovlig trekk om den er trekt og om ingen står der fra før.\n } else {\n legalMoves[i][x] = 1;\n }\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y - 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y - 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y - 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y - 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), (x + 1)).isWhite()) {\n legalMoves[(y - 1)][(x + 1)] = 1;\n }\n }\n }\n } else {//Om brikken har blitt flyttet før. Da kan den bare gå et skritt rett fram, eller diagonalt en vei.\n if ((y - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n\n if (b.getPieceAt((y - 1), x) == null) { //Sjekker om plassen framfor er ledig.\n legalMoves[(y - 1)][x] = 1; //Setter plassen som lovlig trekk. Rett fram.\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y - 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y - 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y - 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y - 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), (x + 1)).isWhite()) {\n legalMoves[(y - 1)][(x + 1)] = 1;\n }\n }\n }\n }\n\n }\n return legalMoves;\n }",
"@Override\n public void paintComponent(Graphics g){\n super.paintComponent(g);\n if(ingame){\n\n int screenWidth = this.getWidth();\n int screenHeight = this.getHeight();\n\n\n for(int i = 0; i < end_positions.size(); i++){\n End_position item = end_positions.get(i);\n g.setColor(Color.green);\n g.fillRect(item.getDestinationX()*screenWidth/LEVEL_WIDTH,item.getDestinationY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n }\n\n g.setColor(Color.white);\n g.fillRect(player.getCurrentX()*screenWidth/LEVEL_WIDTH,player.getCurrentY()*screenHeight/LEVEL_HEIGHT,player.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,player.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n g.setColor(Color.yellow);\n g.fillRect(item.getCurrentX()*screenWidth/LEVEL_WIDTH,item.getCurrentY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n }\n for(int i = 0; i < walls.size(); i++){\n Wall item = walls.get(i);\n\n g.setColor(Color.red);\n g.fillRect(item.getDestinationX()*screenWidth/LEVEL_WIDTH,item.getDestinationY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n\n }\n\n }\n\n }",
"private void green(){\n\t\tthis.arretes_fG();\n\t\tthis.coins_fG();\n\t\tthis.coins_a1G();\n\t\tthis.coins_a2G();\n\t\tthis.aretes_aG();\n\t\tthis.cube[31] = \"G\";\n\t}",
"public static void drawBoard(){\n\t\tSystem.out.println(\"\\n\\t A B C\");\r\n\t\tSystem.out.println(\"\\t .-----------.\");\r\n\t\tSystem.out.println(\"\\t1 |_\"+TicTac.place[0]+\"_|_\"+TicTac.place[1]+\"_|_\"+TicTac.place[2]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t2 |_\"+TicTac.place[3]+\"_|_\"+TicTac.place[4]+\"_|_\"+TicTac.place[5]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t3 |_\"+TicTac.place[6]+\"_|_\"+TicTac.place[7]+\"_|_\"+TicTac.place[8]+\"_|\");\r\n\t\tSystem.out.println(\"\\t '-----------'\");\r\n\t}",
"public static void setBoard() {\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.filledCircle(200, 800, 35);\n\t\tStdDraw.filledCircle(500, 800, 35);\n\t\tStdDraw.filledCircle(800, 800, 35);\n\t\tStdDraw.filledCircle(200, 200, 35);\n\t\tStdDraw.filledCircle(500, 200, 35);\n\t\tStdDraw.filledCircle(800, 200, 35);\n\t\tStdDraw.filledCircle(200, 500, 35);\n\t\tStdDraw.filledCircle(800, 500, 35);\n\t\tStdDraw.filledCircle(350, 650, 35);\n\t\tStdDraw.filledCircle(500, 650, 35);\n\t\tStdDraw.filledCircle(650, 650, 35);\n\t\tStdDraw.filledCircle(350, 350, 35);\n\t\tStdDraw.filledCircle(500, 350, 35);\n\t\tStdDraw.filledCircle(650, 350, 35);\n\t\tStdDraw.filledCircle(350, 500, 35);\n\t\tStdDraw.filledCircle(650, 500, 35);\n\n\t\tStdDraw.setPenRadius(0.01);\n\t\tStdDraw.line(200, 200, 800, 200);\n\t\tStdDraw.line(200, 800, 800, 800);\n\t\tStdDraw.line(350, 350, 650, 350);\n\t\tStdDraw.line(350, 650, 650, 650);\n\t\tStdDraw.line(200, 500, 350, 500);\n\t\tStdDraw.line(650, 500, 800, 500);\n\t\tStdDraw.line(200, 800, 200, 200);\n\t\tStdDraw.line(800, 800, 800, 200);\n\t\tStdDraw.line(350, 650, 350, 350);\n\t\tStdDraw.line(650, 650, 650, 350);\n\t\tStdDraw.line(500, 800, 500, 650);\n\t\tStdDraw.line(500, 200, 500, 350);\n\n\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\tStdDraw.filledCircle(80, 200, 35);\n\t\tStdDraw.filledCircle(80, 300, 35);\n\t\tStdDraw.filledCircle(80, 400, 35);\n\t\tStdDraw.filledCircle(80, 500, 35);\n\t\tStdDraw.filledCircle(80, 600, 35);\n\t\tStdDraw.filledCircle(80, 700, 35);\n\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledCircle(920, 200, 35);\n\t\tStdDraw.filledCircle(920, 300, 35);\n\t\tStdDraw.filledCircle(920, 400, 35);\n\t\tStdDraw.filledCircle(920, 500, 35);\n\t\tStdDraw.filledCircle(920, 600, 35);\n\t\tStdDraw.filledCircle(920, 700, 35);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\n\t}",
"protected void paintMoves(Graphics2D g2d) {\r\n\t\tif (!parent.showMoves) return;\r\n\t\tArrayList<Pose> poses = model.getPoses();\r\n\t\tArrayList<Move> moves = model.getMoves();\r\n\t\t//parent.log(poses.size() + \" poses\");\r\n\t //parent.log(moves.size() + \" moves\");\r\n\t\tif (poses == null || poses.size() < 2) return;\r\n\t\tPose previousPose = null;\r\n\t\t\r\n\t\tg2d.setColor(colors[MOVE_COLOR_INDEX]);\r\n\t\tIterator<Move> iter = moves.iterator();\r\n\t\tfor(Pose pose: poses) {\t\r\n\t\t\tif (previousPose == null) previousPose = pose;\r\n\t\t\telse {\r\n\t\t\t\tMove move = iter.next();\r\n\t\t\t\tif (move.getMoveType() == Move.MoveType.ARC) {\r\n\t\t\t\t\t//parent.log(\"Move = \" + move);\r\n\t\t\t\t\tint radius = Math.round(move.getArcRadius());\r\n\t\t\t\t\tint diameter = radius*2;\r\n\t\t\t\t\tint startAngle = Math.round(previousPose.getHeading() - 90);\r\n\t\t\t\t\tint angleTurned = Math.round(move.getAngleTurned());\r\n \r\n\t\t\t\t\tif (radius < 0) {\r\n\t\t\t\t\t\tstartAngle -= 180;\r\n\t\t\t\t\t\tradius = -radius;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tint startX = (int) Math.round(previousPose.getX() - radius - radius*Math.cos(Math.toRadians(startAngle)));\r\n\t\t\t\t\tint startY = (int) Math.round(previousPose.getY() + radius - radius*Math.sin(Math.toRadians(startAngle)));\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (angleTurned < 0) {\r\n\t\t\t\t\t\tstartAngle += angleTurned;\r\n\t\t\t\t\t\tangleTurned =- angleTurned;\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\tdiameter = Math.abs(diameter);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//parent.log(\"Drawing arc:\" + startX + \",\" + startY + \",\" + diameter + \",\" + diameter + \",\" + startAngle + \",\" + angleTurned);\r\n\t\t\t\t\tg2d.drawArc((int) getX(startX), (int) getY(startY), (int) getDistance(diameter),(int) getDistance(diameter), startAngle, angleTurned);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//parent.log(\"Drawing line from \" + previousPose.getX() + \",\" + previousPose.getY() + \" to \" + pose.getX() + \",\" + pose.getY());\r\n\t\t\t\t\tg2d.drawLine((int) getX(previousPose.getX()), (int) getY(previousPose.getY()), (int) getX(pose.getX()), (int) getY(pose.getY())); \r\n\t\t\t\t}\r\n\t\t\t\tpreviousPose = pose;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"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 Color updateYourBoardHelper(int i, int j) {\n if (i == 0 && j == 0) {\n return Color.BLACK;\n }\n if (i == 0 || j == 0) {\n return Color.GRAY;\n }\n if (arePlayerShipsInitialized()) {\n try{\n TileStatus[][] b = p2.getPlayerStatusBoard();\n Color c = new Color(0);\n switch (b[j][i]) {\n case SHIP:\n case SUBSCANSHIP:\n case AIRCRAFTSCAN:\n switch (p2.getPlayerShipBoard()[j][i][0]) {\n case AIRCRAFTCARRIER:\n c = CARRIER_COLOR;\n break;\n case BATTLESHIP:\n c = BATTLESHIP_COLOR;\n break;\n case DESTROYER:\n c = DESTROYER_COLOR;\n break;\n case SUBMARINE:\n c = SUBMARINE_COLOR;\n break;\n case PATROLBOAT:\n c = PATROLBOAT_COLOR;\n break;\n default:\n break;\n }\n switch (p2.getPlayerShipBoard()[j][i][1]) {\n case AIRCRAFT1:\n if (!(((Aircraft) p2.getShip(5)).launched())) {\n c = AIRCRAFT1_COLOR;\n }\n break;\n case AIRCRAFT2:\n if (!(((Aircraft) p2.getShip(6)).launched())) {\n c = AIRCRAFT2_COLOR;\n }\n break;\n default:\n break;\n }\n break;\n case HIT:\n c = Color.RED;\n break;\n case MISS:\n c = Color.WHITE;\n break;\n case SUBSCANEMPTY:\n c = Color.CYAN;\n break;\n default:\n c = Color.DARK_GRAY;\n break;\n }\n return c;\n }catch(java.lang.NullPointerException n){\n System.err.println(\"Null pointer where p2 should be\");\n for(int ii=0; ii<7; ii++){\n for(int jj=0; jj<3; jj++){\n System.out.print(playerShips[ii][jj]+ \" \");\n }\n System.out.println();\n }\n// System.exit(1);\n return Color.DARK_GRAY;\n }\n } else{\n Color c = Color.DARK_GRAY;\n switch (yourBoard[i][j][0]) {\n case CR:\n if(yourBoard[i][j][1]==Statuses.AC1){\n c = AIRCRAFT1_COLOR;\n }else if(yourBoard[i][j][1]==Statuses.AC2){\n c = AIRCRAFT2_COLOR;\n }else{\n c = CARRIER_COLOR;\n }\n break;\n case BS:\n c = BATTLESHIP_COLOR;\n break;\n case DES:\n c = DESTROYER_COLOR;\n break;\n case SUB:\n c = SUBMARINE_COLOR;\n break;\n case PB:\n c = PATROLBOAT_COLOR;\n break;\n default:\n c = Color.DARK_GRAY;\n break;\n }\n return c;\n }\n }",
"public void displayPossibleMoves() {\n \tGame.permBoard.displayBoard();\n }",
"public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }",
"public void draw() {\n mGameBoard.draw();\n }",
"void defaultsetup(int phi) \n {// The Images should be loded here... Also add labels here\n System.out.println(\"IN DEFAULT SETUP..\");\n if( phi == 0) \n whiteToPlay = true;\n else if (phi == 1) \n whiteToPlay = false;\n // White Chess Pieces\n whiteHorse1.position = 1; whiteHorse1.color = 0;\n whiteHorse2.position = 6; whiteHorse2.color = 0;\n whiteQueen.position = 3; whiteQueen.color = 0;\n whiteKing.position =4 ; whiteKing.color = 0;\n whiteCastle1.position = 0; whiteCastle1.color = 0;\n whiteCastle2.position = 7; whiteCastle2.color = 0;\n whiteBishop1.position = 2; whiteBishop1.color = 0;\n whiteBishop2.position = 5; whiteBishop2.color = 0;\n int y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n whitePawn[x] = new pawn();\n whitePawn[x].position = 8+x;\n whitePawn[x].color = 0;\n }\n //Black Chess Pieces\n blackHorse1.position = 57; blackHorse1.color = 1;\n blackHorse2.position = 62; blackHorse2.color = 1;\n blackQueen.position = 59; blackQueen.color = 1;\n blackKing.position = 60; blackKing.color = 1;\n blackCastle1.position = 56;blackCastle1.color = 1;\n blackCastle2.position = 63;blackCastle2.color = 1;\n blackBishop1.position = 58;blackBishop1.color = 1;\n blackBishop2.position = 61;blackBishop2.color = 1;\n y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n blackPawn[x] = new pawn();\n blackPawn[x].position = 48+x;\n blackPawn[x].color = 1;\n }\n \n this.updatePositions();\n }",
"@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }",
"public Pawn(Player player, Board board, char color, int xpos, int ypos) {\n\t\tsuper(player, board, color, xpos, ypos);\n\t\tthis.name = 'p';\n\t\tthis.enpassant = false;\n\t\thasMovedTwo = false;\n\t}",
"private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }",
"private void startNewGame(){\n if (selectedPiece!=null)\n selectedPiece.setBackground(getDefaultColor(selectedPiece));\n selectedPiece = null;\n setAllToDefaultColor();\n setDefulatMessage();\n board = new ChessBoard(1, false);\n for(int row = 0 ; row < ROWS; row++){\n for(int col = 0; col < COLS ; col++){\n setButtonIcon(row,col);\n }\n }\n }",
"public int[][] getMovesBlackPawn(Pawn p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n if (!p.isDrawn()) { //Sjekker om brikken er brukt før.\n for (int i = (y + 1); i < (y + 3); i++) { //Brikken er brukt før, og sjekker om den kan plasseres\n if (b.getPieceAt(i, x) != null) {//på plassen ovenfor, for så å sjekke om 2 plasser ovenfor.\n break;//Setter plassene som lovlig trekk om den er trekt og om ingen står der fra før.\n } else {\n legalMoves[i][x] = 1;\n }\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y + 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y + 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y + 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y + 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), (x + 1)).isWhite()) {\n legalMoves[(y + 1)][(x + 1)] = 1;\n }\n }\n }\n } else {//Om brikken har blitt flyttet før. Da kan den bare gå et skritt rett fram, eller diagonalt en vei.\n if ((y + 1) < 8) { //Sjekker at brikken ikke går utenfor brettet.\n\n if (b.getPieceAt((y + 1), x) == null) { //Sjekker om plassen framfor er ledig.\n legalMoves[(y + 1)][x] = 1; //Setter plassen som lovlig trekk. Rett fram.\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y + 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y + 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y + 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y + 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), (x + 1)).isWhite()) {\n legalMoves[(y + 1)][(x + 1)] = 1;\n }\n }\n }\n }\n\n }\n return legalMoves;\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 paint(Graphics g){\n if (moves == 0){\n xLength[2] = 50;\n xLength[1] = 75;\n xLength[0] = 100;\n\n yLength[2] = 100;\n yLength[1] = 100;\n yLength[0] = 100;\n }\n\n //draw Title box\n g.setColor(Color.WHITE);\n g.drawRect(24, 10,851,55);\n\n g.setColor(new Color(34,155,3));\n g.fillRect(25,11,850,54);\n\n //draw Title\n g.setColor(Color.WHITE);\n String msg = \"Snake\";\n g.setFont(new Font(\"arial\", Font.BOLD, 30));\n g.drawString(msg, 420, 50);\n\n //draw Board\n g.setColor(Color.WHITE);\n g.drawRect(24,74,851,577);\n\n g.setColor(Color.BLACK);\n g.fillRect(25,75,850,575);\n\n\n //set Images\n rightHead = new ImageIcon(getClass().getResource(\"resources/headRight.png\"));\n rightHead.paintIcon(this, g, xLength[0], yLength[0]);\n\n for(int i = 0; i < snakeLength; i++){\n if(i==0 && right){\n rightHead = new ImageIcon(getClass().getResource(\"resources/headRight.png\"));\n rightHead.paintIcon(this, g, xLength[i], yLength[i]);\n }\n if(i==0 && left){\n leftHead = new ImageIcon(getClass().getResource(\"resources/headLeft.png\"));\n leftHead.paintIcon(this, g, xLength[i], yLength[i]);\n }\n if(i==0 && down){\n downHead = new ImageIcon(getClass().getResource(\"resources/headDown.png\"));\n downHead.paintIcon(this, g, xLength[i], yLength[i]);\n }\n if(i==0 && up){\n upHead = new ImageIcon(getClass().getResource(\"resources/headUp.png\"));\n upHead.paintIcon(this, g, xLength[i], yLength[i]);\n }\n\n if(i!=0){\n tail = new ImageIcon(getClass().getResource(\"resources/tail.png\"));\n tail.paintIcon(this,g,xLength[i],yLength[i]);\n }\n }\n\n apple = new ImageIcon(getClass().getResource(\"resources/apple.png\"));\n apple.paintIcon(this,g,appleX[xApplePosition],appleY[yApplePosition]);\n\n if(gameOver){\n gameOver(g);\n }\n\n g.dispose();\n\n\n }",
"void updateBoard() {\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tfor (int y = 0; y < length; y++) {\r\n\t\t\t\tif (filled[x][y]) {\r\n\t\t\t\t\t// Draw filled square\r\n\t\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\t\tColor use = new Color(0, 0, 0);\r\n\t\t\t\t\tif (rand < .25) {\r\n\t\t\t\t\t\tuse = a;\r\n\t\t\t\t\t} else if (rand < .50) {\r\n\t\t\t\t\t\tuse = b;\r\n\t\t\t\t\t} else if (rand < .75) {\r\n\t\t\t\t\t\tuse = c;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tuse = d;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJSquare element = new JSquare(this.getWidth() / length, this.board.getHeight() / length, use, true);\r\n\t\t\t\t\telement.addMouseListener(this);\r\n\t\t\t\t\tboard.add(element);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Draw empty square\r\n\t\t\t\t\tJSquare element = new JSquare(this.getWidth() / length, this.board.getHeight() / length,\r\n\t\t\t\t\t\t\tnew Color(192, 192, 192), false);\r\n\t\t\t\t\telement.addMouseListener(this);\r\n\t\t\t\t\tboard.add(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void render() {\n int pixel = getPixelSize();\n for (int xx = x; xx<x+w; xx += pixel) {\n for (int yy = y; yy<y+h; yy += pixel) {\n Location next = getLocation(xx, yy);\n if (next != null) { // This way if a wall is spawned at the edge it's ok\n next.setColor(color(255,255,255));\n next.setType(LocationType.WALL);\n getGridCache().add(next);\n }\n }\n }\n }",
"void drawCurrentToBoard () {\n board.clearTemp();\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }",
"@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\trequestFocusInWindow();\n\t\tg.drawImage(mazeImage, 0, 0, null);\n\t\tint difficulty = gui.getModel().getDifficulty();\n\t\tint w = getWidth()/difficulty; int h = getHeight()/difficulty;\n\t\tint[] pos = gui.getModel().getPlayerPos();\n\t\tif (!gui.getModel().isClassicMode()) {\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tCollectibleState cState = (CollectibleState) s;\n\t\t\t\tif (!cState.checkCollected())\n\t\t\t\t\tg.drawImage(cState.getCollectedSprite(), cState.getX()*w, cState.getY()*h, w, h, null);\n\t\t\t}\n\t\t\tif (!gui.getModel().allCollected()) g.drawImage(this.end, (difficulty-1)*w, (difficulty-1)*h, w, h, null);\n\t\t}\n\t\tg.drawImage(gui.getModel().getPlayerSprite(), pos[0]*w, pos[1]*h, w, h, null);\n\t}",
"public void redraw(int [][] board)\n\t{\n\t\tfor(int i = 0; i < 20; ++i)\n\t\t{\n\t\t\tfor( int j = 0; j < 10; ++j)\n\t\t\t{\n\t\t\t\tswitch (board[i][j])\n\t\t\t\t{\n\t\t\t\t\t//empty\n\t\t\t\t\tcase 0:\tcolors[i][j] = Color.GRAY; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//J - shape\n\t\t\t\t\tcase 1:\tcolors[i][j] = Color.BLUE; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//Z shape\n\t\t\t\t\tcase 2:\tcolors[i][j] = Color.RED; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//L shape\n\t\t\t\t\tcase 3:\tcolors[i][j] = Color.ORANGE; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//S shape\n\t\t\t\t\tcase 4:\tcolors[i][j] = new Color(102,255,102); ;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//I shape\n\t\t\t\t\tcase 5:\tcolors[i][j] = Color.CYAN; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//O shape\n\t\t\t\t\tcase 6:\tcolors[i][j] = Color.YELLOW; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//T shape\n\t\t\t\t\tcase 7:\tcolors[i][j] = Color.PINK; \n\t\t\t\t\t\tbreak;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tview.getInGamePanel().getBoardGamePanel().redraw(colors);\t\n\t}",
"public void squaresAttacked(){ \n\t\tint[][] squares = new int[SQUARE_LENGTH][SQUARE_LENGTH];\n\t\tfor (int i = 0; i < BOARD_LENGTH; i++) \n\t\t\tfor (int j = 0; j < BOARD_LENGTH; j++)\n\t\t\t\tsquares[i][j] = 0;\n\n\t\tfor(AbstractPiece p : pieces)\n\t\t\tp.squaresAttacked(squares);\n\n\t\tfor (int i = 0; i < BOARD_LENGTH; i++) // this displays the squares attacked\n\t\t{\n\t\t\tfor (int j = 0; j < BOARD_LENGTH; j++)\n\t\t\t\tSystem.out.print(squares[i][j]);\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println(\"********\"); \n\t}",
"private void drawPiece(int row, int col, Graphics g, Color color){\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\r\n g.setColor(color);\r\n g.fillOval((col*tileSize)+2, (row*tileSize)+2, tileSize-4, tileSize-4);\r\n }",
"public void addPawn(Pawn.Color c) { pawn = new Pawn(c, Pawn.Type.BASIC); }",
"public void createPieces(){ \n\t\tfor(int x = 0; x<BOARD_LENGTH; x++){\n\t\t\tfor(int y = 0; y<BOARD_LENGTH; y++){ \n\t\t\t\tif(CHESS_MAP[x][y] != (null)){\n\t\t\t\t\tswitch (CHESS_MAP[x][y]){\n\t\t\t\t\tcase KING:\n\t\t\t\t\t\tpieces[pieceCounter] = new King(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase QUEEN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Queen(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BISHOP:\n\t\t\t\t\t\tpieces[pieceCounter] = new Bishop(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase KNIGHT:\n\t\t\t\t\t\tpieces[pieceCounter] = new Knight(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PAWN:\n\t\t\t\t\t\tpieces[pieceCounter] = new Pawn(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ROOK:\n\t\t\t\t\t\tpieces[pieceCounter] = new Rook(pieceCounter, new Point(x+1,y+1), new Point(0,0), true, true, BOARD_PIECE_LENGTH, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tsetPieceIconAndName(x, y, CHESS_MAP[x][y]); \t\n\t\t\t\t\tpieceCounter++;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\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\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}",
"public void draw(Graphics2D g2)\n {\n Rectangle grassLawn = new Rectangle(xCord,yCord,xLength,yWidth);\n \n g2.setPaint(Color.GREEN);\n g2.fill(grassLawn);\n }",
"public void draw(GraphicsContext gc) {\n // draw the base grid\n gc.setFill(Color.LIGHTGREY);\n for (int i = 0; i < board.side(); i++)\n for (int j = (i % 2 == 0) ? 1 : 0; j < board.side(); j += 2)\n gc.fillRect(startX + j * unitLength, startY + i * unitLength,\n unitLength, unitLength);\n\n // draw boundaries\n gc.setStroke(Color.BLACK);\n gc.strokeRect(startX, startY, sideLength, sideLength);\n\n // highlight legal positions\n for (BoardPos pos : legalPos) {\n gc.setFill(Color.ORANGE);\n gc.fillRect(startX + pos.getX() * unitLength,\n startY + pos.getY() * unitLength, unitLength, unitLength);\n gc.setFill(Color.LIGHTYELLOW);\n if (pos.route != null)\n for (BoardPos step : pos.route)\n gc.fillRect(startX + step.getX() * unitLength,\n startY + step.getY() * unitLength, unitLength, unitLength);\n }\n\n // draw pieces\n for (int i = 0; i < board.side(); i++)\n for (int j = 0; j < board.side(); j++)\n board.get(i, j).draw(gc, startX + i * unitLength,\n startY + j * unitLength, pieceMargin, unitLength);\n }",
"private void unsetValidMoves() {\n\t\tcurrentPos.setFill(Paint.valueOf(\"Dodgerblue\"));\n\n\t\tif(l.upValid) {\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.leftValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x-1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.rightValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x+1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));}\n\t}",
"@Override\n\tpublic Collection<Move> calculateLegalMoves(final Board board) {\n\t\t\n\t\t//Array that will hold of the legal moves for the Pawn\n\t\tfinal List<Move> legalMoves = new ArrayList<>();\n\t\t\n\t\t//Loop through all possible moves by applying of the offsets to the Pawn's current position\n\t\tfor(final int currentCandidateOffset: CANDIDATE_MOVE_COORDINATES){\n\t\t\t\n\t\t\t//Apply the offset to the Pawn's current position\n\t\t\tfinal int candidateDestinationCoordinate = this.piecePosition + (this.getPieceTeam().getDirection() * currentCandidateOffset);\n\t\t\t\n\t\t\t//Checks if the Destination Coordinate is valid\n\t\t\tif(!BoardUtils.isValidTileCoordinate(candidateDestinationCoordinate)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Checks if this tile is occupied\n\t\t\tif(currentCandidateOffset == 8 && !board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnMove(board, this, candidateDestinationCoordinate)));\n\t\t\t\telse\n\t\t\t\t\tlegalMoves.add(new Move.PawnMove(board, this, candidateDestinationCoordinate));\t\n\t\t\t}\n\t\t\t//Checks if the Pawn is on it's first move\n\t\t\telse if(currentCandidateOffset == 16 && this.isFirstMove() && ((BoardUtils.SEVENTH_RANK[this.piecePosition] && \n\t\t\t\t\tthis.getPieceTeam().isBlack()) || (BoardUtils.SECOND_RANK[this.piecePosition] && this.getPieceTeam().isWhite()))) {\n\t\t\t\t\n\t\t\t\t//Calculate coordinate of the tile behind candidate coordinate\n\t\t\t\tfinal int behindCandidateDestinationCoordinate = this.piecePosition + (this.pieceTeam.getDirection() * 8);\n\t\t\t\t\n\t\t\t\t//Checks if the tile behind the candidate destination is NOT occupied & if the Tile at the Candidate Destination is NOT occupied\n\t\t\t\tif(!board.getTile(behindCandidateDestinationCoordinate).isTileOccupied() && \n\t\t\t !board.getTile(candidateDestinationCoordinate).isTileOccupied())\n\t\t\t\t\t\tlegalMoves.add(new Move.PawnJump(board, this, candidateDestinationCoordinate));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t//Checks for edge cases in the 7 direction\t\n\t\t\t} else if(currentCandidateOffset == 7 &&\n\t\t\t\t\t!((BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t\n\t\t\t\t//This basically checks if En Passant Pawn is next to Player's pawn\t\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition + (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\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\t\n\t\t\t//Checks for edge cases in the 9 direction\t\n\t\t\t} else if(currentCandidateOffset == 9 && \n\t\t\t\t\t!((BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition - (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\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\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn ImmutableList.copyOf(legalMoves);\n\t}",
"public void makeChanges() { \n for(int i = 1; i < 9; i++) {\n for(int j = 1; j < 11; j++) {\n if(!(controller.getBoard().getPiece(i, j) instanceof Forbidden)) {\n Cell[i][j].setBackground(Color.white);\n if(controller.getBoard().getPiece(i,j) != null) {\n if(controller.getPlayer(controller.getTurn()).getColour() != controller.getBoard().getPiece(i,j).getColour()) {\n if(controller.getTurn() == 1) {\n Cell[i][j].setIcon(new ImageIcon(\"pieces\\\\redHidden.png\"));\n Cell[i][j].setEnabled(false);\n } else {\n Cell[i][j].setIcon(new ImageIcon(\"pieces\\\\blueHidden.png\"));\n Cell[i][j].setEnabled(false);\n }\n } else {\n Cell[i][j].setIcon((controller.getBoard().getPiece(i, j).getIcon()));\n Cell[i][j].setEnabled(true);\n }\n if(controller.getBoard().getPiece(i,j) instanceof Trap || controller.getBoard().getPiece(i,j) instanceof Flag) {\n Cell[i][j].removeActionListener(handler);\n Cell[i][j].setEnabled(false);\n }\n } else {\n Cell[i][j].setBackground(Color.white);\n Cell[i][j].setEnabled(false);\n }\n }\n }\n }\n controller.setTurn(); \n }"
] | [
"0.70303166",
"0.7028545",
"0.6703359",
"0.6691801",
"0.65696704",
"0.6535745",
"0.64922076",
"0.6404909",
"0.6399753",
"0.6397025",
"0.6317526",
"0.6298021",
"0.6271586",
"0.62711525",
"0.6262987",
"0.62628174",
"0.62132424",
"0.6212678",
"0.62060624",
"0.6197947",
"0.6184964",
"0.6167866",
"0.61627036",
"0.6144339",
"0.61039925",
"0.6098802",
"0.60824496",
"0.6082426",
"0.6081471",
"0.60789555",
"0.6075667",
"0.6055072",
"0.6040541",
"0.6033594",
"0.60306615",
"0.60190874",
"0.60112065",
"0.5997801",
"0.5974889",
"0.59720314",
"0.5969156",
"0.5961821",
"0.5957573",
"0.59534407",
"0.59529114",
"0.59437937",
"0.59417665",
"0.5925125",
"0.5923371",
"0.5917865",
"0.5917555",
"0.5907942",
"0.5906185",
"0.59018135",
"0.5901696",
"0.5892074",
"0.5886095",
"0.58801484",
"0.58622146",
"0.58568686",
"0.5855603",
"0.5849658",
"0.58401537",
"0.5831106",
"0.5828012",
"0.582762",
"0.582199",
"0.581683",
"0.5815252",
"0.58141047",
"0.5813934",
"0.58083445",
"0.580665",
"0.5788478",
"0.5787947",
"0.5781849",
"0.5781688",
"0.577666",
"0.57750314",
"0.57648426",
"0.57630795",
"0.5755304",
"0.5753566",
"0.5740747",
"0.57406616",
"0.572786",
"0.570817",
"0.57064193",
"0.5704552",
"0.5703468",
"0.5699699",
"0.5697245",
"0.56956947",
"0.56895524",
"0.56870055",
"0.5681908",
"0.56813383",
"0.5675016",
"0.5674424",
"0.566532",
"0.5664429"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"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 |
Spring Data repository for the Car entity. | @SuppressWarnings("unused")
@Repository
public interface CarRepository extends JpaRepository<Car, Long> {
Optional<Car> findByCode(String code);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface CarsRepository extends JpaRepository<Car, Long> {\n\n}",
"@Repository\npublic interface CarDao extends JpaRepository<Car, Integer> {\n}",
"public interface CarRepository extends CrudRepository<CarDO, Long> {\n\n List<CarDO> findByDeletedFalse();\n\n List<CarDO> findByEngineType(EngineType engineType);\n}",
"@Repository\npublic interface CarRepository extends JpaRepository<Car, Integer> {\n\t\n\t/**\n\t * En Car pga unik namn\n\t * @param name Reg. nr.\n\t * @return En Car pga unik namn dvs. reg.nr.\n\t * @author Danijela\n\t */\n\tCar findByName(String name);\n\n\t/**\n\t * Alla bilar pga brand\n\t * @param brandName Volvo, Renault..\n\t * @return En lista av bilar pga brand\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);\n\n\t/**\n\t * Alla bilar pga brand och model\n\t * @param brandName Volvo, Renault..\n\t * @param model m3, Clio ..\n\t * @return En lista av bilar far pga brand och model\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);\n\n\t/**\n\t * Alla bilar som ar biligare an prise som anvandare valde\n\t * @param price Prise som anvandare valde\n\t * @return En lista av bilar som ar biligare an prise som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.price <= :price\")\n\tList<Car> findByBelowPrice(@Param(\"price\") Integer price);\n\n\t/**\n\t * Alla bilar som har mindre kilometer an den som anvandare valde\n\t * @param kilometer Kilometer som anvandare valde\n\t * @return En lista av bilar som har mindre kilometer an den som anvandare valde\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.kilometer <= :kilometer\")\n\tList<Car> findBelowKilometer(@Param(\"kilometer\") Integer kilometer);\n\n\t/**\n\t * Alla bilar med automatisk eller med manuell vaxel\n\t * @param automatic Automatisk vaxel\n\t * @return List av bilar med automatisk eller en lista med manuell vaxel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);\n\n\t/**\n\t * Alla bilar som man kan eller som man inte kan hyra ut\n\t * @param isRentable Man kan eller inte kan hyra ut bil\n\t * @return Lista av bilar som man kan eller en lista av bilar som man inte kan hyra ut\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isRentable IN :isRentables\")\n\tList<Car> findAllRentable(@Param(\"isRentables\") boolean isRentable);\n\n\t/**\n\t * Alla bilar som har eller som inte har navigation\n\t * @param navigation Bil har eller inte har navigation\n\t * @return en lista av bilar som har eller en lista av bilar som inte har navigation\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.navigation IN :navigations\")\n\tList<Car> findAllWithNavigation(@Param(\"navigations\") boolean navigation);\n\n\t/**\n\t * Alla nya bilar eller alla begagnade bilar\n\t * @param nya Nya bilar eller begagnade bilar\n\t * @return En lista av nya bilar eller en lista av begagnade bilar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.isNew IN :nya\")\n\tList<Car> findAllNewCar(@Param(\"nya\") boolean nya);\n\n\t/**\n\t * Alla bilar med samma typ av fuel\n\t * @param fuel Bensin, gas...\n\t * @return En lista av bilar med samma typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.fuel IN :fuels\")\n\tList<Car> findAllCarWithSameFuel(@Param(\"fuels\") String fuel);\n\t/**\n\t * Alla bilar som ar samma brand och anvander sama typ av fuel\n\t * @param brandName Volvo, Renault...\n\t * @param fuel Bensin , gas ..\n\t * @return En lista av bilar som ar samma brand och anvander sama typ av fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"fuels\") Collection<String> fuel);\n\n\t/**\n\t * Alla bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @param brandName Volvo, Renault ..\n\t * @param modelName m3, Clio...\n\t * @param fuel Bensin, gas..\n\t * @return En lista av bilar som ar samma brand, samma typ av model och anvander samma fuel\n\t * @author Danijela\n\t */\n\t@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandModelAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> modelName, @Param(\"fuels\") Collection<String> fuel);\n\t/**\n\t * Alla bilar som ar tillverkad samma ar\n\t * @param yearProduce Ar när ar bil tillverkad\n\t * @return En lista av bilar som ar tillverkad samma ar\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.yearProduce IN :years\")\n\tList<Car> findCarsByYear(@Param(\"years\") Integer yearProduce);\n\n\t/**\n\t * Alla bilar som har samma farg\n\t * @param color Farg\n\t * @return En lista av bilar som har samma farg\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);\n\n\t/**\n\t * Alla bilar som kom till butik på samma tid\n\t * @param timeStored Tid när bilen kom till butik\n\t * @return En lista av bilar som kom till butik på samma tid\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.timeStored <= :timeStored\")\n\tList<Car> findCarByTimeStored(@Param(\"timeStored\") Date timeStored);\n\n\n\t/**\n\t * Alla bilar som ar samma typ\n\t * @param modelName typ av car, model: m3, Clio...\n\t * @return En lista av bilar som ar samma typ\n\t * @author Danijela\n\t */\n\t@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);\n\n\n\n}",
"public interface CarRepository extends JpaRepository<Car, Integer> {\n\n List<Car> findByUser(User user);\n List<Car> findByUserNot(User user);\n}",
"public List<Car>getAllCars(){\r\n return (List<Car>) repository.findAll();\r\n }",
"@Repository\npublic interface VehicleRepository extends CrudRepository<Vehicle,Long>{\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CarerClientRelationRepository extends JpaRepository<CarerClientRelation, Long>, JpaSpecificationExecutor<CarerClientRelation> {\n}",
"@Dao\npublic interface CarDao {\n\n @Query(\"SELECT * FROM car\")\n List<Car> getAll();\n\n @Insert\n void insertAll(Car... cars);\n\n @Delete\n void delete(Car car);\n\n @Update\n void update(Car... cars);\n\n @Query(\"SELECT * FROM car WHERE chassisCode = :chassisCode\")\n Car findByChassisCode(String chassisCode);\n}",
"public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }",
"@Repository\npublic interface CityRepository extends JpaRepository<City, Long> {\n}",
"public Car saveCar(Car car) {\r\n return repository.save(car);\r\n }",
"@Repository\npublic interface FooRepository extends CrudRepository<Foo, Long>, EntityRepository<Foo> {\n List<Foo> findAll();\n}",
"@Repository\npublic interface VendorsRepository extends CrudRepository<Vendor, Long> {\n}",
"public interface CompanyRepository extends JpaRepository<Company, String> {\n Company findByName(String name);\n}",
"List<Car> findByBrand(String brand);",
"@Transactional\r\n\tpublic List<Car> getAllCars() {\n\t\treturn (List<Car>)cr.findAll();\r\n\t}",
"public interface PetRepository extends CrudRepository<Pet, Long> {\n}",
"public interface CityRepository extends JpaRepository<CityEntity, Long>{\n}",
"@Repository\npublic interface WheelRepository extends JpaRepository<Wheel, Long>, JpaSpecificationExecutor<Wheel>{\n\n}",
"List<Car> findByBrand(@NonNull String brand);",
"@Repository\npublic interface BookRepository extends JpaRepository<Book, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface SchemeRepository extends JpaRepository<Scheme,Long> {\n\n List<Scheme> findSchemeByDriver(Driver driver);\n\n}",
"@Repository\npublic interface ModelRepository extends JpaRepository<Citire, Long>{\n}",
"public interface ShopperPersonRepository extends CrudRepository<ShopperPerson, Long> {\n}",
"@Repository\npublic interface PersonRepository extends JpaRepository<Person, Long> {\n}",
"public interface BookRepository extends JpaRepository<Book, Integer> {\n public List<Book> findByBookName(String bookName);\n}",
"@Repository\npublic interface ContactRepository extends JpaRepository<Contact, Long> {\n}",
"@Repository\npublic interface ModelRepository extends CrudRepository<ModelEntity, BigInteger> {\n\n List<ModelEntity> findByBrandName(String name);\n\n}",
"public interface IBookRepository extends CrudRepository<Book, Integer> {}",
"public interface RecipeRepository extends CrudRepository<Recipe,Long> {\n}",
"public interface PersonRepository extends CrudRepository<Person, Long>{\n List<Person> findByFirstName(String firstName);\n}",
"@Query(\"select c from Car c where c.brand = ?1\")\r\n\t\r\n\t// get by brand\r\n\tList<Car> getByBrand(String brand);",
"@Repository\npublic interface PhotoRepository extends JpaRepository<Photo,Long> {\n\n public List<Photo> findByProduct(Product product);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CardysqRepository extends JpaRepository<Cardysq, Long>, JpaSpecificationExecutor<Cardysq> {}",
"public abstract CarTO findCarById(Long id);",
"public interface CurrencyRepository extends JpaRepository<Currency, Long> {\n\n}",
"public interface AuthorRepository extends CrudRepository<Author, Long> {\n}",
"@Repository\npublic interface ArticlePictureRepository extends JpaRepository<ArticlePicture, Long> {\n}",
"@Repository\npublic interface ReservationRepository extends CrudRepository<Reservation, Long> {\n}",
"@Repository\npublic interface RepositoryMain extends CrudRepository<Roulette, Long>{\n\n}",
"@Repository\npublic interface ProductRepository extends CrudRepository<Product, Integer> {\n\n}",
"public Car getCarById(Integer id){\n\n return this.carCrudInterface.getById(id);\n\n }",
"@Repository\npublic interface ProductRepository extends JpaRepository<Product, Long> {\n\n}",
"public interface BookResourceRepository extends JpaRepository<BookResource,Integer> {\n List<BookResource> findByBookId(Integer bookId);\n\n}",
"public interface ContactRepository extends JpaRepository<Contact, Long> {\n\n}",
"public interface MusicRepository extends CrudRepository<Music, Integer> {\n}",
"@Repository\npublic interface PersonaRepository extends JpaRepository<Persona, Integer> {\n \n}",
"@org.springframework.stereotype.Repository\npublic interface EntityRepository<R> {\n\n /* public R get(R entity);*/\n\n public List<R> getAll();\n\n public List<R> getAll(int limit);\n\n public List<R> getAll(Integer firstResult, Integer maxResults);\n\n public List<R> getByExample(final R example);\n\n public R getUniqueByExample(final R example);\n\n public void put(final R record) throws DuplicateKeyException;\n\n public void put(final Collection<R> records);\n\n public Entity getEntity(Entity entity);\n\n public Entity getEntityById(Entity entity);\n\n public Entity getEntityByName(Entity entity);\n\n public void insert(final R record);\n\n public void insertAll(final Collection<R> items);\n\n public void update(final R record);\n\n public void updateAll(final Collection<R> items);\n\n public void remove(final R entity);\n\n public Entity getByColumnName(String columnName, Object columnValue);\n\n public Collection<R> getByEntities(String columnName, Object columnValue);\n\n public void clear();\n\n public void refresh(final R entity);\n\n public Long size();\n}",
"@Repository\npublic interface ICountryRepository extends JpaRepository<Country, String> {\n\n Country findByCode(String code);\n}",
"@Repository\npublic interface ProductRepo extends CrudRepository<Product, String> {\n\n @Override\n Product save(Product product);\n\n @Override\n List<Product> findAll();\n\n Product findByTitle(String title);\n}",
"public interface HousePictureRepository extends CrudRepository<HousePicture, Long> {\n\n List<HousePicture> findAllByHouseId(Long id);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ChapitreRepository extends JpaRepository<Chapitre, Long>, JpaSpecificationExecutor<Chapitre> {\n\n}",
"public interface CartRepository extends JpaRepository<Cart, Integer> {\n}",
"@Repository\r\npublic interface FlightRepository extends CrudRepository<Flight, Integer> {\r\n\r\n}",
"public interface PersonRepository extends JpaRepository<Person, Long>, PersonRepositoryQuery {\n}",
"public interface PriceDao extends JpaRepository<Price, Integer> {\n}",
"public interface AuthorRepository extends Repository<Author, Integer> {\n\n\t\n\tvoid save(Author author) throws DataAccessException;\n\n\t\n\t@Query(\"SELECT DISTINCT author FROM Author author WHERE author.lastName LIKE :lastName%\")\n\tpublic Collection<Author> findByLastName(@Param(\"lastName\") String lastName);\n\n\t//@Query(\"SELECT DISTINCT author FROM Author author WHERE author.user.username = :username\")\n\tpublic Optional<Author> findByUserUsername(String username);\n\t\n\t@Query(\"SELECT author FROM Author author WHERE author.id =:id\")\n\tpublic Author findById(@Param(\"id\") int id);\n\n\t\n\n}",
"@Repository\npublic interface ClienteRepository extends JpaRepository<Cliente, String>{\n\n}",
"public interface ImageRepository extends JpaRepository<Image, Long> {\n\n List<Image> findByUrl(String url);\n}",
"public interface MovieRepository extends JpaRepository<Movie, Long> {\n Movie findByTitle(String title);\n}",
"public interface CardRepository extends CrudRepository<Card, Long> {\n Card findByOnHand(boolean onHand);\n}",
"public interface IBrandRepo extends JpaRepository<Brand, Integer> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface GamerRepository extends JpaRepository<Gamer, Long> {\n\n}",
"@Repository\npublic interface ClientRepository extends JpaRepository<Client, Long> {\n}",
"public interface PhotoRepository extends CrudRepository<Photo, UUID> {\n\n Photo findByFilename(String filename);\n}",
"public interface OwnerRepository extends CrudRepository<Owner, Long> {\n Owner findByLastName(String lastName);\n List<Owner> findAllByLastNameLike(String lastName);\n}",
"public interface CountryRepository extends CrudRepository<Country, Integer> {\r\n\r\n}",
"public interface CategoryRepository extends JpaRepository<Category, Long> {\n}",
"@Repository\npublic interface CustomerRepository extends CrudRepository<Customer, Long> {\n}",
"@Repository\npublic interface ProdutoRepository extends JpaRepository<Produto, Integer>{\n \t\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface TechServicesRepository extends JpaRepository<TechServices, Long> {\n\n List<TechServices> findAllByCompetitorId(Long id);\n}",
"@Component\npublic interface AnimalRepository extends JpaRepository<Animal, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CorpsRepository extends JpaRepository<Corps, Long> {\n\n}",
"@Repository\r\npublic interface HaltestellenzuordnungRepository extends CrudRepository<Haltestellenzuordnung, Long> {\r\n\r\n /**\r\n * Gibt die Haltestellenzuordnungen zurück mit der übergebenen Fahrtstrecke\r\n * \r\n * @param fahrtstrecke\r\n * @return Iterable von Haltestellenzuordnungen\r\n */\r\n Iterable<Haltestellenzuordnung> findAllByFahrtstrecke(Fahrtstrecke fahrtstrecke);\r\n}",
"public interface CategoryRepository extends JpaRepository<Category, Integer> {\n}",
"public interface CityRepository {\n\n List<City> query();\n}",
"public interface ModeloRepository extends CrudRepository<Modelo, Long> {\n}",
"public interface AuthorRepository extends CrudRepository<Author,Long> {\n}",
"public interface AuthorRepository extends CrudRepository<Author,Long> {\n}",
"public interface VendorRepository extends CrudRepository<Vendor, Integer> {\n Vendor findByName(String name);\n Iterable<Vendor> findByNameLike(String search);\n Iterable<Vendor> findByLocation(String location);\n Vendor findByUser(User user);\n}",
"public interface GoodsRepository extends JpaRepository<Goods, Long> {\n\n /**\n * Find by name list.\n *\n * @param name the name\n * @return the list\n */\n List<Goods> findByName(String name);\n}",
"@Repository\npublic interface CategoryRepository extends CrudRepository<Category, Long> {\n\n /**\n * Beschrijf in de method name wat je wilt dat spring uit de database haalt, zo simpel is het!\n */\n Category findCategoryById(Long id);\n\n @Override\n List<Category> findAll();\n\n\n}",
"@Repository\npublic interface CustomerRepository extends CrudRepository<Customer, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CategorieRessourcesRepository extends JpaRepository<CategorieRessources, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DishRepository extends JpaRepository<Dish, Long>, JpaSpecificationExecutor<Dish> {}",
"public interface BookRepository extends CrudRepository<Book,String>{\n}",
"@Repository(value = \"competitionRepository\")\ninterface CompetitionRepository extends JpaRepository<CompetitionModel, Long> {\n\n}",
"public interface CompraRepository extends JpaRepository<Compra,Long> {\n\n}",
"public interface ReservationRepository extends CrudRepository<Reservation, Integer> {\n\n}",
"public interface CategoryRepository extends CrudRepository<Category, Long> {\n}",
"@GetMapping(\"/api/rents/findbycar/{id}\")\r\n public ResponseEntity<List<Rent>> findByCar(@PathVariable(name = \"id\") Long id){\r\n final List<Rent> rent = rentService.findByCarId(id);\r\n return rent != null\r\n ? new ResponseEntity<>(rent, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@org.springframework.stereotype.Repository\npublic interface Repository<R> {\n\n List<R> getAll();\n\n List<R> getAll(Integer firstResult, Integer maxResults);\n\n List<R> getByExample(R example);\n\n R getUniqueByExample(R example);\n\n Long size();\n\n void insert(R record);\n\n void put(R record) throws DuplicateKeyException;\n\n void put(Collection<R> records);\n\n void insertAll(Collection<R> items);\n\n void update(R record);\n\n void updateAll(Collection<R> items);\n\n void remove(R entity);\n\n void refresh(R entity);\n\n void clear();\n\n void updateNow(R entity);\n\n /**\n * Generic Criteria builder for v2 REST endpoints\n * @param criteria - Criteria object\n * @param filter - Various Filters that need to be applied.\n */\n void applyGenericCriteria(Criteria criteria, ServiceFilterBean filter);\n\n}",
"public interface RaceRepository extends IRepository<Race, String>{\n Set<Race> getAll();\n}",
"@Repository\npublic interface PlayerRepository extends JpaRepository<Player, Long> {\n}",
"@Repository\npublic interface ClinicRepository extends JpaRepository<Clinic, Long> {\n}",
"@Repository\npublic interface CategoryRepository extends CrudRepository<Category, Long> {\n\n Category findByName(String name);\n}",
"@Repository\npublic interface LocoRepository extends CrudRepository<Loco, Integer> {\n}",
"@Repository\npublic interface ContactInformationDAO extends JpaRepository<Contact, Long> {\n\n}",
"public interface CustomerRepository extends CrudRepository<Customer, Long> {\n}"
] | [
"0.78001463",
"0.75979894",
"0.7388391",
"0.7239541",
"0.70004135",
"0.6863886",
"0.6747176",
"0.6662103",
"0.6633116",
"0.6624152",
"0.65904355",
"0.6571773",
"0.65450126",
"0.6491918",
"0.6484557",
"0.64750123",
"0.64541876",
"0.6441687",
"0.6390089",
"0.63898826",
"0.63827986",
"0.6378085",
"0.63729846",
"0.6365333",
"0.63302696",
"0.63284343",
"0.63279253",
"0.6305577",
"0.62984544",
"0.62973326",
"0.6289241",
"0.6260842",
"0.62574136",
"0.62514925",
"0.62407005",
"0.6230612",
"0.62113136",
"0.62060964",
"0.6198222",
"0.61978483",
"0.61973536",
"0.61959225",
"0.6191058",
"0.61890143",
"0.61858606",
"0.6176176",
"0.61738926",
"0.61596334",
"0.6157834",
"0.6155034",
"0.61544347",
"0.61516744",
"0.6150003",
"0.61417377",
"0.6119964",
"0.61127985",
"0.61120415",
"0.6111287",
"0.6110556",
"0.6101308",
"0.60986936",
"0.609101",
"0.6085477",
"0.608346",
"0.60793304",
"0.6077559",
"0.60760856",
"0.60749656",
"0.6072077",
"0.6071078",
"0.60701376",
"0.6066303",
"0.6064644",
"0.6058314",
"0.60503143",
"0.6047796",
"0.6046177",
"0.6042243",
"0.60419244",
"0.60419244",
"0.60407746",
"0.6031908",
"0.6031852",
"0.6029352",
"0.60262406",
"0.60226536",
"0.6020456",
"0.60179836",
"0.6016761",
"0.60148203",
"0.60134625",
"0.6011187",
"0.6010908",
"0.60090166",
"0.60087276",
"0.5998101",
"0.59978896",
"0.5995632",
"0.59928197",
"0.59915125"
] | 0.7434606 | 2 |
access token fail call login api | @Override
public void onApiFailure(Throwable mThrowable) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }",
"RequestResult loginRequest() throws Exception;",
"@Override\n\t\t\t\t\t\t\tpublic void onTokenIncorrect() {\n\t\t\t\t\t\t\t\t Log.d(\"LoginActivity\", \"--onTokenIncorrect\");\n\t\t\t\t\t\t\t}",
"private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }",
"@Transactional\n\t@Override\n\tpublic UserQQ login(String access_token, String openid, String oauth_consumer_key) throws Exception {\n\t\treturn dao.login(access_token, openid, oauth_consumer_key);\n\t}",
"@Override\n\t\t\t\tpublic void onAuthenticationTokenError(@Nullable String errorMessage) {\n\t\t\t\t\tLog.e(TAG, \"onIdTokenError: Unable to get authentication token, error: \" + errorMessage);\n\t\t\t\t}",
"@Nullable\n @Override\n public Request authenticate(@NonNull Route route, @NonNull okhttp3.Response response) throws IOException {\n ABBYYLingvoAPI abbyyLingvoAPI = getApi();\n\n Call<ResponseBody> myCall = abbyyLingvoAPI.getBasicToken();\n Response<ResponseBody> response1;\n try {\n response1 = myCall.execute();\n if (response1.isSuccessful()) {\n accessToken = response1.body().string();\n Log.d(Constants.LOG_TAG, \"basic response is success, got accessToken\");\n } else {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful, response code is: \" + response1.code());\n }\n } catch (IOException e) {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful cause error: \" + e.toString());\n }\n\n // Add new header to rejected request and retry it\n accessTokenRequest = response.request().newBuilder()\n .addHeader(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n\n return accessTokenRequest;\n }",
"String getAccessToken();",
"String getAccessToken();",
"private void login_finally(String token, String user_name){\n RequestBody requestBody = new FormBody.Builder()\r\n .add(\"username\", user_name)\r\n .add(\"password\", password)\r\n .build();\r\n\r\n HttpUtil.sendOkHttpRequest(Login.this, login_url, requestBody, new Callback(){\r\n int check_login_user = 0;\r\n String user_name;\r\n\r\n @Override\r\n public void onResponse(Call call, Response response) throws IOException{\r\n Slog.d(TAG, \"========header :\"+response.headers());\r\n String responseText = response.body().string();\r\n Slog.d(TAG, \"login response : \"+responseText);\r\n if(!TextUtils.isEmpty(responseText)){\r\n try {\r\n JSONObject login_response= new JSONObject(responseText);\r\n String sessionId = login_response.getString(\"sessid\");\r\n String session_name = login_response.getString(\"session_name\");\r\n JSONObject user = login_response.getJSONObject(\"user\");\r\n Slog.d(TAG, \"sessionId: \"+sessionId+\"===session name: \"+session_name);\r\n\r\n SharedPreferences.Editor editor = getSharedPreferences(\"session\", MODE_PRIVATE).edit();\r\n editor.putString(\"sessionId\", sessionId);\r\n editor.putString(\"sessionName\", session_name);\r\n editor.putInt(\"uid\", user.getInt(\"uid\"));\r\n editor.apply();\r\n\r\n Intent intent = new Intent(Login.this, MainActivity.class);\r\n startActivity(intent);\r\n\r\n\r\n }catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Call call, IOException e){\r\n runOnUiThread(new Runnable(){\r\n @Override\r\n public void run(){\r\n closeProgressDialog();\r\n Toast.makeText(Login.this, \"登录失败\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n }\r\n });\r\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"public String LoginServiceToken(String token) {\n return token =\n given().log().all().accept(\"text/plain, */*\")\n .headers(\n \"App-Code\", APPCODE,\n \"X-IBM-Client-Id\", IBMCLIENTID\n )\n .and().given().contentType(\"application/x-www-form-urlencoded\")\n .and().given().body(\"grant_type=password&scope=security&username=\"+MXUSER+\"&password=\"+PWD+\"&client_id=\"+IBMCLIENTID)\n .when().post(AZUREURL+\"/v2/secm/oam/oauth2/token\")\n .then().log().ifError().assertThat().statusCode(200)\n .extract().path(\"oauth2.access_token\").toString();\n\n }",
"@Override\n public void onAuthenticationFailed() {\n }",
"AccessToken getOAuthAccessToken() throws MoefouException;",
"private void sendToAPI(final View v, JSONObject jsonLogin){\n APIClient apiClient = new APIClient();\n Service apiService = apiClient.getClient().create(Service.class);\n Call<User> call = apiService.login(new Login(\"efef\",\"dfwd\"));\n call.enqueue(new Callback<User>() {\n @Override\n public void onResponse(Call<User> call, Response<User> response) {\n if (response.isSuccessful()) {\n new CustomToast().displyToast(getContext(), v, \"Error:\"+response.code()+\" \"+response.body().getMessage()+\n \"Token is: \"+response.body().getAccessToken());\n }\n else{\n new CustomToast().displyToast(getContext(), v, \"Error: \"+response.code()+\" \"+\n response.headers()+ \"...Incorrect username or password!\");\n }\n }\n\n @Override\n public void onFailure(Call<User> call, Throwable t) {\n new CustomToast().displyToast(getContext(), v, \"Server unreachable, Please retry again later\");\n }\n });\n\n }",
"@Test\n public void cTestGetLoginToken() {\n token = given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .jsonPath().getString(\"token\");\n }",
"boolean hasLoginapiavgrtt();",
"private void retrieveAccessToken() {\n Log.d(TAG, \"at retreiveAccessToken\");\n String accessURL = TWILIO_ACCESS_TOKEN_SERVER_URL + \"&identity=\" + \"1234\" + \"a\";\n Log.d(TAG, \"accessURL \" + accessURL);\n Ion.with(this).load(accessURL).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null) {\n Log.d(TAG, \"Access token: \" + accessToken);\n MainActivity.this.accessToken = accessToken;\n registerForCallInvites();\n } else {\n Toast.makeText(MainActivity.this,\n \"Error retrieving access token. Unable to make calls\",\n Toast.LENGTH_LONG).show();\n Log.d(TAG, e.toString());\n }\n }\n });\n }",
"@Override\n public void onLoginFailure() {\n\n }",
"public String getAccessToken();",
"public AuthToken loginUser(){\n return null;\n }",
"protected Response login() {\n return login(\"\");\n }",
"@Override\n public void onFailure(Call<TokenApiResponse> call, Throwable t) {\n Log.e(LOG_TAG, t.getMessage());\n tokenCallback.onError(t);\n\n }",
"@Override\n public void onAuthenticationFailed() {\n }",
"private ResponseEntity<TokenLoginResponse> requestLoginResponse() {\n LoginRequest userLogin = new LoginRequest();\n userLogin.setUsername(\"user\");\n userLogin.setPassword(\"password\");\n ResponseEntity<TokenLoginResponse> loginResponse = new TestRestTemplate().postForEntity(\"http://localhost:\" + port + \"/login/api\", userLogin, TokenLoginResponse.class);\n assertEquals(HttpStatus.OK, loginResponse.getStatusCode());\n return loginResponse;\n }",
"@Override\n\tpublic void onLoginFailure(Exception arg0) {\n\t\t\n\t}",
"AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"@Override\n\tpublic Response validateToken(\n\t\t\tString user,\n\t\t\tString token,\n\t\t\tString client_id,//client_id from the app calling the API\n\t\t\tString url,\n\t\t\tString method){\n\n\t\ttry{\t\t\t\n\t\t\tOA2Response result = sessionHandler.validateSession(client_id, user, token, url, method);\n\t\t\treturn Response.ok(result).build();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\toa2logger.logError(httpRequest, Level.SEVERE, e.getLocalizedMessage());\n\t\t\treturn Response.status(Status.INTERNAL_SERVER_ERROR).\n\t\t\t\t\tentity(new OA2Response(500, \"Internal server Error.\"))\n\t\t\t\t\t.build();\n\t\t}\n\t}",
"@Override\r\n public void onResponse(Call call, Response response) throws IOException{\r\n String responseText = response.body().string();\r\n Slog.d(TAG, \"response token: \"+responseText);\r\n if(!TextUtils.isEmpty(responseText)){\r\n try {\r\n JSONObject responseObject = new JSONObject(responseText);\r\n token = responseObject.getString(\"token\");\r\n // Slog.d(TAG, \"token : \"+token);\r\n login_finally(token, user_name);\r\n }catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n }",
"void onGetTokenSuccess(AccessTokenData token);",
"public void testGetSessionToken() throws Exception {\r\n LOG.info(\"getSessionToken\");\r\n TokenAuthorisation token = tmdb.getAuthorisationToken();\r\n assertFalse(\"Token is null\", token == null);\r\n assertTrue(\"Token is not valid\", token.getSuccess());\r\n LOG.info(token.toString());\r\n \r\n TokenSession result = tmdb.getSessionToken(token);\r\n assertFalse(\"Session token is null\", result == null);\r\n assertTrue(\"Session token is not valid\", result.getSuccess());\r\n LOG.info(result.toString());\r\n }",
"private boolean validateAccessToken(String clientId, String clientSecret) {\n log.info(\"Client Id:{} Client Secret:{}\", clientId, clientSecret);\n\n // Enable the Below code when the Introspection URL is ready to test\n /**\n * String auth = clientId + clientSecret; RestTemplate restTemplate = new RestTemplate();\n * HttpHeaders headers = new HttpHeaders(); headers.add(\"Content-Type\",\n * MediaType.APPLICATION_JSON_VALUE); headers.add(\"Authorization\", \"Basic \" +\n * Base64.getEncoder().encodeToString(auth.getBytes())); HttpEntity<String> request = new\n * HttpEntity<String>(headers);\n *\n * <p>log.info(\"Sending Token Intropsection request to Endpoint::::: {}\",\n * tokenIntrospectionURL); ResponseEntity<String> response =\n * restTemplate.exchange(tokenIntrospectionURL, HttpMethod.POST, request, String.class); *\n */\n return true;\n }",
"@Override\r\n protected LoginResult doInBackground(Void... params) {\n Call<AuthResponse> authCall;\r\n authCall = api.login(phone, password, Api.KEY);\r\n\r\n try {\r\n Response<AuthResponse> authResponse = authCall.execute();\r\n\r\n if (authResponse.isSuccessful()) {\r\n AuthResponse auth = authResponse.body();\r\n Log.d(TAG, \"token => \" + auth.getCredential().getToken());\r\n accountPreference.saveLogin(phone, password);\r\n accountPreference.saveToken(auth.getCredential().getToken());\r\n accountPreference.saveEmail(auth.getCredential().getEmail());\r\n accountPreference.saveName(auth.getCredential().getName());\r\n accountPreference.savePhoto(auth.getCredential().getPhoto());\r\n return new LoginResult(true, null);\r\n }\r\n\r\n String errorString = authResponse.errorBody().string();\r\n Log.d(TAG, \"error => \" + errorString);\r\n Gson gson = new GsonBuilder()\r\n .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\r\n .create();\r\n String error = null;\r\n\r\n try {\r\n ErrorReponse e = gson.fromJson(errorString, ErrorReponse.class);\r\n error = e.getMessage();\r\n } catch (JsonSyntaxException e) {\r\n error = getResources().getString(R.string.error_occured);\r\n }\r\n\r\n return new LoginResult(false, error);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return new LoginResult(false, null);\r\n }\r\n }",
"@RequestMapping(value = \"login\", method = RequestMethod.GET)\r\n public void requestAccessCode(HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n try {\r\n response.sendRedirect(DIALOG_OAUTH + \"?client_id=\" + CLIENT_ID\r\n + \"&redirect_uri=\" + REDIRECT_URI + \"&scope=\" + SCOPE);\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"String getLoginapiavgrtt();",
"Future<String> getAccessToken(OkapiConnectionParams params);",
"public AuthResponse loginAccount(Account acc){\n Call<AuthResponse> call = endpoints.loginAcc(acc);\n AuthResponse serverResponse = null;\n try {\n serverResponse = call.execute().body();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return serverResponse;\n }",
"OAuth2Token getToken();",
"@Override\n\tpublic void login() {\n\t\tAccountManager accountManager = AccountManager.get(context);\n\t\tAccount[] accounts = accountManager.getAccountsByType(GOOGLE_ACCOUNT_TYPE);\n\t\tif(accounts.length < 1) throw new NotAccountException(\"This device not has account yet\");\n\t\tfinal String userName = accounts[0].name;\n\t\tfinal String accountType = accounts[0].type;\n\t\tBundle options = new Bundle();\n\t\tif(comService.isOffLine()){\n\t\t\tsetCurrentUser(new User(userName, userName, accountType));\n\t\t\treturn;\n\t\t}\n\t\taccountManager.getAuthToken(accounts[0], AUTH_TOKEN_TYPE, options, (Activity)context, \n\t\t\t\tnew AccountManagerCallback<Bundle>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(AccountManagerFuture<Bundle> future) {\n\t\t\t\t\t\tString token = \"\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tBundle result = future.getResult();\n\t\t\t\t\t\t\ttoken = result.getString(AccountManager.KEY_AUTHTOKEN);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCurrentUser(new User(userName, userName, accountType, token));\n\t\t\t\t\t\t} catch (OperationCanceledException e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(\"Login\", \"Token: \" + token);\n\t\t\t\t\t}\n\t\t\t\t}, new Handler(new Handler.Callback() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean handleMessage(Message msg) {\n\t\t\t\t\t\tLog.d(\"Login\", msg.toString());\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t}",
"private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"ubnaccountsfail\", t.toString());\n showToast(getString(R.string.error_500));\n\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"void onAuthenticationSucceeded(String token);",
"public void loginCallback(JSONObject response) {\n \t/*\n \t * Checks if the response we got after sending the request has any errors,\n \t * in them (i.e. login wasn't successful).\n \t * Example error response :\n \t * {\n \t * \t\t\"error\": \"The username or password wasn't found in the server.\n \t * }\n \t */\n \tif( response.has(\"error\") == true) {\n \t\tToast toast;\n\t\t\ttry {\n\t\t\t\ttoast = Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\tresponse.getString(\"error\"), \n\t\t\t\t\t\tToast.LENGTH_SHORT \n\t\t\t\t);\n\t\t\t\ttoast.show();\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \t\n \t} else {\n \t\t\n \t\t/*\n \t\t * Login was successful, then store the user_id and user_token sent\n \t\t * back with the response. So we have store them locally, so that we\n \t\t * can check it and skip login page next time the user uses the app.\n \t\t * The token from the response should be sent with subsequent requests. \n \t\t * Example correct login response :\n \t\t * {\n \t\t * \t\t\"data\" {\n \t\t * \t\t\t\"token\" : \"3h4k2g432442k34k2hdsfadsf\",\n \t\t * \t\t\t\"user_id\": 3\n \t\t * \t\t}\n \t\t * }\n \t\t */\n \t\tContext context = getApplicationContext();;\n \tSharedPreferences pref = context.getSharedPreferences(\n \t\t\tgetString(R.string.preference_file_key),\n \t\t\tContext.MODE_PRIVATE\n \t);\n \tSharedPreferences.Editor editor = pref.edit();\n \ttry {\n \t\teditor.putString(\"user_id\", \n \t\t\tresponse.getJSONObject(\"data\").getString(\"user_id\")\n \t\t);\n \t\teditor.putString(\"token\", \n \t\t\tresponse.getJSONObject(\"data\").getString(\"token\")\n \t\t);\n \t} catch(JSONException e) { e.printStackTrace(); }\n \t\n \teditor.commit();\n \t\n \t// Open HomeActivity.\n \tIntent homeIntent = new Intent(this, HomeActivity.class);\n \tstartActivity(homeIntent);\n \t}\n \t\t \t\n }",
"@ApiOperation(value = \"카카오로그인\", response = User.class)\n\t@PostMapping(\"/login\")\n\t public ResponseEntity<User> login(@RequestBody String accessToken) {\n\t \n\t int indexsame = 0;\n\t indexsame= accessToken.indexOf(\"=\");\n\t String token = accessToken.substring(indexsame+1, accessToken.length());\n\t HashMap<String,Object>userInfo =kakao.getUserInfo(token);\n\t User loginuser=new User();\n\t String id;\n\t String nickname;\n\t Object temp;\n\t if(userInfo!=null) {\n\t temp= userInfo.get(\"id\");\n\t temp=temp+\"\";\n\t id= temp+\"kakao.com\";\n\t if(userservice.getUserCount(id)>0) {\n\t User user= new User();\n\t user.setUserId(id);\n\t loginuser=userservice.login(user);\n\t }\n\t else if(userservice.getUserCount(id)==0) {\n\t Random r = new Random();\n\t int dice = r.nextInt(157211)+48271;\n\t String dicesen=Integer.toString(dice);\n\t String pw = dicesen;\n\t loginuser.setUserId(id);\n\t loginuser.setUserPw(pw);\n\t int totalcount=userservice.getTotalCount();\n\t loginuser.setUserName(totalcount+\"\");\n\t nickname= temp+\"\";\n\t loginuser.setUserNickname(nickname);\n\t userservice.insertUser(loginuser);\n\t }\n\t }\n\t return new ResponseEntity<User>(loginuser, HttpStatus.OK);\n\t}",
"@Override\n public void onFailure(int code, String msg) {\n Toast.makeText(RegisterActivity.this,\"登录失败:\"+msg,Toast.LENGTH_SHORT).show();\n }",
"@Test\n public void testTokenEndPointNoParams() throws Exception {\n refreshRequestAndResponse();\n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"POST\");\n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointNoParams() => \" + response.getContentAsString());\n \n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n assertTrue( response.getStatus() == HttpServletResponse.SC_BAD_REQUEST ||\n response.getStatus() == HttpServletResponse.SC_UNAUTHORIZED );\n }",
"public void update_token() {\n ApiService api = RetroClient.getApiService();\n\n\n Call<Login> call = api.getLoginJason(pref.getString(\"email\", null), pref.getString(\"password\", null), \"Android\");\n\n progressDialog.show();\n\n call.enqueue(new Callback<Login>() {\n @Override\n public void onResponse(Call<Login> call, Response<Login> response) {\n progressDialog.dismiss();\n if (response.isSuccessful()) {\n // Toast.makeText(MainActivity.this, \"new token: \" + \"token \" + response.body().getData().getToken(), Toast.LENGTH_SHORT).show();\n editor.putString(\"token\", response.body().getData().getToken());\n editor.commit();\n //Toast.makeText(MainActivity.this, \"Token Updated, press the button again\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n //but but i can access the error body here.,\n try {\n JSONObject jObjError = new JSONObject(response.errorBody().string());\n String status = jObjError.getString(\"message\");\n String error_msg = jObjError.getJSONObject(\"data\").getString(\"errors\");\n Build_alert_dialog(getApplicationContext(), status, error_msg);\n\n } catch (Exception e) {\n // Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }\n\n @Override\n public void onFailure(Call<Login> call, Throwable t) {\n progressDialog.dismiss();\n Build_alert_dialog(MainActivity.this, \"Connection Error\", \"Please Check You Internet Connection\");\n }\n });\n\n\n }",
"@Test\n public void doFailedAuthTest() {\n// loadInvalidCredentials();\n//\n// final RestClient restClient = new HttpClientRestClient();\n// restClient.init(testConfig);\n//\n// final SsoSessionRefreshHandler handler = new SsoSessionRefreshHandler(\n// testConfig.getSsoLoginCredentials(),\n// pardotClient\n// );\n//\n// // Sanity check\n// assertFalse(testConfig.getSsoLoginCredentials().hasAccessToken());\n//\n// // Validate not yet valid\n// assertFalse(\"should not yet be valid\", handler.isValid());\n//\n// // Call method with valid credentials and this should throw LoginFailedException.\n// assertThrows(LoginFailedException.class, handler::refreshCredentials);\n//\n// // Sanity check\n// assertFalse(testConfig.getSsoLoginCredentials().hasAccessToken());\n }",
"@Override\n public void onFailure(Exception exception) {\n System.out.println(\"Sign-In Failure: \"+exception);\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirectUri());\n Client.oauth(app);\n String accessToken = app.fetchToken(accessCode);\n\n //check if user input is valid by testing if accesscode given by user successfully authorises the application\n if (!(app.isAuthorized())) {\n throw new IllegalArgumentException();\n }\n\n return accessToken;\n }",
"@Test\n public void testValidToken() {\n try {\n int coachId = authBO.getUserIdAndValidateToken(\"thisisaworkingtoken\");\n Assert.assertTrue(coachId == 1);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }",
"private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }",
"private void logIn(LogSignTemplate credentials){\n Call<LogSignTemplate> callNewTrack = nightAPI.authorize(credentials);\n callNewTrack.enqueue(new Callback<LogSignTemplate>() {\n @Override\n public void onResponse(Call<LogSignTemplate> call, Response<LogSignTemplate> response) {\n if(response.isSuccessful()){\n Log.d(\"QuestionsCallback\", \"//////////////////////////////////// SUCCESFUL LOGIN !!!!!!!!!!!!!!! /////////////////////////////////////\");\n Toasty.success(getContext(), \"Succes, welcome.\", Toast.LENGTH_SHORT, true).show();\n Intent intent = new Intent(getContext(), MenuActivity.class);\n startActivity(intent);\n }\n else{\n Log.d(\"QuestionsCallback\", \"//////////////////////////////////// NO SUCCESFUL RESPONSE /////////////////////////////////////\");\n Toasty.error(getContext(), \"Incorrect username or password.\", Toast.LENGTH_SHORT, true).show();\n }\n }\n\n @Override\n public void onFailure(Call<LogSignTemplate> call, Throwable t) {\n Log.d(\"QuestionsCallback\", \"//////////////////////////////////////// ERROR /////////////////////////////////\");\n Toasty.error(getContext(), \"Error while validating..\", Toast.LENGTH_SHORT, true).show();\n t.printStackTrace();\n }\n });\n }",
"void errorLogin(Throwable caught);",
"private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }",
"void onAuthenticationError(Throwable throwable);",
"private void sendLogin(String username, String password) {\n LoginService loginService = NetContext.instance.createLoginService();\n // data & format\n // format => MediaType\n // data => json\n MediaType jsonMediaType = MediaType.parse(\"application/json\");\n String loginJson = (new Gson()).toJson(new LoginBodyJson(username, password));\n\n RequestBody loginBody = RequestBody.create(jsonMediaType, loginJson);\n\n //3: Create Call\n Call<LoginResponseJson> loginCall = loginService.login(loginBody);\n\n loginCall.enqueue(new Callback<LoginResponseJson>() {\n @Override\n public void onResponse(Call<LoginResponseJson> call, Response<LoginResponseJson> response) {\n LoginResponseJson loginResponseJson = response.body();\n if (loginResponseJson == null) {\n Log.d(TAG, \"onResponse: Could not parse body\");\n etUsername.setError(\"Tên đăng nhập hoặc mật khẩu sai\");\n } else {\n Log.d(TAG, String.format(\"onResponse, oh yeah: %s\", loginResponseJson));\n if (response.code() == 200) {\n token = loginResponseJson.getAccessToken();\n\n onLoginSuccess();\n }\n }\n }\n\n @Override\n public void onFailure(Call<LoginResponseJson> call, Throwable t) {\n Log.d(TAG, String.format(\"onFailure: %s\", t));\n Toast.makeText(LoginActivity.this,\"Mất kết nối\",Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n });\n }",
"@Override\n public void onLogin() {\n accessToken = mSimpleFacebook.getSession().getAccessToken();\n Log.e(\"facebook token\", \"\" + accessToken);\n //check validation\n new LoginGoogleFb().execute(null, null, null);\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onError(Exception e) {\n\t\t\t\t\t\t\t\tToast.makeText(mActivity, \"登录失败\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\tPlatformJinliLoginAndPay.getInstance().isLogined = false;\n\t\t\t\t\t\t\t}",
"boolean hasLoginResponse();",
"public void loginSuccess(String response) {\n \ttry {\n \t\t// Parse the json data and create a json object.\n \t\tJSONObject jsonRes = new JSONObject(response);\n \t\tJSONObject data = jsonRes.getJSONObject(\"data\");\n \t\t\n \t\t// Now add the token into the shared preferences file.\n \t\tContext context = getApplicationContext();\n \t\tSharedPreferences sharedPref = context.getSharedPreferences(\n \t\t\t\"com.example.traffic.pref_file\", \n \t\t\tContext.MODE_PRIVATE\n \t\t);\n \t\t\n \t\t// Now get the editor to the file and add the token \n \t\t// recieved as a response.\n \t\tSharedPreferences.Editor editor = sharedPref.edit();\n \t\teditor.putString(\"token\" , data.getString(\"token\"));\n \t\teditor.commit();\n \tToast toast = Toast.makeText(getApplicationContext(),\n \t\t\t\"Logged in.\", \n \t\t\tToast.LENGTH_SHORT \n \t);\n \ttoast.show();\n \t} catch(Exception e) {\n \t\te.printStackTrace();\n \t}\n \t\n }",
"private void login() {\n String email = username.getText().toString();\n String pass = password.getText().toString();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(DonorInterface.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n DonorInterface api = retrofit.create(DonorInterface.class);\n Login login = new Login(email, pass);\n Call<Donor> call = api.login(login);\n\n call.enqueue(new Callback<Donor>() {\n @Override\n public void onResponse(Call<Donor> call, Response<Donor> response) {\n if (response.isSuccessful())\n {\n token = response.body().getToken().toString();\n Intent intent = new Intent(LoginActivity.this, SecondActivity.class);\n intent.putExtra(\"token\", token);\n startActivity(intent);\n finish();\n }\n else\n {\n Toast.makeText(LoginActivity.this,\"Username or Password is incorrect!\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Donor> call, Throwable t) {\n Toast.makeText(LoginActivity.this,\"Issue in method\",Toast.LENGTH_SHORT).show();\n }\n });\n\n\n\n }",
"@ApiOperation(value=\"Login\", notes=\"Login action\")\n @RequestMapping(value=\"/user/login\",method= RequestMethod.POST)\n @ResponseBody\n public LoginResVO loginHomeconnect(@ApiParam(value = \"account login\", required = true)@RequestHeader(value = \"PlatID\", required = true) String platID,@RequestHeader(value = \"AppID\", required = false) String appID,\n\t\t\t\t\t@RequestHeader HttpHeaders httpHeaders,\n\t\t\t\t\t@RequestBody(required = false) LoginReqVO body,HttpServletResponse response){\n\tString url = \"/api/translator/user/login\";\n\tLoginResVO result = new LoginResVO(RetObject.fail());\n\tMap<String,String> headerMap = new HashedMap();\n\theaderMap.put(\"PlatID\", platID);\n\theaderMap.put(\"AppID\", appID);\n\tString headers = getJSONString(headerMap);\n\tString bodyText = getJSONString(body);\n\tError headerError = validateHeaders(platID,appID);\n\tError bodyError = validateLoginBodyError(body);\n\tif ( bodyError == null && headerError == null){\n\t\tresponse.addHeader(\"AccessToken\",\"12345678\");\n\t\tresult = new LoginResVO();\n\t}\n\treturn result;\n}",
"@Override\n public void onFailure(int arg0, String arg1) {\n login_success = false;\n toast(R.string.activity_login_fail, arg1);\n }",
"@FormUrlEncoded\n @POST(\"/oauth/access_token\")\n Flowable<ResponseBody> getAccessToken(@Field(\"oauth_verifier\") String oauthVerifier);",
"@Test(expected = UserNotInSessionException.class)\n public void invalidTokenAtGettingUsername4Token(){\n \tGetUsername4Token service = new GetUsername4Token(INVALIDTOKEN);\n service.execute();\n }",
"public void authenticate() throws Exception {\n try {\n\n // Build the form body\n final FormBody.Builder formBodyBuilder = new FormBody.Builder().add(\"scope\", \"api-tenant\");\n\n // Has username/password\n if (appProps.getFodGrantType().equals(VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)) {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_PASSWORD)\n .add(\"username\", appProps.getFodTenantId() + \"\\\\\" + appProps.getFodUsername())\n .add(\"password\", appProps.getFodPassword());\n } else // Has api key/secret\n {\n formBodyBuilder.add(\"grant_type\", VulnerabilityReportConstants.GRANT_TYPE_CLIENT_CREDENTIALS)\n .add(\"client_id\", appProps.getFodClientId())\n .add(\"client_secret\", appProps.getFodClientSecret());\n\n }\n final RequestBody formBody = formBodyBuilder.build();\n\n final Request request = new Request.Builder()\n .url(appProps.getFodAPIBaseURL() + \"/oauth/token\")\n .post(formBody)\n .build();\n final Response response = client.newCall(request).execute();\n \n if (!response.isSuccessful()) {\n \tlogger.debug(\"response::\" + response.message() + \", \" + response.code() + \", \" + response.toString());\n throw new FoDConnectionException(\"Unexpected code \" + response);\n }\n\n logger.info(\"Successful connection to Fortify On Demand!\");\n \n final String content = IOUtils.toString(response.body().byteStream(), \"utf-8\");\n response.body().close();\n\n // Parse the Response\n final JsonParser parser = new JsonParser();\n final JsonObject obj = parser.parse(content).getAsJsonObject();\n this.token = obj.get(\"access_token\").getAsString();\n\n } catch (final FoDConnectionException fce) {\n if (fce.getMessage().contains(VulnerabilityReportConstants.FOD_UNAUTORIZED)) {\n logger.error(\"FoD CONNECTION FAILED. Please check the FoD URL, username, tenant, and password and try again.\");\n logger.info(\"FoD URL=\" + appProps.getFodAPIBaseURL());\n logger.info(\"FoD GrantType=\" + appProps.getFodGrantType());\n logger.info(\"FoD client Id=\" + appProps.getFodClientId());\n logger.info(\"FoD username=\" + appProps.getFodUsername());\n logger.info(\"FoD tennant=\" + appProps.getFodTenantId());\n } else {\n logger.error(\"FoD Response was not successful with message: \" + fce.getMessage());\n }\n throw fce;\n }\n\n catch (final UnknownHostException uhe) {\n logger.error(\"Unknown Host Error. Are you connected to the internet?\");\n uhe.printStackTrace();\n throw uhe;\n }\n\n catch (final Exception e) {\n logger.error(\"Authentication to FoD failed. Connection seems OK.\");\n e.printStackTrace();\n throw e;\n }\n }",
"@Test\n\tpublic void testAuthenticateAdminAccountWithInvalidToken() {\n\n\t\tString error = null;\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(USERNAME2);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"An error occured. Please try again.\", error);\n\n\t}",
"@Override\n public void onAuthenticationError(int errorCode, CharSequence errString) {\n }",
"private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public void onError(MsalException exception) {\n Log.d(TAG, \"Authentication failed: \" + exception.toString());\n updateRefreshTokenUI(false);\n if (exception instanceof MsalClientException) {\n /* Exception inside MSAL, more info inside MsalError.java */\n assert true;\n\n } else if (exception instanceof MsalServiceException) {\n /* Exception when communicating with the STS, likely config issue */\n assert true;\n\n } else if (exception instanceof MsalUiRequiredException) {\n /* Tokens expired or no session, retry with interactive */\n assert true;\n }\n }",
"@Override\n public F.Promise<Result> onAuthFailure(Http.Context context, String content) {\n final Http.Context c = context;\n return F.Promise.promise(new F.Function0<Result>() {\n @Override\n public Result apply() throws Throwable {\n String path = c.request().path();\n String sessionId = context.session().get(\"sessionId\");\n try {\n SessionStoreAdapter.getInstance().getUserSession(sessionId);\n c.flash().put(\"error\", Messages.get(\"global.error.noauthorizationforthispage\"));\n return ok(index.render());\n } catch(Exception e) {\n return ok(login.render(path));\n }\n }\n });\n }",
"@Override\n\tprotected boolean doGetAccessToken(ApiJobImpl job) throws IOException {\n\t\treturn false;\n\t}",
"private void attemptLogin(){\n //reset error\n et_email.setError(null);\n et_password.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = et_email.getText().toString();\n final String password = et_password.getText().toString();\n final boolean finish = false;\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n et_password.setError(getString(R.string.error_invalid_password));\n focusView = et_password;\n cancel = true;\n }else if (!isEmailValid(email)) {\n et_email.setError(getString(R.string.error_invalid_email));\n focusView = et_email;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"ctrl\", \"login\");\n json.put(\"email\", email);\n json.put(\"password\", password);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String requete = json.toString();\n Log.v(\"req\", requete);\n HttpQuery login = new HttpQuery(requete, this);\n login.execute();\n }\n\n\n }",
"void successLogin();",
"@Override\n public void tokenOverdue(final Context context) {\n System.out.println(\"tokenOverdue token 失效,重新获取token\");\n\n // 开发者通过自己的方法获取token,这里是demo\n String acountId = \"\";\n USDKCommonManager.updateToken(context, acountId);\n\n /**** 这份代码是例子。。。。。 ****/\n acountId = USDKTest.getSPToken(context);\n String callerPhone = USDKTest.getCallerPhone(context);\n if (TextUtils.isEmpty(acountId) || TextUtils.isEmpty(acountId)) {\n return;\n }\n USDKTest.getToken(context, callerPhone, acountId, new IUSDKHttpCallback() {\n @Override\n public void onSuccess(Object result) {\n try {\n String json = (String) result;\n System.out.println(\"onSuccess json =\" + json);\n String token = \"\";\n\n USDKTestResultGetTokenBean bean = new USDKTestResultGetTokenBean(new JSONObject(json));\n token = bean.getToken();\n USDKCommonManager.updateToken(context, token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailed(Object result) {\n System.out.println(\"onFailed result =\" + result);\n }\n });\n /**** 这份代码是例子。。。。。 ****/\n }",
"public void customLoginTwitter() {\n //check if user is already authenticated or not\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(this, new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterEmail(twitterSession);\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(this, \"User already authenticated\", Toast.LENGTH_SHORT).show();\n// fetchTwitterEmail(getTwitterSession());\n }\n }",
"@GET\n Call<String> getLogin(@Url String URL);",
"@Override\n public void onSignInFailed() {\n BYPASS_LOGIN = true;\n }",
"public void retrieveAccessToken(Context context) {\n PBookAuth mPBookAuth = mApplicationPreferences.getPBookAuth();\n if (mPBookAuth == null || TextUtils.isEmpty(mPBookAuth.getClientName())) {\n view.onReturnAccessToken(null, false);\n return;\n }\n Ion.with(context).load(ACCESS_TOKEN_SERVICE_URL).setBodyParameter(\"client\", mPBookAuth.getClientName()).setBodyParameter(\"phoneNumber\", mPBookAuth.getPhoneNumber()).setBodyParameter(\"platform\", PLATFORM_KEY).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null || !TextUtils.isEmpty(accessToken)) {\n mApplicationPreferences.setTwilioToken(accessToken);\n view.onReturnAccessToken(accessToken, true);\n } else {\n view.onReturnAccessToken(accessToken, false);\n }\n }\n });\n }",
"protected void checkToken(){\n DBManager dao = new DBManager(appContext);\n dao= dao.open();\n Cursor c = dao.selectionner();\n if (c.getCount()>0) {\n System.out.println(\"Base activity token:\"+c.getCount());\n System.out.println(\"Base activity token:\"+c.getString(0));\n Intent main =new Intent(this, SplashScreenActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n } else {\n System.out.println(\"No token Found\");\n Intent main = new Intent(this, LoginActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n }\n }",
"@Override\n public void onFailure(Auth0Exception error) {\n showNextActivity();\n }",
"public void testLoginPIN() {\r\n try {\r\n tokenHandler.loginPIN(pinCode);\r\n tokenHandler.logoutPIN();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"@GET\n @Path(\"/login/{token}/{username}/{password}\")\n @Produces(MediaType.TEXT_HTML)\n public JAXResult login(@PathParam(value = \"token\") String token) {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public java.lang.String getAccessToken(java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException;",
"@Test\r\n public void testGetGuestSessionToken() throws Exception {\r\n LOG.info(\"getGuestSessionToken\");\r\n TokenSession result = tmdb.getGuestSessionToken();\r\n \r\n assertTrue(\"Failed to get guest session\", result.getSuccess());\r\n }",
"private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }",
"public void loginToFB()\r\n {\n \t\r\n\t String access_token = ThisUserConfig.getInstance().getString(ThisUserConfig.FBACCESSTOKEN);\r\n\t long expires = ThisUserConfig.getInstance().getLong(ThisUserConfig.FBACCESSEXPIRES);\r\n\t \r\n\t if (access_token != \"\") {\r\n\t facebook.setAccessToken(access_token);\r\n\t }\r\n\t \r\n\t if (expires != 0 && expires != -1) {\r\n\t facebook.setAccessExpires(expires);\r\n\t }\r\n \t\r\n \t if (!facebook.isSessionValid()) {\r\n \t\t ProgressHandler.dismissDialoge();\r\n \t\t facebook.authorize(underlying_activity, permissions, new LoginDialogListener()); \r\n \t\t \r\n \t }\r\n }",
"@Test\n public void testTokenEndPointAnonymousTokenRequest() throws Exception {\n String callback = \"Backplane.call_back\";\n \n // should return the form:\n // callback({\n // \"access_token\": \"l5feG0KjdXTpgDAfOvN6pU6YWxNb7qyn\",\n // \"expires_in\":3600,\n // \"token_type\": \"Bearer\",\n // \"backplane_channel\": \"Tm5FUzstWmUOdp0xU5UW83r2q9OXrrxt\"\n // })\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequest() => \" + response.getContentAsString());\n \n assertTrue(\"Invalid response: \" + response.getContentAsString(), response.getContentAsString().\n matches(callback + \"[(][{]\\\\s*\\\"access_token\\\":\\\\s*\\\".{22}+\\\",\\\\s*\" +\n \"\\\"expires_in\\\":\\\\s*3600,\\\\s*\" +\n \"\\\"token_type\\\":\\\\s*\\\"Bearer\\\",\\\\s*\" +\n \"\\\"backplane_channel\\\":\\\\s*\\\".{32}+\\\"\\\\s*[}][)]\"));\n \n // cleanup test token\n String result = response.getContentAsString().substring(response.getContentAsString().indexOf(\"{\"), response.getContentAsString().indexOf(\")\"));\n Map<String,Object> returnedBody = new ObjectMapper().readValue(result, new TypeReference<Map<String,Object>>() {});\n daoFactory.getTokenDao().delete((String)returnedBody.get(\"access_token\"));\n \n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n if (resultCode != RESULT_OK || requestCode != AUTH_TOKEN_REQUEST_CODE) {\n Log.e(TAG, \"Finished with no result.\");\n return;\n }\n\n mToken = NestAPI.getAccessTokenFromIntent(intent);\n if (mToken != null) {\n Auth.saveAuthToken(this, mToken);\n authenticate(mToken);\n } else {\n Log.e(TAG, \"Unable to resolve access token from payload.\");\n }\n }",
"private void getAccessToken(final String code, final OperationCallback<User> callback) {\n \n new Thread() {\n @Override\n public void run() {\n Log.i(TAG, \"Getting access token\");\n try {\n String postData = \"client_id=\" + CLIENT_ID + \"&client_secret=\" + CLIENT_SECRET +\n \"&grant_type=authorization_code\" + \"&redirect_uri=\" + CALLBACK_URL + \"&code=\" + code;\n String response = postRequest(TOKEN_URL, postData);\n \n Log.i(TAG, \"response \" + response);\n JSONObject jsonObj = (JSONObject) new JSONTokener(response).nextValue();\n \n mAccessToken = jsonObj.getString(\"access_token\");\n Log.i(TAG, \"Got access token: \" + mAccessToken);\n \n Gson gson = new Gson();\n User user = gson.fromJson(jsonObj.getJSONObject(\"user\").toString(), User.class);\n user.setAccessToken(mAccessToken);\n \n callback.notifyCompleted(user);\n } catch (Exception ex) {\n callback.notifyError(ex);\n Log.e(TAG, \"Error getting access token\", ex);\n }\n \n }\n }.start();\n }",
"@Test\n @DisplayName(\"valid access token is accepted\")\n public void validOAuthJwtShouldReturnUsername() throws Exception {\n String tokenEndpoint = keycloakContainer.getAuthServerUrl() + \"/realms/calamitaid/protocol/openid-connect/token\";\n var restTemplate = new RestTemplate();\n var headers = new HttpHeaders();\n headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);\n headers.setBasicAuth(\"pvt-access\", \"6cf9e105-f5cb-477d-9b65-45b40d1df8f8\");\n var map = new LinkedMultiValueMap<>();\n map.add(\"grant_type\", \"password\");\n map.add(\"username\", \"calmuser\");\n map.add(\"password\", \"calm123\");\n var token = restTemplate.postForObject(tokenEndpoint, new HttpEntity<>(map, headers), KeycloakToken.class);\n assertThat(token).isNotNull();\n\n String accessToken = token.getAccessToken();\n\n mvc.perform(MockMvcRequestBuilders.get(\"/protected\")\n .header(\"Authorization\", \"Bearer \" + accessToken))\n .andExpect(status().isOk());\n }",
"@FormUrlEncoded\n @POST(\"oauth/request_token\")\n Flowable<ResponseBody> requestToken(@Field(\"oauth_callback\") String oauthCallback);",
"@Test\n public void testTokenEndPointAnonymousTokenRequestWithInvalidScope() throws Exception {\n String callback = \"Backplane.callback\";\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"scope\",\"channel:notmychannel\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequestWithInvalidScope() => \" + response.getContentAsString());\n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n \n refreshRequestAndResponse();\n \n request.setRequestURI(\"/v2/token\");\n request.setMethod(\"GET\");\n request.setParameter(\"grant_type\", \"client_credentials\");\n setOAuthBasicAuthentication(request, \"anonymous\", \"\");\n request.setParameter(\"scope\",\"bus:notmybus\");\n request.setParameter(\"callback\", callback);\n \n handlerAdapter.handle(request, response, controller);\n logger.info(\"testTokenEndPointAnonymousTokenRequestWithInvalidScope() => \" + response.getContentAsString());\n assertTrue(response.getContentAsString().contains(ERR_RESPONSE));\n }",
"private void handleFacebookAccessToken(AccessToken token) {\n Log.d(TAG, \"handleFacebookAccessToken:\" + token);\n\n AuthCredential credential = FacebookAuthProvider.getCredential(token.getToken());\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n }\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(FacebookLoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mPasswordView.setError(null);\n usernameView.setError(null);\n\n // Store values at the time of the login attempt.\n String username = usernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n/*\nTODO: Move this to register area to see if email is a valid email address\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n */\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n //showProgress(true);\n HashMap<String, String> map = new HashMap<>();\n map.put(\"username\", username);\n map.put(\"pass\", password);\n mAuthTask = new httpUrlConn(map, \"http://hive.sewanee.edu/evansdb0/android1/scripts/hotPartyLogin.php\");\n\n mAuthTask.execute();\n\n try {\n if(mAuthTask.get().contains(\"true\")) {\n String r = mAuthTask.get().replace(\"true // \",\"\");\n Log.i(\"response\", r.toString());\n Toast.makeText(getApplicationContext(),r,Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this, chooseEvent.class);\n i.putExtra(\"username\", username);\n startActivity(i);\n\n }\n else {\n String[] resp = response.split(\",\");\n // for(String i: resp)\n //Toast.makeText(getApplicationContext(),i,Toast.LENGTH_SHORT).show();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n if (mAuthTask == null || mAuthTask.getStatus().equals(AsyncTask.Status.FINISHED)) {\n mAuthTask = null;\n }\n }\n }",
"@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }"
] | [
"0.70751226",
"0.6806021",
"0.65635896",
"0.6536943",
"0.6429866",
"0.6391102",
"0.63433254",
"0.6339727",
"0.6339727",
"0.6273136",
"0.6248333",
"0.6240425",
"0.62334037",
"0.62212116",
"0.62032944",
"0.6177323",
"0.61743754",
"0.61743367",
"0.6152731",
"0.61525935",
"0.61412615",
"0.6139976",
"0.6138267",
"0.6134591",
"0.6123307",
"0.61152947",
"0.6112464",
"0.60938656",
"0.6089176",
"0.6085905",
"0.60788345",
"0.60655737",
"0.60504377",
"0.6046081",
"0.6045094",
"0.604287",
"0.60412985",
"0.6031476",
"0.60050416",
"0.5986878",
"0.5981357",
"0.59759414",
"0.5969708",
"0.5968819",
"0.59662753",
"0.5962373",
"0.5956047",
"0.59516317",
"0.59322697",
"0.59292644",
"0.59257466",
"0.59202135",
"0.59191465",
"0.59118146",
"0.59046006",
"0.59008145",
"0.589889",
"0.5889629",
"0.5887584",
"0.58837557",
"0.58832556",
"0.58769405",
"0.5872553",
"0.58724505",
"0.5868682",
"0.5847044",
"0.58449394",
"0.5844258",
"0.583864",
"0.58382267",
"0.5838189",
"0.5832677",
"0.58289003",
"0.58188945",
"0.5816166",
"0.5810547",
"0.58023274",
"0.580034",
"0.5795839",
"0.57916284",
"0.57914877",
"0.57799894",
"0.57756954",
"0.5774469",
"0.5772184",
"0.57717866",
"0.5770519",
"0.57675654",
"0.57671374",
"0.57619286",
"0.5754008",
"0.5751386",
"0.5743896",
"0.5737784",
"0.57297397",
"0.57263327",
"0.5726192",
"0.57192355",
"0.57168466",
"0.5716706",
"0.5702856"
] | 0.0 | -1 |
/ This method returns the path from the source to the selected target and NULL if no path exists | public ArrayList<Vertex> getPath(Vertex target) {
ArrayList<Vertex> path = new ArrayList<Vertex>();
Vertex step = target;
// check if a path exists
if (predecessors.get(step) == null) {
return null;
}
path.add(step);
while (predecessors.get(step) != null) {
step = predecessors.get(step);
path.add(step);
}
// Put it into the correct order
Collections.reverse(path);
Vertex current=null;
Vertex next=null;
int length = path.size();
for(int i=0;i<length-1;i++){
current = path.get(i);
next = path.get(i+1);
if(!rapid && (nodeColor_map.get(current.getName()).equalsIgnoreCase("dB")||
nodeColor_map.get(next.getName()).equalsIgnoreCase("dB")))
rapid = true;
route_length+= edge_length_map.get(new Pair(current,next));
}
return path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Path getTargetPath()\n {\n return targetPath;\n }",
"java.lang.String getSrcPath();",
"public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }",
"public java.lang.String getTargetPath() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = s;\n return s;\n }\n }",
"public java.lang.String getTargetPath() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"SourceFilePath getFilePath();",
"Optional<String> getSource();",
"public String getDestLocation() {\r\n return this.destPath.getText();\r\n }",
"public static final String getPath(String source, String target) {\n File directory = null;\n try {\n directory = new File(source);\n } catch (NullPointerException ex) {\n return null;\n }\n if (directory.exists()) {\n for (String foldername : directory.list()) {\n if (foldername.equalsIgnoreCase(target)) {\n return Paths.get(source, foldername).toString();\n }\n }\n }\n return null;\n }",
"private static Path getTargetPath() {\r\n return Paths.get(getBaseDir(), \"target\");\r\n }",
"public Path createSourcespath()\n {\n if( m_sourcesPath == null )\n {\n m_sourcesPath = new Path();\n }\n Path path1 = m_sourcesPath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }",
"Path getPathFromNodeTo(Node destination);",
"public com.google.protobuf.ByteString\n getTargetPathBytes() {\n java.lang.Object ref = targetPath_;\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 targetPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getDestination() {\n if (isSeparateFolder()) {\n return destination.getText();\n } else {\n return null;\n }\n }",
"protected LinkedList<IVertex<String>> getPath(IVertex<String> target) {\n\n LinkedList<IVertex<String>> path = new LinkedList<IVertex<String>>();\n\n IVertex<String> step = target;\n\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }",
"public com.google.protobuf.ByteString\n getTargetPathBytes() {\n java.lang.Object ref = targetPath_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\r\n\tpublic ArrayList<E> getSingleSourcePath(E dst) {\r\n\t\tVertex<E> d = vertices.get(dst);\r\n\t\tArrayList<E> path = new ArrayList<E>();\r\n\t\tif(d != null && d.getPredecessor() != null) {\r\n\t\t\tpathFill(lastSrc, d, path);\r\n\t\t} else if(d == lastSrc && d != null) {\r\n\t\t\tpath.add(d.getElement());\r\n\t\t}\r\n\r\n\t\treturn path;\r\n\t}",
"java.lang.String getSourcepath(int index);",
"java.lang.String getSourcepath(int index);",
"public String getSourcePath()\r\n\t{\r\n\t\treturn sourcePath;\r\n\t}",
"@Override\n public Path getSourcePath(int index) {\n return sourcePath_.get(index);\n }",
"private Path getTargetFile(Endpoint target) {\n Path targetFile;\n if (target.getUrl().startsWith(\"sftp:\")) {\n URI host = null;\n URI rawuri = null;\n String path = null;\n try {\n rawuri = new URI(target.getUrl());\n path = rawuri.getRawPath();\n if (rawuri.getPort() == -1) {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost());\n } else {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost() + \":\" + rawuri.getPort());\n }\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(e);\n }\n SFTPEnvironment environment = new SFTPEnvironment().withUsername(target.getUser())\n .withPassword(target.getPassword().toCharArray())\n .withKnownHosts(new File(System.getProperty(\"user.home\"), \".ssh/known_hosts\"));\n FileSystem fileSystem = null;\n try {\n fileSystem = FileSystems.newFileSystem(host, environment,\n SFTPFileSystemProvider.class.getClassLoader());\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n targetFile = fileSystem.getPath(path);\n } else {\n targetFile = getProject().file(target.getUrl()).toPath();\n }\n return targetFile;\n \n }",
"String getDest();",
"public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }",
"private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}",
"@Override\n public java.util.List<Path> getSourcePathList() {\n return sourcePath_;\n }",
"public Path getSourcePath(int index) {\n if (sourcePathBuilder_ == null) {\n return sourcePath_.get(index);\n } else {\n return sourcePathBuilder_.getMessage(index);\n }\n }",
"private List<Node> getIntermediatePath(final Node source, final Node target) {\n if (P[source.id][target.id] == null) {\n return new ArrayList<Node>();\n }\n final List<Node> path = new ArrayList<Node>();\n path.addAll(getIntermediatePath(source, P[source.id][target.id]));\n path.add(P[source.id][target.id]);\n path.addAll(getIntermediatePath(P[source.id][target.id], target));\n return path;\n }",
"public SelectionPathV2 selectionPath(String sourceJP, String targetJP, boolean validatePath) {\n\n alreadyFound = false;\n // Verify if the join point exist\n // final JoinPointType source = getJoinPoint(joinPointList, sourceJP);\n var source = langSpec.getJoinPoint(sourceJP);\n var selPath = new SelectionPathV2(source, targetJP);\n\n if (source == null) {\n if (!validatePath) {\n // System.out.println(\"SEL PATH 1: \" + selPath);\n return selPath;\n }\n throw new RuntimeException(\n \"The source join point type '\" + sourceJP + \"' does not exist in the join point model.\");\n }\n Stack<Select> path = new Stack<>();\n final Select selected = select(source, targetJP);\n if (selected != null) {\n\n path.push(selected);\n selPath.setPath(path);\n // System.out.println(\"SEL PATH 2: \" + selPath);\n return selPath;\n } else {\n\n path = selectWithMiddlePath(targetJP, source, selPath);\n if (!path.isEmpty()) {\n selPath.setPath(path);\n }\n }\n // System.out.println(\"SEL PATH 3: \" + selPath);\n return selPath;\n\n }",
"File getTargetDirectory();",
"public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public String getSourcePath() {\n return sourcePath;\n }",
"public Optional<String> getSource() {\n\t\treturn Optional.ofNullable(_source);\n\t}",
"String getTarget();",
"String getTarget();",
"private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}",
"@Override\n\tpublic Path getEdgeIfExists(Location src, Location dest) {\n\t\tfor (Path p : paths.get(locations.indexOf(src))) \n\t\t\tif (p.getDestination().equals(dest))\n\t\t\t\treturn p;\n\n\t\treturn null;\n\n\t}",
"@Nullable String getPath();",
"public IPath getPath() {\n \t\tif (remotePath.equals(\"\")) {\n \t\t\treturn null;\n \t\t}\n \t\treturn new Path(remotePath);\n \t}",
"public void findDestination() {\n\t\t\n\t}",
"public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n srcPath_ = s;\n }\n return s;\n }\n }",
"public String getSource(){\r\n\t\treturn selectedSource;\r\n\t}",
"private static Image getTarget()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(tileDirectory + target));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}",
"java.lang.String getTarget();",
"java.lang.String getTarget();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"@Override\n public PathOrBuilder getSourcePathOrBuilder(\n int index) {\n return sourcePath_.get(index);\n }",
"public Optional<String> src() {\n\t\t\treturn Optional.ofNullable(_source);\n\t\t}",
"CtPath getPath();",
"Path getPath();",
"private Resource findDDRSource(Resource resource) {\n Resource answer = null;\n if (resource != null) {\n ValueMap properties = resource.getValueMap();\n String ddrTargetPath = properties.get(DDR_TARGET_PROPERTY_NAME, String.class);\n if (ddrTargetPath == null) {\n answer = findDDRSource(resource.getParent());\n } else {\n answer = resource;\n }\n }\n return answer;\n }",
"public LinkedList<Vertex> getPath(Vertex target) {\n LinkedList<Vertex> path = new LinkedList<Vertex>();\n Vertex step = target;\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }",
"public LinkedList<City> getPath(City target) {\r\n\r\n\t\tLinkedList<City> path = new LinkedList<City>();\r\n \t\tCity step = target;\r\n\t\t// check if a path exists\r\n\t\tif (predecessors.get(step) == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tpath.add(step);\r\n\t\twhile (predecessors.get(step) != null) {\r\n\t\t\tstep = predecessors.get(step);\r\n\t\t\tpath.add(step);\r\n\t\t}\r\n\t\t// Put it into the correct order\r\n\t\tCollections.reverse(path);\r\n\t\treturn path;\r\n\t}",
"public ArrayList<PathXNode> generatePath(PathXNode destination)throws VertexNotFoundException{\r\n \r\n String destState = destination.getState();\r\n if (destState.indexOf(\"MOUSE_OVER\") >= 0)\r\n destState = destState.substring(0, destState.indexOf(\"_MOUSE_OVER\"));\r\n \r\n if (path != null && !path.isEmpty())\r\n return null;\r\n \r\n Graph graph = getLevel().getGraph();\r\n \r\n //The shortest path from the current intersection/vertex to the destination\r\n //intersection/vertex as an ArrayList of vertices.\r\n ArrayList<Vertex> shortestPath = graph.findPath(getIntersection().getVertex(), destination.getVertex());\r\n \r\n ArrayList<PathXNode> newPath = new ArrayList();\r\n \r\n //Convert the shortestPath ArrayList of Vertices to PathXNodes.\r\n ArrayList<PathXNode> nodes = getLevel().getDataModel().getNodes();\r\n for (Vertex v : shortestPath){\r\n for (PathXNode node : nodes)\r\n if (node.getVertex() == v){\r\n newPath.add(node);\r\n break;\r\n }\r\n }\r\n \r\n \r\n newPath.remove(0);\r\n \r\n //Highlight the nodes.\r\n for (PathXNode node : newPath)\r\n node.setState(node.getState() + \"_HIGHLIGHTED\");\r\n \r\n destination.setState(destState + \"_HIGHLIGHTED\");\r\n if (newPath != null && !newPath.isEmpty()) {\r\n targetX = newPath.get(0).getConstantXPos();\r\n targetY = newPath.get(0).getConstantYPos();\r\n }\r\n return newPath; \r\n }",
"public File getSourceFile() {\n if (getSources().size() > 0) {\n return ((FilePath) this.getSources().iterator().next()).getFile();\n } else {\n return null;\n }\n }",
"public Path getPath();",
"List<IDirectory> getSourcePath();",
"abstract File getTargetDirectory();",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"@Override\n public java.util.List<? extends PathOrBuilder>\n getSourcePathOrBuilderList() {\n return sourcePath_;\n }",
"public PSLocator getSrcFolder()\n {\n return m_srcFolder;\n }",
"IPath getPath();",
"java.lang.String getSrc();",
"com.google.protobuf.ByteString\n getSrcPathBytes();",
"public String getSelectedFilePath(){\n return fileChooser.getSelectedFile().getAbsolutePath();\n }",
"public String getFilePath() {\n return getSourceLocation().getFilePath();\n }",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public abstract String getPath();",
"public abstract String getPath();",
"public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n srcPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getDestinationResource() {\r\n\t\treturn destinationSource;\r\n\t}",
"public java.lang.String getSourcepath(int index) {\n return sourcepath_.get(index);\n }",
"URL getTarget();",
"public java.lang.String getSourcepath(int index) {\n return sourcepath_.get(index);\n }",
"public Element lookupSourceOrOutput()\n {\n for (Element e: Element.values())\n if (e.sourceOf == this || this.sourceOf == e)\n return e;\n\n return null;\n }",
"public String getAvailablePath() {\n String path = getPath();\n if (isCut()) {\n path = getCutPath();\n }\n if (isCompressed()) {\n path = getCompressPath();\n }\n if (isToSandboxPath()) {\n path = getSandboxPath();\n }\n if (isOriginal()) {\n path = getOriginalPath();\n }\n if (isWatermarkPath()) {\n path = getWatermarkPath();\n }\n return path;\n }",
"public String getPath() { \n\t\treturn getPathElement().getValue();\n\t}",
"public List<Node> getShortestPath(final Node source, final Node target) {\n if (D[source.id][target.id] == Integer.MAX_VALUE) {\n return new ArrayList<Node>(); // no path\n }\n final List<Node> path = getIntermediatePath(source, target);\n path.add(0, source);\n path.add(target);\n return path;\n }",
"public GraphPath getResultPath() {\n return null;\r\n }",
"private List<Edge<T>> getPath(T target) {\n List<Edge<T>> path = new LinkedList<>();\n T step = target;\n // check if a path exists\n if (predecessors.get(step) == null) {\n return path;\n }\n while (predecessors.get(step) != null) {\n T endVertex = step;\n step = predecessors.get(step);\n T startVertex = step;\n path.add(getEdge(startVertex, endVertex));\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }",
"public String getRelativePath();",
"public String dest() {\n\t\tif ((new File(destination)).exists()) {\n\t\t\tString destinationS = \"C:\\\\Users\\\\Sanja\\\\workspace\\\\hw6\\\\src\\\\com\\\\sourceit\\\\radchenko\\\\hw6\\\\\";\n\t\t\tint destinationF = 0;\n\t\t\tdo {\n\t\t\t\tdestinationF++;\n\t\t\t\tdestination1 = destinationS + destinationF + \".txt\";\n\t\t\t} while ((new File(destination)).exists() == (new File(destination1))\n\t\t\t\t\t.exists());\n\t\t\treturn destination1;\n\t\t} else {\n\t\t\tdestination1 = destination;\n\t\t}\n\t\treturn destination1;\n\t}",
"java.util.List<java.lang.String>\n getSourcepathList();",
"public File getSource() {\n return source;\n }",
"public String getInputPath2() {\n\t\treturn inputPath2;\n\t}",
"public String getLocationPath();",
"@Override\n public String getDestination() {\n return this.dest;\n }",
"public static String chooseFileLocation(){\n String fileLoc = new String();\n\n JFileChooser fc = new JFileChooser(\".\");\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n fc.showOpenDialog(null);\n fileLoc = fc.getSelectedFile().getAbsolutePath() + \"\\\\\";\n\n return fileLoc;\n }",
"@Override\n\tpublic String getDest() {\n\t\treturn dest;\n\t}",
"public File getTargetDir() {\n return targetDir;\n }",
"public String getSource ();",
"java.util.List<java.lang.String>\n getSourcepathList();",
"@Override\r\n\tpublic ArrayList<E> getPath(E src, E dst) {\r\n\t\treturn graphForWarshall.getPath(src, dst);\r\n\t}",
"Node getSourceNode();",
"public String getSource();"
] | [
"0.682904",
"0.65510434",
"0.65464175",
"0.6367105",
"0.6315979",
"0.6254239",
"0.6161452",
"0.61286914",
"0.61017805",
"0.6086827",
"0.60732436",
"0.6044311",
"0.6040599",
"0.60221046",
"0.60100055",
"0.59938574",
"0.5961226",
"0.5932972",
"0.5932972",
"0.5926779",
"0.590421",
"0.58744943",
"0.585702",
"0.58039075",
"0.57836044",
"0.5773111",
"0.57590663",
"0.5737943",
"0.5730601",
"0.5724151",
"0.56743467",
"0.56672496",
"0.5663106",
"0.56577706",
"0.56577706",
"0.56574404",
"0.564221",
"0.5629503",
"0.56208766",
"0.5613083",
"0.5597467",
"0.5591104",
"0.5565898",
"0.5563501",
"0.5563501",
"0.55508083",
"0.55508083",
"0.55508083",
"0.55508083",
"0.55508083",
"0.5549786",
"0.5544611",
"0.55401623",
"0.5538596",
"0.551365",
"0.55106944",
"0.5510114",
"0.5507726",
"0.5506869",
"0.5498909",
"0.54954517",
"0.5489378",
"0.5489241",
"0.54783773",
"0.5475816",
"0.54712456",
"0.5461751",
"0.54609346",
"0.54595673",
"0.5452748",
"0.5451461",
"0.5451461",
"0.5451461",
"0.5446275",
"0.5446275",
"0.5441622",
"0.54401374",
"0.5435331",
"0.54333764",
"0.54332596",
"0.54125255",
"0.53979546",
"0.5396359",
"0.5386213",
"0.53847975",
"0.53719413",
"0.5367256",
"0.53661036",
"0.5365854",
"0.5358481",
"0.53557044",
"0.53352106",
"0.5331673",
"0.53183967",
"0.531755",
"0.53106076",
"0.53097415",
"0.5306505",
"0.5300922",
"0.5292175",
"0.528887"
] | 0.0 | -1 |
this will launch the browser | @Test
public void verifyValidLogin()
{
WebDriver driver=BrowserFacotry.StartBrowser("chromedriver", "http://newtours.demoaut.com/");
//created page object using page factory
VerifyLoginNew login_page = PageFactory.initElements(driver, VerifyLoginNew.class);
//call the method
login_page.Username("mercury");
login_page.Password("mercury");
login_page.Login();
FlightFinder f1= PageFactory.initElements(driver,FlightFinder.class);
// FlightFinder f1 = new FlightFinder();
//f1.strType();
f1.strType2();
//Passenger Data
Select sel=new Select(f1.passengerDropDown());
sel.selectByIndex(0);
//Departing Data
Select DP= new Select(f1.DeaprtingFrom());
DP.selectByIndex(3);
//Month
Select Mon= new Select(f1.Month_dep());
Mon.selectByIndex(9);
//from Day
Select onday= new Select(f1.From_day());
onday.selectByIndex(5);
//Arriving
Select Arriving = new Select(f1.Arriving_In());
Arriving.selectByVisibleText("New York");
//Returning
Select Return= new Select(f1.Return());
Return.selectByIndex(4);
//to day
Select Day_to = new Select(f1.Return_day());
Day_to.selectByVisibleText("22");
//service Class
//f1.Service_class();
//f1.Service_class1();
f1.Service_class2();
//Airlines
Select airlines=new Select(f1.airlines());
airlines.selectByIndex(2);
f1.Continue();
// Select Flight Depart
SelectFlight f2= PageFactory.initElements(driver, SelectFlight.class);
f2.Flight2();
//Select Flight Return
f2.Re_Flight3();
// continue
f2.Continue2();
//Book A Flight
//Passenger
BookFlight f3= PageFactory.initElements(driver,BookFlight.class);
f3.Passenger_name("Ravupalli");
f3.Passenger_Last("Sowjanya");
Select Meals= new Select(f3.Meals());
Meals.selectByIndex(1);
//Credit card
Select Cards = new Select(f3.Cards());
Cards.selectByIndex(1);
f3.CreditCard_number("1234293849345");
Select Exp_month= new Select(f3.Exp_month());
Exp_month.selectByIndex(2);
Select Exp_year= new Select(f3.Exp_year());
Exp_year.selectByIndex(2);
f3.CC_FirstName("Ravupalli");
f3.CC_MidName("Devi");
f3.CC_LastName("Sowjanya");
f3.BillAddress("House number-1234");
f3.BillAddress2("The gravyyard street");
f3.City("New york");
f3.State("CU");
f3.Postal_code("098756467");
Select Country=new Select(f3.Contry());
Country.selectByIndex(1);
f3.SameAddress();
f3.secure_purchase();
//Flight Logout
FlightConfirmation f4= PageFactory.initElements(driver, FlightConfirmation.class);
f4.Logout();
//Close browser
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }",
"public static void launchingBrowser() throws Exception {\n\n\t\tString applicationURL = merchEnv.getProtocol() + \"://\"\n\t\t\t\t+ merchEnv.getHost() + \":\" + merchEnv.getPort() + \"/\";\n\t\tselectedBrowser = merchEnv.getBrowser();\n\t\ttry {\n\t\t\tbaseScreen = new BaseScreen(selectedBrowser, applicationURL,\n\t\t\t\t\tmerchEnv.getContext(), merchEnv, merchUserInfo, merchUI);\n\t\t} catch (ScreenException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void launchBrowser(URI uri) throws IOException\r\n {\r\n getDesktop().browse(uri);\r\n }",
"public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}",
"public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}",
"public static void executeBrowser() throws Exception{\n\t\tinvokeMyBrowser();\n\t}",
"private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }",
"@Given(\"I open a browser and launch the application\")\n public void open_a_browser_and_launch_the_application() throws MalformedURLException\n {\n try {\n if(System.getProperty(\"exemode\").equals(\"remote\")) {\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n DesiredCapabilities dc = DesiredCapabilities.firefox();\n dc.setBrowserName(\"firefox\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n DesiredCapabilities dc = DesiredCapabilities.chrome();\n dc.setBrowserName(\"chrome\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n }\n else{\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n driver = new FirefoxDriver();\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n driver = new ChromeDriver();\n }\n }\n\n if(driver!=null){\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n //driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.get(ENDPOINT_PHPTRAVELS);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n// System.exit(1);\n }\n }",
"@Given(\"^launch the browser \\\"([^\\\"]*)\\\"$\")\n\tpublic void launch_the_browser(String url) throws Throwable {\n\t\tdriver = getDriver();\n\t\tdriver.get(url);\n\n\t}",
"public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }",
"public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}",
"@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}",
"public static void launchSite(String browser) throws AWTException, IOException, InterruptedException\n\t{\n\t\topenBrowserAndSite(browser);\n\t}",
"public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }",
"@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}",
"@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}",
"private boolean openBrowser(IProgressMonitor monitor) {\n\n monitor.subTask(\"Open index page\");\n // FIXME: port should come from the config files\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n URL url;\n try {\n url = new URL(\"http://localhost:8888\");\n IWorkbenchBrowserSupport browserSupport = WebBrowserUIPlugin\n .getInstance().getWorkbench().getBrowserSupport();\n IWebBrowser browser = browserSupport.createBrowser(\n IWorkbenchBrowserSupport.LOCATION_BAR\n | IWorkbenchBrowserSupport.NAVIGATION_BAR,\n null, null, null);\n browser.openURL(url);\n } catch (Exception e) {\n Trace.trace(Trace.SEVERE, \"Error opening browser\", e);\n }\n }\n });\n\n monitor.worked(3);\n return true;\n }",
"public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}",
"@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}",
"public void open() {\n setWebDriver();\n }",
"public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}",
"private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(desktop == null) return ;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdesktop.browse(uri);\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}",
"public static void main(String[] args) {\n\n BrowserService browser = null;\n switch (args[0].toLowerCase()) {\n case \"chrome\":\n browser = new Chrome();\n break;\n case \"safari\":\n browser = new Safari();\n break;\n default:\n System.err.println(\"Unsupported browser\");\n System.exit(1);\n }\n\n System.out.println(\"Opened \" + args[0]);\n //polymorphism is an ability to take different shapes\n //in Java interface data types can be initialized with Objects that implement the interface.\n //and this a runtime process. Dynamic binding.\n browser.navigate(args[1]);\n System.out.println(args[0] + \" navigated to \" + args[1]);\n getUrl(browser);\n }",
"public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }",
"private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }",
"public static void InvokeBrowser() {\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(\"Current Directory \"+currentDir);\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--incognito\");\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir+\"/lib/chromedriver/36/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(capabilities);\n\t\tdriver.manage().window().maximize();\n\t\t//driver.navigate().to(URL);\n\t\t//logger.info(\"URL to proceed with transaction --> \"+URL);\n\t\t/*BestBuyAddCart.addToCart();\n\t\tdriver.close();\n\t\tdriver.quit();*/\n\t}",
"@Parameters(\"browser\")\n\t@BeforeMethod\n\tpublic void launchBrowser(String browser) throws InterruptedException{\n\t\tif(browser.equalsIgnoreCase(\"firefox\")) {\n\t\t\t \n\t\t\t driver = new FirefoxDriver();\n\t\t \n\t\t // If browser is IE, then do this\t \n\t\t \n\t\t }else if (browser.equalsIgnoreCase(\"ie\")) { \n\t\t \n\t\t\t // Here I am setting up the path for my IEDriver\n\t\t \n\t\t\t System.setProperty(\"webdriver.ie.driver\", \"C://Users//sudt//Downloads//IEDriverServer_x64_2.53.1//IEDriverServer (2).exe\");\n\t\t \n\t\t\t driver = new InternetExplorerDriver();\n\t\t \n\t\t } \n\t\t else if (browser.equalsIgnoreCase(\"chrome\")){\n\t\t\t System.setProperty(\"webdriver.chrome.driver\", \"C://Users//sudt//Downloads//chromedriver_win32//chromedriver.exe\");\n\t\t\t driver = new ChromeDriver();\n\t\t }\n\t\t else {\n throw new IllegalArgumentException(\"The Browser Type is Undefined\");\n }\n\n\t\tdriver.get(\"https://www.xero.com/us/\");\n\t\tdriver.manage().window().maximize();\n\t\n\t\n\t}",
"@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}",
"@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}",
"private void openBrowser() {\r\n //http://必须有\r\n String url = urlText.getText().toString();\r\n if (!\"http\".equals(url.substring(0, 4))) {\r\n url = \"http://\" + url;\r\n }\r\n Uri uri = Uri.parse(url);//获取网址,并转换成URI\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);//打开浏览器\r\n startActivity(intent);\r\n }",
"public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}",
"@Given(\"^the user launch chrome application$\")\r\n\tpublic void the_user_launch_chrome_application() throws Throwable {\n\t w.browser();\r\n\t}",
"public void browser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/Driver/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();// maximize the window\n\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\n\t}",
"@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }",
"public void execute() {\n try {\n final DemoManagerWindow window = new DemoManagerWindow();\n window.setResizable(false);\n window.setDemoManager(this);\n window.setDemoProvider(this);\n window.setVisibleAndWait();\n } catch (final Throwable t) {\n throw new BrowserException(\"\", t);\n }\n }",
"public void openBrowser(String url) {\n System.setProperty(\"webdriver.chrome.driver\", \"c:\\\\webdriver\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n// int timeout = Integer.parseInt(ApplicationConfig.readConfigProperties(\"config-week17project.properties\", \"timeout\"));\n int timeout = Integer.parseInt(testData.timeout);\n driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS);\n driver.get(url);\n }",
"@BeforeTest\n\tpublic void LaunchBrowser() {\n\t\t driver = init(\"URL_JQuery\");\n\t\t// driver.get(\"https://jqueryui.com/autocomplete/\");\n\t\t driver.switchTo().frame(0);\n\t\t jq = new JQueryAutocompletePage(driver);\n\t\t \n\t}",
"@Parameters(\"BROWSER\")\n\t@BeforeClass(groups = {\"Smoke Test\",\"Regression Test\"})\n\tpublic void launchBrowser(String BROWSER) throws IOException \n\t{\n\n\t\tif(BROWSER.equalsIgnoreCase(\"Chrome\")) \n\t\t{\n\t\t\tdriver= new ChromeDriver();\n\t\t}\n\t\telse if (BROWSER.equalsIgnoreCase(\"Firefox\"))\n\t\t{\n\t\t\tdriver= new FirefoxDriver();\n\t\t}\n\t\telse {\n\t\t\tdriver= new ChromeDriver();\n\t\t}\n\t\t//String url = System.getProperty(\"URL\");\n\n\t\tdriver.get(fileutility.readDatafrompropfile(\"url\"));\n\t\twdu.maximizewindow(driver);\n\t\twdu.pageloadtimeout(driver);\n\t\tstaticdriver=driver;\n\t}",
"public static void main(String[] args) {\n String url = ConfigurationReader.getProperty(\"url\");\n\n Driver.get().get(url);\n\n BrowserUtils.wait(2);\n Driver.close();\n\n }",
"public void openApp(String Url) {\n\t\tfd = new FirefoxDriver();\r\n\t\tfd.get(Url);\r\n\t\tfd.manage().window().maximize();\r\n\t}",
"public RemoteWebDriver startApp(String url) {\n\t\treturn startApp(\"chrome\", url);\r\n\t}",
"public WebDriver launchBrowser(String browserName) {\n\n\t\tif (browserName.equals(\"chrome\")) {\n\t\t\t//System.setProperty(\"webdriver.chrome.driver\", \"/Users/naveenautomationlabs/Downloads/chromedriver\");\n\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\tdriver = new ChromeDriver();\n\t\t} else if (browserName.equals(\"firefox\")) {\n\t\t\t//System.setProperty(\"webdriver.gecko.driver\", \"/Users/naveenautomationlabs/Downloads/geckodriver\");\n\t\t\tWebDriverManager.firefoxdriver().setup();\n\t\t\tdriver = new FirefoxDriver();\n\t\t} else if (browserName.equals(\"safari\")) {\n\t\t\tdriver = new SafariDriver();\n\t\t} else {\n\t\t\tSystem.out.println(\"please pass the correct browser....\");\n\t\t}\n\n\t\treturn driver;\n\t}",
"public static void main(String[] args) {\n\t\tinvokeFirefoxBrowser();\n\t\t\n\t\t//Enter the URL\n\t\tenterURL(\"https://demoqa.com/buttons\");\n\t\t\n\t}",
"@Given(\"^the user launch the chrome application$\")\r\n\tpublic void the_user_launch_the_chrome_application() throws Throwable {\n\t\tlaunchBrowser(\"chrome\");\r\n\t\t register= new Para_Registartion_page(driver);\r\n\t}",
"public static void main(String[] args) {\n\t\tString driverPath = System.getProperty(\"user.dir\")+\"\\\\src\\\\drivers\\\\chromedriver.exe\";\n\t\t////D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\n\t\t//System.out.println(\"path - \"+ driverPath);\n\t\t//D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\\src\\drivers\\chromedriver.exe\n\t\t//D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\t\t\n\t\tWebDriver chDriver = new ChromeDriver();//complex object\n\t\t//maximize\n\t\tchDriver.manage().window().maximize();\n\t\t\n\t\tchDriver.get(\"https://opensource-demo.orangehrmlive.com/\");\n\t\t\n\t\t//Webdriver -Interface, driver - ref var, CHromeDriver-class\n\t\t\n\t\t\n\t\t//Firefox Browser:\n//\t\tString ffDriverPath = System.getProperty(\"user.dir\")+\"\\\\src\\\\drivers\\\\geckodriver.exe\";\n//\t\tSystem.setProperty(\"webdriver.gecko.driver\", ffDriverPath);\n//\t\tWebDriver ffDriver = new FirefoxDriver();//complex object\n\t\t\n\t\t//get the current Url, title of application\n\t\t\n\t\t//chDriver.close();\n\t\t\n\n\t}",
"@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}",
"protected void openInNewBrowser(SelectEvent event, String url)\n {\n try\n {\n BrowserOpener.browse(new URL(url));\n event.consume();\n }\n catch (Exception e)\n {\n String message = Logging.getMessage(\"generic.ExceptionAttemptingToInvokeWebBrower\", url);\n Logging.logger().warning(message);\n }\n }",
"public static void main(String[] args) {\n\t\tString current = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(current);\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", current + \"\\\\Lib\\\\chromedriver.exe\");\n\n\t\tWebDriver driver = new ChromeDriver(); //open browser\n\t\tdriver.get(\"https://www.google.com\"); //open URL\n\t\ttry {\n\t\t\tThread.sleep(5000); //wait for 5 second\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdriver.close(); //close browser \n\t}",
"@Override\r\n public void run() {\n ax.browserPane.setTitleAt(0,ax.browser.getTitle());\r\n String stringToken1 = null; \r\n try {\r\n stringToken1 = (\"<Navigate Home>::\" + getHome());\r\n } catch (IOException ex) {\r\n Logger.getLogger(AxBrowser.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ax.consoleTextArea.setText(stringToken1);\r\n //Put the current html address in the addressbar\r\n ax.addressBar.setText(ax.browser.getCurrentLocation());\r\n \r\n }",
"public static void main(String[] args) throws Exception {\n\t\t\r\n\t\tDifferent_Browser.call_Firefox();\r\n\t\tDifferent_Browser.get_Google();\r\n\t\tDifferent_Browser.close_browser();\r\n\t\t\r\n//\t\tDifferent_Browser.call_chrome();\r\n//\t\tDifferent_Browser.get_Google();\r\n//\t\tDifferent_Browser.close_browser();\r\n\t}",
"@Override\n public void execute () {\n if (Desktop.isDesktopSupported()) {\n try {\n Desktop.getDesktop().browse(new URI(HELP_URL));\n }\n catch (Exception e) {\n\n }\n }\n }",
"@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }",
"@Parameters({\"Browser\"})\n\t@BeforeTest\n\tpublic void launchBrowser(String Browser){\t\t\n//Method invokes extent report with the given name\n//'**********************************************************\n\t\textentTest = extentReports.startTest(\"Registration and Add to Cart\");\n\t\tdriver = com.wipro.browser.LaunchBrowser.openBrowser(Browser);\n\t\textentTest.log(LogStatus.PASS, \"Browser Launched and accessed application\");\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //difference between get and navigate is get will w8 for page to load fully yet navigate wont\n// driver.get(\"http://www.facebook.com\");\n driver.navigate().to(\"http://www.facebook.com\");\n driver.navigate().to(\"http://www.google.com\");\n driver.navigate().back();\n driver.navigate().forward();\n driver.navigate().refresh();\n\n\n slpBrowser(2000);\n qBrowser(driver);\n System.out.println(\"Test Done\");\n }",
"public static void main(final String[] args) {\n Browser.parseCommandLineArgsAndLaunch(args);\n }",
"public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}",
"public void openUrlInBrowser(String URL) {}",
"private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }",
"public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }",
"public void setup(){\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"//Users//bpat12//Downloads//chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tSystem.out.println(\"launch browser\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\t}",
"public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> Please start your browser and type in the following URL:\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void launchSite()\t{\n\t\t\n\t\tSystem.setProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY, \"D:\\\\Selenium Drivers\\\\MicrosoftWebDriver.exe\");\n\t\tEdgeDriver driver = new EdgeDriver();\n\t\tdriver.get(\"http://google.com\");\n\t\t\n\t}",
"public void openBrowser(Context context, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n context.startActivity(i);\n }",
"public static void start() {\n final Context appContext = ContextUtils.getApplicationContext();\n tryObtainingDataDirLock(appContext);\n // We must post to the UI thread to cover the case that the user\n // has invoked Chromium startup by using the (thread-safe)\n // CookieManager rather than creating a WebView.\n ThreadUtils.runOnUiThreadBlocking(new Runnable() {\n @Override\n public void run() {\n boolean multiProcess = CommandLine.getInstance().hasSwitch(\n AwSwitches.WEBVIEW_SANDBOXED_RENDERER);\n if (multiProcess) {\n // Have a background thread warm up a renderer process now, so that this can\n // proceed in parallel to the browser process initialisation.\n AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {\n @Override\n public void run() {\n ChildProcessLauncher.warmUp(appContext);\n }\n });\n }\n // The policies are used by browser startup, so we need to register the policy\n // providers before starting the browser process. This only registers java objects\n // and doesn't need the native library.\n CombinedPolicyProvider.get().registerProvider(new AwPolicyProvider(appContext));\n\n try {\n BrowserStartupController.get(appContext, LibraryProcessType.PROCESS_WEBVIEW)\n .startBrowserProcessesSync(!multiProcess);\n } catch (ProcessInitException e) {\n throw new RuntimeException(\"Cannot initialize WebView\", e);\n }\n }\n });\n }",
"private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }",
"@Test\n\t@BeforeSuite\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tdriver = new FirefoxDriver();\n\t\tdriver.get(\"https://www.gmail.com\");\n\t\tmanageInit();\n\t\n\t}",
"void browserMethod();",
"public static void main(String[] args)\n\t{\n\t\tInvokeFirefox firefox = new InvokeFirefox();\n\t\tfirefox.Maximize();\n\t\tfirefox.GoTo(\"http://www.google.com\");\n\t\tfirefox.ShutDown(1500);\n\t\tEnd();\n\t}",
"@Given(\"browser is open\")\n\tpublic void browser_is_open() {\n\t\tSystem.out.println(\"browseris open\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/home/rahul/Desktop\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);\n\t\t\n\t}",
"@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}",
"public static void main(String[] args) throws MalformedURLException {\n\t\t\r\n\t\tChromeOptions chromeoptions=new ChromeOptions();\r\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://192.168.225.206:6878/wd/hub\"),chromeoptions);\r\n\t\t\r\n\t\tdriver.get(\"http://opensource.demo.orangehrmlive.com\");\r\n\t\tSystem.out.println(\"URL opened\");\r\n\r\n\t}",
"public void launch() throws IOException {\n \r\n FileInputStream fs=new FileInputStream(\"C:\\\\New folder\\\\PHPTravelers\\\\src\\\\main\\\\java\\\\file\\\\base.properties\");\r\n\t\tprop.load(fs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\rakshitha\\\\chromedriver.exe\"); \r\n\t\t\t\t driver = new ChromeDriver(); \r\n\t\t\t\t//driver.get(\"https://www.phptravels.net\");\r\n\t\t\t\t//System.out.println(driver.getTitle());\r\n\t\t\t\tdriver.manage().window().maximize();\r\n\t\t\t driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n\t\t\t driver.get(prop.getProperty(\"url\"));\r\n\t\t\r\n\t\t\r\n\t}",
"private void launchApplication() {\n driver.manage().deleteAllCookies();\n driver.get(config.getProperty(\"testSiteUrl\"));\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(Integer.parseInt(config.getProperty(\"implicit.wait\")), TimeUnit.SECONDS);\n }",
"private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.firefox.bin\", \"C:\\\\Program Files\\\\Nightly\\\\firefox.exe\");\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"G:\\\\WebUITests\\\\src\\\\test\\\\resources\\\\Drivers\\\\geckodriver.exe\");\n\t\t//System.setProperty(\"webdriver.gecko.driver\", \"G:\\\\geckodriver-v0.18.0-win64\\\\geckodriver.exe\");\n\t\t\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(\"marionette\", true);\n\t\tWebDriver driver = new FirefoxDriver(capabilities);\n\t\t//driver.navigate().to(\"http://www.google.com\");\n\t\tdriver.get(\"http://www.google.com\");\n\t\tdriver.quit();\n\t}",
"public static void main(String[] args) {\n\t\tWebDriverManager.firefoxdriver().setup();\r\n\t\tWebDriver driver = new FirefoxDriver();\r\n\t\t//driver.navigate().to(\"https://www.facebook.com/\");\r\n\r\n\t}",
"@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }",
"public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}",
"public static void main(String[] args) {\n WebDriver driver = WebDriverFactory.getDriver(\"chrome\");\n driver.manage().window().maximize();\n\n\n }",
"public FirefoxDriver openBrowser(String site){\n System.setProperty(\"webdriver.gecko.driver\", \"c:\\\\Utils\\\\geckodriver.exe\");\n FirefoxDriver browser = new FirefoxDriver();\n browser.get(site);\n return browser;\n }",
"@Parameters({\"browserName\"})\n\t@BeforeMethod\n\tpublic void openBrowser(String browserName) {\n\t\tString currentProjectPath = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(\"Current project path is = \" + currentProjectPath);\n\t\t\n\t\tString currentOSname = System.getProperty(\"os.name\");\n\t\tSystem.out.println(\"Current OS name is = \" + currentOSname);\n\t\t\n\t\tif(browserName.equalsIgnoreCase(\"chrome\")) {\n\t\t\t//Open Chrome\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", currentProjectPath + \"\\\\browserDriverEXE\\\\chromedriver.exe\"); \n\t\t\tdriver = new ChromeDriver();\n\t\t}\n\t\t\n\t\telse if(browserName.equalsIgnoreCase(\"firefox\")) {\n\t\t\t//Open FF\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", currentProjectPath + \"\\\\browserDriverEXE\\\\geckodriver.exe\"); \n\t\t\tdriver = new FirefoxDriver();\n\t\t}\n\t\t\n\t\telse {\n\t\t\t//Open IE\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", currentProjectPath + \"\\\\browserDriverEXE\\\\IEDriverServer.exe\"); \n\t\t\tdriver = new InternetExplorerDriver();\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\t//refresh\n\t\t//driver.navigate().refresh();\n\t\t\n\t\t//driver.navigate().forward();\n\t\t\n\t\t//driver.navigate().back();\n\t\t\n\t\t//driver.manage().deleteAllCookies();\n\t\t\n\t\t//imp wait\n\t\t//driver.manage().timeouts().setScriptTimeout(10, TimeUnit.MINUTES);\n\t\t//driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tStart st = new Start();\n\t\t\n\t\tWebDriver drv = st.driverInit();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tString url = st.prop.getProperty(\"url\") ;\n\t\t\n\t\tdrv.get(url);\n\t\tSystem.out.println(dr.getTitle());\n\t\t\n\t\t\n\t\t\n \n\n\t}",
"@BeforeTest\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PSQA\\\\Desktop\\\\driver\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.booking.com/\");\n\t\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\tThread.sleep(100);\n\t\t\n}",
"public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Iguru\\\\I guru\\\\ChromeDriver\\\\chromedriver.exe\");\n\t \n\t\t WebDriver driver = new ChromeDriver();\n\t\t System.out.println(\"========browser started================\");\n\t\t String AppURL=\"https://www.google.com\"; \n\t driver.get(AppURL);\n\t String title= driver.getTitle();\n\t System.out.println(\"page title is\" +title);\n\t \n\t if(title.equals(\"Google\"))\n\t {\n\t \t System.out.println(\"Title is correct\");\n\t }\n\t else\n\t {\n\t \t System.out.println(\"Title is in-correct\");\n\t }\n\t String url =driver.getCurrentUrl();\n\t System.out.println(url);\n\t // driver.quit();\n\t \n\t // in case of close\n\t driver.close(); // in case of close invalid session id \n\t String title1= driver.getTitle(); //in case of quit Session ID is null Using WebDriver after calling quit()? \n\t System.out.println(title1);\n\n\t}",
"@Test\r\n\tpublic void startapp() {\n\t\tdriver.get(\"http://q.door.fund/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\r\n\t\tString currentURL = driver.getCurrentUrl();\r\n\t\tAssert.assertTrue(currentURL.contains(\"q.door.fund\"));\r\n\t\tSystem.out.println(\"Application loaded\");\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tWebDriver driver = new browser_methods().getDriver(\"chrome\");\r\n\t\tdriver.get(\"http://newtours.demoaut.com/\");\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tNewItretor it = new NewItretor();\n\t\tit.invokeBrowser();\n\t\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\tWebDriver d=new ChromeDriver();\n\t\td.get(\"file:///C:/Users/SYED%20HASSAN/Desktop/selinium%202%20se/p1.html\");\n\t\tString title = d.getTitle();\n\t\tSystem.out.println(\"title = \"+title);\n\t\tString window = d.getWindowHandle();\n System.out.println(\"windowhandle\"+window);\n String c = d.getCurrentUrl();\n System.out.println(\"currenturl\"+c);\n d.close();\n System.out.println();\n\t}",
"public static void main(String[] args) {\n\t UIUtils.setPreferredLookAndFeel();\n\t NativeInterface.open();\n\t SwingUtilities.invokeLater(new Runnable() {\n\t public void run() {\n\t JFrame frame = new JFrame(\"SICX Client\");\n\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t frame.getContentPane().add(new JWebBrowserTest(), BorderLayout.CENTER);\n\t frame.setSize(800, 600);\n\t frame.setLocationByPlatform(true);\n\t frame.setVisible(true);\n\t }\n\t });\n\t NativeInterface.runEventPump();\n\t }",
"@Test\n\tpublic void start() {\n\t\t\n\t\tSeleniumUtil.startDriverFirefox(\"DEV_ROBO\");\n\t\t\n\t\tSeleniumUtil.openURL(\"https://www.cadesp.fazenda.sp.gov.br/(S(aljupn5501cd5jefroucepm3))/Pages/Cadastro/Consultas/ConsultaPublica/ConsultaPublica.aspx\");\n\n\t}",
"public static void openBrowser(String browserType) {\n\t\t\tif (\"chrome\".equals(browserType.toLowerCase())) {\n\t\t\t\tsetChromeDriverProperty();\n\t\t\t\tChromeOptions options = setChromeOptions();\n\t\t\t\twebdriver = new ChromeDriver(options);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Browser type \" + browserType + \" hasn't been handled yet.\");\n\t\t\t\tReports.logAMessage(LogStatus.ERROR, \"Browser type \" + browserType + \" hasn't been handled yet.\");\n\t\t\t}\n\t\t}",
"public void getBrowser(String browser, String url) {\n\n\n if (browser.equalsIgnoreCase(\"chrome\")) {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n } else if (browser.equalsIgnoreCase(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n }\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.get(url);\n\n }",
"public WebDriver browserSetup() throws IOException\r\n\t{ \r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tSystem.out.println(\"1.Chrome\\n2.Firefox \\nEnter your choice:\");\r\n\t\tString choice=br.readLine();\r\n\t\t\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t//To start Chrome Driver\r\n\t\tcase \"1\":\r\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Test Automation\\\\Software\\\\chrome\\\\New Version\\\\chromedriver.exe\");\r\n\t\t ChromeOptions options=new ChromeOptions();\r\n\t\t options.addArguments(\"--disable-notifications\");\r\n\t\t driver=new ChromeDriver(options);\r\n\t\t break;\r\n\t\t\r\n\t\t//To start Firefox Driver\r\n\t\tcase \"2\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\***\\\\drivers\\\\geckodriver.exe\");\r\n\t\t\tdriver=new FirefoxDriver();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\t\r\n\t\tdriver.get(url);\r\n\t\t\r\n\t\t//To maximize the window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(8, TimeUnit.SECONDS);\r\n\t\t\r\n\t\treturn driver;\r\n\t}",
"public void launchExplorer() {\n SimulatedEnvironment env = new SimulatedEnvironment(this.domain, this.initialState);\n VisualExplorer exp = new VisualExplorer(this.domain, env, this.v, 800, 800);\n exp.addKeyAction(\"w\", GridWorldDomain.ACTION_NORTH, \"\");\n exp.addKeyAction(\"s\", GridWorldDomain.ACTION_SOUTH, \"\");\n exp.addKeyAction(\"d\", GridWorldDomain.ACTION_EAST, \"\");\n exp.addKeyAction(\"a\", GridWorldDomain.ACTION_WEST, \"\");\n\n //exp.enableEpisodeRecording(\"r\", \"f\", \"irlDemo\");\n\n exp.initGUI();\n }",
"public Runner( String browser )\n {\n browser = browser.toUpperCase();\n if (browser.equals(\"FIREFOX\"))\n {\n driver = new FirefoxDriver();\n }\n if(browser.equals(\"CHROME\"))\n {\n driver = new ChromeDriver();\n }\n\n driver.get(\"http://kuku-kube.com\");\n }",
"public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}",
"@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}",
"public static void main(String[] args) {\nWebDriver driver = new FirefoxDriver();\nSystem.out.println(\"hai\");\ndriver.get(\"https://www.google.com\");\nSystem.out.println(driver.getTitle());\ndriver.close();\n\t}",
"public static void main(String[] args) throws Exception{\n\n WebDriverManager.chromedriver().setup();\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"http://practice.cybertekschool.com/open_new_tab\");\n\n Thread.sleep(4000);\n\n //driver.close(); //expected to close the original one\n driver.quit(); //all window will be closed\n\n\n\n\n }",
"private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }"
] | [
"0.77318573",
"0.7633686",
"0.7600119",
"0.75941575",
"0.75709784",
"0.7346783",
"0.7307146",
"0.72900325",
"0.7198892",
"0.712073",
"0.70591265",
"0.7055519",
"0.70412326",
"0.7038884",
"0.70149297",
"0.6951155",
"0.6947733",
"0.6921138",
"0.69146395",
"0.69110435",
"0.68747675",
"0.68731713",
"0.6869195",
"0.6864607",
"0.685955",
"0.6834932",
"0.68321705",
"0.6771774",
"0.67663765",
"0.67643917",
"0.67640793",
"0.6762016",
"0.67475593",
"0.6738519",
"0.66980684",
"0.66930205",
"0.6674404",
"0.66600895",
"0.6659956",
"0.6641666",
"0.66317093",
"0.65981334",
"0.6597436",
"0.6586647",
"0.65786415",
"0.6553841",
"0.65453786",
"0.65322036",
"0.65234315",
"0.6523145",
"0.6516632",
"0.65144384",
"0.65007085",
"0.64837635",
"0.6476656",
"0.6470286",
"0.6464099",
"0.6461823",
"0.6461129",
"0.645812",
"0.64551514",
"0.6448705",
"0.6442602",
"0.64356565",
"0.6428998",
"0.64140284",
"0.6414006",
"0.6406288",
"0.6402241",
"0.63949996",
"0.6394318",
"0.63939065",
"0.63916826",
"0.63911253",
"0.6389093",
"0.6386175",
"0.63823956",
"0.6369871",
"0.63686764",
"0.636608",
"0.6363947",
"0.6351168",
"0.63495106",
"0.6319462",
"0.62996525",
"0.62977993",
"0.62870127",
"0.62644136",
"0.62610686",
"0.6256159",
"0.62495536",
"0.6246079",
"0.624404",
"0.6240108",
"0.62382525",
"0.62381876",
"0.6234679",
"0.6233174",
"0.62330294",
"0.62320125",
"0.62258476"
] | 0.0 | -1 |
Reverses the input String | public static String reverse(String s){
if(s.length()==0)
return s;
else{
return reverse(s.substring(1))+s.substring(0,1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String reverseMyInput(String input);",
"public String reverse(String input) {\n \n // if there is no string, send it back\n if (input == null) {\n return input;\n }\n // string to return\n String output = \"\";\n // go from the back of input and put its last character at the front of the new string\n for (int i = input.length() - 1; i >= 0; i--) {\n output = output + input.charAt(i);\n }\n \n return output;\n}",
"private static String reverse(String in){\n\t\tString reversed = \"\";\n\t\tfor(int i = in.length() - 1; i >= 0; i--){\n\t\t\treversed += in.charAt(i);\n\t\t}\n\t\treturn reversed;\n\t}",
"static String stringReverser( String inputString) {\n\t\t// Create an char array of given String \n char[] ch = inputString.toCharArray();\n // Initialize outputString; \n String outputString = \"\";\n // Go through the characters within the given input string, from last to first, and concatinate it to the output String\n for (int i = ch.length -1; (i >= 0) ; i--) {\n \toutputString += ch[i]; \n }\n\t\treturn outputString;\n\t}",
"public String reverse(String input) {\n if (input == null || input.length() <= 1) {\n return input;\n }\n char[] array = input.toCharArray();\n int slow = 0;\n int fast = array.length - 1;\n while (slow < fast) {\n swap(array, slow, fast);\n slow++;\n fast--;\n }\n return new String(array);\n }",
"public String reverse(String input) {\n\t\t// Write your solution here.\n\t\tchar[] arr = input.toCharArray();\n\t\tint left = 0, right = input.length() - 1;\n\t\thelper(arr, left, right);\n\t\treturn new String(arr);\n\t}",
"public String reverse(String input) \n {\n \tString outputt = \"\";\n \t//Finds the length of the string input\n \tint i = input.length();\n \t\n \tif (input == \"\")\n \t{\n \t\treturn outputt;\n \t}\n \telse\n \t{\n \t\t//Goes letter by letter building the string backwards\n \t\tfor (int c = 0; c < i; c++)\n \t\t{\n \t\tString a_letter = Character.toString(input.charAt((i - c -1)));\n \t\toutputt = (outputt + a_letter);\n \t\t}\n \t\treturn outputt;\n \t\t//return new StringBuffer(input).reverse().toString();\n \t}\n }",
"void reverse(string str) \n{ \n for (int i=str.length()-1; i>=0; i--) \n cout << str[i]; \n}",
"public String reversestring(String inputstring){\n String originalstring = inputstring; //Originial String\n int n = originalstring.length(); //Length of the string\n String answer=\"\";\n\n for(int i=n-1;i>=0;i--){\n System.out.print(originalstring.charAt(i));\n answer += originalstring.charAt(i) + \" \";//Reversing the string\n }\n answer = answer.trim();\n return answer;\n }",
"public static String reverseString(String input) {\r\n\t\tString reversed = \"\";\r\n\t\tfor (int i = input.length() - 1; i >= 0; i--) {\r\n\t\t\treversed += input.charAt(i);\r\n\t\t}\r\n\t\treturn reversed;\r\n\t}",
"public static String reverse(String str) {\n String retStr = \"\"; //final string\n for (int i = str.length(); i > 0; i--) { //for loop starting from the end of the string\n retStr += str.substring(i-1,i);\n }\n return retStr;\n }",
"public static String reverse(String st) {\n\t\t\n\t\tif(st == null || st ==\"\") {\n\t\t\treturn st;\n\t\t}\n\t\tStringBuffer br = new StringBuffer();\n\t\tfor(int i=st.length()-1; i>=0; i--) {\n\t\t\tbr.append(st.charAt(i));\n\t\t}\n\t\treturn br.toString();\n\t}",
"public static String reverse(String inputString) {\n\t\tif (inputString.length() == 1) {\n\t\t\treturn inputString;\n\t\t} \n\t\tint len = inputString.length();\n\t\treturn inputString.substring(len-1,len) \n\t\t\t+ RecursiveStringReverser.reverse(inputString.substring(0,len-1));\n\t}",
"public static String reverse(String s)\n\t{\n\t\tStringBuilder stb = new StringBuilder(s);\n\t\treturn stb.reverse().toString();\n\t}",
"void reverse();",
"void reverse();",
"public String reverseInput(String input)\n\t{\n\t\tif(input==null)\n\t\t\treturn null;\n String reverseString=\"\";\n for(int i=input.length()-1;i>=0;i--)\n {\n \treverseString+=input.charAt(i);\n }\n return reverseString;\n\t}",
"@Override\n\tpublic String reverse() {\n\t\tint len = theString.length();\n\t\tString s1 = \"\";\n\t\tfor (int i = len - 1; i >= 0; i--) {\n\t\t\ts1 = s1 + theString.charAt(i);\n\t\t}\n\t\t// System.out.println(s1);\n\n\t\treturn s1;\n\t}",
"public static void Rev_Str_Fn(){\r\n\t\r\n\tString x=\"ashu TATA\";\r\n\t\r\n\tStringBuilder stb=new StringBuilder();\r\n\tstb.append(x);\r\n\tstb.reverse();\r\n\tSystem.out.println(stb);\r\n}",
"@Test\n\tvoid testReverseString() {\n\t\tReverseString tester = new ReverseString();\n\t\tchar[] input = new char[] { 'h', 'e', 'l', 'l', 'o' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'o', 'l', 'l', 'e', 'h' }, input);\n\n\t\tinput = new char[] { 'H', 'a', 'n', 'n', 'a', 'h' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'h', 'a', 'n', 'n', 'a', 'H' }, input);\n\n\t\tinput = new char[] { 'H' };\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[] { 'H' }, input);\n\n\t\tinput = new char[0];\n\t\ttester.reverseString(input);\n\t\tassertArrayEquals(new char[0], input);\n\t}",
"public void StringReverse(String parameter){\n String str=parameter;\n String[] arr=str.split(\"\\\\s+\");\n for(int i=0;i<arr.length;i++){\n arr[i]=arr[i].replaceAll(\"[^\\\\w]\", \"\");\n }\n reverser(arr);\n\n String output=new String();\n for(int i=0;i<arr.length;i++){\n output=output+arr[i]+\" \";\n }\n System.out.println(output);\n }",
"public String reverse(String input) {\n char[] carr = input.toCharArray();\n reverse(carr, 0 ,carr[carr.length - 1]);\n return String.valueOf(carr);\n }",
"public static String reverse(String str)\n {\n // return if string is null or empty\n if (str == null || str.equals(\"\"))\n return str;\n \n // variable to store the reversed string\n String rev = \"\";\n \n // use string concatenation operator to build reversed string by\n // reading character from the end of the original string\n for (int i = str.length() - 1; i >=0 ; i--)\n rev += str.charAt(i);\n \n return rev;\n }",
"public static String reverse( String s ) {\n String s2 = \"\";\n for (int i = s.length() -1; i >= 0; i--) { // start at the end of the string; keep going while i>= 0; decriment i\n s2 = s2 += s.charAt(i);\n }\n return s2;\n }",
"public static String reverse(String input)\n\t{\n\t\tif(input.length()==0) return input;\n\t\tStringBuilder s = new StringBuilder();\n\t\treturn s.append(input.substring(1)).append(input.charAt(0)).toString();\n\t}",
"public static void main(String[] args) {\n String str = null;\n //String str = \"My Name Is Aakash\";\n //String str = \"!@@#$%^&*()+_)(*&^%$#@!@#$%^&*(_)(*&^%$%^&**&^%$#$%^&*&^%$##$%^&*&^%$\";\n //String str = \"_sakdkjashdksahkdhjksahdkjakjshdkjahsdkaskdkasdjhasjhckhagcuagskdjkasdjkaskjdhjkashdkjhakjdjkasdkaskjdajksdhjkashdjkahsjkdhjkasckjackhaduihcadlcdjcbkjsbdcjksdjkckjsdcjksdnjkcnjksdhckjsdhjkvsdjvnkjdsbvjkdsvkjdshkhsdkfheklwjfbjkwegfwegfiuwekjfbewjkhfgwejyfguiwejfbwekhfgywegfkjewbhjfgewjfgewhjfjhewgf\";\n\n System.out.println(reverseString(str));\n }",
"public static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tSystem.out.println(\"Enter String\");\n\tString input = s.nextLine();\n\tString a=reverse(input);\n\tSystem.out.print(a);\n}",
"public static void reverseUsingCustomizedLogic(String str) {\n\t\tint strLength = str.length();\n\n\t\tStringBuilder strBuilder = new StringBuilder();\n\n\t\tfor (int i = strLength - 1; i >= 0; i--) {\n\t\t\tstrBuilder = strBuilder.append(str.charAt(i));\n\t\t}\n\t\tSystem.out.println(\"str value after reverse using customized logic : \" + strBuilder.toString());\n\t}",
"public static String reverse(String s)\n {\n return new StringBuilder(s).reverse().toString();\n }",
"public String reverse()\n {\n Stack<String> words = new Stack<String>() ;\n char[] r = s.toCharArray() ;\n StringBuffer sb = new StringBuffer() ; \n String[] w = s.split(\" \");\n \n for(String c : w)\n {\n words.push(c) ;\n }\n while(!words.isEmpty())\n {\n \n \tsb.append(words.pop()) ;\n \n sb.append(\" \") ;\n }\n return sb.substring(0, s.length()) .toString();\n }",
"public static void main(String[] args)\r\n\t{\n\t\t\tString s;\r\n\t\t\tSystem.out.println(\"Enter a string\");\r\n\t\t\tScanner in=new Scanner(System.in);\r\n\t\t\ts=in.nextLine();\r\n\t\t\tStringBuffer s2=new StringBuffer(s);\r\n\t\t\tfor(int i=0;i<s.length();i++)\r\n\t\t\t{\r\n\t\t\t\ts2.setCharAt(i,s.charAt(s.length()-i-1));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Reverse is \"+s);\r\n\t}",
"@Test\n public void reverseString_passString_ReturnReversedString() {\n String output = Java8Streams.reverseString(\"java interview\");\n\n assertThat(output).isEqualTo(\"weivretni avaj\");\n }",
"public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the String\");\n\t\tString string=s.nextLine();\n\t\tSystem.out.println(string);\n\t\tString rev=\"\";\n\t\tint length=string.length();\n\t\tfor(int i=length-1;i>=0;i--) {\n\t\t\trev=rev+string.charAt(i);\n\t\t}\n\t\tSystem.out.println(rev);\n\t}",
"private void reverse(StringBuffer s)\n {\n s.reverse();\n String k = s.toString();\n String tokens[] = k.split(\" \");\n for(int i=0;i<tokens.length;i++)\n {\n StringBuffer temp = new StringBuffer(tokens[i]);\n System.out.print(temp.reverse()+\" \");\n }\n //Normal method\n /*String[] words = s.split(\" \");\n int i = words.length-1;\n while(i>=0)\n {\n System.out.print(words[i]+\" \");\n i--;\n }*/\n }",
"public static void reverser(String word) {\n String newStr = \"\";\n for (int i = word.length(); i > 0; i--) {\n newStr += word.substring(i - 1, i);\n }\n System.out.println(newStr);\n }",
"public String reverse(String s) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = s.length() - 1; i >= 0; i--) {\n\t\t\tchar charS = s.charAt(i);\n\t\t\tbuilder.append(charS);\n\t\t}\n\t\treturn builder.toString();\n\t}",
"public static String reverseString(String input) {\n\t\tStringBuffer output=new StringBuffer();\n\t\tchar[] charArray = input.toCharArray();\n\t\tfor (int i = charArray.length-1; i >= 0; i--) {\n\t\t\toutput.append(charArray[i]);\n\t\t}\n return output.toString();\n\t}",
"public static String reverseStr( String str ){\n //your code goes here\n if (str == null || \"\".equalsIgnoreCase(str)){\n return str;\n }\n\n String reverse = \"\";\n for (int i = 0; i < str.length(); i++){\n reverse += str.charAt(str.length()-1-i);\n }\n\n return reverse;\n }",
"public void reverser(String[] x){\n reverse(x, 0, x.length -1);\n }",
"private String reverseString(String s) {\n char[] c = s.toCharArray();\n int i = 0, j = s.length() - 1;\n while (i < j) {\n if (c[i] != c[j]) {\n c[i] ^= c[j];\n c[j] ^= c[i];\n c[i] ^= c[j];\n }\n ++i;\n --j;\n }\n return new String(c);\n }",
"public static void main(String[] args) {\n \n String str1 = \"hello, return olleh\";\n \n System.out.println( \"ReverseString ans: \" + reverseStr(str1)); \n \n }",
"public static void main(String[] args) {\n\t\tString s = \"I am Ritesh Kumar\";\r\n \r\n\t\tString to = StringRecusiveReverse.reverseMe(s);\r\n\t\tString to1 = StringRecusiveReverse.recursiveReverseString(s);\r\n\t\tSystem.out.println(to);\r\n System.out.println(to1);\r\n /*StringTokenizer st=new StringTokenizer(s);\r\n while(st.hasMoreTokens()) {\r\n \ts1=st.nextToken(); \r\n \tSystem.out.println(s1);\r\n }*/\r\n String[] s1=s.split(\" \");\r\n \r\n for(int i=s1.length-1;i>=0;i--)\r\n \tSystem.out.println(s1[i]);\r\n\t}",
"public static void main(String[] args) {\n String input = \"Lukman\";\n StringBuilder input1 = new StringBuilder();\n\n // append a string into StringBuilder input1\n //input1.append(input);\n\n // reverse StringBuilder input1\n //input1 = input1.reverse();\n\n // print reversed String\n int len = input.length() - 1;\n for (int i = len; i >= 0; --i) {\n input1.append(input.charAt(i));\n }\n System.out.println(\"Reverse:\" + input1);\n }",
"public static String reverseString(String s) {\n\t\tString reverse = \"\";\n\t\tint length = s.length();\n\t\t\n\t\tfor(int i=0; i<length; i++){\n\t\t\t//reverse += (s.charAt(length-1-i) + \"\");\n\t\t\treverse = reverse.concat(s.charAt(length-i-1) + \"\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\treturn reverse;\n \n }",
"public static String reverse(String sentence)\n {\n // Complete this method. Use a Stack.\n ...\n\n\n\n\n\n\n }",
"public static String reverser(String line) {\n String result=\"\";\n for (int i = line.length()-1; i >=0 ; i--) {\n result += line.charAt(i);\n }\n return result;\n}",
"public IDnaStrand reverse();",
"public static void reverseUsingStringBuilder(String str) {\n\n\t\tStringBuilder revStrBuilder = new StringBuilder(str);\n\t\tString revStr = revStrBuilder.reverse().toString();\n\n\t\tSystem.out.println(\"str value after reverse using JAVA API: \" + revStr);\n\t}",
"static void reverse(StringBuffer str)\n\t {\n\t\t Stack<Character> s = new Stack<Character>();\n\t\t int len = str.length();\n\t\t for(int i= 0; i<len ;i ++)\n\t\t {\n\t\t\t s.push(str.charAt(i));\n\t\t }\n\t\t \n\t\t //pop the string and print it\n\t\t for(int i= 0; i<len ;i ++)\n\t\t {\n\t\t\t System.out.print(s.pop());\n\t\t }\n\t }",
"public static void main(String [] args )\n {\n String org, rev=\"\";\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Enter a string to Reverse\");\n org=scanner.nextLine();\n //input length value\n int length=org.length();\n\n for (int i=length - 1; i >=0; i--)\n rev=rev +org.charAt(i);\n\n System.out.println(\"Reverse of the entered string is:\" +rev);\n }",
"public static void main(String[] args) {\n StringBuffer s = new StringBuffer(\"GeeksforGeeks\");\n System.out.println(\"Original string is : \" + s );\n //print the reversed string\n System.out.print(\"Reversed string is : \" );\n //call reverse method\n reverse(s);\n\t}",
"public static String reverseString(String input) {\r\n\t\tif(input==null)\r\n\t\t\t\treturn null;\r\n\t\t\r\n\t\tchar [] inputCharacter = input.toCharArray();\r\n\t\tint inputLength = inputCharacter.length;\r\n\t\t\r\n\t\tfor(int i=0; i<inputLength/2 ;i++){\r\n\t\t\tchar temp = inputCharacter[i];\r\n\t\t\tinputCharacter[i] = inputCharacter[inputLength-1-i];\r\n\t\t\tinputCharacter[inputLength-1-i] = temp;\r\n\t\t}\r\n\t\treturn new String(inputCharacter);\r\n\t}",
"public static void main(String[] args) {\n\t\tString str1=\"A man, a plan, a canal: Panama\";\r\n\t\tSystem.out.println(reverseString(str1));\r\n\t}",
"public void reverseString(char[] s) {\n for(int i = 0; i < s.length/2; i++){\n char temp = s[i];\n s[i] = s[s.length-(i+1)];\n s[s.length-(i+1)] = temp;\n \n }\n \n \n }",
"private static String reverseString(String s) \r\n\t{\r\n\t\tif(s.length() == 1)\r\n\t\t\treturn s;\r\n\t\treturn \"\" + s.charAt(s.length() - 1) + reverseString(s.substring(0, s.length() - 1));\r\n\t}",
"public static void main(String[] args)\n {\n String input = \"now this was interesting\";\n\n StringBuilder input1 = new StringBuilder();\n\n // append a string into StringBuilder input1\n input1.append(input);\n\n // reverse StringBuilder input1\n input1.reverse();\n\n // print reversed String\n System.out.println(input1);\n }",
"public static void main(String[] args) {\n\n StringBuilder lz = new StringBuilder(\"Led Zeppelin\");\n lz.reverse();\n System.out.println(lz);\n\n String lz2 = \"Led Zeppelin\";\n// System.out.println(lz2.reverse()); // does not compile\n\n }",
"public static String reverse(String str){\n if(str.equals(\"\")){\n return str;\n }\n //must make problem simpler\n String firstChar = str.substring(0,1);\n String restOfString = str.substring(1);\n\n //recurse - calling this method with a simpler problem\n String restOfStringReversed = reverse(restOfString);\n\n String strReversed = restOfStringReversed + firstChar;\n return strReversed;\n }",
"public static final String reverseString2(final String inString){\n\t\tif (inString==null || inString.length()==0) return inString;\r\n\t\tchar[] cStringArray=inString.toCharArray();\r\n\t\tchar first;\r\n\t\tfor (int i=0;i<(cStringArray.length/2);i++){\r\n\t\t\tfirst = cStringArray[ i ];\r\n\t\t\tcStringArray[ i ] = cStringArray[ cStringArray.length - i - 1 ];\r\n\t\t\tcStringArray[ cStringArray.length - i - 1 ] = first;\r\n\t\t}\r\n\t\treturn String.valueOf(cStringArray);\r\n\t}",
"static void reverseString(String s){\n\tString[] words=s.split(\" \");\n\tString ReverseString=\"\";\n\tfor(int i=0;i<words.length;i++)\n\t{\n\t\tString word=words[i];\n\t\tString reverseword=\"\";\n\t\tfor(int j=word.length()-1;j>=0;j--){\n\t\t\treverseword=reverseword+word.charAt(j);\n\t\t}\n\t\t\n\t\tReverseString=ReverseString+reverseword+\"\";\n\t}\n\tSystem.out.println(s);\n\tSystem.out.println(\"ReverseString is - \" +ReverseString);\n\t\n}",
"public static String reverseEquation(String equation) {\n\t\tString[] parsed = Equation.parseEquation(equation);\n\t\tStringBuilder reversedEqn = new StringBuilder();\n\t\tfor (int i = parsed.length - 1; i >= 0; i--) {\n\t\t\treversedEqn.append(parsed[i]);\n\t\t}\n\t\treturn reversedEqn.toString();\n\t}",
"public void reverseString(char[] s) {\n for(int i = 0, j = s.length - 1; i < s.length / 2; i++,j--){\n //temporary holder\n char temp = s[j];\n //swap characters\n s[j] = s[i];\n s[i] = temp;\n }\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String string = sc.next();\n char[] ch = string.toCharArray();\n String reverse = \"\";\n for (int i=string.length() - 1; i >=0 ; i--){\n reverse += ch[i];\n }\n if (string.equals(reverse) ) {\n System.out.println(\"yes\");\n } else {\n System.out.println(\"no\");\n }\n }",
"static String reverse3(String s)\n\t{\n\t\tString reverseStr = new StringBuffer(s).reverse().toString();\n\t\treturn reverseStr;\n \n\t}",
"public String reverse(String string) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString result = \"\";\n\t\tint indexCount = string.length()-1;\n\t\t\n\t\twhile(indexCount > -1) {\n//\t\t\tresult += string.charAt(indexCount);\n\t\t\tchar character = string.charAt(indexCount);\n\t\t\t//System.out.println(character);\n\t\t\tresult = result + character;\n\t\t\tindexCount--;\n\t\t}\n\t\t\n\t\t//System.out.println(result);\n\t\treturn result;\n\n\t}",
"public String reverse(String s) {\n String ret = \"\";\n for(int i = 0; i < s.length; i+= 1) {\n ret = s.charAt(i) + ret; //this will go in reverse as the next character will appear before the previously placed ret character.\n }\n return ret;\n}",
"static void findReverseString(String string){\n\t\tfor (int i = string.length() -1; i >= 0; i--) {\n\t\t\tSystem.out.print(string.charAt(i));\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n\t\tString str = \"madam\";\r\n\t\tString rev = \"\";\r\n\t\tfor(int i = str.length()-1; i>=0; i--)\r\n\t\t{\r\n\t\t rev = rev+str.charAt(i);\t\r\n\t\t}\r\n\t\tSystem.out.println(rev);\r\n\t\tif(rev.equals(str))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"its a palendrome\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"its not palendrome\");\r\n\t\t}\r\n\t\treverse(\"avinesh\");\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tString s = \"hello my name is john\";\r\n\t\t//System.out.println(reverse(s,0,s.length()-1));\r\n\t\t\r\n\t\tSystem.out.println(reverseWordsAlt(s));\r\n\t}",
"public static void main(String[] args) {\nString str=\"Welcome To Coding Ninja\";\n\nSystem.out.println(reverse_each(str));\n\t\t\n\t}",
"static String reverseWordsInStringInPlace(StringBuffer input_string){\n //step 1\n int j = -1;\n for(int i = 0; i <input_string.length() ;i++ ){\n if(' ' == input_string.charAt(i)){\n reverseString(input_string,j+1,i-1);\n j=i;\n }\n //for last word\n if(i == input_string.length()-1){\n reverseString(input_string,j+1,i);\n }\n }\n //step 2\n reverseString(input_string,0,input_string.length()-1);\n return input_string.toString();\n\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tScanner s= new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the String\");\n\t\tString value=s.nextLine();\n\t\t\n\t\t\n\n\t\treverse(value);\n s.close();\t\t\n\t}",
"@Test\n\tpublic void RevStr() {\n\n\t\tString str = \"i am the tester\";\n\t\tfor (int i = str.length() - 1; i >= 0; i--) {\n\t\t\tSystem.out.println(str.charAt(i));\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n System.out.println(\"what do you wanna reverse?\");\n Scanner in = new Scanner(System.in);\n String str = in.nextLine();\n StringBuilder ohyeah = new StringBuilder(str);\n System.out.println(\"Here ya go:\");\n System.out.println(ohyeah.reverse().toString());\n\n//option 2 with recursion\n System.out.println(\"what do you wanna reverse?\");\n Scanner in2 = new Scanner(System.in);\n String hey = in2.nextLine();\n String reverseHey = reverse(hey);\n System.out.println(\"Here ya go: \"+ reverseHey);\n }",
"public static void reverse(String sentence) {\r\n\r\n if ((sentence == null) || (sentence.length() <= 1)) {\r\n System.out.println(sentence);\r\n }\r\n else {\r\n System.out.print(sentence.charAt(sentence.length() - 1));\r\n reverse(sentence.substring(0, sentence.length() - 1));\r\n }\r\n }",
"public static void main(String[] args) {\n String input = \"DXC technologies limited\";\n\n String revr = \"\";\n for (int z = input.length() - 1; z >= 0; z--) {\n revr = revr + input.charAt(z);\n }\n System.out.println(revr);\n\n\n String splitwords[] = input.split(\" \");\n String reverseword = \"\";\n\n for (int i = 0; i < splitwords.length; i++) {\n String word = splitwords[i];\n String reversewords = \"\";\n\n for (int j = word.length() - 1; j >= 0; j--) {\n reversewords = reversewords + word.charAt(j);\n }\n reverseword = reverseword + reversewords + \" \";\n\n }\n System.out.println(\"traditional method is \" +trim(reverseword));\n\n //return reverseword;\n\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tString str=\"Ali Can\";\r\n\t\t\r\n\t\tString reverse=\"\";\r\n\t\t\r\n\t\tfor(int i=str.length()-1;i>=0;i--) {\r\n\t\t\treverse=reverse+str.charAt(i);\r\n\t\t}\r\n\t\tSystem.out.println(reverse);\r\n\t}",
"public static void inverseTransform()\r\n {\r\n \tint first = BinaryStdIn.readInt();\r\n \tString s = BinaryStdIn.readString();\r\n \tBinaryStdIn.close();\r\n \t\r\n \tchar[] t = s.toCharArray();\r\n \r\n \tchar[] firstCharacters = t.clone();\r\n \tArrays.sort(firstCharacters);\r\n \t\r\n \t// Construction next[] using t[] and first\r\n \tint[] next = constructNext(t, firstCharacters, first);\r\n \t\r\n \t// Writing original string to StdOut using next[] and first\r\n \tint index = first;\r\n \tfor (int i = 0; i < t.length; i++)\r\n \t{\r\n \t\tBinaryStdOut.write(firstCharacters[index]);\r\n \t\tindex = next[index];\r\n \t}\r\n \tBinaryStdOut.close();\r\n }",
"static void test_reverse() {\n\n System.out.println( \"\\nTESTS for reverse() : \" );\n\n System.out.print( \"String 'Racecar' returns : \" );\n try { System.out.println(StringStuff.reverse( \"Racecar\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"String 'sbmal EVOL I' returns : \" );\n try { System.out.println(StringStuff.reverse( \"sbmal EVOL I\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n }",
"@Test\n\tpublic void checkReverseString()\n\n\t{\n\t\tassertEquals(\"nitin si a doog yob \",test.testReverseString(\"nitin is a good boy\"));\n\t\t\n\t}",
"public static String reverse(String str){\n String result=\"\";//\"CBA\"\n\n for (int i = str.length()-1; i>=0; i--) {\n result+=str.charAt(i);\n }\n return result;\n }",
"public static void main(String[] args) {\n String s =\" 1\";\n\n System.out.println(reverseWords(s));\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tString str=\"Selenium\";\n\t\tString revStr=\"\";\n\t\t\n\t\tfor (int i=str.length()-1;i>=0;i--){\n\t\t\trevStr=revStr+str.charAt(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Reverse String is \"+revStr);\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString str = in.nextLine();\n//\t\tSystem.out.println(reverse(str));\n\t\tSystem.out.println(reverse2(str));\n\t\t\n}",
"public static void main(String[] args) {\nScanner obj =new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the String\");\nString value=obj.nextLine();\nreverseString1(value);\n\t}",
"@Test\n public void reverse_Givenastring_ReverseEachWord()\n {\n\n assertEquals(\"a kciuq nworb xof spmuj revo eht yzal god\",fp.Reversethestring(\"a quick brown fox jumps over the lazy dog\"));\n\n }",
"public void reverse() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n newSeq.add(seq.get(seq.size() - 1 - i));\n }\n seq = newSeq;\n }",
"private void reverseString(int from, int to) {\n System.out.println(\"from is \" + from + \" to is \" + to);\n char[] input = this.inputString.toCharArray();\n char[] substring = new char[to - from + 1];\n for(int i=0; i < substring.length; i++) {\n substring[i] = input[from++];\n }\n for(int i=0; i < substring.length/2; i++) {\n char temp = substring[i];\n substring[i] = substring[substring.length - i -1];\n substring[substring.length -1 -i] = temp;\n }\n from = from - substring.length;\n for(int i=0; i < substring.length; i++) {\n input[from++] = substring[i];\n }\n inputString = new String(input);\n System.out.println(inputString);\n }",
"public static void main(String[] args) {\n\t\tString str = \"Pooja\";\n\t\tchar str1[] = str.toCharArray();\n\t\tString reverse = \"\";\n\t\t\n\t\tfor (int i = str1.length; i>=0 ; i--) {\n\t\t\treverse = reverse + str1[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(reverse);\n\n\t}",
"String reverseTheString(String str)\n {\n \n char s[] = str.toCharArray();\n char temp [] = new char[s.length];\n \n int j = 0; \n for (int i = s.length - 1; i >=0; i--)\n {\n temp[j++] = s[i];\n }\n return new String(temp) ; \n }",
"public static String reverseWord(String str){\n StringBuilder result = new StringBuilder();\n StringTokenizer tokenizer = new StringTokenizer(str,\"\");\n\n while (tokenizer.hasMoreTokens()){\n StringBuilder sb = new StringBuilder();\n sb.append(tokenizer.nextToken());\n sb.reverse();\n\n result.append(sb);\n result.append(\" \");\n }\n return result.toString(); //converting the StringBuilder into String\n }",
"private static void reverseWithSplitArray(String str) {\n\t\tString result = \"\";\r\n\t\tString wordArray[] = str.split(\" \");\r\n\t\tfor (int j = wordArray.length - 1; j >= 0; j--) {\r\n\t\t\tresult = result + wordArray[j] + \" \";\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}",
"protected static void reverseWordsInAString(String s) {\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\r\n String words[] = s.split(\" \"); // splits the input string into an array of\r\n // strings based on a split character\r\n for (String word: words) // iterates through all the entries in the string array\r\n sb.append(new StringBuilder(word).reverse().toString() + \" \"); //uses the reverse\r\n //method to reverse the entry in the array, append it to the string builder and add the\r\n // space back in\r\n System.out.println(sb.toString().trim()); // outputs the fully appended StringBuilder\r\n // .trim() removes any extra whitespace\r\n\t}",
"@Test\n\tpublic void revStrSentances() {\n\n\t\tString s = \"i like this program very much\";\n\t\tString[] words = s.split(\" \");\n\t\tString revStr = \"\";\n\t\tfor (int i = words.length - 1; i >= 0; i--) {\n\t\t\trevStr += words[i] + \" \";\n\n\t\t}\n\n\t\tSystem.out.println(revStr);\n\n\t}",
"private static void reverseWord(String word) {\n // StringBuild.reverse()\n System.out.println(new StringBuilder(word).reverse().toString());\n\n // Add char one by one iteration method\n StringBuilder reversed = new StringBuilder();\n char[] chars = word.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n reversed.append(chars[chars.length - i - 1]);\n }\n System.out.println(reversed.toString());\n }",
"public static void main(String[] args) {\n\t\tString original=\"kayak radar kayak\";\n\t\tString reversed=\"\";\n\t\t\n\t\tfor(int i=original.length()-1; i>=0; i--) {\n\t\t\t\n\t\t\treversed=reversed+original.charAt(i); // +k=k+a=ka+k\n\t\t}\n\t\tSystem.out.println(reversed);\n\t\t\n\t\tif(original.equals(reversed)) {\n\t\t\tSystem.out.println(\"String is a palindrome \");\n\t\t}else {\n\t\t\tSystem.out.println(\"String is NOT palindrome\");\n\t\t}\n\t\t\n\t}",
"public void reverse(String IRQ){\r\n\t\tthis.switches.reverse(IRQ);\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tString reverse = \"hakunaMatata\";\r\n\t\tchar[] creverse = reverse.toCharArray();\r\n\r\n\t\tList<Character> list = new ArrayList();\r\n\r\n\t\tfor (char c : creverse)list.add(c);\r\n\t\tCollections.reverse(list);\r\n\t\tListIterator litr = list.listIterator();\r\n\t\twhile (litr.hasNext())\r\n\t\t\tSystem.out.println(\"Reverse of String: \" + litr.next());\r\n\t}",
"void reverseDirection();",
"public static String reverseWithStaticMethod(String str) {\n return new StringBuilder(str).reverse().toString();\n\n }"
] | [
"0.76908636",
"0.7643855",
"0.7636764",
"0.74469787",
"0.71890944",
"0.71884596",
"0.7186471",
"0.71261406",
"0.7067174",
"0.7060068",
"0.7053605",
"0.7053224",
"0.7034909",
"0.7015408",
"0.7004276",
"0.7004276",
"0.7000615",
"0.6992733",
"0.69909394",
"0.69782525",
"0.69648224",
"0.6964221",
"0.6949186",
"0.69463384",
"0.6945888",
"0.69290036",
"0.68848145",
"0.68837935",
"0.68831503",
"0.6838561",
"0.68233556",
"0.67999864",
"0.67762387",
"0.6770134",
"0.6757569",
"0.67509586",
"0.6739247",
"0.6733438",
"0.6718954",
"0.67061317",
"0.6685194",
"0.6685067",
"0.66701496",
"0.6647436",
"0.6646088",
"0.66433835",
"0.66377735",
"0.66290396",
"0.6620686",
"0.6617121",
"0.66149944",
"0.6613022",
"0.65951526",
"0.6594816",
"0.6583936",
"0.6577232",
"0.6566849",
"0.65587866",
"0.6557344",
"0.65400255",
"0.6523289",
"0.6522088",
"0.6510408",
"0.64925313",
"0.6490831",
"0.6487651",
"0.646021",
"0.6459547",
"0.644856",
"0.64313924",
"0.6427158",
"0.64134383",
"0.64132255",
"0.6411835",
"0.64025617",
"0.63996273",
"0.63992363",
"0.6398399",
"0.6395515",
"0.63739145",
"0.63713366",
"0.63655293",
"0.63364446",
"0.63207704",
"0.63003564",
"0.6284281",
"0.627802",
"0.62727326",
"0.62598276",
"0.62571394",
"0.6249773",
"0.62323457",
"0.6225219",
"0.6211275",
"0.6209651",
"0.62092745",
"0.6205442",
"0.62035143",
"0.61993754",
"0.61980116"
] | 0.7014649 | 14 |
Checks to see if String is a palindrome | public static boolean palindrome(String s){
s=helpPalindrome(s);
if(s.length()>1){
if(s.charAt(0)==s.charAt(s.length()-1)){
palindrome(s.substring(1,s.length()-1));
} else
return false;
}
if(s.length()<2||s.length()>-1)
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean IsPalindrome(String string){\r\n \r\n string = string.replace(\" \", \"\");\r\n \r\n String reverseString = new StringBuilder(string).reverse().toString();\r\n\r\n return reverseString.equalsIgnoreCase(string);\r\n }",
"public static boolean checkPalindrome(String s){\n\t\t\n\t\tfor(int i=0;i<(s.length()/2);i++ ){\n\t\t\t\n\t\t\tif(s.charAt(i)!=s.charAt(s.length()-1-i)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean isPalindrome(String s) {\n if (s == null || s.length() == 0) return true;\n s = s.replaceAll(\"[^a-zA-Z0-9]\", \"\").toLowerCase();\n int left = 0;\n int right = s.length() - 1;\n while (left < right) {\n if (s.charAt(left++) != s.charAt(right--)) {\n return false;\n }\n }\n return true;\n }",
"private boolean isPalindrome(String s) {\r\n int l = 0, r = s.length() - 1;\r\n while (l <= r && s.charAt(l) == s.charAt(r)) {\r\n l++;\r\n r--;\r\n }\r\n return l >= r;\r\n }",
"static boolean isPalindrome(String s) {\n\t\tint i = 0, j = s.length() - 1;\n\t\twhile (i < j) {\n\t\t\tif (s.charAt(i) != s.charAt(j))\n\t\t\t\treturn false;\n\t\t\t++i;\n\t\t\t--j;\n\t\t}\n\t\treturn true;\n\t}",
"static boolean isPalindrome(String str){\n\t\tString a = str.replaceAll(\"\\\\s+\",\"\");\n\t\tString b = new StringBuilder(a).reverse().toString();\n\t\treturn a.equalsIgnoreCase(b);\n\t}",
"public static boolean isPalindrome2(String s) {\n List<Character> list = new ArrayList<>();\n for (int i = 0; i < s.length(); i++) {\n char c = Character.toLowerCase(s.charAt(i));\n if (c >= 'a' && c <= 'z' || c >= '0' && c <='9')\n list.add(c);\n }\n for (int i = 0; i < list.size() / 2; i++)\n if (list.get(i) != list.get(list.size() - i - 1))\n return false;\n return true;\n }",
"public static boolean isPalindrome(String a)\n { \n boolean flag = true; \n //Iterate the string forward and backward and compare one character at a time \n //till middle of the string is reached \n for(int i = 0; i < a.length()/2; i++)\n { \n if(a.charAt(i) != a.charAt(a.length()-i-1))\n { \n flag = false; \n break; \n } \n } \n return flag; \n }",
"public boolean validPalindrome(String s) {\n int start = 0;\n int end = s.length() - 1;\n return validPalindrom(s, start, end, true);\n }",
"private static boolean isItPalindrome(String s) {\n\t\t\n\t\ts = s.toLowerCase();\n\t\t\n\t\tint i = 0, j = s.length()-1;\n\t\t\n\t\twhile(i < j) {\t\t\t\t\t\t\n\t\t\t\n\t\t\t// Both i and j skips the non-alphanumerics.\n\t\t\twhile(!Character.isLetterOrDigit(s.charAt(i)) && i < j) { ++i; }\n\t\t\t\n\t\t\twhile(!Character.isLetterOrDigit(s.charAt(j)) && j > i) { --j; }\n\t\t\t\n\t\t\tif(s.charAt(i++) != s.charAt(j--))\n\t\t\t\treturn false;\t\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isPalindrome(String inputString) {\n\t\tchar ar[] = inputString.toCharArray();\n\t\tfor (int i = 0, j = ar.length - 1; i < (ar.length / 2); i++, j--) {\n\t\t\tif (ar[i] != ar[j])\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean isPalindrome(String s) {\n\t\t\n\t\tString newS = s.replaceAll(\"[^a-zA-Z0-9]\", \"\").toLowerCase();\n\t\tSystem.out.println(newS);\n\t\t\n\t\treturn new StringBuilder(newS).reverse().toString().equals(newS);\n\t}",
"public boolean isPalindrome(String s){ \n if(palindromes.containsKey(s))\n return (palindromes.get(s)).booleanValue();\n int m=0;\n int n=s.length()-1;\n while(m<n){\n if(s.charAt(m++)!=s.charAt(n--)){\n palindromes.put(s,new Boolean(false));\n return false;\n }\n }\n palindromes.put(s,new Boolean(true));\n return true;\n }",
"public static boolean isPalindrome(String input){\n String backwards = \"\";\n int i = input.length();\n while (i > 0) { // creates a backwards string of input\n backwards = backwards + input.substring(i - 1, i);\n i--;\n }\n return (backwards.equals(input)); //returns true if backwards string is same as input\n }",
"public static boolean isPalindrome_v2(String s)\n { \n return isPalindrome(s, 0, s.length()-1);\n }",
"public static boolean isPalindrome(String s) {\n\t\t// base case\n\t\tif (s.length() < 2) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// compare first and last\n\t\tif (s.charAt(0) != s.charAt(s.length()-1)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// recursive case\n\t\tisPalindrome(s.substring(1, s.length()-1));\n\t\t\n\t\treturn true;\n\t}",
"public boolean isPalindrome(String s) {\n s = s.toLowerCase();\n int start = 0;\n int end = s.length() - 1;\n char sc;\n char ec;\n boolean pass;\n while (end > start) {\n sc = s.charAt(start);\n ec = s.charAt(end);\n pass = false;\n if ((sc < 'a' || sc > 'z') && (sc < '0' || sc > '9')) {\n start++;\n pass = true;\n }\n if ((ec < 'a' || ec > 'z') && (ec < '0' || ec > '9')) {\n end--;\n pass = true;\n }\n if (pass) continue;\n if (s.charAt(start++) != s.charAt(end--)) return false;\n }\n return true;\n }",
"public final boolean isPalindrome(String stringToCheck){\n return stringToCheck.replaceAll(\"[^A-Za-z]\", \"\").toLowerCase().equals(\n new StringBuilder(stringToCheck.replaceAll(\"[^A-Za-z]\", \"\").toLowerCase()).reverse().toString());\n }",
"static boolean isRealPalindrome(String s) {\n return s.chars().distinct().count() > 1 // Contains more\n // than one letter\n && s.equals(new StringBuilder(s).reverse().toString()); // Is a palindrome\n }",
"public static boolean findStringPalindrome(String str) {\r\n\t\tString rev = \"\";\r\n\t\tfor (int i = str.length() - 1; i >= 0; i--) {\r\n\t\t\trev = rev + str.charAt(i);\r\n\t\t}\r\n\t\tif (str != rev) {\r\n\t\t\treturn false;\r\n\t\t} else\r\n\t\t\treturn true;\r\n\t}",
"static boolean is_palindrome(String s) {\n /* using iteration */\n for (int i = 0; i < Math.floor(s.length() / 2); i++) {\n int lastindex = s.length() - 1 - i;\n String endchar = s.substring(lastindex, lastindex + 1);\n String startchar = s.substring(i, i + 1);\n if (!startchar.equals(endchar)) {\n return false;\n }\n }\n return true;\n }",
"public boolean isPalindrome22(String s) {\n s = s.toLowerCase().replaceAll(\"[^a-z0-9]\", \"\");\n return new StringBuilder(s).reverse().toString().equals(s);\n }",
"public static void checkPalindrome(String str) {\n\n\t\tString reverse = new StringBuffer(str).reverse().toString();\n\n\t\t// check whether the string is palindrome or not\n\t\tif (str.equalsIgnoreCase(reverse)) {\n\n\t\t\tSystem.out.println(\"Given string is Palindrome\");\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Given string is Not Palindrome\");\n\t\t}\n\t}",
"public static boolean isPalindrome(String s) {\n int head = 0, tail = s.length() - 1;\n while (head < tail) {\n char cl = 0, cr = 0;\n while (!Character.isLetterOrDigit(cl) && head < s.length())\n cl = s.charAt(head++);\n while (!Character.isLetterOrDigit(cr) && tail >= 0)\n cr = s.charAt(tail--);\n if (head < s.length() && Character.toLowerCase(cl) != Character.toLowerCase(cr))\n return false;\n }\n return true;\n }",
"public static boolean isPalindrome(String s) {\n if(s==null){\n return false;\n }\n\n s = s.toLowerCase();\n\n int i=0;\n int j=s.length()-1;\n\n while(i<j){\n while(i<j && !((s.charAt(i)>='a' && s.charAt(i)<='z')\n || (s.charAt(i)>='0'&&s.charAt(i)<='9'))){\n i++;\n }\n\n while(i<j && !((s.charAt(j)>='a' && s.charAt(j)<='z')\n || (s.charAt(j)>='0'&&s.charAt(j)<='9'))){\n j--;\n }\n\n if(s.charAt(i) != s.charAt(j)){\n return false;\n }\n\n i++;\n j--;\n }\n\n return true;\n }",
"public static boolean isPalindrome(String s) {\n s = s.toLowerCase();\n // Store all letters and digits in new string. We don't care about space and special characters etc.\n StringBuilder builder = new StringBuilder();\n for (char ch : s.toCharArray()) {\n if (Character.isLetterOrDigit(ch)) {\n builder.append(Character.toLowerCase(ch));\n }\n }\n String s1 = builder.toString();\n boolean palindrome = true;\n int length = s1.length();\n int frontIndex = 0;\n int backIndex = length - 1;\n // Two indexes, one that points to the first index and one to the last index\n while (frontIndex < backIndex) {\n char c1 = s1.charAt(frontIndex);\n char c2 = s1.charAt(backIndex);\n if (c1 != c2) {\n palindrome = false;\n break;\n }\n frontIndex += 1;\n backIndex -= 1;\n }\n return palindrome;\n }",
"public boolean isPalindrome(String str) {\n\t\t//index of first element of the string\n\t\tint i = 0;\n\t\t//index of last element of the string\t\n\t\tint j = str.length() - 1;\t\n\t\t\n\t\t//iterate through the string\n\t\twhile (i < j) {\n\t\t\t//if a mismatch is found, return false\n\t\t\tif (str.charAt(i) != str.charAt(j)) \n return false;\n\t\t\t//if no mismatch is found at current stage, keep checking\n\t\t\ti++;\n\t\t\tj--;\n\t\t}\n\t\t//string is confirmed to be a palindrome, return true\n\t\treturn true;\n\t}",
"public static boolean IsPalindrome(String str) {\n\t\tint maxIndex = str.length() - 1;\n\t\tif (str.length() <= 1)\n\t\t\treturn true;\n\t\tfor (int i = 0; i < str.length() / 2; i++) {\n\t\t\tif (str.charAt(i) != str.charAt(maxIndex - i))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean validPalindrome(String s) {\n\t\tif (s.length() <= 1)\n\t\t\treturn true;\n\n\t\tint l = 0;\n\t\tint r = s.length() - 1;\n\t\twhile (l <= r) {\n\t\t\tif (s.charAt(l) == s.charAt(r)) {\n\t\t\t\tl++;\n\t\t\t\tr--;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn pali(s, l, r - 1) || pali(s, l + 1, r);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\n\t}",
"public boolean isPalindrome(String s) {\n int i = 0, j = s.length() - 1;\n while (i < j) {\n while (i < s.length() && !Character.isLetterOrDigit(s.charAt(i))) {\n i++;\n }\n\n while (j >= 0 && !Character.isLetterOrDigit(s.charAt(j))) {\n j--;\n }\n\n if (i < j && Character.toLowerCase(s.charAt(i++)) != Character.toLowerCase(s.charAt(j--))) {\n return false;\n }\n }\n return true;\n }",
"public static boolean isPalindrome(String str) {\n\r\n StringBuilder reversedString = new StringBuilder();\r\n for (int i = str.length() - 1; i >= 0; i--) {\r\n reversedString.append(str.charAt(i));\r\n }\r\n\r\n return str.equals(reversedString.toString());\r\n }",
"private boolean isPalindrome(String str){\n for(int i=0, j=str.length()-1; i<j; i++,j--){\n if(str.charAt(i) != str.charAt(j)){\n return false;\n }\n }\n return true;\n }",
"public static boolean isPalindrome(String str)\n {\n String str2 = \"\";\n str = str.toLowerCase();\n for(int i = str.length() - 1; i > -1; i--)\n {\n str2 += str.substring(i, i + 1);\n }\n if (str.equals(str2))\n return true;\n return false;\n }",
"public static boolean isPalindrome(String s) {\n if(s ==null||s.length()<=0)\n return true;\n int frontIndex=0;\n int backIndex = s.length()-1;\n \n char[] strChar = s.toCharArray();\n \n while(frontIndex < backIndex){\n while(!Character.isLetterOrDigit(strChar[frontIndex])&&frontIndex<s.length()-1)\n frontIndex++;\n while(!Character.isLetterOrDigit(strChar[backIndex])&&backIndex>0)\n backIndex--;\n if(Character.isUpperCase(strChar[frontIndex]))\n strChar[frontIndex] = Character.toLowerCase(strChar[frontIndex]);\n if(Character.isUpperCase(strChar[backIndex]))\n strChar[backIndex] = Character.toLowerCase(strChar[backIndex]);\n if(strChar[frontIndex]!=strChar[backIndex]&&(Character.isLetterOrDigit(strChar[frontIndex])&&Character.isLetterOrDigit(strChar[backIndex]))){\n return false;\n }else{\n frontIndex++;\n backIndex--;\n \n }\n }\n return true;\n \n \n }",
"public static boolean isPalindrome(String str) {\n StringBuilder reverse = new StringBuilder();\n String clean = str.toLowerCase();\n char[] plain = clean.toCharArray();\n for (int i = plain.length - 1; i >= 0; i--) {\n reverse.append(plain[i]);\n }\n return (reverse.toString()).equals(clean);\n\n }",
"public boolean testPalindromicity(String s) {\n s = s.replaceAll(\"[^a-zA-Z]\", \"\").toLowerCase();\n char[] sArr = s.toCharArray();\n\n int i=0;\n while (i < sArr.length-1-i) {\n if (sArr[i] != sArr[sArr.length-1-i])\n return false;\n i++;\n }\n return true;\n }",
"public static boolean checkPalaindrome(String s) {\n if (s == null) return false;\n String refinedString = s.toLowerCase()\n .replaceAll(\" \",\"\")\n .replaceAll(\"[^a-z]\", \"\");\n int i =0;\n int j = refinedString.length() -1;\n while (i < j) {\n if (refinedString.charAt(i) != refinedString.charAt(j)) {\n return false;\n }\n i++ ; j--;\n }\n return true;\n }",
"public static boolean palindrome(String s) {\n\t\tString uncluttered=new String();\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\tif(Character.isLetter(s.charAt(i))==true) {\n\t\t\tuncluttered=uncluttered+s.charAt(i);\n\t\t}\n\t\tuncluttered=uncluttered.toLowerCase();\n\t\t}\n\t\tfor(int i=0; i<uncluttered.length()/2; i++) {\n\t\t\tif(uncluttered.charAt(i)==uncluttered.charAt(uncluttered.length()-(i+1))) {\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isPalindrome(String str) {\n\n String newstring = \"\";\n for (int i = str.length()-1; i >=0; i=i-1) {\n newstring = newstring + str.charAt(i);\n }\n if(str.equals(newstring)){\n return true;\n }\n else{\n return false;\n }\n\n }",
"public boolean isPalindrome2(String s) {\n int start = 0;\n int end = s.length() - 1;\n while(start <= end) {\n while(start <= end && !Character.isLetterOrDigit(s.charAt(start))) {\n start++;\n }\n while(start <= end && !Character.isLetterOrDigit(s.charAt(end))) {\n end--;\n }\n if(start <= end && Character.toLowerCase(s.charAt(start)) != Character.toLowerCase(s.charAt(end))) {\n return false;\n }\n start++;\n end--;\n }\n return true;\n }",
"public static boolean isPalindrome( String s ) {\n// two indexes --> front and back to move toowards each other\n if (s.length() == 0 || s.length() == 1)\n return false;\n int i = 0;\n int j = s.length() - 1;\n while (i != j && i < j ) {\n if (s.charAt(i) == s.charAt(j)) {\n i++; j--;\n }\n else\n return false;\n }\n return true;\n }",
"private static boolean is_palindrome(String test) {\n\t\t\n\t\treturn false;\n\t}",
"static boolean isPalindrome(String str) {\n\n if (str.length() <= 1) return true;\n\n return str.charAt(0) != str.charAt(str.length()-1) ? false : isPalindrome(str.substring(1, str.length()-1));\n }",
"public static void isPalindromeString(String palindrome){\n String result =\"\";\n for(int i = palindrome.length()-1; i>=0; i--){\n result += palindrome.charAt(i);\n }\n System.out.println(\"The reversed string is: \" + result);\n\n if(palindrome.equalsIgnoreCase(result)){\n System.out.println(result + \" IS a palindrome\");\n }else {\n System.out.println(result + \" is NOT a palindrome!\");\n }\n }",
"public static boolean palindrome(String s) {\n \tString x = \"\";\n \tfor(int i = 0; i<s.length(); i++) {\n \t\tif(Character.isLetter(s.charAt(i))) {\n \t\t\tx += s.substring(i, i + 1);\n \t\t}\n \t}\n \tString other = \"\";\n \tfor(int i = x.length() - 1; i>=0; i--) {\n \t\tother += x.substring(i, i + 1);\n \t}\n return other.compareToIgnoreCase(x) == 0;\n }",
"public static boolean isPallindrome(String s) {\n\t\tif (StringUtils.isEmpty(s)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn StringUtils.reverse(s).equals(s);\n\t}",
"public static boolean isPalindrome(String s) {\n\t\tif (s == null || s.trim().isEmpty())\n\t\t\treturn true;\n\t\tif (s.length() == 1) {\n\t\t\treturn true;\n\t\t}\n\t\tchar[] charArray = s.toLowerCase().toCharArray();\n\t\tint start = 0;\n\t\tint end = charArray.length - 1;\n\t\twhile (start < end) {\n\t\t\twhile (start < charArray.length\n\t\t\t\t\t&& !isAlphanumeric(charArray[start]))\n\t\t\t\tstart++;\n\t\t\twhile (end >= 0 && !isAlphanumeric(charArray[end]))\n\t\t\t\tend--;\n\n\t\t\tif (start >= charArray.length || end < 0)\n\t\t\t\treturn true;\n\n\t\t\tif (charArray[start] != charArray[end])\n\t\t\t\treturn false;\n\t\t\tstart++;\n\t\t\tend--;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isPalindrome(String input){\n\t\t\n\t\t//if the input string is null, then return false\n\t\tif(input == null )\n\t\t\treturn false;\n\t\t\n\t\t//strip the input of all whitespaces\n\t\tinput = input.trim();\n\t\t\n\t\t//if what remains is of length 0 or 1, return true\n\t\tif(input.length()==0||input.length()==1)\n\t\t\treturn true;\n\t\telse\n\t\t{\n\t\t\t//set up two counters, one at the starting and one at the ending.\n\t\t\tint i = 0;\n\t\t\tint j = input.length() - 1;\n\t\t\t\n\t\t\t//while they don't cross paths, compare the characters at the counters and move them in opposite directions\n\t\t\t//return false if the characters don't match.\n\t\t\twhile(i < j)\n\t\t\t{\n\t\t\t\tif(input.charAt(i)!=input.charAt(j))\n\t\t\t\t\treturn false;\n\t\t\t\ti++;\n\t\t\t\tj--;\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}",
"static boolean isPalindrome(char []str) \n{ \n\tint len = str.length; \n\n\t// single character is always palindrome \n\tif (len == 1) \n\t\treturn true; \n\n\t// pointing to first character \n\tchar ptr1 = str[0]; \n\n\t// pointing to last character \n\tchar ptr2 = str[len-1]; \n\n\twhile (ptr2 > ptr1) \n\t{ \n\t\tif (ptr1 != ptr2) \n\t\t\treturn false; \n\t\tptr1++; \n\t\tptr2--; \n\t} \n\n\treturn true; \n}",
"private boolean isPalindrome(String s) {\n if (!this.Memoize.containsKey(s)) {\n if (s.length() < 2) {\n this.Memoize.put(s, true);\n } else {\n String sub = s.substring(1, s.length() - 1);\n // check the recursed results\n this.Memoize.put(s, this.isPalindrome(sub) && s.charAt(0) == s.charAt(s.length() - 1));\n }\n }\n return this.Memoize.get(s);\n }",
"include<stdio.h>\nint main()\n{\n char t[1000]; \n scanf(\"%s\",t); \n \n int i,j,len; \n len=strlen(t); \n i=0; \n j=len-1; \n while(i<=j)\n {\n if(t[i]!=t[j])\n { break; } \n j--; i++;\n } \n \n if(i<j)\n printf(\"%s is not a palindrome\",t); \n else\n printf(\"%s is a palindrome\",t); \n \n return 0;\n}",
"public boolean isPalindromeNotWorking(String s) {\n\t\t\n if(s.isEmpty()) {\n \treturn true;\n }\n s = s.toLowerCase();\n int length = s.length();\n boolean ispalindrome = true;\n for(int i=0,j=length-1;i<j;) {\n \tint left = (int)s.charAt(i);\n \tint right = (int)s.charAt(j);\n \tboolean isleftAlphabet = isAlphabet(left);\n \tboolean isrightAlphabet = isAlphabet(right);\n \tif(!isleftAlphabet) {\n \t\ti++;\n \t}\n \tif(!isrightAlphabet) {\n \t\tj--;\n \t}\n \tif(isleftAlphabet && isrightAlphabet) {\n \t\tif(s.charAt(i) != s.charAt(j)) {\n \t\tispalindrome = false;\n \t\tbreak;\n \t}else {\n \t\ti++;\n \t\tj--;\n \t}\n \t}\n \t\n }\n return ispalindrome; \n }",
"private static boolean isPalindromic(String str) {\n if (str.length() < 3)\n return false;\n\n // Check to see if the word is a palindrome\n // From the first character to the midpoint...\n for (int i = 0; i <= str.length() / 2; i++) {\n // From the last chracter to the midpoint...\n for (int j = str.length() - 1; j >= str.length() / 2; j--) {\n // If the end characters are not equal, it's not a palindrome\n // Otherwise, assume it is until proven otherwise\n if (i >= j) {\n return true;\n }\n else if (str.charAt(i) != str.charAt(j)) {\n return false;\n }\n else\n i++;\n }\n }\n // If it is never disproved, it's probably a palindrome\n return true;\n }",
"public final boolean isPalindromeEfficient(String stringToCheck){\n stringToCheck = stringToCheck.replaceAll(\"[^A-Za-z0-9]\", \"\").toLowerCase();\n int n = stringToCheck.length();\n stringToCheck = stringToCheck.toLowerCase();\n int limitSuperior = n-1;\n int stopCondition = (n / 2) + 1;\n for (int i = 0; i < stopCondition; ++i) {\n if (stringToCheck.charAt(i) != stringToCheck.charAt(limitSuperior - i)) {\n return false;\n }\n }\n return true;\n }",
"public static boolean palindrome(String s) {\n\t\tString str = s.replaceAll(\" \", \"\");\n\n\t\t//str.replace(\"?\", \"\");\n\t\tString newStr = \"\";\n\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(str);\n\t\tif(sb.charAt(sb.length()-1) == '?') {\n\t\t\tsb.deleteCharAt(sb.length()-1);\n\t\t}\n\t\tfor (int i = 0; i < sb.length(); i++) {\n\t\t\ttry {\n\t\t\t\tif(sb.charAt(i) == '?') {\n\t\t\t\t\tsb.deleteCharAt(i);\n\t\t\t\t}\n\t\t\t\tif(sb.charAt(i) == ',') {\n\t\t\t\t\tsb.deleteCharAt(i);\n\t\t\t\t}\n\t\t\t\tif(sb.charAt(i) == '.') {\n\t\t\t\t\tsb.deleteCharAt(i);\n\t\t\t\t}\n\t\t\t\tif(sb.charAt(i) == ':') {\n\t\t\t\t\tsb.deleteCharAt(i);\n\t\t\t\t}\n\t\t\t}catch(Exception e) {}\n\t\t}\n\t\tnewStr = sb.toString();\n\t\tsb.reverse();\n\t\t//System.out.println(sb.toString());\n\t\t\n\t\t\n\n//\t\tfor (int i = str.length(); i > 0; i--) {\n//\t\t\tnewStr = newStr + str.charAt(i-1);\n//\t\t}\n\t\t\n\t\t//System.out.println(newStr + \" \" + str);\n\t\tif(newStr.equalsIgnoreCase(sb.toString()))\n\t\treturn true;\n\t\telse\n\t\treturn false;\n\t}",
"public boolean hasPalindromeRemaining(String s, int i) {\n int p1 = i;\n int p2 = s.length() - 1;\n while (p1 < p2) {\n if (s.charAt(p1) != s.charAt(p2)) return false;\n p1++; p2--;\n }\n return true;\n }",
"public boolean validPalindrome(String s) {\n char[] chars = s.toCharArray();\n\n int i = 0;\n int j = s.length() - 1;\n\n int count = 1;\n boolean result = true;\n while (i < j) {\n if (chars[i] != chars[j] && count == 1) {\n //删掉当前的i\n i++;\n count--;\n }\n if (chars[i] != chars[j] && count == 0) {\n result = false;\n }\n i++;\n j--;\n }\n\n if (result) {\n return true;\n }\n\n i = 0;\n j = s.length() - 1;\n\n count = 1;\n while (i < j) {\n if (chars[i] != chars[j] && count == 1) {\n //删掉当前的j\n j--;\n count--;\n }\n if (chars[i] != chars[j] && count == 0) {\n return false;\n }\n i++;\n j--;\n }\n\n\n return true;\n }",
"public boolean isPalindrome3(String s) {\n char[] c = s.toCharArray();\n for (int i = 0, j = c.length - 1; i < j; ) {\n if (!Character.isLetterOrDigit(c[i])) i++; // error: isWhitespace is not applicable eg.\":,1\"\n else if (!Character.isLetterOrDigit(c[j])) j--;\n else if (Character.toLowerCase(c[i++]) != Character.toLowerCase(c[j--]))\n return false;\n }\n return true;\n }",
"public boolean isPalindrome(String input) {\n\t\t\n\t\tif(input == \"\") {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//strip out all spaces\n\t\tinput.replaceAll(\"\\\\s\", \"\");\n\t\tint i = 0; \n\t\tint j = input.length() - 1;\n\t\t\n\t\twhile(i < j) {\n\t\t\tif(Character.toLowerCase(input.charAt(i)) != Character.toLowerCase(input.charAt(j))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ti++;\n\t\t\tj--;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean checkString(){\n createString();\n char[] charsJoinedString=this.joinedTextPalindrome.toCharArray();\n int lengthString=charsJoinedString.length-1;\n for(int i=0;i<charsJoinedString.length;i++){\n if(charsJoinedString[i]!=charsJoinedString[lengthString]){\n return false;\n }\n lengthString--;\n }\n return true;\n \n }",
"public static boolean isPalindrome(String s, int length){\n if(length <= 1){\r\n return true;\r\n }\r\n // create a new string for the first letter\r\n String first = s.substring(0,1);\r\n \r\n //create a new string for the last letter\r\n String last = s.substring(s.length() - 1, s.length());\r\n \r\n //create an if statement if the first and the last letter equal together\r\n if(first.equals(last)){\r\n //use a subtring to seperate the letters\r\n return isPalindrome(s.substring(1, length - 1), length - 2); \r\n } else {\r\n //return false if the letters are not the same\r\n return false;\r\n }\r\n }",
"public static boolean isPallindrome(String st) {\n\t\t\n\t\tif(st==null || st==\"\") {\n\t\t\treturn true;\n\t\t}\n\t\tint first =0;\n\t\tint last = st.length()-1;\n\t\twhile(first <last) {\n\t\t\tif(st.charAt(first) != st.charAt(last)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfirst++;\n\t\t\tlast--;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean containsPalindrome(String str) {\n String[] words = str.split(\"\\\\s+\");\n int count = 0;\n for (String word : words) {\n if (isPalindromic(word))\n count++;\n }\n\n // Remove spaces to check entire sentence\n str = str.replaceAll(\"\\\\s\", \"\");\n\n return (count > 1) || isPalindromic(str);\n }",
"public boolean validPalindrome(String s) {\n int start = 0, end = s.length() - 1;\n int[] delete = new int[3];\n while (start < end) {\n char a = s.charAt(start);\n char b = s.charAt(end);\n \n if (a != b) {\n if (delete[0] == 2) {\n return false;\n }\n if (delete[0] == 1) {\n delete[0] = 2;\n start = delete[1];\n end = delete[2];\n end += 1;\n } else {\n delete[0] = 1;\n delete[1] = start;\n delete[2] = end;\n start -= 1;\n }\n }\n start += 1;\n end -= 1;\n }\n return true;\n }",
"public static boolean isPal(String s)\n {\n if(s.length() == 0 || s.length() == 1){\n return true; \n }\n //recursive call\n if(s.charAt(0) == s.charAt(s.length()-1))\n /* check for first and last char of String:\n * if they are same then do the same thing for a substring\n * with first and last char removed. and carry on this\n * until you string completes or condition fails\n * Function calling itself: Recursion\n */\n {\n return isPal(s.substring(1, s.length()-1));\n }\n /* If program control reaches to this statement it means\n * the String is not palindrome hence return false.\n */\n return false;\n }",
"public boolean isPalindrome(String word) {\n if (word == null) {\n /** Unsure about this. Need to verify. */\n return false;\n }\n if (word.length() == 0 || word.length() == 1) {\n return true;\n }\n StringBuilder reverse = new StringBuilder(word).reverse();\n return word.equals(reverse.toString());\n }",
"public static boolean isPalindrome(String word) {\n String palindrome = new StringBuilder(word).reverse().toString();\n \n if(word.compareToIgnoreCase(palindrome) == 0) return true;\n else return false;\n }",
"public static boolean isPalindrome(String word){\r\n\t\tboolean palindrome = false;\r\n\t\tif(word.length()%2 == 1){\r\n\t\t\tfor(int a= 0; a<word.length()/2; a++){\r\n\t\t\t\tfor (int b = word.length()-1; b> word.length()/2; b--){\r\n\t\t\t\t\tif( word.charAt(a)== word.charAt(b)){\r\n\t\t\t\t\t\tpalindrome = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tpalindrome = false;\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\telse {\r\n\t\t\tfor(int a= 0; a<word.length()-1; a++){\r\n\t\t\t\tfor (int b = word.length()-1; b> 0; b--){\r\n\t\t\t\t\tif( word.charAt(a)== word.charAt(b)){\r\n\t\t\t\t\t\tpalindrome = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tpalindrome = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\treturn palindrome;\r\n\r\n}",
"public boolean palindromeCheck(String number) {\n\t\tString reverse = \"\";\n\t\tfor (int i = number.length() - 1; i >= 0; i--) {\n\t\t\treverse = reverse + number.charAt(i);\n\t\t}\n\t\tif (number.equals(reverse)) {\n\t\t\tSystem.out.println(number);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean isPalindrome_v1(String s)\n { // if length is 0 or 1 then String is palindrome\n System.out.println(s);\n if(s.length() == 0 || s.length() == 1)\n return true; \n \n if(s.charAt(0) == s.charAt(s.length()-1)) //base case\n /* check for first and last char of String:\n * if they are same then do the same thing for a substring\n * with first and last char removed. and carry on this\n * until you string completes or condition fails\n * Function calling itself: Recursion\n */\n \n return isPalindrome_v1(s.substring(1, s.length()-1));\n\n /* If program control reaches to this statement it means\n * the String is not palindrome hence return false.\n */\n return false;\n }",
"public static boolean isPalindrome(String s, int start, int last)\r\n\t{\r\n\t\tif(s.charAt(start) != s.charAt(last-1)) return false;\r\n\t\tif(start >= last) return true;\r\n\t\treturn isPalindrome(s, start+1, last-1);\r\n\t}",
"public static boolean DaLiJePalindrom(String s)\n\t{\n\t\tint i=0, j=0, brojac=0;\n\t\twhile(s.length()-1-j>=0)\n\t\t\t{\n\t\t\tif(s.charAt(s.length()-1-j)== s.charAt(i)) brojac++;\n\t\t\ti++;\n\t\t\tj++;\n\t\t\t}\n\t\tif(brojac==s.length())return true;\n\t\treturn false;\n\t}",
"public static void main(String[] args) {\n String s = \"MOM\";\n String reverse = \"\";\n String d = \"IMTIAZ\";\n String back = \"\";\n char[] word = s.toLowerCase().toCharArray();\n for (int i = s.length() - 1; i >= 0; i--) {\n reverse = reverse + s.charAt(i);\n for (int j = d.length() - 1; j >= 0; j--) {\n back = back + d.charAt(j);\n }\n\n }\n if (s.equals(reverse)) {\n System.out.println(s + \"--word is a palindron\");\n\n } else {\n System.out.println(s + \"--word is not a palindron\");\n }\n if (d.equals(back))\n System.out.println(d + \"--word is a palindron\");\n else\n System.out.println(d + \"--word is not a palindron\");\n\n\n\n isPalindrome(\"MADAM\");\n isPalindrome(\"IMTIAZ\");\n isPalindrome(\"AHMED\");\n isPalindrome(\"MOM\");\n }",
"public static boolean isPalin(String s){\n int i = 0;\n boolean con = true;\n\n con = true;\n i = 0;\n while((i <= s.length()/2) && (con)){\n if(s.charAt(i) != s.charAt(s.length()-i-1))\n con = false;\n i++;\n }\n return con;\n }",
"public boolean isPalindrome(String word) {\n if (word.length() == 0 || word.length() == 1) {\n return true;\n }\n Deque<Character> L = wordToDeque(word);\n return isPalindrome(L);\n }",
"public boolean isPalindrome(String s, CharacterComparator comp) {\n if (s.length() == 0 || s.length() == 1) {\n return true;\n }\n String revS = new StringBuilder(s).reverse().toString();\n for (int i = 0; i < s.length(); i++) {\n if (!comp.equalChars(s.charAt(i), revS.charAt(i))\n && i != Math.floorDiv(s.length(), 2)) {\n return false;\n }\n }\n return true;\n }",
"public static boolean palindrome(String word) {\n\t\t\r\n\t\tint equalsCounter=0;\r\n\t\t\r\n\t\tfor(int i=0;i<word.length();i++) {\r\n\t\t\t\r\n\t\tif(word.contains(\" \")) {\r\n\t\t\t\r\n\t\t\tword=word.replace(\" \",\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t if(word.charAt(i)==word.charAt(word.length()-(i+1))){\r\n\t\t\t\t\r\n\t\t\t\tequalsCounter++;\r\n\t\t\t\t\r\n\t\t\t\tif(equalsCounter==word.length()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\t\r\n\t}",
"public static Boolean isPalindrome(String s, int start, int end) {\n\t\tif(start < 0 || end < 0) return false;\n\t\t\n\t\twhile(start < end) {\n\t\t\tif(s.charAt(start) != s.charAt(end)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tstart++;\n\t\t\tend--;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"static boolean checkPalin(String word) {\n\t\tint n = word.length();\n\n\t\t// making the check case\n\t\t// case insensitive\n\t\tword = word.toLowerCase();\n\n\t\t// loop to check palindrome\n\t\tfor (int i = 0; i < n; i++, n--)\n\t\t\tif (word.charAt(i) != word.charAt(n - 1))\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public static boolean palindromeTest(int num) {\n\t\tString x = Integer.toString(num);\n\n\t\tif (x.charAt(0) == x.charAt(x.length() - 1)) {\n\t\t\tif (x.charAt(1) == x.charAt(x.length() - 2)) {\n\t\t\t\tif (x.charAt(2) == x.charAt(x.length() - 3)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t\treturn false;\n\t}",
"public boolean isPalindrom(String word) {\n boolean palindrom = false;\n int middle = word.length() / 2;\n\n for (int i = 0; i < middle; i++) {\n for (int j = word.length() - i - 1; j >= middle; j--) {\n if (word.charAt(i) == word.charAt(j)) {\n palindrom = true;\n break;\n } else {\n return false;\n }\n }\n }\n\n return palindrom;\n }",
"private static boolean validPalindrome(String s, int head, int tail) {\n\t\tif (tail - head == 0) return true;\n\t\tint left = head, right = tail;\n\t\twhile (left <= right) {\n\t\t\tif (s.charAt(left) != s.charAt(right)) return false;\n\t\t\tleft ++;\n\t\t\tright --;\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean isPalindrome(String text, int left, int right)\n {\n\n if (right - left <= 0)\n return true;\n else if (text.charAt(left) != text.charAt(right))\n return false;\n else\n return isPalindrome(text, left + 1, right - 1);\n\n // do as homework the version that ignores non-alphabetic symbols\n }",
"public static PerformOperation isPalindrome() {\n return (num) -> {\n String number = Integer.toString(num);\n String reversed = new StringBuilder(number).reverse().toString();\n return number.equals(reversed);\n };\n }",
"private boolean isPalindrome(String s) {\r\n\r\n if (s == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n // Implement this method body using your ArrayListStack. Be mindful of your algorithm!\r\n boolean isPal = true;\r\n String newString1 = s.toLowerCase().trim(); //Test if lower case trim off any spaces\r\n String newString2 = \"\";\r\n\r\n System.out.println(\"original \" + s);\r\n System.out.println(\"lower trimmed \" + newString1);\r\n\r\n //Removes any white spaces \r\n for (int i = 0; i < newString1.length(); i++) {\r\n if (Character.isWhitespace(newString1.charAt(i))) {\r\n continue;\r\n } else {\r\n newString2 += Character.toString(newString1.charAt(i));\r\n }\r\n }\r\n System.out.println(\"final \" + newString2); //Print the final string after we have cleaned it up\r\n\r\n ArrayListStack<Character> one; //Puts the string into an array list stack\r\n one = new ArrayListStack<>();\r\n\r\n for (int i = 0; i < newString2.length(); i++) {\r\n one.push(newString2.charAt(i)); //pushing each char into array list \"one\"\r\n }\r\n\r\n ArrayListStack<Character> two;\r\n two = new ArrayListStack<>();\r\n\r\n int len = newString2.length(); //put half on to array list \"two\"\r\n if (len % 2 == 0) {\r\n for (int i = 0; i < (len / 2); i++) {\r\n two.push(one.pop()); \r\n }\r\n } else {\r\n for (int i = 0; i <= (len / 2); i++) {\r\n if (i < (len - 1) / 2) {\r\n two.push(one.pop());\r\n } else {\r\n one.pop();\r\n }\r\n }\r\n }\r\n\r\n for (int i = 0; i < (len / 2); i++) { //This compares each of the slices\r\n if (!(one.pop().equals(two.pop()))) {\r\n isPal = false;\r\n break;\r\n }\r\n }\r\n System.out.println(\"palindrome? \" + isPal);\r\n return isPal;\r\n\r\n }",
"public static boolean isPalindrome(int number) {\n \n return number == reverse(number) ? true : false; \n \n }",
"public static boolean isPalindrome(int x) {\r\n\t\treturn false;\r\n\t}",
"private static boolean isPalindrome(int num) {\n\t\t// Reversing a number\n\t\tint reverse = 0;\n\t\tfor (int i = num; i > 0; i /= 10)\n\t\t\treverse = reverse * 10 + i % 10;\n\n\t\t// If num and reverse are same, then num is palindrome\n\t\treturn num == reverse;\n\t}",
"private static boolean palindrome(String input, int i, int j) {\n\t while (i < j) {\n\t if (input.charAt(i) != input.charAt(j)) {\n\t return false;\n\t }\n\t i++;\n\t j--;\n\t }\n\t return true;\n\t }",
"public static boolean canFormPalindrome(String str) {\n\t\n\t// Create a count array and initialize all\n\t// values as 0\n\tint count[] = new int[NO_OF_CHARS];\n\tArrays.fill(count, 0);\n\n\t// For each character in input strings,\n\t// increment count in the corresponding\n\t// count array\n\tfor (int i = 0; i < str.length(); i++)\n\tcount[(int)(str.charAt(i))]++;\n\n\t// Count odd occurring characters\n\tint odd = 0;\n\tfor (int i = 0; i < NO_OF_CHARS; i++) \n\t{\n\tif ((count[i] & 1) == 1)\n\t\todd++;\n\n\tif (odd > 1)\n\t\treturn false;\n\t}\n\n\t// Return true if odd count is 0 or 1,\n\treturn true;\n}",
"public static void main(String[] args) {\n String string1 = new String(\"abcd\");\n if(isPisPalindrome(string1) == true){\n System.out.println(\"true\");\n }else{\n System.out.println(\"false\");\n }\n }",
"public static String isPalindrome(String str) {\n\t\tchar ch[] = new char[(str.length())];\r\n\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tfor (int i = str.length()-1; i>=0; i--) {\r\n\t\t\tch[i] = str.charAt(i);\r\n\t\t\t// System.out.println(ch[i]);\r\n\t\t\tsb.append(ch[i]);\r\n\t\t}\r\n\t\t// System.out.println(sb);\r\n\t\tString rev = sb.toString();\r\n\t\treturn rev;\r\n\t\t}",
"public boolean isPalindrome21(String s) {\n char[] c = s.toCharArray();\n // Invariant: [0,i) and (j,N-1] are matched excluding whitespace\n for (int i = 0, j = c.length - 1; i < j; ) {\n if (!Character.isLetterOrDigit(c[i])) i++; // error: isWhitespace is not applicable eg.\":,1\"\n else if (!Character.isLetterOrDigit(c[j])) j--;\n else if (Character.toLowerCase(c[i]) != Character.toLowerCase(c[j])) return false;\n else {\n i++;\n j--;\n }\n }\n return true;\n }",
"public static void main(String args[]) {\n\t\t\n\t\tString input = \"ABCD\";\n\t\t\n\t\t\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int counter=input.length()-1;counter>=0;counter--) {\n\t\t\tbuilder.append(input.charAt(counter));\t\t\t\n\t\t}\n\t\t\n\t\tString reverseString = builder.toString();\n\t\t\n\t\tif(input.equals(reverseString)) { // if(input == reverseString)\n\t\t\tSystem.out.println(\"Given string is a Palindrome\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Given string is not a Palindrome\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public boolean isPalindrome(String s) throws InterruptedException{\n\t\tint l=s.length();\r\n\t\tSystem.out.println(l);\r\n\t\t\r\n\t\tfor (int i =0;i<1000 ;i++){\r\n\t\t\tSystem.out.println(\"Hello\");\r\n\t\t\tThread.sleep(20000);\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i=0; i==l/2;i++){\r\n\t\t\tThread.sleep(20000);\r\n\t\t\tif (s.charAt(i) != (s.charAt(l-i-1)))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"not palindrom\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t}\r\n\t\tSystem.out.println(\"palindrome\");\r\n\t\treturn true;\r\n\t}",
"static void test_isPalindrome() {\n\n String pal1 = new String( \"a\" );\n String pal2 = new String( \"ab\" );\n String pal3 = new String( \"aba\" );\n String pal4 = new String( \"amanaplanacanalpanama\" );\n String pal5 = new String( \"abba\" );\n String pal6 = new String( \"Racecar\" );\n String pal7 = new String( \"RacecaR\" );\n\n\n System.out.println( \"\\nTESTS FOR isPalindrome() : \" );\n\n System.out.print( \"Test for string 'a' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal1 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"Test for string 'ab' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal2 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"Test for string 'aba' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal3 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"Test for string 'amanaplanacanalpanama' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal4 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"Test for string 'abba' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal5 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"Test for string 'Racecar' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal6 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"Test for string 'RacecaR' : \" );\n try { System.out.println( StringStuff.isPalindrome( pal7 ) ? \"true\" : \"false\" ); }\n catch( Exception e ) { System.out.println ( false ); }\n\n }",
"public void isValidPalindrome(String s, int left, int right) {\n while(left >= 0 && right<s.length() && s.charAt(left) == s.charAt(right)){\n left--;\n right++;\n }\n // check if we found a longer palindrome\n if(maxLen < right - left - 1){\n maxLen = right - left - 1;\n start = left + 1;\n }\n }",
"public static boolean isPalindrome(int number){\n return reverse(number) == number;\n }",
"public boolean isPalindrome(int x) {\n int y = 0;\n\t\tint temp = x;\n\t\twhile(temp > 0){\n\t\t\tint s = temp % 10;\n\t\t\ty = y * 10 + s;\n\t\t\ttemp = temp / 10;\n\t\t}\n\t\tif(x == y){\n\t\t\treturn true;\n\t\t}\n\t\treturn false; \n }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a string to check if it is a Palindrome:\");\r\n\t\t\r\n\t\tString s = scan.next();\r\n\t\tStringBuilder sbl = new StringBuilder(s);\r\n\t\tString revStr = sbl.reverse().toString();\r\n\t\tif(s.equals(revStr))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"This is a palindrome!!\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"This is NOT a palindrome!!\");\r\n\t\t}\t\r\n\t\tscan.close();\r\n\t}"
] | [
"0.8606293",
"0.8422432",
"0.84219307",
"0.83822143",
"0.8278122",
"0.8275937",
"0.8263729",
"0.82570827",
"0.8216733",
"0.82152283",
"0.82134694",
"0.8208431",
"0.81987303",
"0.8171435",
"0.81645584",
"0.81284165",
"0.8118782",
"0.8113772",
"0.8079571",
"0.8069138",
"0.80625767",
"0.8060355",
"0.8045812",
"0.8040074",
"0.80391026",
"0.80381346",
"0.803124",
"0.8011968",
"0.8009813",
"0.80055064",
"0.799589",
"0.79817736",
"0.79781824",
"0.79433507",
"0.79410404",
"0.7932488",
"0.78962296",
"0.78943056",
"0.7888636",
"0.78616655",
"0.7860922",
"0.7853268",
"0.7843482",
"0.78373855",
"0.78331083",
"0.7815988",
"0.781188",
"0.77789146",
"0.7763451",
"0.7749873",
"0.7720041",
"0.76943016",
"0.76742446",
"0.7649974",
"0.7593555",
"0.757752",
"0.7561824",
"0.75519174",
"0.75482213",
"0.75282574",
"0.751296",
"0.75005245",
"0.7479387",
"0.74451816",
"0.74320453",
"0.74262875",
"0.7398967",
"0.7388454",
"0.7383629",
"0.7366636",
"0.7330708",
"0.73094344",
"0.72987187",
"0.72867554",
"0.7283028",
"0.725679",
"0.7205572",
"0.7175413",
"0.7169313",
"0.71607935",
"0.71564925",
"0.71520346",
"0.7104313",
"0.71038777",
"0.7088845",
"0.70733315",
"0.70714253",
"0.7071126",
"0.7064419",
"0.7056407",
"0.70494163",
"0.70347965",
"0.70192266",
"0.7013032",
"0.7012522",
"0.70008296",
"0.6986006",
"0.69427305",
"0.6931735",
"0.69207996"
] | 0.8235657 | 8 |
Returns string to lowercase and removes punctuation | private static String helpPalindrome(String s){
s=s.toLowerCase().trim();
if(s.indexOf(",")>=0){
s=s.substring(0, s.indexOf(","))+s.substring(s.indexOf(",")+1);
s=helpPalindrome(s);
}else if(s.indexOf(".")>=0){
s=s.substring(0, s.indexOf("."))+s.substring(s.indexOf(".")+1);
s=helpPalindrome(s);
}else if(s.indexOf(":")>=0){
s=s.substring(0, s.indexOf(":"))+s.substring(s.indexOf(":")+1);
s=helpPalindrome(s);
}else if(s.indexOf(" ")>=0){
s=s.substring(0, s.indexOf(" "))+s.substring(s.indexOf(" ")+1);
s=helpPalindrome(s);
}else if(s.indexOf("'")>=0){
s=s.substring(0, s.indexOf("'"))+s.substring(s.indexOf("'")+1);
s=helpPalindrome(s);
}else if(s.indexOf("?")>=0){
s=s.substring(0, s.indexOf("?"))+s.substring(s.indexOf("?")+1);
s=helpPalindrome(s);
}else if(s.indexOf("!")>=0){
s=s.substring(0, s.indexOf("!"))+s.substring(s.indexOf("!")+1);
s=helpPalindrome(s);
}
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"private String removePunctuation(String input, boolean caseSensitive) {\n\t\tint i;\n\t\tint x;\n\t\tchar[] temp;\n\n\t\ttemp = input.toCharArray();\n\t\tx = 0;\n\n\t\t//Iterate through string and replace punctuation with white space\n\t\tfor (i = 0; i < input.length(); i++) {\n\t\t\tif ((input.charAt(i) == '.') || (input.charAt(i) == ',') || (input.charAt(i) == '?')\n\t\t\t\t\t || (input.charAt(i) == ':') || (input.charAt(i) == ';') || (input.charAt(i) == '\"')\n\t\t\t\t\t || (input.charAt(i) == '\\'') || (input.charAt(i) == '`') || (input.charAt(i) == '\\n')\n\t\t\t\t\t || (input.charAt(i) == '\\t')) {\n\t\t\t\tif (input.charAt(i) == '\\'') {\n\t\t\t\t\tx--;\n\t\t\t\t} else {\n\t\t\t\t\ttemp[x] = ' ';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!caseSensitive) {\n\t\t\t\t\ttemp[x] = Character.toLowerCase(input.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tx++;\n\t\t}\n\n\t\treturn ((new String(temp, 0, x)).concat(\"\\n\"));\n\t}",
"protected String normalize(String text) {\r\n\t\tString normalized = text.toLowerCase();\r\n\t\treturn normalized;\r\n\t}",
"public static String lowerCase(String s){\n\t\tString lower= \" \";\n\t\tfor (int i=0; i<s.length(); i++){\n\t\t\tString letter=s.substring(i, i+1);\n\t\t\tif (Constants.UPPER_CASE.indexOf(letter)!= -1){\n\t\t\t\tint indexLetter=Constants.UPPER_CASE.indexOf(letter);\n\t\t\t\tString lowerLetter= Constants.UPPER_CASE.substring(indexLetter, indexLetter+1);\n\t\t\t\tlower=lower+lowerLetter;\n\t\t\t} else {\n\t\t\t\tlower=lower+letter;\n\t\t\t}\n\t\t}\n\t\treturn lower;\n\t}",
"public static String removePunctuation( String word )\n {\n while(word.length() > 0 && !Character.isAlphabetic(word.charAt(0)))\n {\n word = word.substring(1);\n }\n while(word.length() > 0 && !Character.isAlphabetic(word.charAt(word.length()-1)))\n {\n word = word.substring(0, word.length()-1);\n }\n \n return word;\n }",
"public static String normalizeText(String text) {\r\n if (text.equals(\"\")) {\r\n throw new IllegalArgumentException(\"Please enter some text\");\r\n } else {\r\n return text.replaceAll(\"[?.\\\\s\\\"()!]\", \"\").toUpperCase();\r\n }\r\n }",
"private String removePunctuation(String word) {\t\t\r\n\t\t\t//removes all punctuation and special characters\r\n\t\t\t// adds a space so we can deal with words such as pre-req\r\n\t\treturn word.replaceAll(\"[&@#$%^*()\\\\\\\"\\\\\\\\/$\\\\-\\\\!\\\\+\\\\=|(){},.;:!?\\\\%]+\", \" \");\t\t\r\n\t\t\r\n\t}",
"private final static String toTitleCase( String s ) {\n\n char[] ca = s.toCharArray();\n\n boolean changed = false;\n boolean capitalise = true;\n\n for ( int i=0; i<ca.length; i++ ) {\n char oldLetter = ca[i];\n if ( oldLetter <= '/'\n || ':' <= oldLetter && oldLetter <= '?'\n || ']' <= oldLetter && oldLetter <= '`' ) {\n /* whitespace, control chars or punctuation */\n /* Next normal char should be capitalized */\n capitalise = true;\n } else {\n char newLetter = capitalise\n ? Character.toUpperCase(oldLetter)\n : Character.toLowerCase(oldLetter);\n ca[i] = newLetter;\n changed |= (newLetter != oldLetter);\n capitalise = false;\n }\n } // end for\n\n return new String (ca);\n\n }",
"public static String normalise(String value) {\n return value.toLowerCase(Locale.ENGLISH);\n }",
"public static final String lowercase(String s) {\n StringBuffer n = new StringBuffer(s);\n for (int i = 0; i < s.length(); ++i) {\n if (!Character.isLetterOrDigit(n.charAt(i))) \n\tn.setCharAt(i, '_');\n else\n\tn.setCharAt(i, Character.toLowerCase(n.charAt(i)));\n }\n return n.toString();\n }",
"@Test\n\tpublic void testRemoveWhiteSpacesAndPunctuation() {\n\t\tString input = \"2$2?5 5!63\";\n\t\tString actual = GeneralUtility.removeWhiteSpacesAndPunctuation(input);\n\t\tString expected = \"225563\";\n\t\tAssert.assertEquals(expected, actual);\n\t}",
"String filter(String text)\n {\n return text.trim().toLowerCase();\n }",
"private String stripNoneWordChars(String uncleanString) {\n return uncleanString.replace(\".\", \" \").replace(\":\", \" \").replace(\"@\", \" \").replace(\"-\", \" \").replace(\"_\", \" \").replace(\"<\", \" \").replace(\">\", \" \");\n\n }",
"public static String formatter(String s) {\n return s.replaceAll(\"[^a-zA-Z]\", \"\").toLowerCase();\n }",
"public static String removeNonAlphabeticCharactersFrom(String text) {\n\n // replacing \\r\\n\\t for a single space\n text = text.replaceAll(\"[\\\\p{Cntrl}]\", \" \");\n\n // strips off all non-alphabetic character:[\\p{Lower}\\p{Upper}] apart from a blank\n text = text.replaceAll(\"[^\\\\p{Alpha}\\\\p{Blank}]\", \" \");\n\n // remove extra spaces\n text = text.replaceAll(\"\\\\s+\", \" \");\n\n return text.trim();\n }",
"public static String toLower(String s) {\n if(s.length() <= 1) {\n return s.toLowerCase();\n }\n char first = s.charAt(0);\n if((first == 'n' || first == 't') && isIrishUpperVowel(s.charAt(1))) {\n return first + \"-\" + s.substring(1).toLowerCase();\n } else {\n return s.toLowerCase();\n }\n }",
"private static String convert(String word) {\n\n char[] charArray = word.toCharArray();\n\n for (int letter = 0; letter < word.length(); letter++) {\n // Finding the first letter of a word.\n if (letter == 0 && charArray[letter] != ' ' || charArray[letter] != ' ' && charArray[letter - 1] == ' ') {\n // Checking if the first letter is lower case.\n if (charArray[letter] >= 'a' && charArray[letter] <= 'z') {\n // Converting first letter to upper case\n charArray[letter] = (char)(charArray[letter] - 'a' + 'A');\n }\n }\n // Checking if the letters other than the first letter are capital\n else if (charArray[letter] >= 'A' && charArray[letter] <= 'Z')\n // Converting uppercase other letters to lower case.\n charArray[letter] = (char)(charArray[letter] + 'a' - 'A');\n }\n // Returning a Title cased String.\n return new String(charArray);\n }",
"public static String toTitleCase(String s) {\n if (s != null && !s.isEmpty()) {\n int length = s.length();\n String str = \"\";\n String strTemp = \"\";\n for (int i = 0; i < length; i++) {\n char ch = s.charAt(i);\n if (ch == ' ') {\n strTemp += ch;\n str = str.concat(toSentenceCase(strTemp));\n strTemp = \"\";\n } else {\n strTemp += ch;\n }\n }\n str = str.concat(toSentenceCase(strTemp));\n return str;\n } else\n return \"\";\n }",
"static String convert(String str)\n {\n char ch[] = str.toCharArray();\n for (int i = 0; i < str.length(); i++) {\n \n // If first character of a word is found\n if (i == 0 && ch[i] != ' ' || \n ch[i] != ' ' && ch[i - 1] == ' ') {\n \n // If it is in lower-case\n if (ch[i] >= 'a' && ch[i] <= 'z') {\n \n // Convert into Upper-case\n ch[i] = (char)(ch[i] - 'a' + 'A');\n }\n }\n \n // If apart from first character\n // Any one is in Upper-case\n else if (ch[i] >= 'A' && ch[i] <= 'Z') \n \n // Convert into Lower-Case\n ch[i] = (char)(ch[i] + 'a' - 'A'); \n }\n \n // Convert the char array to equivalent String\n String st = new String(ch);\n return st;\n }",
"private String removePunctuation(String word) {\n\n StringBuffer sb = new StringBuffer(word);\n if (word.length() == 0) {\n return word;\n }\n for (String cs : COMMON_SUFFIX) {\n if (word.endsWith(\"'\" + cs) || word.endsWith(\"’\" + cs)) {\n sb.delete(sb.length() - cs.length() - 1, sb.length());\n break;\n }\n }\n if (sb.length() > 0) {\n int first = Character.getType(sb.charAt(0));\n int last = Character.getType(sb.charAt(sb.length() - 1));\n if (last != Character.LOWERCASE_LETTER\n && last != Character.UPPERCASE_LETTER) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() > 0 && first != Character.LOWERCASE_LETTER\n && first != Character.UPPERCASE_LETTER) {\n sb.deleteCharAt(0);\n }\n }\n return sb.toString();\n }",
"public String translateSentence(String sentence)\n {\n // store the punctuation in a variable.\n String punc = sentence.substring(sentence.length() - 1);\n // Use split to tokenize the sentence as per spec.\n String[] words = sentence.split(\" \");\n int lastIdx = words.length - 1;\n // Replace the punctuation in the last word with nothing, we'll add it later at the end.\n words[lastIdx] = words[lastIdx].replace(punc, \"\");\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < words.length; i++)\n {\n // for the first word, we want to lowercase it and capitalize only the first letter.\n if (i == 0)\n {\n sb.append(convertToLatin(words[i].toLowerCase()) + \" \");\n }\n else\n {\n sb.append(convertToLatin(words[i]) + \" \");\n }\n }\n // Trim off the last space and add the punctuation.\n String sent = sb.toString().substring(0, sb.toString().length() - 1) + punc;\n sent = sent.substring(0, 1).toUpperCase() + sent.substring(1);\n return sent;\n }",
"public String normalize(String word);",
"public static void main(String[] args) {\nString s = \"HElLo WoRlD WelCOMe To JaVa\";\nSystem.out.println(s.toLowerCase());\n\t}",
"private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }",
"public static String NormalizeText(String Word) {\n String EditText = Word.replaceAll(\"[^a-zA-Z]\", \"\");\r\n String Capstext = EditText.toUpperCase();\r\n System.out.println(Capstext);\r\n return Capstext;\r\n }",
"private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}",
"private String sanitizeString(String string) {\n if (string == null) {\n return \"\";\n }\n return string.toLowerCase().trim();\n }",
"private void toLower() {\n System.out.print(\"ToLower(\");\n text.print();\n System.out.print(\")\");\n }",
"private String filter(String line) {\n return line.toLowerCase().replaceAll(\"[^a-z]\", \"\");\n }",
"public String removePunct(String input) {\n\t\tchar[] inputs = input.toCharArray();\n\t\tString result = \"\";\n\t\tfor (Character c : inputs) {\n\t\t\tif (Character.isLetter(c) || c == '\\'')\n\t\t\t\tresult += c;\n\t\t\telse if (Character.isWhitespace(c))\n\t\t\t\tresult += \" \";\n\t\t}\n\t\treturn result;\n\t}",
"public static String sanitize(String inputString) {\n\t\tif(inputString == null) {\n\t\t\treturn new String();\n\t\t}\n\t\treturn inputString.toLowerCase()\n\t\t\t\t.replaceAll(\"[#%&*'\\\"/\\\\+\\\\-\\\\.]\",\" \")\n\t\t\t\t.replaceAll(\"[^a-z0-9 ]\", \"\")\n\t\t\t\t.replaceAll(\"\\\\s+\",\" \").trim();\n\t}",
"private String fixupCase(String s) {\r\n boolean nextIsUpper = true;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n for (int i = 0; i < s.length(); i++) {\r\n char c = s.charAt(i);\r\n if (nextIsUpper) {\r\n c = Character.toUpperCase(c);\r\n } else {\r\n c = Character.toLowerCase(c);\r\n }\r\n sb.append(c);\r\n nextIsUpper = Character.isWhitespace(c);\r\n }\r\n return sb.toString();\r\n }",
"public static String cap(String w) {\n if (w.toLowerCase().equals(w)){ //if there are no capitals\n return w; // //then just return the word as is\n }\n else{\n // for (int i=0; i<w.length(); i++) {\n \n return w.substring(0,1).toUpperCase() + w.substring(1).toLowerCase(); //if there is a capital then make the first only the first letter capital and the rest lowercase\n }\n }",
"private String preprocessName(String original){\n\t\t// Remove non-alphabetical characters from the name\n\t\toriginal = original.replaceAll( \"[^A-Za-z]\", \"\" );\n\t\t\t\t\n\t\t// Convert to uppercase to help us ignore case-sensitivity\n\t\toriginal = original.toUpperCase();\n\t\t\n\t\t// Remove all occurences of the letters outlined in step 3\n\t\toriginal = original.substring(0,1) + original.substring(1).replaceAll(\"[AEIHOUWY]\",\"\");\n\t\t\n\t\t// Return the result\n\t\treturn original;\n\t}",
"public String stripNonLettersOrNumbers(String in) {\n if (in != null) {\n return in.replaceAll(\"[^\\\\p{L}\\\\p{N}]\", \"\");\n } else {\n return null;\n }\n }",
"public static String toTitleCase(final String str) {\n return toTitleCase(str, EMPTY_EXCLUDE, EMPTY_EXCLUDE);\n }",
"private String makeFirstLetterCapital(String str) {\n\t\tchar ch[] = str.toCharArray();\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\r\n\t\t\t// If first character of a word is found\r\n\t\t\tif (i == 0 && ch[i] != ' ' || ch[i] != ' ' && ch[i - 1] == ' ') {\r\n\r\n\t\t\t\t// If it is in lower-case\r\n\t\t\t\tif (ch[i] >= 'a' && ch[i] <= 'z') {\r\n\r\n\t\t\t\t\t// Convert into Upper-case\r\n\t\t\t\t\tch[i] = (char) (ch[i] - 'a' + 'A');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// If apart from first character\r\n\t\t\t// Any one is in Upper-case\r\n\t\t\telse if (ch[i] >= 'A' && ch[i] <= 'Z')\r\n\r\n\t\t\t\t// Convert into Lower-Case\r\n\t\t\t\tch[i] = (char) (ch[i] + 'a' - 'A');\r\n\t\t} \r\n\r\n\t\t// Convert the char array to equivalent String\r\n\t\tString st = new String(ch);\r\n\t\treturn st;\r\n\r\n\t\t// return sb.toString();\r\n\t}",
"String normalizeString(String s) {\n if (s == null) {\n return null;\n } else if (caseInsensitive) {\n return s.toLowerCase(Locale.getDefault());\n } else {\n return s;\n }\n }",
"public String convertLowercase(String str)\r\n {\r\n return str.toLowerCase();\r\n }",
"public static String lowerCaseFirstChar(String str){\r\n\t\treturn str.substring(0, 1).toLowerCase() + str.substring(1); \r\n\t}",
"protected static String reduceString(String input) {\n String newString = input.toLowerCase();\n int len = newString.length();\n String retval = \"\";\n for (int i = 0; i < len; i++) {\n if (newString.charAt(i) == ' ' || newString.charAt(i) == '\\t') continue; else retval += newString.charAt(i);\n }\n return retval;\n }",
"public static String removeNonLetters(String input)\n\t{\n\t\tchar[] nonLetters \t= { '-', ' ' };\n\t\tString result \t\t= \"\";\n\t\tboolean willAdd \t= false;\n\n\t\t/* when it's a single hyphen */\n\t\tif( input.length() < 2 )\n\t\t{\n\t\t\treturn input;\n\t\t}\n\n\t\tfor( int i = 0; i < input.length(); i++ )\n\t\t{\n\n\t\t\tfor( int j = 0; j < nonLetters.length; j++)\n\t\t\t{\n\t\t\t\tif( input.charAt(i) != nonLetters[j]) {\n\t\t\t\t\twillAdd = true;\n\t\t\t\t} else {\n\t\t\t\t\twillAdd = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( willAdd ) {\n\t\t\t\tresult = result + input.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public void makeLowerCase () {\n tags = new StringBuilder (tags.toString().toLowerCase());\n }",
"public static String toPlainText(String input) {\r\n return input.replaceAll(REGEX_SPECIAL_CHARS, \"\");\r\n }",
"public static String normalize(String str) {\n // Remove every puncutation mark except for spaces\n char[] charsToRemove = { '\\'', '.', ',', '?', '\"', '!' };\n String normalized =\n removeMultipleChars(str, charsToRemove).toUpperCase();\n String noEmDashes = \"\";\n // Handle em dashes - gettysburg specific\n int length = normalized.length();\n for (int i = 0; i < length; i++) {\n \t// Checks if there is an instance of -- and it's not the last character\n \tif (normalized.charAt(i) == '-' && normalized.charAt(i + 1) == '-' && i < length - 1) {\n \t\t// Replace \"--\" with \" \"\n \t\tnoEmDashes += \" \";\n \t} else {\n \t\tnoEmDashes += normalized.charAt(i);\n \t}\n }\n // Finally, remove the dashes\n return removeChar(noEmDashes, '-');\n }",
"public static String replacePunctuation(String str) {\n if(str==null){\n return str;\n }\n String returnStr = \"\";\n if(str.indexOf(\"'\") != -1) {\n returnStr = str.replaceAll(\"'\", \"''\");\n str = returnStr;\n }\n return str;\n }",
"private static String spellPunctuation(String string) {\n\t\tchar[] in = string.toCharArray();\n\t\tStringBuilder out = new StringBuilder();\n\t\t\n\t\tchar b = 0; //previous\n\t\tchar c = 0; //current\n\t\tchar d = 0; //next\n\t\tint n = in.length;\n\t\t\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tc = in[i];\n\t\t\t\n\t\t\tif (i+1 < n) {\n\t\t\t\td = in[i+1];\n\t\t\t}\n\t\t\t\n\t\t\tswitch (c) {\n\t\t\t\tcase ',':\n\t\t\t\t\tif (d != ' ') {\n\t\t\t\t\t\tout.append(\" comma \");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tout.append(\" comma\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '.':\n\t\t\t\t\tif (d == ' ') { //skip periods at the end of sentences\n\t\t\t\t\t\t//skip\n\t\t\t\t\t}\n\t\t\t\t\telse { //keep number with a decimal intact\n\t\t\t\t\t\tout.append(c);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ';':\n\t\t\t\t\tout.append(\" semicolon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ':':\n\t\t\t\t\tout.append(\" colon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201c':\n\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201d':\n\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\"':\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\tout.append(\" double quote \");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\'': //single quote\n\t\t\t\tcase '\\u2019': //apostrophe\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\t//contraction apostrophe is ignored; don't -> dont\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '%':\n\t\t\t\t\tout.append(\" percent\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tout.append(c);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tb = c;\n\t\t}\n\t\t\n\t\treturn out.toString();\n\t}",
"public void toLower() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(Character.toLowerCase(c));\n }\n seq = newSeq;\n }",
"public static void main(String[] args) {\n String S1=\"THE QUICK BROWN FOR JUMPS OVER THE LAZY DOG.\";//convert into lowercase\n String result = S1.toLowerCase();//formula to convert\n System.out.println(result);//print the outcome\n }",
"public static String normalize(String txt) {\n return StringUtils.replaceChars(\n txt,\n ACCENTED_CHARS,\n REPLACED_CHARS);\n }",
"public static String convertToTitleCase(String s) {\n boolean whiteSpace = true;\n\n StringBuilder builder = new StringBuilder(s);\n final int builderLength = builder.length();\n \n for (int i = 0; i < builderLength; ++i) {\n char c = builder.charAt(i);\n\n if (whiteSpace) {\n if (!Character.isWhitespace(c)) {\n builder.setCharAt(i, Character.toTitleCase(c));\n whiteSpace = false;\n }\n } \n else if (Character.isWhitespace(c)) {\n whiteSpace = true;\n\n } \n else {\n builder.setCharAt(i, Character.toLowerCase(c));\n }\n }\n\n return builder.toString();\n }",
"private static String capitalize (String input) {\n\n String output = WordUtils.capitalize(input.toLowerCase());\n\n return output;\n }",
"public static String normalize(String email) {\n\t\treturn email.toLowerCase();\n\t}",
"public static String getPunctuation( String word )\n { \n String punc = \"\";\n for(int i=word.length()-1; i >= 0; i--){\n if(!Character.isLetterOrDigit(word.charAt(i))){\n punc = punc + word.charAt(i);\n } else {\n return punc;\n }\n }\n return punc;\n }",
"public static String clean(String string) {\n\t\tif(!Character.isLetter(string.charAt(string.length() - 1))){\n\t\t\tString str = \"\";\n\t\t\tfor(int i = 0; i < string.length() - 1; i++){\n\t\t\t\tstr += string.charAt(i);\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t\treturn string;\n\t}",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"private String getTitle(String s) {\n if (this.isCaseFolding) {\n s = s.toLowerCase();\n }\n\n if (this.isPunctuationHandling) {\n s = punctuationHandler(s);\n }\n\n return s;\n }",
"public static String cleanString(String s) {\n\t\ts = s.trim();\n\t\tString newStr = \"\";\n\t\tboolean lastWasSpace = false;\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tif(c == ' ' && lastWasSpace) {\n\t\t\t\t//Ignore\n\t\t\t} else if (c == ' ' && !lastWasSpace) {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = true;\n\t\t\t} else {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = false;\n\t\t\t}\n\t\t}\n\t\ts = newStr;\n\t\treturn s;\n\t}",
"public static String removeNonAlphaNumeric(String data, boolean removeSpace) {\n\t\tif (data == null || data.length() < 1) return data;\n\n\t\tStringBuilder newVal = new StringBuilder();\n\t\tfor (char a : data.toCharArray()) {\n\t\t\tif (Character.isWhitespace(a) || Character.isDigit(a) || Character.isLetter(a)) {\n\t\t\t\tif (Character.isWhitespace(a) && removeSpace) continue;\n\t\t\t\tnewVal.append(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newVal.toString();\n\t}",
"private static String removeSoftHyphens(String in) {\n String result = in.replaceAll(\"\\u00AD\", \"\");\n return result.length() == 0 ? \"-\" : result;\n }",
"public static String onlyAlpha(final String s) {\n\t\tfinal StringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tif (Character.isLetter(s.charAt(i))) {\n\t\t\t\tsb.append(s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static String removeSpecialCharacters(String text) {\r\n\t\tif (null == text) {\r\n\t\t\treturn text;\r\n\t\t}\r\n\t\tPattern pattern = Pattern.compile(\"[^A-Z a-z0-9]\");\r\n\t\tMatcher matcher = pattern.matcher(text);\r\n\t\ttext = matcher.replaceAll(\"\");\r\n\t\treturn text;\r\n\t}",
"public static String firstLowerCase(String value) {\n\t\tif (value == null || value.length() == 0) {\n\t return value;\n\t }\n\t\tchar[] c = value.toCharArray();\n\t\tc[0] += 32;\n\t\treturn new String(c);\n\t}",
"public static String stripAccents(String s) \n{\n s = Normalizer.normalize(s, Normalizer.Form.NFD);\n s = s.replaceAll(\"[\\\\p{InCombiningDiacriticalMarks}]\", \"\");\n s= s.replace('\\'', '\\u0020');\n s= s.replace('\\\"', '\\u0020');\n s= s.replace('’', '\\u0020');\n s= s.replace('-', '\\u0020');\n s= s.replace('«', '\\u0020');\n s= s.replace('»', '\\u0020');\n return s;\n}",
"public static String trimer (String text){\n\t\treturn text.replaceAll(\"\\\\s+\", \" \");\n\t}",
"public static String punct(String w) {\n int len = w.length();\n String newW = \"\"; //just letters\n String start= \"\"; //string of start punctuations\n String end = \"\"; //string of end punctuations\n for (int i = 0; i < len; i++) {\n if (endPunct.indexOf(w.substring(i, i+1)) != -1) {\n end += w.substring(i, i+1); } //if there is an end punctuation put it in the end NOT counting apostrophes \n else if (startPunct.indexOf(w.substring(i,i+1)) != -1) {\n start += w.substring(i, i+1); } //if there is a start punctution, put it in start\n else {\n newW += w.substring(i, i+1); } //string of just the letters \n }\n return start + newW + end; }",
"private static String convertToLatin(String word)\n {\n return word.substring(1) + word.substring(0,1) + \"ay\";\n }",
"static String refineWord(String currentWord) {\n\t\t// makes string builder of word\n\t\tStringBuilder builder = new StringBuilder(currentWord);\n\t\tStringBuilder newWord = new StringBuilder();\n\n\t\t// goes through; if it's not a letter, doesn't add to the new word\n\t\tfor (int i = 0; i < builder.length(); i++) {\n\t\t\tchar currentChar = builder.charAt(i);\n\t\t\tif (Character.isLetter(currentChar)) {\n\t\t\t\tnewWord.append(currentChar);\n\t\t\t}\n\t\t}\n\n\t\t// returns lower case\n\t\treturn newWord.toString().toLowerCase().trim();\n\t}",
"private static String capitaliseSingleWord(String word) {\n String capitalisedFirstLetter = word.substring(0, 1).toUpperCase();\n String lowercaseRemaining = word.substring(1).toLowerCase();\n return capitalisedFirstLetter + lowercaseRemaining;\n }",
"public static String lowerFirst(String value) {\r\n\t\tif(value == null || value.length() == 0) {\r\n\t\t\treturn value;\r\n\t\t}\r\n\t\tif(value.length() == 1) {\r\n\t\t\treturn value.toLowerCase();\r\n\t\t}\r\n\t\treturn Character.toLowerCase(value.charAt(0)) + value.substring(1); \r\n\t}",
"public static String capitalizeFirstLetter(String input) {\n return output;\n }",
"static public String normalize(String s){\n\t\treturn s;\n\t}",
"private String cleanMake(String make) {\n\t\tString cleanMake = make.trim().replaceAll(\"[^a-zA-Z]\", \"\");\n\t\treturn cleanMake.substring(0,1).toUpperCase() + cleanMake.substring(1).toLowerCase();\n\t}",
"public static String toggleCase(String str){\n\t\tStringBuilder sb = new StringBuilder(str);\n\t\tfor(int i=0;i<str.length() ;i++ ){\n\t\t char ch = str.charAt(i);\n\t\t if(ch>='a' && ch<='z')\n\t\t {\n\t\t char upr = (char)('A'+ch-'a');\n\t\t sb.setCharAt(i,upr);\n\t\t }\n\t\t else if(ch>='A' && ch<='Z')\n\t\t {\n\t\t char upr = (char)('a'+ch-'A');\n\t\t sb.setCharAt(i,upr);\n\t\t }\n\t\t}\n\t\t\n\n\t\treturn sb.toString();\n\t}",
"public static String capitaliseFirstLetter(String input) {\n\n\t\t// Check if 1st char is already Uppercase\n\t\tif (!Character.isUpperCase(input.charAt(0))) {\n\t\t\tinput = input.substring(0, 1).toUpperCase() + input.substring(1).toLowerCase();\n\t\t}\n\t\treturn input;\n\t}",
"public static String sanitizeInput(String input) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor (int i = 0 ; i < input.length(); i++) {\n\t\t\tchar c = input.charAt(i);\n\t\t\tif (c >= 48 && c <= 57) {\n\t\t\t\tsb.append(c);\n\t\t\t} else if (c >= 65 && c <= 90) {\n\t\t\t\tsb.append(c);\n\t\t\t} else if (c >= 97 && c <= 122) {\n\t\t\t\tsb.append(c);\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t\t\n\t}",
"public static String convert1(String input) {\n\t\tString sRes = \"\";\n\t\tString[] splitInput = input.split(\"\\n\");\n\n\t\tfor (String s : splitInput) {\n\t\t\tString[] splitStr = s.split(\" \");\n\t\t\tfor (int i = 0; i < splitStr.length; i++) {\n\t\t\t\tsplitStr[i] = firstUpperCase(splitStr[i].toLowerCase());\n\t\t\t\tsRes = sRes.concat(splitStr[i] + \" \");\n\t\t\t}\n\t\t\tsRes += \"\\n\";\n\t\t}\n\n\t\treturn sRes;\n\t}",
"private static String trimWhiteSpace(String sentence) {\n\t\tsentence = sentence.replaceAll(\"[^a-zA-Z]\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\n\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\t\", \" \");\n// sentence = sentence.replaceAll(\"\\\\.\", \" \");\n// sentence = sentence.replaceAll(\",\", \" \");\n \n//\t\tint length;\n//\t\tdo {\n//\t\t\tlength = sentence.length();\n//\t\t\tsentence = sentence.replaceAll(\" \", \" \");\n//\n//\t\t} while (sentence.length() < length);\n\t\treturn sentence;\n\t}",
"public static String normalizeString(String name) {\n if (StringUtil.isEmpty(name)) {\n return name;\n }\n if (!normalizer.isDelimited(defaultRule, name)) {\n // If not delimited, delimit the string if necessary\n return normalizer.delimit(defaultRule, name);\n }\n return name;\n }",
"public static String toTitleCase(String str) {\n\t\t\n\t\treturn str.substring(0, 1).toUpperCase()+\n\t\t\tstr.substring(1).toLowerCase();\t\n\t}",
"public static void main(String[] args) {\n Function<String, String> func = text -> text.toLowerCase().trim();\n String original = \" WIELKI NAPIS \";\n //wywołujemy funkcję przekazująć jej oryginał jako parametr\n String loweCaseTrim = func.apply(original);\n System.out.println(loweCaseTrim);\n\n }",
"public static String capitalizeAllFirstLetters(String s)\n {\n char firstLetter;\n String result, word, capitalizedWord;\n String [] array;\n\n result = \"\";\n\n if(s.length() > 0)\n {\n array = s.split(\" \");\n\n for(int i =0; i < array.length; i++)\n {\n word = array[i];\n firstLetter = Character.toUpperCase(word.charAt(0));\n capitalizedWord = firstLetter + word.substring(1);\n\n result += capitalizedWord + \" \";\n }\n }\n\n return result;\n }",
"public static String toWordUpperCase(String inText)\n {\n if(inText.length() == 0)\n return inText;\n\n String []split = inText.split(\"(?<![&'])\\\\b(?=\\\\p{Lower})\");\n\n if(split.length == 1)\n if(Character.isLowerCase(inText.charAt(0)))\n return Character.toUpperCase(inText.charAt(0)) + inText.substring(1);\n else\n return inText;\n\n StringBuilder result = new StringBuilder(split[0]);\n\n for(int i = 1; i < split.length; i++)\n result.append(Character.toUpperCase(split[i].charAt(0))\n + split[i].substring(1));\n\n return result.toString();\n }",
"public static String textFormat(String s){\r\n s =s.toLowerCase();\r\n s = s.substring(0, 1).toUpperCase() + s.substring(1);\r\n return(s);\r\n }",
"public static String preProcessWordsSpecialCharacters(String line){\n\n\t\tStringBuilder newLine = new StringBuilder();\n\t\t//System.out.println(\"Preprocess words with special characaters ...\");\n\t\tList<String> newLineList = new ArrayList<String>();\n\t\tString eachWord;\n\t\tString[] hyphenWordArray;\n\t\t//replace all forward slash in the string with whitespace\n\t\t//line = line.replaceAll(\"[/|:|?|..|adverb|noun]\", \" \");\n\t\t//System.out.println(\"Line before modification: \"+ line);\n\t\tline = line.replaceAll(\"(\\\\?)|(\\\\()|(\\\\))|(\\\\,)|(\\\\.)|(\\\\!)|(\\\\/)|(\\\\:)|(\\\\?)|(\\\\')|(\\\\])|(\\\\[)\", \" \");\n\t\t//System.out.println(\"Line after first modification: \"+ line);\n\t\tline = line.replaceAll(\"\\\\s+\", \" \");\n\n\t\tnewLineList = Arrays.asList(line.split(\"\\\\s+\"));\n\t\tIterator<String> iter = newLineList.iterator();\n\n\t\twhile(iter.hasNext()){\n\t\t\teachWord = (String)iter.next();\n\t\t\tnewLine.append(\" \").append(eachWord);\n\t\t\tif(eachWord.contains(\"-\")){ //if the word contains a hyphen\n\t\t\t\t//System.out.println(\"Word containing hyphen: \"+ eachWord);\n\t\t\t\thyphenWordArray = eachWord.split(\"\\\\-\");\n\t\t\t\t//adding aaabbccc for aaa-bb-ccc \n\t\t\t\tnewLine.append(\" \").append(eachWord.replaceAll(\"\\\\-\", \"\"));\n\t\t\t\tfor(int i = 0; i < hyphenWordArray.length; i++ )\n\t\t\t\t\t//adding aaa, bb, cc for aaa-bb-ccc \n\t\t\t\t\tnewLine.append(\" \").append(hyphenWordArray[i]);\n\t\t\t}/*else{ //if the word does not contain hyphen, add it as it is\n\t\t\t\tnewLine.append(\" \").append(eachWord);\n\t\t\t}*/\n\t\t}\n\t\t//System.out.println(\"Line after modification: \"+ newLine.toString());\n\t\treturn newLine.toString();\n\t}",
"private String prepare(String originStr)\r\n {\r\n String result=originStr.toLowerCase();\r\n result = result.replace('ä','a');\r\n result = result.replace('ö','o');\r\n result = result.replace('ü','u');\r\n// result = result.replace(':',' ');\r\n// result = result.replace(';',' ');\r\n// result = result.replace('<',' ');\r\n// result = result.replace('>',' ');\r\n// result = result.replace('=',' ');\r\n// result = result.replace('?',' ');\r\n// result = result.replace('[',' ');\r\n// result = result.replace(']',' ');\r\n// result = result.replace('/',' ');\r\n return result;\r\n }",
"String normalizeName(String tag) {\n\t\tStringBuffer buf = new StringBuffer();\n\t\t\n\t\tboolean newWord = true;\n\t\t// capitalize first letter of each word\n\t\t// remove -'s and _'s\n\t\tfor (int i = 0; i < tag.length(); i++) {\n\t\t\tchar c = tag.charAt(i);\n\t\t\tif (c == '-' || c == '_') {\n\t\t\t\tnewWord=true;\n\t\t\t} else if (newWord) {\n\t\t\t\tbuf.append(Character.toUpperCase(c));\n\t\t\t\tnewWord = false;\n\t\t\t} else {\n\t\t\t\tbuf.append(c);\n\t\t\t\tnewWord = false;\n\t\t\t}\n\t\t}\n\t\treturn buf.toString().trim();\n\t}",
"private String normalize(String text) {\n final String nbsp = new String(new char[] {(char) 160});\n return text.replaceAll(\"\\\\s+(\" + nbsp + \")+\\\\s+\", \"$1\")\n .replace((char) 160, ' ')\n .replaceAll(\n \"\\n+\", \"\\n\")\n .replaceAll(\"\\r|\\t\", \"\")\n .trim();\n }",
"public static String uppercaseFirstLetters(String str) {\n boolean prevWasWhiteSp = true;\n char[] chars = str.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n if (Character.isLetter(chars[i])) {\n if (prevWasWhiteSp) {\n chars[i] = Character.toUpperCase(chars[i]);\n }\n prevWasWhiteSp = false;\n } else {\n prevWasWhiteSp = Character.isWhitespace(chars[i]);\n }\n }\n return new String(chars);\n }",
"public String ignoreCase(String in)\n {\n return in;\n }",
"public static String lcfirst(String input) {\n return withFirst(input, first -> String.valueOf(Character.toLowerCase(first)));\n }",
"String getPunctuation();",
"private String cleanModel(String model) {\n\t\tString cleanModel = model.replaceAll(\"[$|#|@|!|%|^|&|*|(|)|]\", \"\").trim();\n\t\treturn cleanModel.substring(0,1).toUpperCase() + cleanModel.substring(1).toLowerCase();\n\t}",
"public static final String[] toLowerCaseWordArray(String text) {\r\n StringTokenizer tokens = new StringTokenizer(text, \" ,\\r\\n.:/\\\\+\");\r\n String[] words = new String[tokens.countTokens()];\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = tokens.nextToken().toLowerCase();\r\n }\r\n return words;\r\n }",
"String replaceInString(String s) {\n\t\tString newS = s.replaceAll(\"[a-zA-Z]+\", \"WORT\");\n\t\tif (newS == s) {\n\t\t\tSystem.out.println(\"gleich\");\n\t\t}\n\t\treturn newS;\n\t}",
"public static String translateSentence(String sentence) {\n\n Matcher matcher = Pattern.compile(\"\\\\w+\").matcher(sentence);\n return matcher.replaceAll(match -> translateWord(match.group()));\n }",
"public String titlelize(String toTitlelize) {\r\n if (toTitlelize == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n StringBuilder resultString = new StringBuilder();\r\n List<String> wordList = Arrays.asList(toTitlelize.split(\"\\\\s\"));\r\n\r\n\r\n for (String word : wordList) {\r\n if (!ignoreList.contains(word)) {\r\n resultString.append(WordUtils.capitalizeFully(word));\r\n resultString.append(\" \");\r\n\r\n\r\n } else {\r\n resultString.append(word);\r\n resultString.append(\" \");\r\n }\r\n\r\n\r\n }\r\n resultString.deleteCharAt(resultString.length() - 1);\r\n return resultString.toString();\r\n }",
"private final static String stripA( String s ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [ca.length - 1];\n\n\n for ( int i=0; i<ca2.length; i++ ) {\n ca2[i] = ca[i];\n } // end for\n\n return new String (ca2);\n\n }",
"public static String toSentenceCase(String s) {\n if (s != null && !s.isEmpty()) {\n int length = s.length();\n String temp = \"\";\n int position = 0;\n for (int i = 0; i < length; i++) {\n if (s.charAt(i) == '.') {\n temp = temp.concat(s.substring(position, position + 1).toUpperCase() + s.substring(position + 1, i + 1));\n position = i + 1;\n }\n }\n if (position < length)\n temp = temp.concat(s.substring(position, position + 1).toUpperCase() + (position >= length - 1 ? \"\" : s.substring(position + 1)));\n return temp;\n } else\n return \"\";\n }"
] | [
"0.7174277",
"0.7174277",
"0.7174277",
"0.7094655",
"0.68863094",
"0.65994376",
"0.65838486",
"0.65171146",
"0.6506311",
"0.64854246",
"0.64853054",
"0.6438024",
"0.6366601",
"0.6359809",
"0.626344",
"0.62479216",
"0.62230164",
"0.6209718",
"0.6202216",
"0.61859494",
"0.6128267",
"0.61127496",
"0.6112245",
"0.6030328",
"0.6027141",
"0.60009575",
"0.5983242",
"0.5978602",
"0.59549683",
"0.5954515",
"0.5944796",
"0.593108",
"0.59224206",
"0.59170705",
"0.59075326",
"0.590511",
"0.589563",
"0.5890643",
"0.58807105",
"0.58797604",
"0.5870775",
"0.5859005",
"0.58570457",
"0.58410937",
"0.58084255",
"0.580058",
"0.57768416",
"0.57651263",
"0.5759252",
"0.57586",
"0.5747145",
"0.5740462",
"0.57292587",
"0.5718512",
"0.56957227",
"0.5688678",
"0.567911",
"0.56743807",
"0.56685466",
"0.56608385",
"0.5638034",
"0.5633923",
"0.56328243",
"0.5619469",
"0.5583701",
"0.5572011",
"0.5568527",
"0.5568198",
"0.5559173",
"0.5547091",
"0.5545647",
"0.5542395",
"0.5532609",
"0.5522168",
"0.55083174",
"0.54987985",
"0.54986596",
"0.5494521",
"0.5490551",
"0.5490313",
"0.5483237",
"0.54826665",
"0.54785484",
"0.5474046",
"0.5473948",
"0.5471833",
"0.54686725",
"0.5462724",
"0.54543173",
"0.5452763",
"0.54483944",
"0.544151",
"0.54314697",
"0.54258114",
"0.5417938",
"0.5413088",
"0.5409959",
"0.54065436",
"0.5394488",
"0.5393477",
"0.53892344"
] | 0.0 | -1 |
Converts a String to shorthand "AND" to "&" "FOR" to "4" "TO" to "2" "YOU" to "U" | public static String shorthand(String s){
if(s.toUpperCase().indexOf("YOU")>=0){
s=s.substring(0, s.toUpperCase().indexOf("YOU"))+" U "+s.substring(s.toUpperCase().indexOf("YOU")+3);
s=shorthand(s);
}else if(s.toUpperCase().indexOf("FOR")>=0){
s=s.substring(0, s.toUpperCase().indexOf("FOR"))+" 4 "+s.substring(s.toUpperCase().indexOf("FOR")+3);
s=shorthand(s);
}else if(s.toUpperCase().indexOf("AND")>=0){
s=s.substring(0, s.toUpperCase().indexOf("AND"))+" & "+s.substring(s.toUpperCase().indexOf("AND")+3);
s=shorthand(s);
}else if(s.toUpperCase().indexOf("TO")>=0){
s=s.substring(0, s.toUpperCase().indexOf("TO"))+" 2 "+s.substring(s.toUpperCase().indexOf("TO")+3);
s=shorthand(s);
}
return removeVowels(s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void explicitANDTest() {\n\t\tString query = \"hello goodbye\";\n\t\tString query2 = \"hello goodbye hello\";\n\t\tString query3 = \"( hello ( goodbye | hello bye ) )\";\n\t\t\n\t\tString queryResults = \"hello & goodbye\";\n\t\tString query2Results = \"hello & goodbye & hello\";\n\t\tString query3Results = \"( hello & ( goodbye | hello & bye ) )\";\n\n\t\tassertEquals(queryResults, String.join(\" \", queryTest.addExplicitAND(query.split(\" \"))));\n\t\tassertEquals(query2Results, String.join(\" \", queryTest.addExplicitAND(query2.split(\" \"))));\n\t\tassertEquals(query3Results, String.join(\" \", queryTest.addExplicitAND(query3.split(\" \"))));\n\t}",
"private static String or(String s, String t)\r\n\t{\r\n\t\tchar[] out = s.toCharArray();\r\n\t\tfor (int i = 0; i < out.length; i++)\r\n\t\t{\r\n\t\t\tif(out[i] == '0' && t.charAt(i) == '1')\r\n\t\t\t\tout[i] = '1';\r\n\t\t}\r\n\t\treturn new String(out);\r\n\t}",
"public String getAndOr();",
"public String convertAmpersands(String text)\n\t{\n\t\tString result = \"\";\n\n\t\t// Search for the next ampersand\n\t\tint semiColonIndex = -1;\n\t\tint ampersandIndex = -1;\n\n\t\tdo\n\t\t{\n\t\t\tampersandIndex = text.indexOf('&', semiColonIndex + 1);\n\t\t\t\n\t\t\tif (ampersandIndex != -1)\n\t\t\t{\n\t\t\t\t// Add the text up to the ampersand to the result\n\t\t\t\tresult += text.substring(semiColonIndex + 1, ampersandIndex);\n\t\t\t\t\n\t\t\t\t// Find the end of the ampersand\n\t\t\t\tsemiColonIndex = text.indexOf(';', ampersandIndex + 1);\n\t\t\t\t\n\t\t\t\t// Test the type of ampersand\n\t\t\t\tString type = text.substring(ampersandIndex + 1, semiColonIndex);\n\t\t\t\t\n\t\t\t\tif (type.equals(\"quot\"))\n\t\t\t\t{\n\t\t\t\t\tresult += '\\\"';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile (ampersandIndex != -1);\n\t\t\n\t\t// Add the final string\n\t\tresult += text.substring(semiColonIndex + 1);\n\t\n\t\treturn result;\n\t}",
"public void setAndOr (String AndOr);",
"public Object visitLogicalAndExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a & (Long) b;\n }\n else {\n return parens(a) + \" && \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.andWith(b);\n \n return bdd;\n }\n }",
"public void testToString_AND() {\n assertEquals(\"Returns an incorrect string\", \"AND\", BinaryOperation.AND.toString());\n }",
"public static String punctuateAnd(List<String> elements)\r\n/* 43: */ {\r\n/* 44: 43 */ return punctuateSequence(elements, \"and\");\r\n/* 45: */ }",
"public void executeAnd(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString operand1 = mRegisters[mIR.substring(7, 3).getValue()];\n\t\tchar[] andSolution = new char[16];\n\t\tBitString operand2 = new BitString();\n\t\tif(mIR.substring(10, 1).getValue() == 1){ //immediate mode\n\t\t\toperand2 = mIR.substring(11, 5); //imma5\n\t\t\tif(operand2.getValue2sComp() < 0){\n\t\t\t\tBitString negativeExtend = new BitString();\n\t\t\t\tnegativeExtend.setBits(\"11111111111\".toCharArray());\n\t\t\t\tnegativeExtend.append(operand2);\n\t\t\t\toperand2 = negativeExtend;\n\t\t\t} else {\n\t\t\t\tBitString positiveExtended = new BitString();\n\t\t\t\tpositiveExtended.setBits(\"00000000000\".toCharArray());\n\t\t\t\toperand2 = positiveExtended.append(operand2);\n\t\t\t}\n\t\t} else { \t\t\t\t\t\t\t\t\t\t\t\t//register mode\n\t\t\toperand2 = mRegisters[mIR.substring(13, 3).getValue()];\n\t\t}\n\n\n\t\tfor (int i = 0; i < operand1.getLength(); i++) {\n\t\t\tif(operand1.substring(i, 1).getValue() + operand2.substring(i, 1).getValue() ==2){\n\t\t\t\tandSolution[i] = '1';\n\t\t\t} else {\n\t\t\t\tandSolution[i] = '0';\n\t\t\t}\n\t\t}\n\n\t\tmRegisters[destBS.getValue()].setBits(andSolution);\n\n\t\tsetConditionalCode(mRegisters[destBS.getValue()]);\n\t}",
"public static String normalizeQuery(String txt) {\n if (txt == null) {\n return null;\n }\n\n return normalize(txt)\n .replaceAll(\" or \", \" OR \")\n .replaceAll(\" and \", \" AND \");\n }",
"private Term parseBitwiseAnd(final boolean required) throws ParseException {\n Term t1 = parseAdd(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '&') {\n Term t2 = parseAdd(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.AndI(t1, t2);\n } else {\n reportTypeErrorI2(\"'&'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }",
"private static final String toExpr(String s) {\n\t\tchar[] b = s.toCharArray();\n\t\tint i;\n\t\tfor (i=0; (i<b.length) && Character.isLetter(b[i]); i++) ;\n\t\tif (i<b.length) return(\"(\" + s + \")\");\n\t\treturn(s) ;\t\t// Just letters\n\t}",
"public Object visitBitwiseAndExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a & (Long) b;\n }\n else {\n result = parens(a) + \" & \" + parens(b);\n }\n \n return result;\n }",
"public void testAND2() throws Exception {\n\t\tObject retval = execLexer(\"AND\", 226, \"&\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"AND\", expecting, actual);\n\t}",
"public final void mAND() throws RecognitionException {\n try {\n int _type = AND;\n // /Users/benjamincoe/HackWars/C.g:217:5: ( '&&' )\n // /Users/benjamincoe/HackWars/C.g:217:7: '&&'\n {\n match(\"&&\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"public static void appendAndToWhereClause(StringBuilder whereBuilder) {\n if (whereBuilder.length() > 0) {\n whereBuilder.append(\" and \");\n }\n }",
"private void passAND() {\n\t\tif (currentIndex >= data.length || (data[currentIndex] != 'a' && data[currentIndex] != 'A')) {\n\t\t\tthrow new LexerException(\"Ulaz ne valja!\");\n\t\t}\n\t\tcurrentIndex++;\n\t\tif (currentIndex >= data.length || (data[currentIndex] != 'n' && data[currentIndex] != 'N')) {\n\t\t\tthrow new LexerException(\"Ulaz ne valja!\");\n\t\t}\n\t\tcurrentIndex++;\n\t\tif (currentIndex >= data.length || (data[currentIndex] != 'd' && data[currentIndex] != 'D')) {\n\t\t\tthrow new LexerException(\"Ulaz ne valja!\");\n\t\t}\n\t\tcurrentIndex++;\n\t}",
"public static String hackerSpeak(String str) {\n\n String replace = str.replace(\"a\", \"4\").replace(\"e\", \"3\").replace(\"i\", \"1\").replace(\"o\", \"0\").replace(\"s\", \"5\");\n return replace;\n }",
"public final void ruleOpAnd() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:445:2: ( ( '&&' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:446:1: ( '&&' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:446:1: ( '&&' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:447:1: '&&'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpAndAccess().getAmpersandAmpersandKeyword()); \n }\n match(input,14,FOLLOW_14_in_ruleOpAnd886); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpAndAccess().getAmpersandAmpersandKeyword()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private String escape(String str) {\n String result = null; // replace(str, \"&\", \"&\");\n\n while (str.indexOf(\"&\") != -1) {\n str = replace(str, \"&\", \"&\");\n }\n result = str;\n while (result.indexOf(\"-\") != -1) {\n result = replace(result, \"-\", \"\");\n }\n return result;\n }",
"public final void ruleOpAnd() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:642:2: ( ( '&&' ) )\r\n // InternalDroneScript.g:643:2: ( '&&' )\r\n {\r\n // InternalDroneScript.g:643:2: ( '&&' )\r\n // InternalDroneScript.g:644:3: '&&'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAndAccess().getAmpersandAmpersandKeyword()); \r\n }\r\n match(input,15,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAndAccess().getAmpersandAmpersandKeyword()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"@Test\n\tpublic void postFixTest() {\n\t\tString query = \"( ( !hello | goodbye & hello ) & cya )\";\n\t\tString query2 = \"( hello & goodbye | foo & ( foo & bar ) )\";\n\t\t\n\t\t// this test verifies that implict AND's are added\n\t\tString query3 = \"( testing the waters | ( am & I ) | oh my )\";\n\t\tString query4 = \"a b c d e\";\n\t\t\n\t\tString queryAns = \"!hello goodbye hello & | cya &\";\n\t\tString query2Ans = \"hello goodbye & foo foo bar & & |\";\n\t\tString query3Ans = \"testing the & waters & am I & | oh my & |\";\n\t\tString query4Ans = \"a b & c & d & e &\";\n\t\t\n\t\tassertEquals(queryAns, String.join(\" \", queryTest.convertToPostfix(query.split(\" \"))));\n\t\tassertEquals(query2Ans, String.join(\" \", queryTest.convertToPostfix(query2.split(\" \"))));\n\t\tassertEquals(query3Ans, String.join(\" \", queryTest.convertToPostfix(queryTest.addExplicitAND(query3.split(\" \")))));\n\t\tassertEquals(query4Ans, String.join(\" \", queryTest.convertToPostfix(queryTest.addExplicitAND(query4.split(\" \")))));\n\t}",
"public String getANDClause()\n {\n StringBuilder builder = new StringBuilder();\n\n String colName;\n String term;\n\n for (int i = 0; i < columnNames.length; i++)\n {\n colName = columnNames[i];\n\n String[] terms = Spans.prepareStrings(keywords);\n\n builder.append(\"(\");\n for(int j = 0; j < terms.length; j++)\n {\n term = terms[j];\n builder.append(colName + \" LIKE '%\"+ term + \"%'\" );\n\n if (j != terms.length - 1)\n {\n builder.append(\" AND \");\n }\n }\n builder.append(\")\");\n\n if (i != columnNames.length - 1)\n {\n builder.append(\" OR \");\n }\n }\n\n return builder.toString();\n }",
"protected String canonicalizeLabel(String label) {\r\n\t\tif (label.indexOf('&') < 0) {\r\n\t\t\treturn label;\r\n\t\t}\r\n\r\n\t\treturn label.replaceAll(\"&\", \"&&\"); //$NON-NLS-1$//$NON-NLS-2$\r\n\t}",
"public String visit(AndExpression n, String s) {\n n.f0.accept(this, null);\n n.f2.accept(this, null);\n return null;\n }",
"public ArrayList<SimplifyResult> doAND(String predicates[]) throws IOException {\n\t\tString formula = new String();\n\t\t\n\t\tformula += \"(AND \";\n\t\tfor (String p : predicates) {\n\t\t\tformula += p + \" \";\n\t\t}\n\t\tformula += \")\";\t\t\n\t\t\n\t\treturn doFormula(formula);\n\t}",
"public final void mRULE_AND() throws RecognitionException {\n try {\n int _type = RULE_AND;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12791:10: ( '&' '&' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12791:12: '&' '&'\n {\n match('&'); \n match('&'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private Term parseLogicalAnd(final boolean required) throws ParseException {\n Term t1 = parseComparison(required);\n while (t1 != null) {\n /*int tt =*/ _tokenizer.next();\n if (isSpecial(\"&&\") || isKeyword(\"and\")) {\n Term t2 = parseComparison(true);\n if ((t1.isB() && t2.isB()) || !isTypeChecking()) {\n t1 = new Term.AndB(t1, t2);\n } else {\n reportTypeErrorB2(\"'&&' or 'and'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }",
"static String[] weightedUniformStrings(String s, int[] queries) {\n List<String> result = new ArrayList<>();\n char prev = ' ';\n int sum = 0;\n int[] checks = new int[s.length()];\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (prev == ch) sum += ch - 'a' + 1;\n else sum = ch - 'a' + 1;\n checks[i] = sum;\n prev = ch;\n }\n for (int query : queries) {\n result.add(has(checks, query) ? \"Yes\" : \"No\");\n }\n return result.toArray(new String[0]);\n }",
"public static BinaryExpression andAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public String tweakFront(String str) {\n\n if(str.substring(0, 1).equalsIgnoreCase(\"a\")){\n\n if(!str.substring(1, 2).equalsIgnoreCase(\"b\")){\n str = str.substring(0, 1) + str.substring(2,str.length());\n }\n \n }else{\n str = str.substring(1);\n \n if(str.substring(0, 1).equalsIgnoreCase(\"b\")){\n \n }else{\n str = str.substring(1);\n }\n }\n \n \n \n return str;\n \n}",
"private void and() {\n // PROGRAM 1: Student must complete this method\n //loop through the output array\n for (int i = 0; i < output.length; i++) {\n //take the and of index i of inputA and inputB and place result in output[i]\n output[i] = inputA[i] & inputB[i];\n }\n }",
"public final void ruleOpAnd() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:528:2: ( ( '&&' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:529:1: ( '&&' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:529:1: ( '&&' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:530:1: '&&'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAndAccess().getAmpersandAmpersandKeyword()); \r\n }\r\n match(input,17,FOLLOW_17_in_ruleOpAnd1066); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAndAccess().getAmpersandAmpersandKeyword()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public void testAND1() throws Exception {\n\t\tObject retval = execLexer(\"AND\", 225, \"and\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"AND\", expecting, actual);\n\t}",
"@Test\n\tpublic void queryTest() {\n\t\tString query1 = \"(\\\"hello my name is\\\" & my | (!no & yes))\";\n\t\tString query2 = \"(hello & (\\\"yes sir\\\") | !no)\";\n\t\tString query3 = \"\\\"bob dylan\\\" ( big boy | toy ) & \\\"named troy\\\"\";\n\t\tString query4 = \"test \\\"quan what does\\\"\";\n\t\t\n\t\tString query1Result = \"hello+my+name+is my & !no yes & |\";\n\t\tString query2Result = \"hello yes+sir & !no |\";\n\t\tString query3Result = \"bob+dylan big boy & toy | & named+troy &\";\n\t\tString query4Result = \"test quan+what+does &\";\n\t\t\n\t\tassertEquals(query1Result, String.join(\" \", queryTest.getPostFix(query1)));\n\t\tassertEquals(query2Result, String.join(\" \", queryTest.getPostFix(query2)));\n\t\tassertEquals(query3Result, String.join(\" \", queryTest.getPostFix(query3)));\n\t\tassertEquals(query4Result, String.join(\" \", queryTest.getPostFix(query4)));\n\t}",
"void mo9699a(String str, String str2, boolean z);",
"public void andWhere(String dbsel)\n {\n this._appendWhere(dbsel, WHERE_AND); // WHERE_OR [2.6.4-B59]\n }",
"private boolean conditionAndOr( String condition, String[] ligne )\r\n {\n if( !condition.contains(\"AND\") || !condition.contains(\"OR\") )\r\n return this.conditionSimple(condition, ligne);\r\n \r\n // on suppose que cette fonction ne peut être utilisée que si\r\n // la condition ne contient pas des ( ou )\r\n // dans le cas d'une succession de AND et OR\r\n // on donne la priorité pour le AND\r\n boolean resultat = false;\r\n boolean resAnd = true;\r\n boolean resOr = false;\r\n \r\n // pour supprimer tous les espaces\r\n condition = condition.replaceAll(\" \", \"\");\r\n String[] conditionsAnd = condition.split(\"AND\");\r\n for( String cdsAnd : conditionsAnd ) // cds abréviation de conditions\r\n {\r\n String[] conditionsOr = cdsAnd.split(\"OR\");\r\n for( String cdsOr : conditionsOr )\r\n {\r\n resOr |= this.conditionSimple(cdsOr, ligne);\r\n }\r\n resAnd &= resOr;\r\n }\r\n resultat = resAnd;\r\n return resultat;\r\n }",
"void mo9700a(String str, boolean z);",
"public String fn_and_controlstrings(String userControlString, \n String interControlString) {\n String ctlReturn = \"\";\n char ctl1, ctl2;\n for (int i = 0; i < 16; i++) {\n ctl1 = (userControlString.charAt(i));\n ctl2 = (interControlString.charAt(i));\n if (ctl1 == '0' && ctl2 == '0')\n ctlReturn = ctlReturn.concat(\"0\");\n else\n ctlReturn = ctlReturn.concat(\"1\");\n\n }\n return ctlReturn;\n }",
"private String reduceOperation(String op1, String opd, String op2, StringBuffer expr) {\r\n if (opd == null) {\r\n if (op1 == null || op2 == null) {\r\n return null;\r\n } else if (\"AND\".equals(op1) && \"AND\".equals(op2)) {\r\n return \"AND\";\r\n } else {\r\n return \"OR\";\r\n }\r\n } else {\r\n if (op1 != null) {\r\n expr.append(op1).append(\" \");\r\n }\r\n expr.append(opd).append(\" \");\r\n return op2;\r\n }\r\n }",
"public final void rule__AstExpressionAnd__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2818:1: ( ( '&&' ) | ( 'and' ) )\n int alt13=2;\n int LA13_0 = input.LA(1);\n\n if ( (LA13_0==17) ) {\n alt13=1;\n }\n else if ( (LA13_0==18) ) {\n alt13=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 0, input);\n\n throw nvae;\n }\n switch (alt13) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2819:1: ( '&&' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2819:1: ( '&&' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2820:1: '&&'\n {\n before(grammarAccess.getAstExpressionAndAccess().getOperatorAmpersandAmpersandKeyword_1_1_0_0()); \n match(input,17,FOLLOW_17_in_rule__AstExpressionAnd__OperatorAlternatives_1_1_06085); \n after(grammarAccess.getAstExpressionAndAccess().getOperatorAmpersandAmpersandKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2827:6: ( 'and' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2827:6: ( 'and' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2828:1: 'and'\n {\n before(grammarAccess.getAstExpressionAndAccess().getOperatorAndKeyword_1_1_0_1()); \n match(input,18,FOLLOW_18_in_rule__AstExpressionAnd__OperatorAlternatives_1_1_06105); \n after(grammarAccess.getAstExpressionAndAccess().getOperatorAndKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"String mo3176a(String str, String str2);",
"public static BinaryExpression and(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public static String filter(String text)\n { StringBuffer buffer = new StringBuffer();\n for (int i=0; i<text.length(); i++)\n { char c = text.charAt(i);\n if (c == '<') buffer.append(\"<\");\n else if (c == '>') buffer.append(\">\");\n else if (c == '\"') buffer.append(\"quot;\");\n else if (c == '&') buffer.append(\"amp;\");\n else buffer.append(c);\n }\n return buffer.toString();\n }",
"ANDDecomposition createANDDecomposition();",
"public static BinaryExpression andAlso(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public static String SimpleSymbols(String str) {\n \n for(int i = 0; i < str.length(); i++){\n \n if(Character.isLetter(str.charAt(i))){\n \n if(i == 0){\n return \"false\";\n }\n if(str.charAt(i - 1) != '+'){\n return \"false\";\n }\n if((i+ 1) < str.length()){\n if(str.charAt(i+1) != '+'){\n return \"false\";\n }\n }\n }\n }\n \n return \"true\";\n \n }",
"public final void rule__BoolOperation__Group_17__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:1935:1: ( ( '&' ) )\n // InternalBSQL2Java.g:1936:1: ( '&' )\n {\n // InternalBSQL2Java.g:1936:1: ( '&' )\n // InternalBSQL2Java.g:1937:2: '&'\n {\n before(grammarAccess.getBoolOperationAccess().getAmpersandKeyword_17_0()); \n match(input,33,FOLLOW_2); \n after(grammarAccess.getBoolOperationAccess().getAmpersandKeyword_17_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void setAnd(boolean and) {\n reqIsAnd = and;\n }",
"public final void rule__PredicateAnd__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3667:1: ( ( '&&' ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3668:1: ( '&&' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3668:1: ( '&&' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3669:1: '&&'\n {\n before(grammarAccess.getPredicateAndAccess().getAmpersandAmpersandKeyword_1_1()); \n match(input,28,FOLLOW_28_in_rule__PredicateAnd__Group_1__1__Impl7218); \n after(grammarAccess.getPredicateAndAccess().getAmpersandAmpersandKeyword_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private static void m848a(StringBuilder sb, int i, int i2, String str) {\n if ((i & i2) == i2) {\n sb.append(str);\n }\n }",
"public static boolean ransomChars(String str1, String str2) {\n return false;\n }",
"public final void rule__BoolOperation__Group_8_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:1881:1: ( ( '&' ) )\n // InternalBSQL2Java.g:1882:1: ( '&' )\n {\n // InternalBSQL2Java.g:1882:1: ( '&' )\n // InternalBSQL2Java.g:1883:2: '&'\n {\n before(grammarAccess.getBoolOperationAccess().getAmpersandKeyword_8_1_0()); \n match(input,33,FOLLOW_2); \n after(grammarAccess.getBoolOperationAccess().getAmpersandKeyword_8_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"static void andOp(){\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Ingrese el primer numero binario: \");\n String bin1 = scanner.nextLine();\n\n System.out.print(\"Ingrese el segundo numero binario: \");\n String bin2 = scanner.nextLine();\n\n int A = Integer.parseInt(bin1,2);\n int B = Integer.parseInt(bin2,2);\n\n System.out.print(\"A & B = \" + (A & B));\n }",
"public static ArrayList<String> toCNF(String str) {\r\n\t\tArrayList<String> front = new ArrayList<String>();\r\n\t\tArrayList<String> back = new ArrayList<String>();\r\n\t\tArrayList<String> result = new ArrayList<String>();\r\n\t\tString[] orign = str.split(\" \");\t\t\r\n\t\tboolean isfront = true;\r\n\t\tfor(int i =0; i < orign.length; i++) {\r\n\t\t\tif(!orign[i].equals(\"=>\") && isfront && !orign[i].equals(\"&\") && !orign[i].equals(\"=>\") ) {\r\n\t\t\t\tfront.add(orign[i]);\r\n\t\t\t}else if(orign[i].equals(\"=>\")) {\r\n\t\t\t\tisfront = false;\r\n\t\t\t}\r\n\t\t\telse if(!orign[i].equals(\"&\") && !orign[i].equals(\"=>\")){\r\n\t\t\t\tback.add(orign[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t for(String s : front) {\r\n\t \tif(isfront == false) {\r\n\t \t\ts = negation(s);\r\n\t \t\tresult.add(s);\r\n\t \t}else {\r\n\t \t\tresult.add(s);\r\n\t \t}\t\t\t\r\n\t\t}\r\n\t\tfor(String s : back) {\r\n\t\t\tresult.add(s);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public static String a(String str, Boolean justA)\n\t{\n\t\tString lowerStr = stripPrefix(str.toLowerCase());\n\t\t\n\t\tCharacter[] vowels = new Character[]{'a', 'e', 'i', 'o', 'u'};\n\t\tString aStr = Arrays.asList(vowels).contains(str.charAt(0)) ? \"an \" : \"a \";\n\t\treturn justA ? aStr : aStr + str;\n\t}",
"Expression andExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = eqExpression();\r\n\t\twhile(isKind(OP_AND)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = eqExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}",
"String checkString(String str) {\n\t\tString output = \"\";\n\t\tfor (int index = str.length() - 1; index >= 0; index--) {\n\t\t\toutput = output + str.charAt(index);\n\t\t}\n\t\treturn output;\n\t}",
"static String[] weightedUniformStrings(String s, int[] queries) {\n Set<Integer> set = new HashSet<>();\n String[] res = new String[queries.length];\n int i = 0, j = 0, count = 0;\n while(j < s.length()) {\n while(j < s.length() && s.charAt(i) == s.charAt(j)) {\n count++;\n set.add(count * ((s.charAt(i) - 'a') + 1));\n j++;\n }\n \n count = 0;\n i = j;\n }\n\n for(i = 0; i < queries.length; i++) {\n if(set.contains(queries[i]))\n res[i] = \"Yes\";\n else res[i] = \"No\";\n }\n\n return res;\n }",
"private void parseAnd(Node node) {\r\n if (switchTest) return;\r\n parse(node.left());\r\n if (! ok) return;\r\n parse(node.right());\r\n }",
"void mo8715r(String str, String str2, String str3);",
"private static boolean checkAndOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"and\")) {\n\t\t\tString[] arr = expression.split(\"and\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkOrOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"and\");\n\t\t\t\t} else if (expression.endsWith(\"and\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"and\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkOrOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private String normalizeOperator(String op)\n {\n String normalOp = null;\n \n if (op != null && op.trim().length() > 0)\n {\n op = op.trim().toLowerCase();\n\n String [] ops = new String []\n {\n OP_EQUALS,\n OP_NOTEQUAL,\n OP_LESSTHAN,\n OP_LESSTHANEQUAL,\n OP_GREATERTHAN,\n OP_GREATERTHANEQUAL,\n OP_ISNULL,\n OP_ISNOTNULL,\n OP_IN,\n OP_NOTIN,\n OP_LIKE,\n OP_NOTLIKE,\n OP_BETWEEN\n };\n\n for (int i=0; i<ops.length && normalOp == null; i++)\n {\n if (ops[i].equalsIgnoreCase(op))\n normalOp = ops[i];\n }\n }\n \n return normalOp;\n }",
"public final void mAMPERSAND() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = AMPERSAND;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:429:10: ( '&' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:429:16: '&'\n\t\t\t{\n\t\t\tmatch('&'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"protected void sequence_AND(ISerializationContext context, AND semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getAND_And()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getAND_And()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getANDAccess().getAndAndKeyword_0(), semanticObject.getAnd());\n\t\tfeeder.finish();\n\t}",
"public static void main(String[] args) {\n int method,result;String string;\r\n String[] input=new String[3];\r\n ArrayList<String> inputs=new ArrayList<String>();\r\n\r\n\r\n\t\t// declare a Scanner object to read input\r\n Scanner sc=new Scanner(System.in);\r\n\r\n\t\t// read input and process them accordingly\r\n method=sc.nextInt();\r\n sc.nextLine();\r\n\r\n if(method == 1){\r\n int number=sc.nextInt();\r\n sc.nextLine();\r\n for(int i=0;i<number;i++){\r\n string=sc.nextLine();\r\n inputs.add(string);\r\n }\r\n for(int i=0;i<number;i++){\r\n input=inputs.get(i).split(\" \");\r\n result=0;\r\n if(input[0].equals(\"AND\")){\r\n if(input[1].equals(\"1\") &&input[2].equals(\"1\")){\r\n result=1;\r\n }\r\n }\r\n else{\r\n if(input[1].equals(\"1\") ||input[2].equals(\"1\"))\r\n result=1;\r\n }\r\n System.out.println(result); \r\n\r\n } \r\n\r\n\r\n }\r\n else if(method==2){\r\n int counter=0;\r\n while(true){\r\n string=sc.nextLine();\r\n inputs.add(string);\r\n if(string.equals(\"0\"))\r\n break;\r\n counter+=1;\r\n }\r\n for(int i=0;i<counter;i++){\r\n input=inputs.get(i).split(\" \");\r\n result=0;\r\n if(input[0].equals(\"AND\")){\r\n if(input[1].equals(\"1\") && input[2].equals(\"1\")){\r\n result=1;\r\n }\r\n\r\n }\r\n else{\r\n if(input[1].equals(\"1\") || input[2].equals(\"1\"))\r\n result=1;\r\n }\r\n \r\n System.out.println(result);\r\n \r\n \r\n }\r\n } \r\n else{\r\n int counter=0;\r\n while(sc.hasNextLine()){\r\n string=sc.nextLine();\r\n inputs.add(string);\r\n counter+=1;\r\n \r\n }\r\n for(int i=0;i<counter;i++){\r\n input=inputs.get(i).split(\" \");\r\n result=0;\r\n if(input[0].equals(\"AND\")){\r\n if(input[1].equals(\"1\") && input[2].equals(\"1\"))\r\n result=1;\r\n \r\n }\r\n else{\r\n if(input[1].equals(\"1\")||input[2].equals(\"1\"))\r\n result=1;\r\n }\r\n System.out.println(result);\r\n }\r\n\r\n\r\n }\r\n\t}",
"public String visit(AndExpression n, LLVMRedux argu) throws Exception {\n\n String arg1 = n.f0.accept(this, argu), arg2 = n.f2.accept(this, argu);\n u.println(u.getReg()+\" = and i1 \"+arg1+\", \"+arg2);\n return u.getLastReg();\n }",
"void mo1334i(String str, String str2);",
"Expr join() throws IOException {\n\t\tExpr e = equality();\n\t\twhile (look.tag == Tag.AND) {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new And(tok, e, equality());\n\t\t}\n\t\treturn e;\n\t}",
"public static int complexAction(String str)\n {\n if (str.equalsIgnoreCase(\"Play\") || str.equalsIgnoreCase(\"Start\") || str.equalsIgnoreCase(\"Begin\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Pause\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"QUIT\"))\n {\n return 3;\n }\n else\n { return 0;} \n }",
"void mo28733a(boolean z, int i, String str, String str2);",
"public final void rule__BoolOperation__Group__15__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:1557:1: ( ( '&' ) )\n // InternalBSQL2Java.g:1558:1: ( '&' )\n {\n // InternalBSQL2Java.g:1558:1: ( '&' )\n // InternalBSQL2Java.g:1559:2: '&'\n {\n before(grammarAccess.getBoolOperationAccess().getAmpersandKeyword_15()); \n match(input,33,FOLLOW_2); \n after(grammarAccess.getBoolOperationAccess().getAmpersandKeyword_15()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"void mo5871a(String str);",
"public final void mAMPERSAND() throws RecognitionException {\n try {\n int _type = AMPERSAND;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:19:11: ( '&' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:19:13: '&'\n {\n match('&'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private static String helpPalindrome(String s){\n \ts=s.toLowerCase().trim();\n \tif(s.indexOf(\",\")>=0){\n \t\ts=s.substring(0, s.indexOf(\",\"))+s.substring(s.indexOf(\",\")+1);\n \t\ts=helpPalindrome(s);\n \t}else if(s.indexOf(\".\")>=0){\n \t\ts=s.substring(0, s.indexOf(\".\"))+s.substring(s.indexOf(\".\")+1);\n \t\ts=helpPalindrome(s);\n \t}else if(s.indexOf(\":\")>=0){\n \t\ts=s.substring(0, s.indexOf(\":\"))+s.substring(s.indexOf(\":\")+1);\n \t\ts=helpPalindrome(s);\n \t}else if(s.indexOf(\" \")>=0){\n \t\ts=s.substring(0, s.indexOf(\" \"))+s.substring(s.indexOf(\" \")+1);\n \t\ts=helpPalindrome(s);\n \t}else if(s.indexOf(\"'\")>=0){\n \t\ts=s.substring(0, s.indexOf(\"'\"))+s.substring(s.indexOf(\"'\")+1);\n \t\ts=helpPalindrome(s);\n \t}else if(s.indexOf(\"?\")>=0){\n \t\ts=s.substring(0, s.indexOf(\"?\"))+s.substring(s.indexOf(\"?\")+1);\n \t\ts=helpPalindrome(s);\n \t}else if(s.indexOf(\"!\")>=0){\n \t\ts=s.substring(0, s.indexOf(\"!\"))+s.substring(s.indexOf(\"!\")+1);\n \t\ts=helpPalindrome(s);\n \t}\n \treturn s;\n }",
"public abstract boolean mo70724g(String str);",
"public String getAND_COND_LHS(int fiIndex)\n {\n switch (fiIndex)\n {\n case 1 :\n return getAND_COND_LHS_1();\n case 2 :\n return getAND_COND_LHS_2();\n case 3 :\n return getAND_COND_LHS_3();\n case 4 :\n return getAND_COND_LHS_4();\n case 5 :\n return getAND_COND_LHS_5();\n default :\n return null ;\n\n } /* end switch ( fiIndex ) */\n }",
"public void testAND3() throws Exception {\n\t\tObject retval = execLexer(\"AND\", 227, \"+\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"AND\", expecting, actual);\n\t}",
"public static String encode(String in){\n in = in.replace(\"&\", \"&\");\n in = in.replace(\"\\\"\", \""\");\n in = in.replace(\"<\", \"<\");\n in = in.replace(\">\", \">\");\n log.debug(\"encoded string: \" + in);\n // FIXME: Consider double-encoding & if it is not part of &\n return in;\n }",
"public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"String mo1888b(String str, String str2, String str3, String str4);",
"private String _buildWhereCondition(Vector conditions){\n String strConditions = \"\";\n if(conditions != null){\n strConditions = clsPopulateFunctions.joinVector(conditions, \" AND \");\n }\n return strConditions;\n }",
"public static BinaryExpression and(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"@Override\n\tpublic String dofilter(String str) {\n\t\tfor(Filter f : filters){\n\t\t\tstr = f.dofilter(str);\n\t\t}\t\t\n\t\treturn str;\n\t}",
"private static String getSingleText(CommonToken token, String name1, String name2) {\n String input = token.getText();\n\n if (StringUtils.containsWhitespace(input)) return input;\n if (\",\".equals(input)) return \" AND \";\n return name1 + \".\" + input + \"=\" + name2 + \".\" + input;\n }",
"private boolean isAdvancedQuery(String enteredQuery){\n try{\n Character firstChar = enteredQuery.charAt(0);\n Character secondChar = enteredQuery.charAt(1);\n\n return isSignOperator(firstChar.toString()) && secondChar.equals(' ');\n }catch (StringIndexOutOfBoundsException ex){\n return false;\n }\n }",
"public static void main(String[] args) {\n\t\tStringJoiner joiner=new StringJoiner(\" and \",\"{\",\"}\");\n\t\tjoiner.add(\"python\");\n\t\tjoiner.add(\"java\");\n\t\tjoiner.add(\"c\");\n\t\tjoiner.add(\"c++\").add(\"html\").add(\"css\").add(\"js\");\n\t\tString s=joiner.toString();\n\t\tSystem.out.println(s);\n\t\tString s1=\"asd ad ad vxczvz\";\n\t\tSystem.out.println(s1.lastIndexOf(\" \"));\n\t\tSystem.out.println(s1.substring(s1.lastIndexOf(\" \")));\n\t\t\n\t\tStringJoiner joiner1=new StringJoiner(\" and \",\"[\",\"]\");\n\t\tjoiner1.add(\"asdsa\").add(\"rgrg\").add(\"grger\");\n\t\tSystem.out.println(joiner1);\n\t\tjoiner.merge(joiner1);\n\t\tSystem.out.println(joiner);\n\t}",
"String convertToPostfix(String input);",
"public LogicGateAND() {\r\n\t\t// Initialize input and output ports\r\n\t\tsuper(Operators.AND, new IDynamicInterface(2), new IFixedInterface(new IPort()));\r\n\t}",
"public static String produceAnswer(String input)\r\n { \r\n // TODO: Implement this function to produce the solution to the input\r\n\t\tint space = input.indexOf(' ');\r\n String value1 = input.substring(0, space);\r\n\t\tString value2 = input.substring(space + 3, input.length());\r\n\t\tString operator = input.substring(space, space + 3);\r\n\t\tif (value1.contains(\"_\"))\r\n\t\t{\r\n\t\t\tString newValue1 = convertMixedNumber(value1);\r\n\t\t\tif (value2.contains(\"_\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertMixedNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse if (value2.contains(\"/\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = value2;\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertWholeNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if (value1.contains(\"/\"))\r\n\t\t{\r\n\t\t\tString newValue1 = value1;\r\n\t\t\tif (value2.contains(\"_\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertMixedNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse if (value2.contains(\"/\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = value2;\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertWholeNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tString newValue1 = convertWholeNumber(value1);\r\n\t\t\tif (value2.contains(\"_\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertMixedNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse if (value2.contains(\"/\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = value2;\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertWholeNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif (input.contains(\" / \"))\r\n\t\t{\r\n\t\t int slash = input.indexOf('/');\r\n\t\t int slash2 = input.indexOf('/', slash + 1);\r\n\t\t int slash3 = input.indexOf('/', slash2 + 1);\r\n\t\t space = input.indexOf(' ');\r\n\t\t int num1 = Integer.parseInt(input.substring(0, slash));\r\n\t\t int denom1 = Integer.parseInt(input.substring(slash + 1, space));\r\n\t\t int num2 = Integer.parseInt(input.substring(space + 3, slash3));\r\n\t\t int denom2 = Integer.parseInt(input.substring(slash3 + 1, input.length()));\r\n\t\t if (num2 < 0)\r\n\t\t {\r\n\t\t\t num2 = num2 * -1;\r\n\t\t\t denom2 = denom2 * -1;\r\n\t\t\t int numerator = num1 * denom2;\r\n\t\t\t int denominator = denom1 * num2;\r\n\t\t\t String Answer = numerator + \"/\" + denominator;\r\n\t\t\t return reduceAnswer(Answer);\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t int numerator = num1 * denom2;\r\n\t\t int denominator = denom1 * num2;\r\n\t\t String Answer = numerator + \"/\" + denominator;\r\n\t\t return reduceAnswer(Answer);\r\n\t\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t int slash = input.indexOf('/');\r\n\t int slash2 = input.indexOf('/', slash + 1);\r\n\t space = input.indexOf(' ');\r\n\t\t int num1 = Integer.parseInt(input.substring(0, slash));\r\n\t int denom1 = Integer.parseInt(input.substring(slash + 1, space));\r\n\t int num2 = Integer.parseInt(input.substring(space + 3, slash2));\r\n\t int denom2 = Integer.parseInt(input.substring(slash2 + 1, input.length()));\r\n\t if (input.contains(\" + \"))\r\n {\r\n \t int numerator1 = num1 * denom2;\r\n \t int numerator2 = num2 * denom1;\r\n \t int finalNumerator = numerator1 + numerator2;\r\n \t int denominator = denom2 * denom1;\r\n \t String Answer = finalNumerator + \"/\" + denominator;\r\n \t return reduceAnswer(Answer);\r\n \t\t\r\n }\r\n else if (input.contains(\" - \"))\r\n {\r\n \tint numerator1 = num1 * denom2;\r\n \tint numerator2 = num2 * denom1;\r\n \tint finalNumerator = numerator1 - numerator2;\r\n \tint denominator = denom2 * denom1;\r\n \tString Answer = finalNumerator + \"/\" + denominator;\r\n \treturn reduceAnswer(Answer);\r\n }\r\n else if (input.contains(\" * \"))\r\n {\r\n \tint numerator = num1 * num2;\r\n \tint denominator = denom1 * denom2;\r\n \tString Answer = numerator + \"/\" + denominator;\r\n \treturn reduceAnswer(Answer);\r\n }\r\n else\r\n {\r\n \tString error = \"Error: Invalid user input\";\r\n \treturn error; \r\n }\r\n\t}\r\n }",
"private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}",
"private static String pmaQ(String arg) {\n\t\tif (arg == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treturn URLEncoder.encode(arg, \"UTF-8\").replace(\"+\", \"%20\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.print(e.getMessage());\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t}",
"String mo2801a(String str);",
"private List<ParseTree> separateAND(ParseTree t){\n List<ParseTree> nodes = new ArrayList<ParseTree>();\n List<ParseTree> aux = getNodes(t, RulesParser.RULE_conjuncion);\n List<ParseTree> factores = getNodes(t, RulesParser.RULE_factor); // factors enclosed in parentheses, such as ((1+2)+3)\n int count = 0;\n for (int i = 0; i < factores.size(); i++) {\n if (((RulesParser.FactorContext) factores.get(i)).PA() != null){\n count++;\n }\n }\n int params = Trees.findAllRuleNodes(t, RulesParser.RULE_parametros).size();\n params = aux.size() == params ? 0 : params;\n for (int i = 0; i < aux.size() - params - count; i++) {\n if (aux.get(i).getChild(i) instanceof RulesParser.ConjuncionContext){\n nodes.add(((RulesParser.ConjuncionContext) aux.get(i)).igualdad());\n } else{\n nodes.add(aux.get(i));\n }\n }\n Collections.reverse(nodes);\n return nodes;\n }",
"public String a(String str, Map<String, String> map, @NonNull String str2) {\n Builder buildUpon = Uri.parse(str).buildUpon();\n for (Entry entry : map.entrySet()) {\n buildUpon.appendQueryParameter((String) entry.getKey(), (String) entry.getValue());\n }\n StringBuilder stringBuilder = new StringBuilder(buildUpon.build().toString());\n stringBuilder.append(\"&\").append(\"it\").append(\"=\").append(str2);\n return stringBuilder.toString();\n }",
"void mo1342w(String str, String str2);",
"void mo2802a(String str, boolean z);",
"int mo23353w(String str, String str2);",
"public static BinaryExpression andAlso(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }"
] | [
"0.6555858",
"0.6242293",
"0.6171492",
"0.6063437",
"0.586845",
"0.5771392",
"0.5707908",
"0.56847537",
"0.55574256",
"0.55307645",
"0.5456293",
"0.5267634",
"0.52599776",
"0.5210477",
"0.5208419",
"0.51790506",
"0.5178494",
"0.5166018",
"0.51322365",
"0.51292086",
"0.5113619",
"0.5101096",
"0.51001436",
"0.50816214",
"0.5065603",
"0.50030893",
"0.49740842",
"0.49603024",
"0.495022",
"0.49412817",
"0.4922243",
"0.49164593",
"0.49124357",
"0.48917243",
"0.4891243",
"0.48843625",
"0.487608",
"0.48667094",
"0.48456025",
"0.48432317",
"0.4841219",
"0.4834214",
"0.4820876",
"0.4814905",
"0.48120958",
"0.48118034",
"0.47811517",
"0.47797176",
"0.4775043",
"0.47745365",
"0.47706217",
"0.47633475",
"0.47617468",
"0.47469366",
"0.47436997",
"0.47100943",
"0.47020763",
"0.4701047",
"0.46984777",
"0.46976802",
"0.46790254",
"0.4675425",
"0.46745375",
"0.4668178",
"0.46668577",
"0.46328914",
"0.46257353",
"0.4620928",
"0.4614464",
"0.46049786",
"0.45873058",
"0.45854896",
"0.4580025",
"0.45793223",
"0.45745665",
"0.457184",
"0.45628512",
"0.45602867",
"0.45572734",
"0.45535052",
"0.45527467",
"0.45464957",
"0.45419315",
"0.45401123",
"0.45344657",
"0.4532566",
"0.45304045",
"0.45295265",
"0.45289186",
"0.45180678",
"0.45050502",
"0.45045042",
"0.45027143",
"0.45006332",
"0.44951636",
"0.4492487",
"0.44892222",
"0.44820392",
"0.44818574",
"0.44814727"
] | 0.60629576 | 4 |
Removes the vowels from a String | private static String removeVowels(String s){
if(s.toLowerCase().indexOf("a")>=0){
s=s.substring(0, s.toLowerCase().indexOf("a"))+s.substring(s.toLowerCase().indexOf("a")+1);
s=removeVowels(s);
}else if(s.toLowerCase().indexOf("e")>=0){
s=s.substring(0, s.toLowerCase().indexOf("e"))+s.substring(s.toLowerCase().indexOf("e")+1);
s=removeVowels(s);
}else if(s.toLowerCase().indexOf("i")>=0){
s=s.substring(0, s.toLowerCase().indexOf("i"))+s.substring(s.toLowerCase().indexOf("i")+1);
s=removeVowels(s);
}else if(s.toLowerCase().indexOf("o")>=0){
s=s.substring(0, s.toLowerCase().indexOf("o"))+s.substring(s.toLowerCase().indexOf("o")+1);
s=removeVowels(s);
}else if(s.toLowerCase().indexOf("u")>=0){
s=s.substring(0, s.toLowerCase().indexOf("u"))+s.substring(s.toLowerCase().indexOf("u")+1);
s=removeVowels(s);
}
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String removeVowels(String s) {\n\n return s.replaceAll(\"[aeiouAEIOU]\", \"\");\n\n }",
"public String removeVowels(String s) {\n if (s == null) {\n return null;\n }\n String vowels = \"aeiou\";\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (vowels.indexOf(c) == -1) {\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"public static String removeVowel(String words) {\n words = words.replaceAll(\"[AEIOUaeiou]\", \"\");\n return words;\n }",
"public String removeVowels(String str) {\n\t\t// base cases\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (str.equals(\"\")) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// recursive case\n\n\t\t// Make a recursive call to remove vowels from the\n\t\t// rest of the string.\n\t\tString removedFromRest = removeVowels(str.substring(1));\n\n\t\t// If the first character in str is a vowel,\n\t\t// we don't include it in the return value.\n\t\t// If it isn't a vowel, we do include it.\n\t\tchar first = Character.toLowerCase(str.charAt(0));\n\t\tif (first == 'a' || first == 'e' || first == 'i' || first == 'o'\n\t\t\t\t|| first == 'u') {\n\t\t\treturn removedFromRest;\n\t\t} else {\n\t\t\treturn first + removedFromRest;\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the String:\");\r\n\t\tString word=sc.next();\r\n\t\tchar ch[]=word.toCharArray();\r\n\t\t\r\n\t\tfor(int i=0;i<word.length();i++)\r\n\t\t{\r\n\t\t\tif(ch[i]=='a'||ch[i]=='e'||ch[i]=='i'||ch[i]=='o'||ch[i]=='u')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"remove vowels is:\"+ch[i]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}",
"public static String disemvowel(String originStr){\r\n return originStr.replaceAll(\"[AaEeIiOoUu]\",\"\");\r\n }",
"public static String allVowels( String w ) \n {\n String rtrnStr = \"\";\n String currLetter = \"\";\n int origLength = w.length();\n for (int i = 0; i < origLength; i++){\n currLetter = w.substring(i,i+1);\n if (isAVowel(currLetter)){\n rtrnStr += currLetter; //if it is a vowel, add the letter to the string of vowels \n }\n }\n return rtrnStr;\n }",
"public static String allVowels( String w ) \r\n {String vowels = \"\";\r\n\tfor (int x = 0; x < w.length(); x +=1) {\r\n\t if (isAVowel(w.substring(x,x+1))) {//if the letter is a vowel...\r\n\t\tvowels += w.substring(x,x+1); //add that vowel to the string\r\n\t }//end if\r\n\t}//end for\r\n\treturn vowels;\r\n }",
"public static List<String> noVowel(List<String> in) {\n return in.stream()\n .distinct() // Ensure elements are unique\n .filter(i -> !i.matches(\"[aeiou]\")) // Keep elements that don't contain a vowel\n .collect(Collectors.toList()); // Collect result\n }",
"public String reverseVowels(String s) {\n if(s == null || s.length() < 2) {\n return s;\n }\n char[] chars = s.toCharArray();\n int front = 0;\n int back = chars.length - 1;\n while (front < back) {\n if(isVowel(chars[front]) && isVowel(chars[back])) {\n char tmp = chars[front];\n chars[front] = chars[back];\n chars[back] = tmp;\n front++;\n back--;\n } else if(isVowel(chars[front])) {\n back--;\n } else if(isVowel(chars[back])) {\n front++;\n } else {\n front++;\n back--;\n }\n }\n return new String(chars);\n }",
"public static boolean containsVowel( String s ) {\n String s2 = s.toLowerCase();\n //s2 = s.toLowerCase(); -- dont fuck with the original param\n\n for (int i = 0; i < s2.length(); i++) {\n if (s2.charAt(i) == 'a' || s2.charAt(i) == 'e' || s2.charAt(i) == 'i' ||\n s2.charAt(i) == 'o' || s2.charAt(i) == 'u' || s2.charAt(i) == 'y') {\n return true;\n }\n }\n return false;\n//use the s2 so you dont have to check the cap letters\n\n // return !(s.indexOf('a') < 0 && s.indexOf('e') && s.indexOf('i') < 0 && s.indexOf('o') < 0 && s.indexOf('u') < 0 && s.indexOf('y') < 0);\n }",
"public static String removeBuailte(String s) {\n String out = \"\";\n char[] ca = s.toCharArray();\n for(int i = 0; i < ca.length; i++) {\n char undotted = removeDot(ca[i]);\n if(undotted == ca[i]) {\n out += ca[i];\n } else {\n if(Character.isLowerCase(ca[i])) {\n out += undotted;\n out += 'h';\n } else {\n if((i == 0 && ca.length == 1)\n || (ca.length > (i + 1) && Character.isUpperCase(ca[i + 1]))\n || ((i > 0) && (i == ca.length - 1) && Character.isUpperCase(ca[i - 1]))) {\n out += undotted;\n out += 'H';\n } else {\n out += undotted;\n out += 'h';\n }\n }\n }\n }\n return out;\n }",
"public String removerAcentos(String str) {\r\n return Normalizer.normalize(str, Normalizer.Form.NFD).replaceAll(\"[^\\\\p{ASCII}]\", \"\");\r\n }",
"public static String convertVowels(String word) {\n StringBuffer sb = new StringBuffer();\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (((c == 'a') || (c == 'e') || (c == 'i') || (c == 'o') || (c == 'u'))){\n sb.append(\"*\");\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"public static String removeAnything(String s, String remove){\n\t\ts=\"1a2b3c\";\n\t\tremove=\"abc\";\n\t\tString copy=\"\";\n\t\tfor(int i=0; i<s.length(); i++){\n\t\t\tString letter=s.substring(i, i+1);\n\t\t\tif (remove.indexOf(letter) ==1)\n\t\t\t\tcopy=copy+letter;\n\t\t}\n\t\treturn copy;\n\t}",
"private String stripNoneWordChars(String uncleanString) {\n return uncleanString.replace(\".\", \" \").replace(\":\", \" \").replace(\"@\", \" \").replace(\"-\", \" \").replace(\"_\", \" \").replace(\"<\", \" \").replace(\">\", \" \");\n\n }",
"public static String removeInvalidCharacteres(String string) {\n\t\tString corretString = string;\n\t\tif (containsInvalidCharacterInLogin(string)) {\n\t\t\tString regex = \"[|\\\"&*=+'@#$%\\\\/?{}?:;~<>,\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D8\\u0152\\u00DE\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u0178\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F8\\u0153\\u00DF\\u00FE\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FF]\";\n\t\t\tPattern p = Pattern.compile(regex);\n\t\t\tMatcher m = p.matcher(string);\n\t\t\tcorretString = m.replaceAll(\"\");\n\t\t\t//System.out.println(corretString);\n\t\t}\n\t\t\n\t\tcorretString = corretString.replace(\"\\\\\", \"\");\n\t\t\n\t\treturn corretString;\n\t}",
"public String reverseVowels(String s) {\n \n // Cases 1 and 2\n if (s == null || \"\".equals(s) || s.length() < 2) return s;\n \n // Case 3\n StringBuilder result = new StringBuilder(s);\n int start = 0;\n int end = s.length() - 1;\n \n while (start < end) {\n \n // Increment start until char is vowel\n while (!isVowel(s.charAt(start)) && start < end) {\n start++;\n }\n \n // Decrement end until char is vowel\n while (!isVowel(s.charAt(end)) && start < end) {\n end--;\n }\n \n // Swap start and end in result\n if (start < end) {\n char temp = result.charAt(start);\n result.setCharAt(start, result.charAt(end));\n result.setCharAt(end, temp);\n \n // Change values to prevent infinite loop\n start++;\n end--;\n }\n }\n \n return result.toString();\n }",
"public String reverseVowels2(String s) {\n if (s == null || \"\".equals(s) || s.length() < 2) return s;\n \n // Case 3\n StringBuilder builder = new StringBuilder();\n char[] vowels = new char[s.length()];\n int vowelsIndex = 0;\n \n // Fill vowels[]\n for (char c : s.toCharArray()) {\n if (isVowel(c)) vowels[vowelsIndex++] = c;\n }\n \n // Iterate through s and build StringBuilder\n for (char c : s.toCharArray()) {\n \n if (isVowel(c)) {\n builder.append(vowels[--vowelsIndex]);\n } else {\n builder.append(c);\n }\n \n }\n \n return builder.toString();\n }",
"public static void main(String args[])\n {\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n StringBuilder sb = new StringBuilder(str);\n int len = sb.length();\n StringBuilder temp = new StringBuilder(\"\");\n for(int id = 0;id<=len-1;id++)\n {\n if((str.charAt(id)!='a')&&(str.charAt(id)!='e')&&(str.charAt(id)!='i')&&(str.charAt(id)!='o')&&(str.charAt(id)!='u')||(str.charAt(id)==' '))\n {\n temp.append(str.charAt(id));\n }\n }\n System.out.println(temp);\n \n\n }",
"public void removeJunkOrUnwantedCharFromString() {\n\t\tString str = \"hello@#4kjk122\";\n\t\tstr = str.replaceAll(\"[^a-zA-z0-9]\", \"\");\n\t\t// if we don't put ^ in above statement it will remove a to z charac and numbers\n\t\tSystem.out.println(str);\n\t}",
"public static String unalter(String saInput) {\r\n\t\tif (null == saInput) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tString slInputTmp = saInput;\r\n\t\t\tint specialLen = specialChars.length;\r\n\t\t\tfor (int ilCounter = 0; ilCounter < specialLen; ilCounter++) {\r\n\t\t\t\tslInputTmp = replaceAllOccurrences(slInputTmp, replacement[ilCounter], specialChars[ilCounter]);\r\n\t\t\t}\r\n\r\n\t\t\treturn slInputTmp;\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.info(\"Exception:\" + e);\r\n\t\t\t// LOGGER.error(e);\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}",
"private String remove(String in, char toBeRemoved){\n\t\tStringBuilder str = new StringBuilder();\n\t\tfor(int i = 0; i < in.length(); i++){\n\t\t\tif(in.charAt(i) != toBeRemoved){\n\t\t\t\tstr.append(in.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn str.toString();\n\t}",
"public static String removeNonLetters(String input)\n\t{\n\t\tchar[] nonLetters \t= { '-', ' ' };\n\t\tString result \t\t= \"\";\n\t\tboolean willAdd \t= false;\n\n\t\t/* when it's a single hyphen */\n\t\tif( input.length() < 2 )\n\t\t{\n\t\t\treturn input;\n\t\t}\n\n\t\tfor( int i = 0; i < input.length(); i++ )\n\t\t{\n\n\t\t\tfor( int j = 0; j < nonLetters.length; j++)\n\t\t\t{\n\t\t\t\tif( input.charAt(i) != nonLetters[j]) {\n\t\t\t\t\twillAdd = true;\n\t\t\t\t} else {\n\t\t\t\t\twillAdd = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( willAdd ) {\n\t\t\t\tresult = result + input.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"String searchVowel();",
"private final static String stripA( String s ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [ca.length - 1];\n\n\n for ( int i=0; i<ca2.length; i++ ) {\n ca2[i] = ca[i];\n } // end for\n\n return new String (ca2);\n\n }",
"protected static String removeBannedCharacters(String st) {\n return st.replaceAll(\"[^A-Za-z]\", \"\");\n }",
"public static String remove(String str){\n\t\tString str2 = str.trim();\n\t\tstr2 = str2.replaceAll(\"à|á|ả|ã|ạ|â|ầ|ấ|ẩ|ẫ|ậ|ằ|ắ|ẳ|ẵ|ặ|ă\", \"a\");\n\t\tstr2 = str2.replaceAll(\"í|ì|ỉ|ĩ|ị\",\"i\");\n\t\tstr2 = str2.replaceAll(\"ư|ứ|ừ|ử|ữ|ự|ú|ù|ủ|ũ|ụ\",\"u\");\n\t\tstr2 = str2.replaceAll(\"ế|ề|ể|ễ|ệ|é|è|ẻ|ẽ|ẹ|ê\",\"e\");\n\t\tstr2 = str2.replaceAll(\"ố|ồ|ổ|ỗ|ộ|ớ|ờ|ở|ỡ|ợ|ó|ò|ỏ|õ|ọ|ô|ơ\",\"o\");\n\t\tstr2= str2.replaceAll(\"ý|ỳ|ỷ|ỹ|ỵ\",\"y\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"Ấ|Ầ|Ẩ|Ẫ|Ậ|Ắ|Ằ|Ẳ|Ẵ|Ặ|Á|À|Ả|Ã|Ạ|Â|Ă\",\"A\");\n\t\tstr2 = str2.replaceAll(\"Í|Ì|Ỉ|Ĩ|Ị\",\"I\");\n\t\tstr2 = str2.replaceAll(\"Ứ|Ừ|Ử|Ữ|Ự|Ú|Ù|Ủ|Ũ|Ụ|Ư\",\"U\");\n\t\tstr2 = str2.replaceAll(\"Ế|Ề|Ể|Ễ|Ệ|É|È|Ẻ|Ẽ|Ẹ|Ê\",\"E\");\n\t\tstr2 = str2.replaceAll(\"Ố|Ồ|Ổ|Ô|Ộ|Ớ|Ờ|Ở|Ỡ|Ợ|Ó|Ò|Ỏ|Õ|Ọ|Ô|Ơ\",\"O\");\n\t\tstr2= str2.replaceAll(\"Ý|Ỳ|Ỷ|Ỹ|Ỵ\",\"Y\");\n\t\tstr2 = str2.replaceAll(\"đ\",\"d\");\n\t\tstr2 = str2.replaceAll(\"Đ\",\"D\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"ò\", \"\");\n\t\treturn str2;\n\t}",
"public static String removeChar(String s, char c) {\r\n String r = \"\";\r\n for (int i = 0; i < s.length(); i++) {\r\n if (s.charAt(i) != c) {\r\n r += s.charAt(i);\r\n }\r\n }\r\n return r;\r\n }",
"@Test\n public void Exercitiu14() {\n\n String[] instruments = new String[6];\n instruments[0] = \"cello\";\n instruments[1] = \"piano\";\n instruments[2] = \"clapsticks\";\n instruments[3] = \"steelpan\";\n instruments[4] = \"triangle\";\n instruments[5] = \"xylophone\";\n\n String[] instrumentsNew = new String[6];\n\n String[] vowels = new String[5];\n vowels[0] = \"a\";\n vowels[1] = \"e\";\n vowels[2] = \"i\";\n vowels[3] = \"o\";\n vowels[4] = \"u\";\n\n String temp = \"\";\n String temporary = \"\";\n boolean status = true;\n\n for (int i = 0; i <= instruments.length-1; i++) {\n temp = instruments[i];\n for (int j = 0; j <= (temp.length()-1); j++) {\n status = true;\n for (int k = 0; k <= (vowels.length-1); k++) {\n if (temp.charAt(j) == vowels[k].charAt(0)) {\n status = false;\n }\n }\n if (status) {\n temporary += temp.charAt(j);\n }\n }\n instruments[i] = temporary;\n temporary = \"\";\n }\n System.out.println(Arrays.toString(instruments));\n }",
"private static String removeChars(String input, String rmv){\n\t\t// in case checked with question asker the char possibility is ASCII\n\t\tboolean[] flags=new boolean[128];\n\t\t// using Arrays.fill to set all flase\n\t\tArrays.fill(flags, false);\n\t\t\n\t\tfor(int i=0;i<rmv.length();i++){\n\t\tflags[(int)rmv.charAt(i)]=true;\t\n\t\t}\n\t\t\n\t\t\n\t\t// here is another trick,\n\t\t// instead of arbitrially loop the array\n\t\t// use self-incremental end pointer\n\t\tint src=0,dst=0;\n\t\tint len=input.length(); \n\t\tchar[] s=input.toCharArray();\n\t\t//save the origional length now, as input array will be updated later, the length maybe changed.\n\t\twhile(src<len){\n\t\t\tif(!flags[(int)s[src]]){\n\t\t\t\ts[dst++]=s[src];\n\t\t\t}\n\t\t\tsrc++;\n\t\t}\n\t\treturn new String(s,0,dst);\n\t}",
"public static String removeSpecialCharacters(String string) {\n return Normalizer.normalize(string, Normalizer.Form.NFD).replaceAll(\"[^\\\\p{ASCII}]\", \"\");\n }",
"public static String removeJunk(String str){\n StringBuilder strnew = new StringBuilder(str);\n for(int i=0;i<strnew.length();i++){\n if(!Character.isLetter(strnew.charAt(i)))\n strnew.delete(i, i+1);\n }\n return strnew.toString();\n }",
"private String replaceUlauts(String str) {\n\t\treturn str.replace(\"ä\", \"ae\").replace(\"ö\", \"oe\").replace(\"ü\", \"ue\").replace(\"ß\", \"ss\").replace(\"Ä\", \"Ae\").replace(\"Ö\", \"Oe\").replace(\"Ü\", \"Ue\");\n\t}",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString name = sc.nextLine();\n\t\tString withoutVo = \"\";\n\t\t\n\t\tfor(int i=0; i<name.length(); i++) {\n\t\t\n\t\tint count = 0; \n\t\t\t\n\t\tif(name.substring(i, i+1).contentEquals(\"A\")) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\tif(name.substring(i, i+1).contentEquals(\"E\")) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\tif(name.substring(i, i+1).contentEquals(\"I\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"O\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"U\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"a\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"e\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"i\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"o\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(name.substring(i, i+1).contentEquals(\"u\")) {\n\t\t\tcount++;\n\t\t}\n\t\tif(count==0) {\n\t\t\twithoutVo = withoutVo+name.substring(i, i+1);\n\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(withoutVo);\n\n\t}",
"public static String clean(String string) {\n\t\tif(!Character.isLetter(string.charAt(string.length() - 1))){\n\t\t\tString str = \"\";\n\t\t\tfor(int i = 0; i < string.length() - 1; i++){\n\t\t\t\tstr += string.charAt(i);\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t\treturn string;\n\t}",
"public static int countVowels( String w ) \n {\n int total = 0;\n int origLength = w.length();\n for (int i = 0; i < origLength; i++){\n if (isAVowel(w.substring(i,i+1))){\n total += 1;\n }\n }\n return total;\n }",
"public static String removeCharacter(char c, String s) {\n if(s==null) return s;\n StringBuffer ret = new StringBuffer();\n \n for(int i = 0; i < s.length(); ++i) {\n if(s.charAt(i) != c) {\n ret.append(s.charAt(i));\n }\n }\n return ret.toString();\n }",
"String filter(String v);",
"public static String RemoveCharacters(String sentence){\n\t\tString keyCharacters[] = {\"<\",\">\",\"SERVICE\",\"{\",\"}\",\"(\",\")\",\"-\"};\n\t\tString resturnString = sentence;\n\t\tfor(int i=0;i<keyCharacters.length;i++) {\n\t\t\tresturnString = resturnString.replace(keyCharacters[i],\"\");\n\t\t}\n\t\t\n\t\treturn resturnString;\n\t}",
"private static boolean isvowel(char i) {\n\t\tif(i=='a' || i=='e' || i=='i' || i=='o' || i=='u' || i=='A' || i=='E' || i=='I' || i=='O' || i=='U')\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public static String firstVowel(String w){\n if (hasAVowel(w)) {\n return allVowels(w).substring(0,1); }//looks for the first vowel in the string of all vowels only if the string has vowels\n else {\n return \"\"; } //nothing if the string has no vowels\n }",
"public String replaceAndRemove(char[] s) {\n\n //First we remove 'b' and count a\n int countA = 0;\n int len =0;\n for (int i=0; i <= s.length-1 && s[i] != '\\u0000'; i++) {\n if (s[i] == 'a' || s[i] == 'A')\n countA++;\n\n if (s[i] == 'b' || s[i] == 'B') {\n int j =i;\n while (s[j] != '\\u0000') {\n s[j] = s[j+1];\n j++;\n }\n i--;\n len--;\n }\n len++;\n }\n\n //Now we replace 'a' with 'dd'\n for (int i= len-1; i>= 0; i--) {\n if (s[i] == 'a' || s[i] == 'A') {\n s[i+countA-1] = 'd';\n s[i+countA] = 'd';\n countA--;\n } else {\n s[i+countA] = s[i];\n }\n }\n\n return new String(s).trim();\n }",
"public static String stripAccents(String s) \n{\n s = Normalizer.normalize(s, Normalizer.Form.NFD);\n s = s.replaceAll(\"[\\\\p{InCombiningDiacriticalMarks}]\", \"\");\n s= s.replace('\\'', '\\u0020');\n s= s.replace('\\\"', '\\u0020');\n s= s.replace('’', '\\u0020');\n s= s.replace('-', '\\u0020');\n s= s.replace('«', '\\u0020');\n s= s.replace('»', '\\u0020');\n return s;\n}",
"public static void main(String[] args) {\n String word;\n Scanner in = new Scanner(System.in);\n int count = 0;\n\n System.out.println(\"Enter the string\");\n word = in.nextLine().toLowerCase().replaceAll(\"[^a-z]\", \"\");\n\n for (int i = 0;i<word.length();i++)\n {\n if (word.charAt(i)=='a'||word.charAt(i)=='e'||word.charAt(i)=='i'\n ||word.charAt(i)=='o'||word.charAt(i)=='u'||word.charAt(i)=='y')\n {\n count++;\n System.out.println(word.charAt(i));\n }\n }\n System.out.println(\"The number of vowels is: \"+count);\n\n }",
"public static String cleanString(String str) {\n if (str != null) {\n str = str.replaceAll(\"é\", \"é\");\n str = str.replaceAll(\"ê\", \"ê\");\n str = str.replaceAll(\"è\", \"è\");\n str = str.replaceAll(\"\\\"\", \"'\");\n str = str.replaceAll(\"°\", \"°\");\n str = str.replaceAll(\"ï\", \"ï\");\n str = str.replaceAll(\"ô\", \"ô\");\n str = str.replaceAll(\"à§\", \"ç\");\n str = str.replaceAll(\"Ã\", \"à\");\n str = str.replaceAll(\"Â\", \"\");\n }\n return str;\n }",
"private String StringFilter(String str) {\n String regEx = \"[` !@#$%^&*()+=|《{}':;',//[//]. ̄<o╥﹏╥o>/?!@#¥%……&*~~。∀。》()・゜・ノД・゜・∠ ͡° ͜ʖ ͡° ᐛ 」∠_——+|{}【】σ°∀°σ‘⊙▽⊙;≧∇≦ヾ〃∇ノヽ´∀`ノ:ω”“’。,、ヽ●´∀●ノ?ヾ´∀`ノ[\\\\s][0-9][\\\\uD83E\\uDD70\\\\uD83E\\uDD2A\\\\uD83E\\uDD23\\\\uD83E\\uDD22\\\\uD83E\\uDD2E\\\\uD83E\\uDDD0\\\\uD83E\\uDD11\\\\uD83E\\uDD2A\\\\uD83E\\uDD23\\\\uD83E\\uDD2A\\\\uD83E\\uDD74\\\\ud83c\\\\udc00-\\\\ud83c\\\\udfff]|[\\\\ud83d\\\\udc00-\\\\ud83d\\\\udfff]|[\\\\u2600-\\\\u27ff]]\";\n Pattern pattern = Pattern.compile(regEx);\n Matcher matcher = pattern.matcher(str);\n String trim = matcher.replaceAll(\"\").trim();\n return trim;\n }",
"public static String removeNonWord(String message)\r\n {\r\n int start = getLetterIndex(message, head); //get the fist index that contain English letter\r\n int end = getLetterIndex(message, tail); //get the last index that contain English letter\r\n if (start == end) // if only contain one letter\r\n return String.valueOf(message.charAt(start)); // return the letter\r\n return message.substring(start, end + 1); // return the content that contain English letter\r\n }",
"private static String RemoveSpecialCharacter (String s1) {\n String tempResult=\"\";\n for (int i=0;i<s1.length();i++) {\n if (s1.charAt(i)>64 && s1.charAt(i)<=122){\n tempResult=tempResult+s1.charAt(i);\n }\n }\n return tempResult;\n }",
"public static String firstVowel( String w )\r\n {String vowels = allVowels(w); //extracting all vowels from w\r\n\tif (vowels.length() != 0) { //if there are vowels in w...\r\n\t return vowels.substring(0,1); //return the first vowel\r\n\t}//end if\r\n\treturn \"\"; //if there are no vowels in w\r\n }",
"public String stripNonLettersOrNumbers(String in) {\n if (in != null) {\n return in.replaceAll(\"[^\\\\p{L}\\\\p{N}]\", \"\");\n } else {\n return null;\n }\n }",
"private String removeOutsides(String in){\n\t\t\n\t\tStringBuilder str = new StringBuilder();\n\t\tint firstQuote = in.indexOf(\"\\\"\");\n\t\tint secondQuote = in.indexOf(\"\\\"\", firstQuote + 1);\n\t\tfor(int i = firstQuote + 1; i < secondQuote; i++){\n\t\t\tstr.append(in.charAt(i));\n\t\t}\n\n\t\treturn str.toString();\n\t}",
"public boolean isVowel(Character c){\n\t String strvowel = \"aeiouAEIOU\";\n\t \n\t if(strvowel.indexOf(c)!=-1){\n\t return true;\n\t }\n\t \n\t return false; \n\t }",
"public String cleanTheString(String input) {\n String result = \"\";\n if (input != null && !input.isEmpty()) {\n\n for (int k = 0; k < input.length(); k++) {\n if (!(input.charAt(k) == '0'\n || // unallowed characters\n input.charAt(k) == '1' || input.charAt(k) == '2' || input.charAt(k) == '3'\n || input.charAt(k) == '4' || input.charAt(k) == '5' || input.charAt(k) == '6'\n || input.charAt(k) == '7' || input.charAt(k) == '8' || input.charAt(k) == '9'\n || input.charAt(k) == 'A' || input.charAt(k) == 'B' || input.charAt(k) == 'C'\n || input.charAt(k) == 'D' || input.charAt(k) == 'E' || input.charAt(k) == 'F')) {\n } else\n result = result + Character.toString(input.charAt(k));\n\n }\n\n }\n\n return result;\n }",
"private static String alterString(String string) {\n\t\t/*\n\t\t * creating the character array by converting string to charArry()\n\t\t */\n\t\t char name[]=string.toCharArray();\n\t\t /*\n\t\t * creating character array for storing elements\n\t\t */\n\t\t\t char arr[]=new char[name.length];\n\t\t\t \n\t\t\t /*\n\t\t\t * Creating character array for alphabets\n\t\t\t */\n\t\t\t char alphabets[]= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\n\t\t\t \n\t\t\t for(int i=0;i<name.length;i++) {\n\t\t\t\t /*\n\t\t\t\t * if vowels are present add it to storing array\n\t\t\t\t */\n\t\t\t\t if(name[i]=='a' || name[i]=='e' || name[i]=='i' || name[i]=='o' || name[i]=='u') {\n\t\t\t\t\t arr[i]=name[i];\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t for(int j=0;j<alphabets.length;j++) {\n\t\t\t\t\t\t /*\n\t\t\t\t\t\t * after looping through alphabet array if the element consonant is found replace it next element in alphabet array \n\t\t\t\t\t\t */\n\t\t\t\t\t\t if(name[i]==alphabets[j]) {\n\t\t\t\t\t\t\t arr[i]=alphabets[j+1];\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\t /*\n\t\t\t * converting character array to string;\n\t\t\t */\n\t\t\t String string1=new String(arr); \n\t\t\t /*\n\t\t\t * returning the string\n\t\t\t */\n\t\t\treturn string1;\n\t}",
"public String removeA(String string) {\n\t\tString result=\"\";\n\t\tint length=string.length();\n\t\tif(length==1)\n\t\t{\n\t\t\tif(string.charAt(0)!='A')\n\t\t\t\tresult=string;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar firstchar=string.charAt(0);\n\t\t char secondchar=string.charAt(1);\n\t\t if(string.contains(\"A\") && (firstchar=='A' || secondchar=='A'))\n\t\t\t{\n\t\t\t\tString rest_of_string=string.substring(2, length);\n\t\t\t\tif(firstchar=='A' && secondchar=='A')\n\t\t\t\t{\n\t\t\t\t\tresult=rest_of_string;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif(firstchar=='A')\n\t\t\t\t\t{\n\t\t\t\t\t\tresult=secondchar+rest_of_string;\n\t\t\t\t\t}\n\t\t\t\t\telse if(secondchar=='A')\n\t\t\t\t\t{\n\t\t\t\t\t\tresult=firstchar+rest_of_string;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tresult=string;\n\t\t}\n\t\treturn result;\n\t}",
"public static String negation(String s) {\r\n \tif(s.charAt(0) == '~') s = s.substring(1);\r\n\t\telse s = \"~\"+ s;\r\n \treturn s;\r\n }",
"public static void main(String[] args) {\n\n\t\tString input=\"hello world!\";\n\t\tString remove=\"eod\";\n\t\tSystem.out.println(\" === after remove ====:\"+removeChars(input, remove));\n\t\t// output is : === after remove ====:hll wrl!\n\t}",
"private String removeSpecialCharacters(String word)\n\t{\n\t\tString newString = \"\";\n\n\t\tfor (int i = 0; i < word.length(); i++)\n\t\t{\n\t\t\tif (word.charAt(i) != '?' && word.charAt(i) != '!' && word.charAt(i) != '\"' && word.charAt(i) != '\\''\n\t\t\t\t\t&& word.charAt(i) != '#' && word.charAt(i) != '(' && word.charAt(i) != ')' && word.charAt(i) != '$'\n\t\t\t\t\t&& word.charAt(i) != '%' && word.charAt(i) != ',' && word.charAt(i) != '&')\n\t\t\t{\n\t\t\t\tnewString += word.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn newString;\n\t}",
"public static String removeDiacritic(String input) {\n input = input.replaceAll(\"\\u0650\", \"\");\n input = input.replaceAll(\"\\u0651\", \"\");\n input = input.replaceAll(\"\\u0652\", \"\");\n input = input.replaceAll(\"\\u064E\", \"\");\n input = input.replaceAll(\"\\u064F\", \"\");\n input = input.replaceAll(\"\\u064D\", \"\");\n input = input.replaceAll(\"\\u064B\", \"\");\n return input;\n }",
"public static String RemoveDublicates(String str) {\n String result = \"\"; //storing result of the loop\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if (!result.contains(\"\" + ch)) { // this is char so we need convert comcating to empty string\n result += ch;\n }\n\n }\n return result;\n }",
"private String fjernSkilleTegn (String inputString) {\n\t\t\tfor (int i = 0; i < skilleTegn.length; i++) {\n\t\t\t\tinputString = inputString.replace(Character.toString(skilleTegn[i]), \"\");\n\t\t\t}\n\t\t\treturn inputString;\n\t}",
"public static void removeCharacter(String username)\r\n\t{\r\n\t\tcharacters.remove(username);\r\n\t}",
"public static String removeChar(String str, char ch) {\n int length = str.length();\n String newString = \"\";\n for (int i = 0; i < length; i++) {\n char current = str.charAt(i);\n if (current != ch) {\n newString += current;\n }\n }\n return newString;\n }",
"public static String removeSpecialCharacters(String text) {\r\n\t\tif (null == text) {\r\n\t\t\treturn text;\r\n\t\t}\r\n\t\tPattern pattern = Pattern.compile(\"[^A-Z a-z0-9]\");\r\n\t\tMatcher matcher = pattern.matcher(text);\r\n\t\ttext = matcher.replaceAll(\"\");\r\n\t\treturn text;\r\n\t}",
"public void unescapedCharacters(char[] chars, int start, int length);",
"public static void main(String[] args) {\n\t\tString s=\"abcdef\";\n\t\tStringBuilder sb=new StringBuilder(s);\n\t\tfor(int i=0,j=s.length()-1;i<j;)\n\t\t{\n\t\t\tif(!isvowel(sb.charAt(i))) \n\t\t\t\t{\t\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\tif(!isvowel(sb.charAt(j)))\n\t\t\t\t{\n\t\t\t\tj--;\n\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\tchar c=sb.charAt(i);\n\t\t\t\tsb.replace(i,i+1, sb.charAt(j)+\"\");\n\t\t\t\tsb.replace(j,j+1,c+\"\");\t\n\t\t\t\ti++;\n\t\t\t\tj--;\n\t\t\t\n\t\t\n\t\t}\n\t\tSystem.out.println(sb);\n\t}",
"private boolean isVowel(char ch) {\r\n ch = Character.toLowerCase(ch);\r\n return (ch == 'a') || (ch == 'e') || (ch == 'i') || (ch == 'o') || (ch == 'u');\r\n }",
"public String removeStringIterator(String oldS, Character ch) {\n\t\tif (oldS == null) {\n\t\t\treturn oldS;\n\t\t}\n\n StringBuilder sb = new StringBuilder();\n char[] oldArray = oldS.toCharArray();\n for(int i = 0; i < oldArray.length; i++){\n if(oldArray[i] == ch.charValue()){\n\n } else {\n sb.append(oldArray[i]);\n }\n }\n return sb.toString();\n\t}",
"private static String removeWord(String string, String word) {\n\t\tif (string.contains(word)) {\n\t\t\tstring = string.replaceAll(word, \"\");\n\t\t}\n\n\t\t// Return the resultant string\n\t\treturn string;\n\t}",
"public static String stripNonValidXMLCharacters(String in) {\n if ((in == null) || in.isEmpty()) {\n return \"\"; // vacancy test.\n }\n StringBuilder out = new StringBuilder(in.length()); // Used to hold the output.\n for (int i = 0; i < in.length(); i++) {\n char current = in.charAt(i); // Used to reference the current character.\n // NOTE: No IndexOutOfBoundsException caught here; it should not happen.\n if ((current == 0x9) ||\n (current == 0xA) ||\n (current == 0xD) ||\n ((current >= 0x20) && (current <= 0xD7FF)) ||\n ((current >= 0xE000) && (current <= 0xFFFD)) ||\n ((current >= 0x10000) && (current <= 0x10FFFF)))\n {\n out.append(current);\n }\n }\n return out.toString();\n }",
"public static int countVowels(String str) {\r\n int count = 0;\r\n final String VOWELS = \"aeiou\";\r\n for (int i = 0; i < str.length(); i++) {\r\n count += VOWELS.contains(Character.toString(str.charAt(i))) ? 1 : 0;\r\n }\r\n return count;\r\n }",
"public static boolean hasAVowel( String w ) \n {\n return countVowels(w) > 0; //if there is more than 1 vowel, the string has a vowel\n }",
"public static String evensOnly( String s ) {\n String s2 = \"\"; //tkaing pieces of the string --> put it into s2 ean empty string\n for (int i = 0; i < s.length(); i++) {\n if ((int)s.charAt(i) % 2 == 0) // putting int infront truns it into the ascii value --> so you can check if its divisible by 2\n s2 = s2 + s.charAt(i); // add it to string\n }\n return s2;\n // return new String( \"HJHJHJ\" );\n }",
"public String stripInput(String input) {\n return input.replaceAll(\"[.#$\\\\[\\\\]]\", \"\").replaceAll(\"/\", \" \");\n }",
"public static String stripNonValidXMLCharacters(String in) {\n\t\tfinal StringBuffer out = new StringBuffer();\n\t\tchar current;\n\t\tif (in == null || (\"\".equals(in)))\n\t\t\treturn \"\";\n\t\tfor (int i = 0; i < in.length(); i++) {\n\t\t\tcurrent = in.charAt(i);\n\t\t\tif (current == 0x0)\n\t\t\t\tSystem.err.println(\"WARNING: FOUND 0x0 char on index \" + i);\n\t\t\t// eliminiamo in particolare 0x0\n\t\t\tif ((current == 0x9) || (current == 0xA) || (current == 0xD) || ((current >= 0x20) && (current <= 0xD7FF)) || ((current >= 0xE000) && (current <= 0xFFFD)) || ((current >= 0x10000) && (current <= 0x10FFFF)))\n\t\t\t\tout.append(current);\n\t\t}\n\t\treturn out.toString();\n\t}",
"public static boolean isAVowel( String letter ) \r\n { return VOWELS.indexOf(letter) != -1;\r\n }",
"private static String removeSoftHyphens(String in) {\n String result = in.replaceAll(\"\\u00AD\", \"\");\n return result.length() == 0 ? \"-\" : result;\n }",
"public static int countVowels( String w ) \r\n { int count = 0;\r\n\tfor (int x = 0; x < w.length(); x +=1) {\r\n\t if (isAVowel(w.substring(x,x+1))) {//if that letter is a vowel...\r\n\t\tcount += 1;//add one to the count\r\n\t } //end if\r\n\t}//end for\r\n\treturn count;\r\n }",
"public static void main(String[] args) {\n\n \tString str = \"123abc你好efc\";\n\n \tString reg = \"[\\u4e00-\\u9fa5]\";\n\n \tPattern pat = Pattern.compile(reg); \n\n \tMatcher mat=pat.matcher(str); \n\n \tString repickStr = mat.replaceAll(\"\");\n\n \tSystem.out.println(\"去中文后:\"+repickStr);\n\n}",
"public static String removeEscapeChar(String string)\t{\n\t\tint lastIndex = 0;\n\t\twhile (string.contains(\"&#\"))\n\t\t{\n\t\t\t//Get the escape character index\n\t\t\tint startIndex = string.indexOf(\"&#\", lastIndex);\n\t\t\tint endIndex = string.indexOf(\";\", startIndex);\n\n\t\t\t//and rip the sucker out of the string\n\t\t\tString escapeChar = string.substring(startIndex, endIndex);\n\n\t\t\t//Get the unicode representation and replace all occurrences in the string\n\t\t\tString replacementChar = convertEscapeChar(escapeChar);\n\t\t\tstring = string.replaceAll(escapeChar + \";\", replacementChar);\t\t\t\n\t\t\tlastIndex = endIndex;\n\t\t}\n\t\treturn string;\n\t}",
"public static String stringYak(String str) {\n return str.replaceAll(\"yak\", \"\");\n }",
"private boolean isVowels(char c) {\n\t\tc = Character.toLowerCase(c);\n\n\t\tif (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}",
"public static boolean isAVowel( String letter ) \n {\n return hasA(VOWELS, letter); //is the letter in string VOWELS?\n }",
"public static String removeSpecialChars(String text, String byString) {\r\n\t\tfinal String[] chars = new String[] { \",\", \".\", \"/\", \"!\", \"@\", \"#\",\r\n\t\t\t\t\"$\", \"%\", \"^\", \"&\", \"*\", \"'\", \"\\\"\", \";\", \"-\", \"_\", \"(\", \")\",\r\n\t\t\t\t\":\", \"|\", \"[\", \"]\", \"~\", \"+\", \"{\", \"}\", \"?\", \"\\\\\", \"<\", \">\" };\r\n\t\tif (StringUtil.isNullOrEmpty(text))\r\n\t\t\treturn text;\r\n\r\n\t\tfor (int i = 0; i < chars.length; i++) {\r\n\t\t\tif (text.indexOf(chars[i]) >= 0) {\r\n\t\t\t\ttext = text.replace(chars[i], byString);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"public static String deleteAny(String inString, String charsToDelete) {\n\t\tif (!hasLength(inString) || !hasLength(charsToDelete)) {\n\t\t\treturn inString;\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < inString.length(); i++) {\n\t\t\tchar c = inString.charAt(i);\n\t\t\tif (charsToDelete.indexOf(c) == -1) {\n\t\t\t\tsb.append(c);\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static void main(String[] args) {\n\n Scanner vowelconsonent =new Scanner(System.in);\n char ch;\n System.out.print(\"Enter your word = \");\n\n ch = vowelconsonent.next().charAt(0);\n\n\n if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'){\n\n System.out.print(\"vowel \"+ch);\n\n }else {\n\n System.out.print(\"consonent \");\n\n }\n\n }",
"public static String stripColors(String str) {\n\t\tstr = str.replaceAll(\"(?i)\\u00A7[0-F]\", \"\");\n\t\tstr = str.replaceAll(\"(?i)&[0-F]\", \"\");\n\t\treturn str;\n\t}",
"public static String getRandomVowel()\n\t{\n\t\tint randNum = getRandomBetween(1,4);\n\n\t\tswitch(randNum)\n\t\t{\n\t\tcase 1:\n\t\t\treturn \"a\";\n\t\tcase 2:\n\t\t\treturn \"e\";\n\t\tcase 3:\n\t\t\treturn \"i\";\n\t\tcase 4:\n\t\t\treturn \"o\";\n\t\t}\n\n\t\treturn \"u\";\n\t}",
"public static boolean isVog(String s){\n boolean flag = true;\n int i = 0;\n while(flag && i < s.length()){\n flag = (s.charAt(i) == 'a' || s.charAt(i) == 'A' ||\n s.charAt(i) == 'e' || s.charAt(i) == 'E' ||\n s.charAt(i) == 'i' || s.charAt(i) == 'I' ||\n s.charAt(i) == 'o' || s.charAt(i) == 'O' ||\n s.charAt(i) == 'u' || s.charAt(i) == 'U' );\n i++;\n }\n return flag;\n }",
"private static String removegivenChar(String str,int pos) {\n\t\treturn str.substring(0,pos) + str.substring(pos+1);\r\n\t}",
"private static void addVowels(ArrayList<Character> vowels) {\n vowels.add('a');\n vowels.add('e');\n vowels.add('i');\n vowels.add('o');\n vowels.add('u');\n }",
"public static String convertNonAscii(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint n = s.length();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (i > n-6) {\r\n\t\t\t\tsb.append(s.charAt(i));\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tString c = s.substring(i, i+6);\r\n\t\t\tint pos;\r\n\t\t\tfor (pos = 0; pos < UNICODE_STRING.length && !UNICODE_STRING[pos].equals(c); pos++) ;\r\n\t\t\tif (pos < UNICODE_STRING.length) {\r\n\t\t\t\tsb.append(PLAIN_ASCII.charAt(pos));\r\n\t\t\t\ti += 5;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(c.charAt(0));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"void unsetString();",
"public static void main(String[] args) {\n\n String str = \"Angelsa MIilovski\";\n StringBuilder bulid = new StringBuilder(str);\n bulid.deleteCharAt(6); // Shift the positions front.\n bulid.deleteCharAt(6 - 1);\n bulid.deleteCharAt(8 - 1);\n System.out.println(\"Name is : \" + bulid);\n\n// StringBuffer buffer = new StringBuffer(str);\n// buffer.replace(1, 2, \"\"); // Shift the positions front.\n// buffer.replace(7, 8, \"\");\n// buffer.replace(13, 14, \"\");\n// System.out.println(\"Buffer : \"+buffer);\n\n// char[] c = str.toCharArray();\n// String new_Str = \"\";\n// for (int i = 0; i < c.length; i++) {\n// if (!(i == 1 || i == 8 || i == 15))\n// new_Str += c[i];\n// }\n// System.out.println(\"Char Array : \"+new_Str);\n\n// public String removeChar(String str, Integer n) {\n// String front = str.substring(0, n);\n// String back = str.substring(n+1, str.length());\n// return front + back;\n// }\n\n// String str = \"Angel%Milovski\";\n// str = str.replaceFirst(String.valueOf(str.charAt(5)), \" \");//'l' will replace with \"\"\n// System.out.println(str);//output: wecome\n\n }",
"public static String uniqueChars(String str) {\n String result = \"\";\n char[] ch = str.toCharArray();\n\n for (int i = 0; i < ch.length; i++) {\n if(!result.contains(\"\" + ch[i])){\n result+=\"\" + ch[i];\n }\n\n }\n\n return result;\n }",
"public String deAccent(String str) {\n String nfdNormalizedString = Normalizer.normalize(str, Normalizer.Form.NFD);\n Pattern pattern = Pattern.compile(\"\\\\p{InCombiningDiacriticalMarks}+\");\n return pattern.matcher(nfdNormalizedString).replaceAll(\"\");\n }"
] | [
"0.8379044",
"0.80741936",
"0.7956655",
"0.77395517",
"0.7446967",
"0.7221017",
"0.6866431",
"0.6782844",
"0.6585739",
"0.6405735",
"0.6266561",
"0.6236518",
"0.6213967",
"0.6196024",
"0.61497015",
"0.6077296",
"0.60734046",
"0.60471976",
"0.603691",
"0.5993229",
"0.5978476",
"0.58584595",
"0.58394516",
"0.5829947",
"0.58275187",
"0.5823278",
"0.58083075",
"0.57804865",
"0.5708262",
"0.5673621",
"0.5672318",
"0.56673676",
"0.5618396",
"0.55648786",
"0.5559837",
"0.5559837",
"0.5559837",
"0.5552706",
"0.5549119",
"0.55359775",
"0.5535573",
"0.5529",
"0.5521404",
"0.5511504",
"0.5511395",
"0.551025",
"0.55093026",
"0.55011076",
"0.5497798",
"0.54440373",
"0.54381365",
"0.54349995",
"0.5404614",
"0.5404162",
"0.54008657",
"0.5399697",
"0.5382756",
"0.53806055",
"0.5374165",
"0.5369015",
"0.53668123",
"0.5362321",
"0.53168684",
"0.53137",
"0.5313096",
"0.52893955",
"0.5287406",
"0.5286062",
"0.52804047",
"0.527467",
"0.52705276",
"0.52641374",
"0.5262266",
"0.5261247",
"0.52588934",
"0.5254878",
"0.5236541",
"0.5232971",
"0.5219931",
"0.5218987",
"0.5191604",
"0.51787895",
"0.51731366",
"0.5164017",
"0.5163863",
"0.5159892",
"0.51557475",
"0.5153124",
"0.5135593",
"0.5118876",
"0.50860053",
"0.50851256",
"0.50687796",
"0.50668466",
"0.5065252",
"0.50624675",
"0.5060319",
"0.5054016",
"0.50532025",
"0.50524586"
] | 0.8294034 | 1 |
constructs a new empty synchronized tree set. | public SyncedTreeSet() {
_treeSet = new TreeSet<T>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MyTreeSet()\r\n {\r\n root = null;\r\n }",
"static Set createEmpty() {\n return new EmptySet();\n }",
"public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}",
"private EmptySet() {}",
"public MyHashSet() {\n nodes = new Node[Max_Size];\n }",
"public EfficientTerminalSet empty() {\n return new EfficientTerminalSet(terminals, indices, new int[data.length]);\n }",
"public HeapSet () {\r\n\t\tsuper ();\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tTrieSet() {\n children = (Set<String>[]) new Set[26];\n terminal = false;\n }",
"private EmptySortedSet() {\n }",
"public Hashtree<V> build() {\n return new UnmodifiableMerkleTree<>(tree);\n }",
"public MyTrieSet() {\n root = new Node ('i', false, 256);\n }",
"public void makeEmpty( )\r\n\t{\r\n\t\troot = null;\r\n\t}",
"private Set() {\n this(\"<Set>\", null, null);\n }",
"@SuppressWarnings(\"unchecked\")\n \tpublic static <T> Set<T> createConcurrentHashSet() {\n \t\treturn (Set<T>) Collections.synchronizedSet(CollectionFactory.createHashSet());\n \t}",
"public Set() {\n\t\tlist = new LinkedList<Object>();\n\t}",
"public static <T extends Comparable> Set<T> CreateSortedSet() {\n return new TreeSet<>();\n }",
"public void makeEmpty()\n {\n root = nil;\n }",
"public void makeEmpty() {\r\n\t\troot = null;\r\n\t}",
"public HashMultiSet() {\n\t\thMap = new HashMap<T, Integer>();\n\t\tsize = 0;\n\t}",
"public void makeEmpty() {\n\t\troot = null;\n\t}",
"protected Object newInitialFlow() {\n\t\treturn emptySet.clone();\n\t}",
"public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }",
"public void makeEmpty() {\n root = null;\n }",
"ClusterSet() {\n }",
"public TreeBuilder() {\n\t\troot = null;\n\t}",
"Set createSet();",
"public void clear()\r\n\t{\r\n\t\tdata = new IterativeBinarySearchTree<Entry>();\r\n\t}",
"public HashMultiSet() {\r\n\t\tbaseMap = new HashMap<>();\r\n\t}",
"public OpenHashSet() {\n this(DEFAULT_HIGHER_CAPACITY, DEFAULT_LOWER_CAPACITY);\n }",
"static IntSet empty() {\n if (emptySet == null) {\n emptySet = new EmptySet();\n }\n return emptySet;\n }",
"public ListSet() {\n lists = new TernarySearchTree<>();\n }",
"BinarySearchTree() {\n this.root = null;\n }",
"public Tree(){\n root = null;\n }",
"public SortedSet() {\n\n }",
"public SegmentTree() {}",
"public BSearchTree() {\n\t\tthis.overallRoot = null;\n\t}",
"public LinkedHashSet() {\n this(10);\n }",
"@SuppressWarnings(\"unchecked\") // Nested sets are immutable, so a downcast is fine.\n <E> NestedSet<E> emptySet() {\n return (NestedSet<E>) emptySet;\n }",
"public ArraySet() {\n\t\tthis(DEFAULT_CAPACITY);\n\t}",
"private BinaryTree() {\n root = new Node(0);\n }",
"public KdTree() {\n root = null;\n }",
"protected Set() {\n size = 0;\n set = new int[TEN];\n }",
"public KdTree() {\n size = 0;\n }",
"public ClosedHashSet(){\r\n super();\r\n buildHashSet(capacity(), hashSet);\r\n }",
"public JdbTree() {\r\n this(new Object [] {});\r\n }",
"public MyHashSet() {\n s = new ArrayList<>();\n }",
"public static FeatureSet empty() {\n return new FeatureSet(ImmutableSet.of(), ImmutableSet.of());\n }",
"private HPTNode<K, V> buildRoot() {\n HPTNode<K, V> node = new HPTNode<K, V>(keyIdSequence++, null);\n node.children = reallocate(ROOT_CAPACITY);\n return node;\n }",
"public Tree() // constructor\n\t{ root = null; }",
"public Tree() {\n // constructor. no nodes in tree yet\n root = null;\n }",
"public static <T> HashSet<T> createHashSet() {\n \t\treturn new HashSet<T>();\n \t}",
"public DisjointSet() {}",
"public Universe() {\n\t\tset = new HashSet<T>();\n\t}",
"public ParallelMinimalSeparatorsEnumerator()\n {\n super();\n Q = new ConcurrentQueueSet<>();\n P = ConcurrentHashMap.newKeySet();\n componentsCache = ConcurrentHashMap.newKeySet();\n }",
"public void makeEmpty(){\n for(int element = set.length - 1; element >= 0; element--){\n remove(set[element]);\n }\n }",
"public BSTMap() {\n clear();\n }",
"public KdTree()\n {\n root = null;\n size = 0;\n }",
"public KdTree() {\n root = null;\n n = 0;\n }",
"public TreeDictionary() {\n\t\tfor (int i = 0; i < nodes.length; i++) {\n\t\t\tnodes[i] = null;\n\t\t}\n\t}",
"public PointSET() {\n pointSet = new TreeSet<>();\n }",
"public EmptyBinarySearchTree()\n {\n\n }",
"public BinaryTree() {\r\n\t\troot = null;\r\n\t\tcount = 0;\r\n\t}",
"public Builder clearTreeNodeIdNull() {\n \n treeNodeIdNull_ = false;\n onChanged();\n return this;\n }",
"public BinaryTree() {\n root = null;\n }",
"public BinaryTree() {\n root = null;\n }",
"public MutableNodeSet(Graph graph) {\n\t\tsuper(graph);\n\t\tthis.members = new TreeSet<Integer>();\n\t\tinitializeInOutWeights();\n\t}",
"public void makeEmpty() {\r\n\t\troot = null;\r\n\t\tleftChild = null;\r\n\t\trightChild= null;\r\n\t}",
"public NodeSet freeze() {\n\t\tNodeSet result = new NodeSet(this.graph);\n\t\tresult.members = this.members;\n\t\tresult.totalInternalEdgeWeight = this.totalInternalEdgeWeight;\n\t\tresult.totalBoundaryEdgeWeight = this.totalBoundaryEdgeWeight;\n\t\treturn result;\n\t}",
"public static java.util.Set synchronizedSet(java.util.Set arg0)\n { return null; }",
"public KdTree() {\n this.root = null;\n this.size = 0;\n }",
"public BinarySearchTree() {\n root = null;\n size = 0;\n }",
"public BinaryTree() {\n count = 0;\n root = null;\n }",
"public RBTree() {\r\n\t\troot = null;\r\n\t}",
"public BendExplicitGraphSynchroniser build() {\n return new BendExplicitGraphSynchroniser(graph, nodeAttributesToPreserve, edgeAttributesToPreserve);\n }",
"public MyHashSet() {\n \n }",
"private BinaryTree<Character> constructTree(){\n if(pq.size() == 1) return pq.poll().data;\n if(pq.size() == 0) return null;\n // Poll the lowest two trees, combine them, then stick them back in the queue.\n Helper<BinaryTree<Character>> temp0 = pq.poll(), temp1 = pq.poll(),\n result = new Helper<>(temp0.priority + temp1.priority, new BinaryTree<>(temp0.data, null , temp1.data));\n pq.add(result);\n // Call again to keep constructing.\n return constructTree();\n }",
"public IntTree() {\n overallRoot = null;\n }",
"public PointSET() { // construct an empty set of points\n\n }",
"public RandomizedSet() {\r\n set = new HashSet<>();\r\n }",
"public TrieTree()\n {\n prefixes = 0;\n children = new TreeMap<>();\n childrenAdded = new ArrayList<>();\n }",
"public Trie() {\n root = new TreeNode();\n }",
"private void createNullSet()\n\t{\n\t\tm_values = null;\n\t}",
"private DisjointSet() {\n throw new UnsupportedOperationException(\"Creating an empty Disjoint Set\");\n }",
"public RBTree() {\r\n\t\t// well its supposed just create a new Red Black Tree\r\n\t\t// Maybe create a new one that does a array of Objects\r\n\t}",
"public BSTMap() {\n this.clear();\n }",
"public SearchTreeNode()\n\t{\n\t\tthis.word = \"\";\n\t\tthis.children = new HashSet<>();\n\t}",
"public RandomizedSet() {\n m = new HashMap<>();\n l = new ArrayList<>();\n }",
"public MySet(int size) {\n table = (HashNode<E>[]) new HashNode[size];\n }",
"protected SafeHashMap.KeySet instantiateKeySet()\n {\n return new KeySet();\n }",
"public Set(){\n setSet(new int[0]);\n }",
"@Test\r\n public void clearEmpty() throws Exception {\r\n TreeSet<String> check = new TreeSet<>();\r\n check.clear();\r\n assertTrue(check.isEmpty());\r\n }",
"public AgileSet() {\n currentSize = 0.0;\n }",
"public Node() {\n neighbors = new ArrayList<>();\n sizeOfSubtree = 0;\n containedPaths = new long[k];\n startingPaths = new long[k];\n }",
"public IdentificationSet() {\n map = new HashMap<>();\n init();\n }",
"public BinaryTree(){\r\n root = null;\r\n }",
"public BalancedBinarySearchTree() {\r\n\t\tRoot = null;\r\n\t}",
"protected Object entryInitialFlow() {\n\t\treturn emptySet.clone();\n\t}",
"public LeftistHeap() {\n root = null;\n }",
"public GenericSetTreeNode(V value) {\n\t\tthis(null, value);\n\t}",
"public RandomizedSet() {\r\n\t\tbucket = new BucketItem[BUCKET_SIZE];\r\n\t}"
] | [
"0.7334543",
"0.6905726",
"0.6827768",
"0.65998894",
"0.6466445",
"0.63996845",
"0.6395462",
"0.63578725",
"0.63373184",
"0.6334629",
"0.626134",
"0.6194802",
"0.615699",
"0.61518866",
"0.61276984",
"0.61176157",
"0.6113891",
"0.6104145",
"0.61015934",
"0.6098345",
"0.6080008",
"0.60754657",
"0.6063293",
"0.5971271",
"0.5965023",
"0.5960354",
"0.59486526",
"0.59323967",
"0.5912814",
"0.5911051",
"0.58991855",
"0.5868104",
"0.5859126",
"0.5846513",
"0.58462214",
"0.584493",
"0.5827528",
"0.5823745",
"0.581254",
"0.5808712",
"0.58068854",
"0.5796935",
"0.5796262",
"0.5795404",
"0.5789641",
"0.5760796",
"0.5753282",
"0.575161",
"0.57373613",
"0.57213557",
"0.57020485",
"0.56974053",
"0.5692502",
"0.56743187",
"0.5672529",
"0.5667216",
"0.56658375",
"0.5656877",
"0.56508106",
"0.56464607",
"0.56449974",
"0.56375957",
"0.56356317",
"0.5627006",
"0.5627006",
"0.5625216",
"0.56207263",
"0.5616158",
"0.56142217",
"0.561059",
"0.55991644",
"0.55881304",
"0.558198",
"0.5579241",
"0.555912",
"0.555274",
"0.5551358",
"0.5545373",
"0.5537889",
"0.55368024",
"0.55358464",
"0.55357087",
"0.55356544",
"0.5535303",
"0.55288845",
"0.5523297",
"0.55050564",
"0.54970914",
"0.549336",
"0.5491484",
"0.54904485",
"0.5488642",
"0.5486038",
"0.5485278",
"0.54815036",
"0.54804087",
"0.5479538",
"0.5474735",
"0.5472359",
"0.5470762"
] | 0.7358807 | 0 |
Return a list of current items in the set. | public ArrayList<T> getList() {
synchronized(this) {
return new ArrayList<T>(_treeSet);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Item> getCurrentItems() {\n return currentItems;\n }",
"@Override\n public Set<T> getItems() {\n return items;\n }",
"public List<K> getItems() {\n\t\t\treturn items;\n\t\t}",
"public List<T> items() {\n return items;\n }",
"private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public List<Integer> getBySetPos() {\n\t\treturn bySetPos;\n\t}",
"@Override\n public List<E> allItems() {\n return new ArrayList(graphNodes.keySet());\n }",
"public Set list() {\n Set result = new HashSet();\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result.addAll( catalog.list() );\n }\n return result;\n\n }",
"public List<T> getItems() {\n return SerDes.unmirrorList(getElement().getItems(), getItemClass());\n }",
"public List<Itemset> getListItem() {\n\t\tList<Itemset> list = new ArrayList<Itemset>();\n\t\tfor (int i = 0; i < trans.size(); i++) {\n\t\t\tfor (int j = 0; j < trans.get(i).size(); j++) {\n\t\t\t\tList<Integer> item = new ArrayList<>();\n\t\t\t\titem.add(trans.get(i).get(j));\n\t\t\t\tItemset itemset = new Itemset(item, 1);\n\t\t\t\tlist.add(itemset);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < list.size() - 1; i++) {\n\t\t\tfor (int j = i + 1; j < list.size(); j++) {\n\t\t\t\tif (list.get(i).getItemset().equals(list.get(j).getItemset())) {\n\t\t\t\t\tlist.remove(j);\n\t\t\t\t\tlist.get(i).updateMinSuppor(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < list.size() - 1; i++) {\n\t\t\tfor (int j = i + 1; j < list.size(); j++) {\n\t\t\t\tif (list.get(i).getItemset().equals(list.get(j).getItemset())) {\n\t\t\t\t\tlist.remove(j);\n\t\t\t\t\tlist.get(i).updateMinSuppor(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public Collection<T> getItems() {\r\n return Collections.unmodifiableCollection(items);\r\n }",
"public Set<T> getSelectedItems() {\n return selectedEntities == null ? Collections.<T>emptySet() : selectedEntities;\n }",
"@Override\n\tpublic Set<T> retrieveAllItems() {\n\t\treturn cache;\n\t}",
"public List<Item> listItems() {\n return this.items;\n }",
"public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}",
"public ListVS<T> getKeys() {\n return this.keys.getElements();\n }",
"public List<IDataSetItem> getItems() {\n return items;\n }",
"private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}",
"public List<Item> getItems() {\n\t\treturn Collections.unmodifiableList(items);\n\t}",
"public java.util.List<java.lang.Integer>\n getItemsList() {\n return java.util.Collections.unmodifiableList(items_);\n }",
"public List<T> values() {\n return values(System.currentTimeMillis());\n }",
"public Set<E> getIn() {\n return in;\n }",
"public java.util.List<java.lang.Integer>\n getItemsList() {\n return items_;\n }",
"public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}",
"private static List<Item> getItems() {\n\t\treturn items;\n\t}",
"public List<String> keys()\n {\n return new ArrayList<String>(keys);\n }",
"public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }",
"public List<String> getKeys(){\n return Collections.unmodifiableList(keys);\n }",
"public List<Item> getItems() {\n\t\treturn this.items;\n\t}",
"@Nonnull\n\t@Override\n\tpublic NodeCollection getItems() {\n\t\treturn items;\n\t}",
"public List<Item> getItems() {\n return Collections.unmodifiableList(items);\n }",
"public Set<IS> getFreItemSet();",
"public List<Item> getItems() {\n return items;\n }",
"public List<Item> getItems() {\n return items;\n }",
"public Item[] getList() {\n\t\treturn list;\n\t}",
"@SuppressWarnings (\"rawtypes\") public java.util.List getItems(){\n return this.items;\n }",
"Set<String> getInventory();",
"java.util.List<java.lang.Integer> getItemsList();",
"public List<Itemset> getItemsets() {\n return itemsets;\n }",
"public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }",
"public Set<Entry> getSet() {\n Set<Entry> litSet = this.litRegister;\n return litSet;\n }",
"List<String> getSelectedItems();",
"public List<Items> list() {\n\t\treturn itemDao.list();\r\n\t}",
"public ArrayList<Item> getItems() {\r\n\t\treturn items;\r\n\t}",
"public ObservableValue<List<T>> items() {\n return createObservableValue(this::getItems, this::setItems, \"items-changed\");\n }",
"public List<String> getStates() {\r\n \t\treturn new ArrayList<String>(new TreeSet<String>(states.keySet()));\r\n \t}",
"public List<ItemStack> getItems()\n {\n return items;\n }",
"public String toString() {\n\t\tif (list.size() < 1)\n\t\t\treturn \"There is no element in the Set.\";\n\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (Object item : list) {\n\t\t\tif (sb.length() > 0)\n\t\t\t\tsb.append(\", \").append(\"[\").append(item.toString()).append(\"]\");\n\t\t\telse\n\t\t\t\tsb.append(\"[\").append(item.toString()).append(\"]\");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public ArrayList<Item> getItems()\n {\n return items;\n }",
"public ArrayList<Item> getList() {\r\n\t\treturn inventory;\r\n\t}",
"public Iterable<K> inOrder() {\n Queue<K> q = new Queue<>();\n inOrder(root, q);\n return q;\n }",
"@Override\n public Iterator<T> iterator() {\n return items.iterator();\n }",
"public UnsortedList<Integer> listOfKeys() {\n\t\tUnsortedList<Integer> list \n\t\t= new UnsortedList<Integer>(new IntegerComparator());\n\t\treturn listOfKeys(list);\n\t}",
"@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}",
"public ArrayList<Item> getItems() {\n\t\treturn items;\n\t}",
"public ArrayList<Item> getItems() {\n\t\treturn items;\n\t}",
"private Itemset[] getItemsets() {\n\t\t\treturn frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t}",
"public java.util.List<java.lang.Integer>\n getItemList() {\n return item_;\n }",
"public Iterator<T> iterator() {\n return new SetIterator<T>(this.head);\n }",
"public java.util.List<SeenInfo> getSeenInfoList() {\n return java.util.Collections.unmodifiableList(\n instance.getSeenInfoList());\n }",
"@SuppressWarnings(\"unchecked\")\n public <T> List<T> list() {\n return (List<T>) journal\n .retrieve(BarbelQueries.all(id), queryOptions(orderBy(ascending(BarbelQueries.EFFECTIVE_FROM))))\n .stream().map(d -> processingState.expose(context, (Bitemporal) d)).collect(Collectors.toList());\n }",
"public synchronized List<Item> getItems()\n\t{\n\t\t/**\n\t\t * TODO Q: Deep copy override clone in Item?\n\t\t * pre-condition: List not null;\n\t\t * Invariant:size list of active items cannot more than server capacity\n\t\t * post-condition:return the copy of items in the list.\n\t\t * Exception: list size more than server capacity.\n\t\t */\n\t\t// TODO: IMPLEMENT CODE HERE\n\t\t// Some reminders:\n\t\t// Don't forget that whatever you return is now outside of your control.\n\t\treturn new ArrayList<>(itemsUpForBidding);\n\t}",
"public TreeMap<Item, Integer> getItems() {\r\n\t\treturn items;\r\n\t}",
"public ArrayList<Integer> inOrderTraversal() {\r\n\t\treturn inOrderTraversal(treeMinimum());\r\n\t}",
"private List<Multiset.Entry<E>> snapshot() {\n\t\t\tList<Multiset.Entry<E>> list = Lists\n\t\t\t\t\t.newArrayListWithExpectedSize(size());\n\t\t\tfor (Multiset.Entry<E> entry : this) {\n\t\t\t\tlist.add(entry);\n\t\t\t}\n\t\t\treturn list;\n\t\t}",
"public List<String> getActiveSetNames()\n {\n List<String> names = New.list(myActiveSetConfig.getSetNames());\n names.remove(USER_ACTIVATED_SET_NAME);\n return names;\n }",
"@Override public Set<String> forcedItems() {\n Set<String> forcedItems = new HashSet<>(first.forcedItems());\n forcedItems.addAll(next.forcedItems());\n return forcedItems;\n }",
"public Item getItems() {\n return items;\n }",
"Set<String> getKeys();",
"@Override\r\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator();\r\n\t}",
"public ImmutableList<X> getXs() {\n return _xs;\n }",
"public Iterable<K> keys() {\n Queue<K> q = new Queue<>();\n inOrder(root, q);\n return q;\n }",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }",
"List<PricedItem> getItems() {\n return Collections.unmodifiableList(items);\n }",
"public Collection<Integer> getItemIds()\n {\n return m_items;\n }",
"public List<Item> getItemList();",
"public ArrayList<Item> getAllItems(){\n\t\treturn itemList; \n\t}",
"public Iterator iterator() {\n\t\treturn theList.listIterator(0);\n\t}",
"public KeySet getKeys();",
"@Override\n public String toString() {\n StringBuilder r = new StringBuilder(\"\");\n for (Itemset itemset : itemsets) {\n r.append(\"{t=\");\n r.append(itemset.getTimestamp());\n r.append(\", \");\n for (Item item : itemset.getItems()) {\n String string = item.toString();\n r.append(string);\n r.append(' ');\n }\n r.append('}');\n }\n return r.append(\" \").toString();\n }",
"public List<GeneralItem> getList() {\n return stList;\n }",
"public List<Pair> getStatesSeenSoFar() {\n\t\treturn list;\n\t}",
"public Iterator getShowings(){\n return super.iterator();\n }",
"public List<ItemStack> getItems() {\n return this.items;\n }",
"public Collection<Long> getAvailableItems();",
"public HashSet getElements() {\n\treturn elements;\n }",
"public Item current() {\n return curr;\n }",
"public ArrayList getKeys() {\r\n return this.keys;\r\n }",
"public Iterator getTransactions() {\n return (transactions.listIterator());\n }",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"@Override\n public String[] listAll() {\n return list();\n }",
"public List<Item> getItems(){\n\t\treturn data;\n\t}",
"public Iterator<LineItem> getItems()\r\n {\r\n return new\r\n Iterator<LineItem>()\r\n {\r\n public boolean hasNext()\r\n {\r\n return current < items.size();\r\n }\r\n\r\n public LineItem next()\r\n {\r\n return items.get(current++);\r\n }\r\n\r\n public void remove()\r\n {\r\n throw new UnsupportedOperationException();\r\n }\r\n\r\n private int current = 0;\r\n };\r\n }",
"public Iterator iterator()\n {\n return new HashSetIterator();\n }",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic Iterable<Entry<K, V>> entrySet() {\n\t/* TCJ\n\t * Iterates through potentially entire collection: O(n)\n\t */\n\t\treturn snapShot(0, null);\n\t}",
"public List<KeyInner> keys() {\n return this.keys;\n }",
"private Set<String> getKeys() {\n return bookDB.keySet();\n }",
"@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn this.itemList.iterator();\n\t}",
"public IIterator getKeys()\r\n {\r\n return new VectorIterator(m_keys);\r\n }",
"public ArrayList<Integer> getKeys() {\r\n return keys;\r\n }"
] | [
"0.6816221",
"0.68013376",
"0.66568696",
"0.6621716",
"0.6494706",
"0.6378081",
"0.63516456",
"0.6198061",
"0.6191941",
"0.6169906",
"0.616848",
"0.6127469",
"0.611973",
"0.6087719",
"0.606282",
"0.6041366",
"0.60399616",
"0.6027901",
"0.6025513",
"0.60192484",
"0.60155445",
"0.5979544",
"0.5972395",
"0.5966697",
"0.5965614",
"0.5937897",
"0.5935557",
"0.592798",
"0.59246546",
"0.5896658",
"0.589652",
"0.58945507",
"0.58859557",
"0.58859557",
"0.58807415",
"0.58768356",
"0.587657",
"0.5872081",
"0.5855585",
"0.58547944",
"0.58501846",
"0.5833108",
"0.5830349",
"0.5825309",
"0.58170223",
"0.58163357",
"0.5808162",
"0.58068514",
"0.5806803",
"0.58060455",
"0.5805919",
"0.5779606",
"0.57721895",
"0.5764692",
"0.57608724",
"0.57608724",
"0.5754274",
"0.5751211",
"0.57484686",
"0.5747483",
"0.573876",
"0.57368416",
"0.57362056",
"0.5729606",
"0.572681",
"0.570874",
"0.57055074",
"0.57053405",
"0.57029635",
"0.5702128",
"0.56997615",
"0.5698091",
"0.569608",
"0.5695994",
"0.5695637",
"0.5689883",
"0.56890184",
"0.5687851",
"0.56782615",
"0.5677275",
"0.5676034",
"0.5675305",
"0.5674261",
"0.5672631",
"0.56662524",
"0.56591517",
"0.5652486",
"0.564927",
"0.5646385",
"0.56417763",
"0.563935",
"0.56304437",
"0.56300825",
"0.5626038",
"0.56251085",
"0.5624854",
"0.56244683",
"0.56176656",
"0.56141233",
"0.56118256"
] | 0.561124 | 100 |
Check if there's an instance of the given item already in the set | public boolean contains(T item) {
synchronized(this) {
return _treeSet.contains(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }",
"public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }",
"public abstract boolean contains(Object item);",
"@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}",
"public boolean contains(E item) {\n \t\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \t// create iterator instance to go thru set\n \tIterator<E> iterateSet = this.iterator(); \t\n \twhile(iterateSet.hasNext()) {\n \t\t// searches for a target item\n \t\tif( iterateSet.next().equals(item)) {\n \t\t\treturn true;\n \t\t}\n \t}\n \t\n \treturn false;\n }",
"@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }",
"@Override\n public boolean contains(Object item) {\n if (item == null)\n return false;\n return map.containsKey(item);\n }",
"public boolean has(Object item) {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining (* no earlier element is elem_equals to item *);\n while (ptr != null) {\n if (elem_equals(ptr.val, item)) {\n return true;\n }\n ptr = ptr.next;\n }\n return false;\n }",
"public boolean contains(Item item) {\n for (Item i : items) {\n if (i == item) return true;\n }\n return false;\n }",
"public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}",
"public boolean contains(Type item);",
"public boolean contains(T item) {\n Iterator<T> iterator = this.iterator();\n while (iterator.hasNext()) {\n if (iterator.next().equals(item))\n return true;\n }\n\n return false;\n }",
"public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}",
"public boolean contains(E item) {\n \tDblListnode<E> n = items.getNext();\n \tfor (int k = 0; k < numItems; k++) {\n n = n.getNext();\n if (n.getData() == item) {\n \treturn true;\n }\n }\n \treturn false;\n }",
"@Override\n public boolean addItem(T item) {\n //Make sure the Set does not already contain the item\n if(!this.contains(item)) {\n //Make sure there is enough room for the item. If there isn't\n //resize the array\n if(numItems == arr.length)\n this.ensureCap();\n //Add the item to the end and increment numItems\n arr[numItems++] = item;\n //return true\n return true;\n }\n //if item was already in set, return false\n return false;\n }",
"public boolean contains(int item) {\n if (item == datum() ) return true; // true upon finding the item\n else if (next() == null) return false; // false if item not found until the end of list\n else return next.contains(item); \n }",
"private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}",
"public boolean contains(Item item) {\n\t\tif (item == null)\n\t\t\treturn false;\n\t\tfor (Item other : this)\n\t\t\tif (other.equals(item))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }",
"public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}",
"public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }",
"public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }",
"public boolean contains(int item) {\r\n for (int i = 0; i < NumItems; i++) {\r\n if (items[i] == item) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"@Override\n public boolean contains(T item) {\n //iterate through the array and look for the item\n for(int i = 0; i < numItems; i++){\n //if it is found, return true\n if(item.equals(arr[i]))\n return true;\n }\n return false;\n }",
"@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}",
"public boolean has(String itemName);",
"public boolean contains(SeqItemset set)\n\t{\n\t\tif (m_size<set.m_size) return false;\n\t\tint ind = 0;\n\t\tint i = 0;\n\t\twhile ((i<set.m_size) && (-1!=ind))\n\t\t{\n\t\t\tind = indexOf(set.elementIdAt(i));\n\t\t\ti++;\n\t\t}\n\t\tif (-1==ind) return false;\n\t\telse return true;\n\t}",
"@Override\n\tpublic boolean contains(T searchItem) {\n\n\t\tif (indexOf(searchItem) == -1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}",
"public boolean contains(Software item){\n return products.contains (item);\n }",
"public boolean itemExist(Object item) {\r\n\t\tfor(int i = 0; i < getItemCount(); i++)\r\n\t\t\tif(getItem(i).equals(item))\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean isDupe(T element);",
"public boolean containsItem(int par1)\n {\n return this.lookupEntry(par1) != null;\n }",
"public boolean contains(T entry) {\n return false;\n }",
"@Override\n public boolean add(X x) {\n if (!allowElementsWithoutIdentification)\n throw new IllegalArgumentException(\"It is not allowed to put Elements without Identification in this Set\");\n\n return map.put(x, placeholder) == null;\n }",
"public boolean contains(E element) {\r\n return items.contains(element);\r\n }",
"public boolean contains(E item) {\n if (item == null) {\n throw new NullPointerException();\n }\n else {\n DoublyLinkedNode<E> iter = head.getNext();\n while (iter.getNext() != null) {\n if (iter.getData().equals(item)) {\n return true;\n }\n iter = iter.getNext();\n }\n return false;\n }\n }",
"boolean hasItemId();",
"boolean hasItemId();",
"boolean hasItemId();",
"boolean hasItemId();",
"boolean hasItemId();",
"boolean hasItemId();",
"boolean hasItemId();",
"public boolean contains(int key) {\n \tfor(int k:set){\n \tif(k==key){\n \t\treturn true;\n \t}\n }\n\t\treturn false;\n }",
"public boolean contains(T instance);",
"boolean hasFeedItemSet();",
"public boolean containsAtMostOneItem() {\n boolean contains;\n if (start==null | start.next==null) {\n contains = true;\n }\n return contains;\n }",
"@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }",
"@Test\r\n public void testContains() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n // Test element does not exist case\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test element exists case\r\n assertTrue(instance.contains(entry1));\r\n }",
"public boolean hasItem() {\n return null != item;\n }",
"public boolean contains(Item item){\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perfrom contains because the DList instance is empty!\");\n for(Node temp = first.next; temp.next!=null; temp=temp.next)\n if(temp.data.equals(item)) return true;\n return false; \n }",
"public boolean contains(T item) {\n int listSize = numItemInList();\n if (listSize == 0) {\n return false;\n }\n\n if (item.getClass() == ShadowSquare.class) {\n ShadowSquare givenSQ = (ShadowSquare) item;\n for (int i = 0; i < listSize; i++) {\n ShadowSquare listSQ = (ShadowSquare) list[startIndex + i];\n if (listSQ.getX() == givenSQ.getX() && listSQ.getY() == givenSQ.getY()) {\n return true;\n }\n }\n }\n\n for (int i = 0; i < listSize; i++) {\n if (list[i + startIndex].equals(item)) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemid == null && other.itemid != null) || (this.itemid != null && !this.itemid.equals(other.itemid))) {\n return false;\n }\n return true;\n }",
"public abstract boolean contains(E e);",
"@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}",
"public boolean contains(Object elem);",
"public boolean contains(String setName, String item) throws Exception {\n Table set = HbaseManager.getInstance().getTable(setName);\n TypeHint typeHint = SetMetaDataCache.getInstance().getSetType(setName);\n boolean elementFound = false;\n try {\n\n Get get = new Get(setName.getBytes());\n get.setMaxVersions(1);\n get.setMaxVersions(1);\n get.setConsistency(Consistency.TIMELINE);\n\n Result rs = null;\n\n try {\n rs = set.get(get);\n byte[] colName = null;\n switch (typeHint) {\n case INT:\n colName = Ints.toByteArray(Integer.valueOf(item));\n break;\n case LONG:\n colName = Longs.toByteArray(Long.valueOf(item));\n break;\n case STRING:\n colName = item.getBytes();\n break;\n }\n\n //check in column directly\n elementFound = rs.containsColumn(HbaseManager.DEFAULT_COL_FAMILY, colName);\n System.out.println(elementFound + \" for \" + item);\n } catch (IOException e) {\n e.printStackTrace();\n throw new Exception(e);\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new SetOpsException(\"Exception in checking set containment \" + setName + \" for \" + item);\n } finally {\n if (set != null)\n set.close();\n }\n return elementFound;\n }",
"public boolean contains(T x) {\n\t\tEntry<T> t = getSplay(find(x));\n\t\tif(t != null && t.element == x) {\n\t\t\tsplay(t);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemPK == null && other.itemPK != null) || (this.itemPK != null && !this.itemPK.equals(other.itemPK))) {\n return false;\n }\n return true;\n }",
"public boolean contains(T item)\n\t{\n\t\treturn searchRecursive(item, root);\n\t}",
"public boolean containItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getName() == item.getName()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean checkOutItem(Item item)\n {\n \t return memberItems.add(item);\n }",
"public boolean hasGrabbedItem(String item) {\n return grabbedItems.contains(item);\n }",
"public boolean evaluate(T obj) {\n\t\treturn set.contains(obj);\n\t}",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Item item = (Item) o;\n return ID == item.ID;\n }",
"public boolean contains(E item) {\n\n return bstContains(item, root);\n }",
"boolean hasSharedSet();",
"public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"public boolean remove(E item) {\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \tIterator<E> iterateSet = this.iterator();\n \tboolean foundMatch = false;\n \t\n \twhile(iterateSet.hasNext()) {\n \t\tE element = iterateSet.next();\n \t\t// removes all occurrences of a target element\n \t\tif(element.equals(item)) {\n \t\t\titerateSet.remove();\n \t\t\tfoundMatch = true;\n \t\t}\t\n \t}\n \t\n \treturn foundMatch;\n }",
"public boolean contains(E item) {\n if(head == null) {\n return false;\n } else {\n for(Node<E> cur = head; cur != null; cur = cur.next) {\n if(cur.item.equals(item)) {\n return true;\n }\n }\n return false;\n }\n }",
"@Test\n\tpublic void testRepeatedInsert() {\n\t\tSetADT<String> items = new JavaSet<>();\n\t\titems.insert(\"A\");\n\t\titems.insert(\"B\");\n\t\titems.insert(\"C\");\n\t\titems.insert(\"C\");\n\t\t\n\t\t// No matter what, \"C\" can't be added twice.\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\t//double checking - same as for loop\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\tassertEquals(3, items.size());\n\t\tassertEquals(true, items.contains(\"A\"));\n\t\tassertEquals(true, items.contains(\"B\"));\n\t\tassertEquals(true, items.contains(\"C\"));\n\t\t\n\t}",
"public boolean hasItem() {\n return (this.curItem != null);\n }",
"public boolean hasNextInSet() {\n return (hasNext() &&\n (indexOfCurrentElement + 1 < firstIndexOfCurrentSet + quantity) &&\n (indexOfCurrentElement + 1 >= firstIndexOfCurrentSet)); \n }",
"public boolean contains(Object o);",
"public boolean contains(Object o);",
"@Override\n public boolean contains(Object o) {\n return map.containsKey(o);\n }",
"@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean equals(Object ob){\n\t\tItem itemob=(Item)ob;\t//transfer object type to Item type\r\n\t\tif(this.UID==itemob.UID && this.TITLE==itemob.TITLE && this.NOOFCOPIES==itemob.NOOFCOPIES) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public int alreadyExists(FoodItem item){\n for(int i = 0; i < numItems; i++) {\n\n if(inventory[i]!= null) {\n if(item.isEqual(inventory[i])){\n return i;\n }\n }\n }\n return -1;\n }",
"public boolean contains(E element);",
"boolean containsInstance(Instance instance);",
"@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}",
"@Override\n public boolean add(E item) {\n if (item == null)\n throw new IllegalArgumentException(\"null invalid value for bag\");\n Counter count = map.get(item);\n if (count == null)\n map.put(item, new Counter(1));\n else\n count.increment();\n return true;\n }",
"public boolean hasItem() {\n return this.item != null;\n }",
"@Override\n public boolean contains(final Object element) {\n return this.lastIndexOf(element) != -1;\n }",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"boolean containsLEXPlus(int[] itemset, int item) {\n\t\t// for each item in itemset\n\t\tfor(int i=0; i< itemset.length; i++){\n\t\t\t// check if the current item is equal to the one that is searched\n\t\t\tif(itemset[i] == item){\n\t\t\t\t// if yes return true\n\t\t\t\treturn true;\n\t\t\t// if the current item is larger than the item that is searched,\n\t\t\t// then return true because if if the item \"item\" was added it would be the largest one\n\t\t\t// according to the lexical order. \n\t\t\t}else if(itemset[i] > item){\n\t\t\t\treturn true; // <-- XXXX\n\t\t\t}\n\t\t}\n\t\t// if the searched item was not found, return false.\n\t\treturn false;\n\t}",
"@Override\r\n\t\tpublic boolean contains(E value) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.contains(value);\r\n\t\t\t}\r\n\t\t}",
"public boolean isPresent(T t) {\n\t\treturn multiSet.containsKey(t);\n\t}",
"public boolean contains(E value);",
"@Override\n\tpublic boolean contains(Object value) {\n\t\tif (indexOf(value) != -1) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean contains(Object value) {\n\t\treturn false;\n\t}",
"private int containsExactItem(Item item) {\n\t\tfor (Item currentItem : this.items) {\n\t\t\tif (item.equals(currentItem)) {\n\t\t\t\treturn items.indexOf(currentItem);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn false;\n\t\t}",
"public boolean contains(T item){\n if (head.next == tail && tail.prev == head){\n return false;\n }\n else {\n MyDoubleNode<T> counter = head.next;\n boolean shouldContinue = true;\n while (shouldContinue){\n if (counter.next != tail){\n if (counter.data.equals(item)){\n return true;\n }\n counter = counter.next;\n shouldContinue = true;\n }\n else{\n if (counter.data.equals(item)){\n return true;\n }\n shouldContinue = false;\n }\n }\n return false;\n }\n }",
"@Override\n public boolean contains(Object o) {\n if (indexOf(o) == -1) {\n return false;\n } else {\n return true;\n }\n }"
] | [
"0.75073063",
"0.7317679",
"0.7275751",
"0.7197103",
"0.7139584",
"0.7118434",
"0.7109148",
"0.68743384",
"0.6812472",
"0.678464",
"0.6779287",
"0.67393214",
"0.6735959",
"0.6724983",
"0.6705068",
"0.6690978",
"0.6690676",
"0.66696924",
"0.66355497",
"0.66232806",
"0.6585109",
"0.65120584",
"0.6474358",
"0.6462352",
"0.64556867",
"0.6448645",
"0.640149",
"0.6394978",
"0.6389016",
"0.63371044",
"0.6292685",
"0.62802213",
"0.62639034",
"0.6242344",
"0.62361646",
"0.6210065",
"0.62077343",
"0.62077343",
"0.62077343",
"0.62077343",
"0.62077343",
"0.62077343",
"0.62077343",
"0.61787796",
"0.61520135",
"0.614453",
"0.6130632",
"0.6126032",
"0.6118272",
"0.6113172",
"0.6111623",
"0.61077476",
"0.6098981",
"0.60895205",
"0.6074759",
"0.6048704",
"0.60345316",
"0.60212356",
"0.60094786",
"0.60004264",
"0.59998876",
"0.5994381",
"0.59770626",
"0.5972739",
"0.5972141",
"0.59717184",
"0.59672767",
"0.5966969",
"0.5965015",
"0.5964223",
"0.59343183",
"0.5929461",
"0.59282625",
"0.5925911",
"0.5917479",
"0.59167814",
"0.59167814",
"0.5914304",
"0.5907854",
"0.5901179",
"0.5885836",
"0.58832663",
"0.5883205",
"0.5882082",
"0.5879588",
"0.58738196",
"0.58705735",
"0.5870511",
"0.5870511",
"0.5870511",
"0.5862333",
"0.5857434",
"0.584847",
"0.58473694",
"0.58407974",
"0.58242524",
"0.58160704",
"0.5812975",
"0.5806715",
"0.5805453"
] | 0.69822085 | 7 |
adds the given item to the list, if absent | public void putIfAbsent(T item) {
synchronized(this) {
_treeSet.add(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean add(T item) {\n\t\treturn list.add(item);\n\t}",
"void add(Item item);",
"public void add(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = item;\n break;\n }\n }\n }",
"public void addItemToList(Item item) {\n\t\tif (item != null) {\n\t\t\tif (!items.contains(item)) {\n\t\t\t\titems.add(item);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }",
"public void addItem(Item item) {\n if (winner(item)) {\n listItems.add(item);\n }\n }",
"public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}",
"public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}",
"void add(E item);",
"void add(E item);",
"void add(E item);",
"@Override\n public boolean addItem(T item) {\n //Make sure the Set does not already contain the item\n if(!this.contains(item)) {\n //Make sure there is enough room for the item. If there isn't\n //resize the array\n if(numItems == arr.length)\n this.ensureCap();\n //Add the item to the end and increment numItems\n arr[numItems++] = item;\n //return true\n return true;\n }\n //if item was already in set, return false\n return false;\n }",
"public void add(E item);",
"void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}",
"public void add(int item) {\r\n if (!contains(item)) {\r\n items[NumItems++] = item;\r\n } else if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is full\");\r\n }\r\n }",
"void add(T item);",
"public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }",
"public void addItem(Object item) throws SetException {\n\t\tif (member(item))\n\t\t\tthrow new SetException(\"Item already in set.\");\n\n\t\tlist.add(item);\n\t}",
"void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}",
"@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }",
"@SuppressWarnings(\"unchecked\")\n public static void addIfNotContained(List list, Object object) {\n if (!list.contains(object)) {\n list.add(object);\n }\n }",
"public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }",
"public boolean add(E item) {\n if (item == null) { //Checks if the item is null if it is throws a new exception\n throw new IllegalArgumentException(\"Yeah Nah, No thanks null.\");\n }\n\n int index = findIndexOf(item); //For simplification\n\n if (data[index] != null) { //if the item at the index is not null\n if (data[index].equals(item))\n return false;\n }\n for (int i = count; i >= index; i--) { //iterates backward through the collection.\n\n if (i == index || i == 0) { //while iterating it checks if the value i is the same as index or 0, increments count and swaps the item.\n count++;\n ensureCapacity(); //checks capacity works, and if so adds item to and returns true.\n data[i] = item;\n return true;\n }\n data[i] = data[i - 1];\n }\n return false;\n }",
"public boolean add(Type item);",
"@SuppressWarnings (\"unchecked\") public void add(String item){\n if(item==null)\n return;\n items.add(item.trim());\n }",
"public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }",
"public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }",
"@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}",
"public void addItem(Item item) {\n items.add(item);\n }",
"public void addItem(Item item) {\n items.add(item);\n }",
"public boolean putItem(@NonNull Item item) {\n return items.add(item);\n }",
"public void append(Object item);",
"public void addFirst(Item x);",
"public void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}",
"public int addItem(Item i);",
"private void addValidItem(Item item){\r\n\t\titems.put(item.getItemIdentifier(), item);\r\n\t\ttotal.updateTotal(item);\r\n\t}",
"public boolean addItemToList(Item item, ShoppingList list) throws ItemException {\r\n \t\tif (item == null || list == null)\r\n \t\t\tthrow new IllegalArgumentException(\"null is not allowed\");\r\n \t\t\r\n \t\tList<Item> items = persistenceManager.getItems(list);\r\n \t\titem = mergeItem(item, items);\r\n \t\t\r\n \t\tpersistenceManager.save(item, list);\r\n \t\treturn !items.contains(item);\r\n \t}",
"public void addItem(Object obj) {\n items.add(obj);\n }",
"public void add(E elem) {\n if (!list.contains(elem))\n list.insertLast(elem);\n }",
"public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}",
"public void addItem(Item item) {\n _items.add(item);\n }",
"@Override\n\tpublic boolean add(E item) {\n\t\tif (this.numberOfElements == this.size) {\n\t\t\tE[] newArrayList = (E[]) new Object[this.size * 2];\n\t\t\tint i = 0;\n\t\t\twhile (i < this.size) {\n\t\t\t\tnewArrayList[i] = this.arrayList[i];\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tthis.arrayList = newArrayList;\n\t\t\tthis.size = this.size * 2;\n\t\t}\n\t\tthis.arrayList[this.numberOfElements] = item;\n\t\tthis.numberOfElements += 1;\n\t\treturn true;\n\t}",
"@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }",
"public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}",
"public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }",
"@Override\n\tpublic void addEntry(E entry) {\n\n\t\t// Determine if the entry already exists in the list\n\t\tE current = this.getHead();\n\t\twhile (current != null) {\n\t\t\tif (this.isEqual(current, entry)) {\n\t\t\t\t// Already in list\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\n\t\t// Not in list, so add the entry\n\t\tsuper.addEntry(entry);\n\t}",
"public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}",
"public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }",
"public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}",
"public void addFirst(Object item) {\r\n\t\tdata.add(0, item);\r\n\t}",
"public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }",
"public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}",
"public void addItem(Item item) {\n\t\titems.add(item);\n\t}",
"public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}",
"public abstract void addItem(AbstractItemAPI item);",
"public void add(Item toAdd) throws DuplicateItemException {\n assert toAdd != null;\n if (contains(toAdd)) {\n throw new DuplicateItemException();\n }\n internalList.add(toAdd);\n }",
"public boolean insertItem(MoviePanelBasicView item) {\r\n if (!this.contains(item)) {\r\n this.list.add(item);\r\n return true;\r\n } else {\r\n logger.debug(\"File \" + item.getFile() + \" is already in list!\");\r\n return false;\r\n }\r\n \r\n }",
"public boolean checkOutItem(Item item)\n {\n \t return memberItems.add(item);\n }",
"public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }",
"public boolean add(T item) {\n boolean addSuccessful = items.add(item);\n if (addSuccessful) {\n currentSize = -1.0;\n inCapacitySize = -1.0;\n }\n return addSuccessful;\n }",
"public void addItem(Item i) {\n this.items.add(i);\n }",
"public void addFirst(E item);",
"public boolean add(final OrderedItem item) {\n\t\t\tfinal int i = item.getIndex();\n\t\t\tif (table[index].get(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttable[index].set(i);\n\t\t\treturn true;\n\t\t}",
"public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}",
"public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }",
"public ReturnObject add(Object item) {\n ReturnObjectImpl rtn = new ReturnObjectImpl();\n if (item == null) {\n rtn.setError(ErrorMessage.INVALID_ARGUMENT);\n } else {\n rtn.setObj(item);\n extendArray();\n AL[size()-1] = item;\n }\n return rtn;\n }",
"@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}",
"public void addReservable(Reservable item){\n // Adds an item to the manager\n listI.add(item);\n }",
"public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }",
"public boolean offer(Object item) {\r\n\r\n\t\tdata.add(item);\r\n\t\t// no size restriction so it should always be true\r\n\t\treturn true;\r\n\t}",
"public void add(E item) {\n\t\tDblListnode<E> tmp = lastNode;\n\t\tlastNode.setNext(new DblListnode<E>(item));\n\t lastNode = lastNode.getNext();\n\t lastNode.setPrev(tmp);\n\t numItems++;\n\t}",
"public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}",
"public void addItem(Item toAdd) throws ImpossiblePositionException, NoSuchItemException {\n int itemX = (int) toAdd.getXyLocation().getX();\n int itemY = (int) toAdd.getXyLocation().getY();\n ArrayList<Item> rogueItems = getRogue().getItems();\n int itemFound = 0;\n if ((itemX >= getWidth() - 1) || (itemX <= 0) || (itemY >= getHeight() - 1)\n || (itemY <= 0) || !(roomDisplayArray[itemY][itemX].equals(\"FLOOR\"))) {\n throw new ImpossiblePositionException();\n } else {\n roomItems.add(toAdd);\n }\n for (Item singleItem : rogueItems) {\n if (toAdd.getId() == singleItem.getId()) {\n itemFound = 1;\n }\n }\n if (itemFound != 1) {\n throw new NoSuchItemException();\n }\n\n }",
"public void addLast(E item);",
"public void addLast(Item x);",
"public void newItemNotAdded(String itemValue);",
"public boolean add(Object element);",
"public void validAdd(String element){\n\t\tlist.addLast(element);\n\t}",
"public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}",
"public void addItem(CSVItem item)\n\t{\n\t\titemList.add(item);\n\t}",
"public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\n }",
"public void addItemFromLoad(String key, Item item) {\n itemMap.get(key).add(item);\n\n if(item.getImportance().equals(\"yes\")) importantItemList.add(item);\n\n }",
"public synchronized boolean add(Item pItem)\n {\n for(Item item : mItems)\n if(item.address.equals(pItem.address))\n {\n mIsModified = true;\n if(pItem.isEmpty())\n {\n mItems.remove(item);\n return false;\n }\n else\n {\n item.assign(pItem);\n return true;\n }\n }\n\n if(pItem.isEmpty())\n return false;\n\n mItems.add(pItem);\n mIsModified = true;\n return false;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}",
"public boolean addItem(Item item, Supplier sup){\r\n //forbids the modification PO that has been Validated\r\n if ((this.currentStatusChange != null) &&\r\n \t(this.currentStatusChange.ordinal >= PoStatusCode.VALIDATED.ordinal))\r\n throw new IllegalAccessError(\"Cannot add item to PO already Validated\");\r\n \r\n for (ListIterator iter = poLineItems.listIterator() ; iter.hasNext() ;) {\r\n PoLineItem linetemp = (PoLineItem)iter.next();\r\n //increase quantity if same Item\r\n if (linetemp.getItem().equals(item)) {\r\n linetemp.incrementQuantity(1);\r\n return false;\r\n }\r\n }\r\n //new Item\r\n PoLineItem lineItem = new PoLineItem(item,1,sup);\r\n return this.poLineItems.add(lineItem);\r\n }",
"public void add(T item) \n\t//PRE: The input parameter item can be any type but must be initialized\n\t//POST: The input parameter item is added to the circular linked list\n\t{\n\t\tNode<T> n = new Node<T>(item);\t//initialize new node for list \n\t\tnewState(n);\t\t\t\t\t\n\t\tif(start == null) //if list is empty\n\t\t{ \n\t\t\tstart = n;\n\t\t\tn.next = start;\n\t\t}\n\t\telse \t\t\t//if the list is not empty\n\t\t{ // find end\n\t\t\tNode tmp = start;\n\t\t\twhile(tmp.next != start) \n\t\t\t{ // scan until loop\n\t\t\t\tnewState(tmp);\n\t\t\t\ttmp = tmp.next;\n\t\t\t}\n\t\t\t// tmp.next == start at this point\n\t\t\tn.next = start;\n\t\t\ttmp.next = n; // complete the loop\n\t\t}\n\t\tlength++;\t//increment length of list\n\t\tnewState(null);\n\t}",
"public boolean add(E item) {\r\n\t\troot = add(root, item);\r\n\t\treturn addReturn;\r\n\t}",
"public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }",
"public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }",
"@Override\n public boolean add(E item) {\n if (item == null)\n throw new IllegalArgumentException(\"null invalid value for bag\");\n Counter count = map.get(item);\n if (count == null)\n map.put(item, new Counter(1));\n else\n count.increment();\n return true;\n }",
"public void push(E item) {\n addFirst(item);\n }",
"public void add(Item item) {\n if (item == null) throw new NullPointerException();\n Node oldFisrt = first;\n first = new Node();\n first.item = item;\n first.next = oldFisrt;\n N++;\n }",
"public void add(String element){\n\t\tif(!contains(element)){\n\t\t\tlist.addLast(element);\n\t\t}\n\t}",
"@Override\r\n\tpublic void add(T element) {\n\t\tthis._list.add(element);\r\n\t}",
"public boolean add (E item)\n {\n add(size, item); // calling public method add\n return true;\n }",
"public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}",
"private void addItemToList(String item) {\n itemList.add(item);\n\n // ListView aktualisieren\n adapter.notifyDataSetChanged();\n }",
"public boolean add(E item){\n\t\troot = add(item, root);\n\t\treturn addReturn;\n\t}",
"public void addFirst(Item item){\r\n\t\t if (item == null) throw new NullPointerException();\r\n\t\t if (n == list.length){resize(2*list.length);}\r\n\t\t if(isEmpty()){prior=0;first=0;last=0;latter=1;}\r\n\t\t list[prior--]=item;\r\n\t\t first = prior+1;\r\n\t\t if(prior==-1){prior=list.length-1;}\r\n\t\t n++;}",
"public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}"
] | [
"0.723747",
"0.72357273",
"0.70906496",
"0.70498514",
"0.701706",
"0.69817007",
"0.6971403",
"0.6889983",
"0.6804219",
"0.6804219",
"0.6804219",
"0.6800894",
"0.67983663",
"0.6796757",
"0.6767099",
"0.67485654",
"0.6735278",
"0.67273194",
"0.67219085",
"0.6671369",
"0.6671244",
"0.66679066",
"0.66584396",
"0.66453916",
"0.6638172",
"0.66282237",
"0.6603418",
"0.66003007",
"0.65926456",
"0.65926456",
"0.6577222",
"0.6547494",
"0.65147096",
"0.6496093",
"0.64909834",
"0.6467025",
"0.6410183",
"0.6407763",
"0.6405344",
"0.6404904",
"0.640311",
"0.6401001",
"0.6394613",
"0.63794",
"0.6376159",
"0.63755864",
"0.6371143",
"0.6363605",
"0.63468",
"0.6346571",
"0.6344749",
"0.6341711",
"0.63329846",
"0.6330808",
"0.63257474",
"0.6323274",
"0.63222027",
"0.63150036",
"0.6305537",
"0.6290716",
"0.62905484",
"0.6281643",
"0.6277803",
"0.626754",
"0.62295026",
"0.6225575",
"0.62250227",
"0.6212666",
"0.6205186",
"0.6203202",
"0.619149",
"0.6173354",
"0.61610365",
"0.6156756",
"0.61557984",
"0.6146454",
"0.61461234",
"0.6145922",
"0.6142355",
"0.61387557",
"0.6135027",
"0.61250216",
"0.6124354",
"0.61217993",
"0.6109923",
"0.61067927",
"0.609986",
"0.60936826",
"0.60935974",
"0.6085347",
"0.60841405",
"0.60820633",
"0.6072826",
"0.60690653",
"0.6064441",
"0.60641015",
"0.6059887",
"0.6058285",
"0.6056924",
"0.60515237"
] | 0.62415373 | 64 |
Removes item from the set | public void remove(String item) {
synchronized(this) {
_treeSet.remove(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean remove(Object o) {\n\t\treturn set.remove(o);\r\n\t}",
"@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }",
"public void removeItem(Object item) throws SetException {\n\t\tfor (Object element : list)\n\t\t\tif (element.equals(item)) {\n\t\t\t\tlist.remove(item);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\tthrow new SetException(\"Item not already in set.\");\n\t}",
"public /*@ non_null @*/ JMLObjectSet<E> remove(E elem) {\n if (!has(elem)) {\n return this;\n } else {\n //@ assume the_list != null;\n JMLListObjectNode<E> new_list = the_list.remove(elem);\n //@ assume (new_list == null) == (size == 1);\n return new JMLObjectSet<E>(new_list, size - 1);\n }\n }",
"public Object removeItem (String key);",
"@Override\r\n\tpublic void removeElement(K key) {\n\t\tque.remove(key);\r\n\t\thashMap.remove(key);\r\n\t}",
"public Location remove() {\n\t\t//empty set\n\t\tif (head == null){\n\t\t\treturn null;\n\t\t}\n\n\t\t//removes and returns the SquarePosition object from the top of the set\n\t\tLocation removedLocation = head.getElement();\n\t\thead = head.next;\n\t\tsize --;\n\t\treturn removedLocation;\n\t}",
"Set<Card> remove();",
"@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }",
"public boolean remove(int val) {\r\n return set.remove(val);\r\n }",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void removeItem(){\n\t\tthis.item = null;\n\t}",
"public void remove(int rem){\n if(elementOf(rem)){\n Set removed = new Set();\n for(int element = 0; element < set.length; element++){\n if(set[element] != rem)\n removed.add(set[element]);\n }\n setSet(removed.getSet());\n removed = null;\n }\n }",
"public Object remove();",
"protected abstract void removeItem();",
"public void remove()\n {\n if( current > 0 )\n {\n set(-- current);\n }\n }",
"public void remove() {\n if (!canRemove)\n throw new IllegalStateException();\n\n set.remove(set.data[nextIndex - 1]);\n canRemove = false;\n }",
"Object remove();",
"public void remove () {}",
"public void remove(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == item) {\n items[i] = null;\n return;\n }\n }\n }",
"Object removeFirst();",
"public boolean remove(int val) {\n if (set.contains(val)) {\n set.remove(val);\n return true;\n } else return false;\n }",
"public void remove(int key) {\n store[key] = -1; // If the key is removed, the value of that key is replaced with -1, \n \t\t\t\t// that the item doesn't exist because hashmap requires removal of keys.\n }",
"public Item removeLast();",
"@Override\r\n\tpublic void clear() {\n\t\tset.clear();\r\n\t}",
"@Override\n public void remove(K key) {\n super.remove(key);\n keySet.remove(key);\n }",
"protected abstract Set<String> _removeFromSet(String key, Collection<String> str);",
"public void removeItem(int id);",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void remove() {\r\n return;\r\n }",
"@Override\n\tpublic String remove(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key)) {\n\t\t\t\thashArray[hashVal] = deleted;\n\t\t\t\tthis.numOfItems--;\n\t\t\t\treturn key;\n\t\t\t}\n\t\t\thashVal++;\n\t\t\thashVal = hashVal % size;\n\n\t\t}\n\t\treturn null;\n\t}",
"public Book removeBookAt(int index) {\n \treturn (Book)set.remove(index);\n }",
"@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }",
"public final void remove () {\r\n }",
"public void removeActor(Actor act) { ActorSet.removeElement(act); }",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"@Override\n public boolean remove(Object item) {\n if (item == null)\n return false;\n Counter count = map.get(item);\n if (count == null)\n return false;\n count.decrement();\n if (count.isZero())\n map.remove(item);\n return true;\n }",
"public void removeIt() { \n\t\t\tcollection.remove(currIndex);\n\t\t\tcurrIndex--;\n\t\t}",
"public void removePartOfSet(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), PARTOFSET, value);\r\n\t}",
"public void removePartOfSet( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), PARTOFSET, value);\r\n\t}",
"public void remove() {\n\n }",
"public void remove() {\r\n //\r\n }",
"interface RemovableSet extends Set\n{\n void remove(String s);\n}",
"public void remove() {\n\t}",
"public void remove() {\n\t}",
"public void remove(T element);",
"public void removeItem(Item item) {\n this.reservationItems = this.reservationItems.stream()\n .filter(ri -> ri.isForItem(item))\n .collect(Collectors.toSet());\n }",
"public void supprimerCollection(){\r\n collection.clear();\r\n }",
"public Itemset remove(int indexItemset) {\n Itemset itemset = itemsets.remove(indexItemset);\n numberOfItems -= itemset.size();\n return itemset;\n }",
"public T remove (T element);",
"public boolean remove(E item) {\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \tIterator<E> iterateSet = this.iterator();\n \tboolean foundMatch = false;\n \t\n \twhile(iterateSet.hasNext()) {\n \t\tE element = iterateSet.next();\n \t\t// removes all occurrences of a target element\n \t\tif(element.equals(item)) {\n \t\t\titerateSet.remove();\n \t\t\tfoundMatch = true;\n \t\t}\t\n \t}\n \t\n \treturn foundMatch;\n }",
"public void removeActor(int index) { ActorSet.removeElementAt(index); }",
"public void remove() {\r\n super.remove();\r\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"@Override\n public void remove() {\n if (lastItem == null)\n throw new IllegalStateException();\n bag.remove(lastItem);\n lastItem = null;\n }",
"@Override\n\tpublic void remove() { }",
"public E remove();",
"public E remove();",
"@Override\n public void remove() {\n }",
"public T removeFirst();",
"private static void removeValue(ISet set, Scanner in)\n {\n if (set.getSize() == 0)\n System.out.println(\"Can't remove from an empty set!\");\n else {\n int pos;\n boolean valid;\n do {\n System.out.println(\"What position should be removed from the set?\");\n pos = Integer.parseInt(in.nextLine());\n valid = (pos >= 0 && pos < set.getSize());\n if (!valid)\n System.out.println(\"That's not a valid position\");\n } while (!valid);\n set.removePos(pos);\n }\n }",
"public E removeFirst();",
"public Entry remove(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SListNode n = (SListNode) chain.front(); n.isValidNode(); n = (SListNode) n.next()) {\n Entry e = (Entry) n.item();\n if (e.key.equals(key)) {\n n.remove();\n size--;\n return e;\n }\n }\n } catch(InvalidNodeException e) {\n System.out.println(e);\n }\n return null; \n }",
"@Override\n public V remove(K key, V value) {\n V val = get(key);\n if (val != null && value != null && val.equals(value)) {\n root = removeHelper(root, key);\n size -= 1;\n }\n return val;\n// throw new UnsupportedOperationException(\"Unsupported operation, sorry!\");\n }",
"public void removeItem(Item e) {\n\t\tif (items.contains(e))\n\t\t\titems.remove(e);\n\t}",
"public void remove(int key) {\n\n }",
"public E remove () throws NoSuchElementException;",
"public void remove(Tuple t){\r\n\t\ttuples.remove(t);\r\n\t\tsize--;\r\n\t}",
"public void remove(K key);",
"public void remove()\n {\n list.remove(cursor);\n cursor--;\n }",
"@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}",
"public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }",
"public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }",
"public static void removePartOfSet( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, PARTOFSET, value);\r\n\t}",
"@Override\n public void remove() {\n }",
"public Object remove(String key);",
"@Override\n\tpublic V remove(K key) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// parcurgerea listei de elemente pentru a gasi cheia ceruta si\n\t\t\t// stergerea acesteiu din lista\n\t\t\tif (b.get(h).getEntries().get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tb.get(h).e.remove(i);\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}",
"public void remove(int key) {\n int index = keys.indexOf(key);\n if(index > 0) {\n keys.remove(index);\n values.remove(index);\n }\n }",
"@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}",
"V remove(Object key);",
"public void itemRemoved(E item);",
"V remove(K key);"
] | [
"0.75054455",
"0.7082186",
"0.70106554",
"0.68604726",
"0.68079174",
"0.6792824",
"0.67401415",
"0.6736841",
"0.6733232",
"0.6716593",
"0.67165613",
"0.67165613",
"0.67165613",
"0.67165613",
"0.67165613",
"0.6714842",
"0.6688673",
"0.6685249",
"0.66633856",
"0.66389763",
"0.66382945",
"0.6588457",
"0.65754193",
"0.64516556",
"0.6450858",
"0.64455664",
"0.6440421",
"0.64313745",
"0.6419213",
"0.6418449",
"0.64158666",
"0.64126045",
"0.64111394",
"0.64111394",
"0.64111394",
"0.6406008",
"0.6392659",
"0.6390277",
"0.6388536",
"0.63411766",
"0.6331078",
"0.63263583",
"0.63263583",
"0.63263583",
"0.63263583",
"0.63263583",
"0.6319735",
"0.6312348",
"0.6305693",
"0.6302033",
"0.62912357",
"0.62884754",
"0.62872374",
"0.62850153",
"0.62850153",
"0.6282677",
"0.62766683",
"0.62715656",
"0.6259899",
"0.62561595",
"0.6252463",
"0.6249873",
"0.6241545",
"0.6226697",
"0.6226697",
"0.6226697",
"0.6226697",
"0.6226697",
"0.6226697",
"0.6226697",
"0.62124383",
"0.61945814",
"0.61945087",
"0.61945087",
"0.61712104",
"0.61666244",
"0.6163193",
"0.6155908",
"0.61439687",
"0.6141111",
"0.61399245",
"0.61375105",
"0.61370784",
"0.6134096",
"0.6127666",
"0.6126768",
"0.61224395",
"0.61224395",
"0.6122379",
"0.6122379",
"0.6118745",
"0.61156464",
"0.6113226",
"0.6113075",
"0.6109677",
"0.610182",
"0.6095439",
"0.60936993",
"0.60924125",
"0.60921615"
] | 0.7250801 | 1 |
TODO Autogenerated method stub | public static void main(String[] args) {
SubClass obj = new SubClass();
obj.display();
} | {
"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 |
Add button for Assurance | public void setAssurance(View view) {
//include Assurance url here
assuranceURL = findViewById(R.id.assuranceUrl);
String url = assuranceURL.getText().toString();
Assurance.startSession(url);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void makeAcquireButton() {\r\n JButton acquire = new JButton(\"Acquire a new champion with Blue Essence\");\r\n new Button(acquire, main);\r\n// acquire.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// acquire.setPreferredSize(new Dimension(2500, 100));\r\n// acquire.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n acquire.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n acquireChampionUsingBlueEssence();\r\n }\r\n });\r\n// main.add(acquire);\r\n }",
"public void addVehicleSaveButton() {\r\n\t\tsafeJavaScriptClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-col-24 button.ant-btn.ant-btn-primary\"));\r\n\t}",
"public void clickOnAddVehicleButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary\"), SHORTWAIT);\r\n\t}",
"public void makeObtainButton() {\r\n JButton obtain = new JButton(\"Obtain a new champion using Riot Points\");\r\n new Button(obtain, main);\r\n// obtain.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// obtain.setPreferredSize(new Dimension(2500, 100));\r\n// obtain.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n obtain.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n obtainChampionUsingRiotPoints();\r\n }\r\n });\r\n// main.add(obtain);\r\n }",
"public void createInstructionButton() {\n \tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tshowInstructions();}\n };\n \tcreateGenericButton(2, 0, myResources.getString(\"guide\"), eventHandler);\n }",
"public void addButton()\n\t{\n\t\tdriver.findElement(By.xpath(\"//input[@name='Insert']\")).click();\n\t}",
"void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}",
"@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }",
"private void setupAddToReviewButton() {\n\t\tImageIcon addreview_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"addtoreview.png\");\n\t\tJButton add_to_review = new JButton(\"\", addreview_button_image);\n\t\tadd_to_review.setBounds(374, 598, 177, 100);\n\t\tadd_to_review.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twords_to_add_to_review.add(words_to_spell.get(current_word_number));\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tadd_to_review.addMouseListener(new VoxMouseAdapter(add_to_review,null));\n\t\tadd(add_to_review);\n\t}",
"public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }",
"public void clickAddButton() {\n\t\tfilePicker.fileManButton(locAddButton);\n\t}",
"@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\t\n\t}",
"private void addMiscInventory() {\r\n \tcheckInvButton = new JButton (\"Check Inverntory\");\r\n \torderText = new JTextField (5);\r\n orderButton = new JButton (\"Print Order\");\r\n \r\n \tadd (checkInvButton);\r\n \tadd (orderText);\r\n add (orderButton);\r\n \r\n \tcheckInvButton.setBounds (625, 120, 140, 35);\r\n \torderText.setBounds (575, 185, 105, 25);\r\n orderButton.setBounds (720, 185, 100, 25);\r\n }",
"private void setAddButtonUI() {\n addButton = new JButton(\"Add\");\n addButton.setForeground(new Color(247, 37, 133));\n addButton.addActionListener(this);\n addButton.setContentAreaFilled(false);\n addButton.setFocusPainted(false);\n addButton.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n addButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n }",
"private JButton createButtonAddProduct() {\n\n JButton btn = new JButton(\"Add Product\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n // new NewProductDialog(DemonstrationApplication.this);\n }\n });\n\n return btn;\n }",
"public void makeGetRPButton() {\r\n JButton getRP = new JButton(\"Check if a champion can be purchased with Riot Points\");\r\n new Button(getRP, main);\r\n// getRP.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// getRP.setPreferredSize(new Dimension(2500, 100));\r\n// getRP.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n getRP.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n getRiotPointsBalanceDifference();\r\n }\r\n });\r\n// main.add(getRP);\r\n }",
"public void makeCheckBEButton() {\r\n JButton checkBE = new JButton(\"Check if a champion can be purchased with Blue Essence\");\r\n new Button(checkBE, main);\r\n// checkBE.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// checkBE.setPreferredSize(new Dimension(2500, 100));\r\n// checkBE.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n checkBE.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n checkBlueEssenceBalanceDifference();\r\n }\r\n });\r\n// main.add(checkBE);\r\n }",
"private JButton getAddIncludeConditionButton() {\n\t\tif (addIncludeConditionButton == null) {\n\t\t\taddIncludeConditionButton = new JButton();\n\t\t\taddIncludeConditionButton.setText(\"Добавить\");\n\t\t\taddIncludeConditionButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tDefaultListModel model = (DefaultListModel) functionList.getModel();\n\t\t\t\t\tOneCard el = new OneCard((ListElement)getCardValue().getSelectedItem(), (ListElement) getCardColor().getSelectedItem());\n\t\t\t\t\t((DefaultListModel) functionList.getModel()).add(model.getSize(), el);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn addIncludeConditionButton;\n\t}",
"public void clickOnAddVehiclesButton() {\r\n\t\tsafeClick(groupListSideBar.replace(\"Group List\", \"Add Vehicle\"), SHORTWAIT);\r\n\t}",
"protected void addButtonActionPerformed() {\n\t\tFoodTruckManagementSystem ftms = FoodTruckManagementSystem.getInstance();\n\t\t// Initialize controller\n\t\tMenuController mc = new MenuControllerAdapter();\n\t\t\n\t\t// Get selected supply type\n\t\tSupplyType supply = null;\n\t\ttry {\n\t\t\tsupply = ftms.getSupplyType(selectedSupply);\n\t\t} catch (NullPointerException | IndexOutOfBoundsException e) {\n\t\t}\n\t\t\n\t\t// Get given quantity\n\t\tdouble qty = -1;\n\t\ttry {\n\t\t\tqty = Double.parseDouble(qtyTextField.getText());\n\t\t} catch (NumberFormatException | NullPointerException e) {\n\t\t}\n\t\t\n\t\t// Add supply to item\n\t\ttry {\n\t\t\tmc.addIngredientToItem(item, supply, qty);\n\t\t} catch (InvalidInputException | DuplicateTypeException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\t\n\t\trefreshData();\n\t\t\n\t}",
"private static void addInventoryButton(AnchorPane ui) {\n\t\tCanvas inventoryBtn = new Canvas(32 * GameConfig.getScale(), 32 * GameConfig.getScale());\n\t\tui.getChildren().add(inventoryBtn);\n\n\t\tAnchorPane.setBottomAnchor(inventoryBtn, 5.0 * GameConfig.getScale());\n\t\tAnchorPane.setRightAnchor(inventoryBtn, 5.0 * GameConfig.getScale());\n\n\t\tinventoryBtn.getGraphicsContext2D().drawImage(DrawUtil.scaleUp(backpackSprite, GameConfig.getScale()), 0, 0);\n\n\t\tinventoryBtn.setOnMouseClicked((event) -> {\n\t\t\tif (InterruptController.isPauseOpen() || InterruptController.isTransition()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tAudioClip openSFX = GameAudioUtils.getOpenInventorySFX();\n\n\t\t\tgamePane.getChildren().add(inventoryPane);\n\t\t\tinventoryPane.requestFocus();\n\t\t\tInterruptController.setInventoryOpen(true);\n\n\t\t\tif (!openSFX.isPlaying()) {\n\t\t\t\topenSFX.play();\n\t\t\t}\n\t\t});\n\t}",
"public void clickAddButtonInStockTab(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-border-layout-ct') and not(contains(@class,'x-hide-display'))]//div[contains(@class,'x-panel-bbar')]//button[contains(text(),'Add..')]\").click();\r\n\t\t\r\n\t\t//McsElement.getElementByAttributeValueAndParentElement(driver, \"div\", \"@class\", \"x-panel-bbar\", \"button\", \"text()\", \"Add...\", true, true).click();\r\n\t\t\r\n\t\tReporter.log(\"Clicked on Add button in Stock Tab\", true);\r\n\t}",
"void onAddClicked();",
"public void makePurchaseButton() {\r\n JButton purchase = new JButton(\"Purchase premium currency\");\r\n new Button(purchase, main);\r\n// purchase.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// purchase.setPreferredSize(new Dimension(2500, 100));\r\n// purchase.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n purchase.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n doBuyRiotPoints();\r\n }\r\n });\r\n// main.add(purchase);\r\n }",
"public void onChangedAdBtnPressed() {\n String uniqueID = advertisement.getUniqueID();\n view.showEditView(uniqueID);\n }",
"public HomeAddettoUI(Account a) {\n\t\tsuper(a);\n\n\t\tJButton btn_events = new JButton(\"Registra evento\");\n\t\tbtn_events.setBounds(10, 275, 205, 21);\n\t\tbtn_events.setActionCommand(\"event\");\n\t\tbtn_events.addActionListener(this);\n\t\tgetContentPane().add(btn_events);\n\n\t\tJButton btn_prenotations = new JButton(\"Registra prenotazione\");\n\t\tbtn_prenotations.setBounds(10, 300, 205, 21);\n\t\tbtn_prenotations.setActionCommand(\"pren\");\n\t\tbtn_prenotations.addActionListener(this);\n\t\tgetContentPane().add(btn_prenotations);\n\n\t\tJButton btn_amount = new JButton(\"Registra pagamento\");\n\t\tbtn_amount.setBounds(10, 325, 205, 21);\n\t\tbtn_amount.setActionCommand(\"amount\");\n\t\tbtn_amount.addActionListener(this);\n\t\tgetContentPane().add(btn_amount);\n\t\t\n\t\tJButton btn_restaurant = new JButton(\"Registra conto ristorante\");\n\t\tbtn_restaurant.setBounds(10, 350, 205, 21);\n\t\tbtn_restaurant.setActionCommand(\"risto\");\n\t\tbtn_restaurant.addActionListener(this);\n\t\tgetContentPane().add(btn_restaurant);\n\t}",
"public void onclick_add(MouseEvent mouseEvent) {\n\t\tUifEditCmd cmd = new UifEditCmd(\"ssoView\",DialogConstant.DEFAULT_WIDTH, DialogConstant.SIX_ELE_HEIGHT);\n\t\tAppLifeCycleContext.current().getWindowContext().addAppAttribute(\"operate\", \"add\");\n\t\tcmd.execute();\n//\t\tRow row = ds.getEmptyRow();\n//\t\tds.addRow(row);\n//\t\tds.setRowSelectIndex(ds.getRowIndex(row));\n//\t\tds.setEnabled(true);\n//\t\tnew UifUpdateOperatorState(ds, AppLifeCycleContext.current().getViewContext().getView()).execute();\n\t}",
"private Button addButton(Configuration config, String name) {\r\n Button button = new HintedButton(config, name);\r\n button.addActionListener(this);\r\n add(button);\r\n return button;\r\n }",
"@FXML\n\tpublic void onAddInstrumentClick(MouseEvent e) {\n\t\t// Get the current instrument count\n\t\tint instrumentCount = synth.getInstrumentCount();\n\n\t\t// If there are 4 instruments or more, move on\n\t\tif(instrumentCount < 4) {\n\t\t\t//Increment the count\n\t\t\tinstrumentCount++;\n\n\t\t\t// Create a new Instrument button and add the necessary functionality\n\t\t\tButton newInstrument = new Button(\"Instrument \" + instrumentCount);\n\n\t\t\t//Set the instrument number in the user data (0 based)\n\t\t\tnewInstrument.setUserData(instrumentCount - 1);\n\n\t\t\t//Set the instruments id based on the instrument count (1 based)\n\t\t\tnewInstrument.setId(\"instrument\" + instrumentCount);\n\n\t\t\t//Set the instruments on click event\n\t\t\tnewInstrument.setOnMouseClicked(event -> {\n\t\t\t\tonInstrumentButtonClick(event);\n\t\t\t});\n\n\t\t\t//Set the new instruments max height and width, based on the pre-existing add instrument button\n\t\t\tnewInstrument.setMaxHeight(btnAddInstrument.getMaxHeight());\n\t\t\tnewInstrument.setMaxWidth(btnAddInstrument.getMaxWidth());\n\n\t\t\t//Add the instrument-button class to the instruments style class list\n\t\t\tnewInstrument.getStyleClass().add(\"instrument-button\");\n\n\t\t\t//Attempt to add this action to the action log (using the InstrumentButton class for the old/new values)\n\t\t\ttry {\n\t\t\t\tInstrumentButton oldInstrumentButton = new InstrumentButton(), newInstrumentButton = new InstrumentButton();\n\n\t\t\t\t//Set the old instrument button fields\n\t\t\t\toldInstrumentButton.setInstrumentButton(newInstrument);\n\t\t\t\toldInstrumentButton.setExists(false);\n\n\t\t\t\t//Set the new instrument button fields\n\t\t\t\tnewInstrumentButton.setInstrumentButton(newInstrument);\n\t\t\t\tnewInstrumentButton.setExists(true);\n\n\t\t\t\t//Add the action\n\t\t\t\tactionLog.AddAction(\n\t\t\t\t\t\toldInstrumentButton,\n\t\t\t\t\t\tnewInstrumentButton,\n\t\t\t\t\t\tnewInstrument,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tthis.getClass().getMethod(\"alterInstrument\", InstrumentButton.class));\n\t\t\t} catch (NoSuchMethodException | SecurityException e1) {\n\t\t\t\tSystem.out.println(\"An unexpected error has occured.\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t//Add the instrument\n\t\t\taddInstrument(newInstrument);\n\t\t} else {\n\t\t\tSystem.out.println(\"Max number of instruments created.\");\n\t\t}\n\t}",
"private JButton createAddResourceButton() {\n\n JButton addBtn = new JButton(\"Add\");\n addBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n\n List<Resource> resourcesList = controller.getResoucesList();\n\n for (Resource resource : controller.getDemonstration().getResourcesList()) {\n resourcesList.remove(resource);\n }\n\n if (resourcesList.isEmpty()) {\n throw new IllegalArgumentException();\n }\n\n DialogSelectable dialogoNewResource = new DialogSelectable(CreateDemonstrationUI.this, resourcesList, \"Select Resource from list:\");\n Resource selectedResource = (Resource) dialogoNewResource.getSelectedItem();\n if (selectedResource == null) {\n throw new NullPointerException();\n }\n\n if (controller.addResource(selectedResource)) {\n updateResourcesList();\n String successMessage = \"Resource added successfully!\";\n String successTitle = \"Resource added.\";\n\n JOptionPane.showMessageDialog(rootPane, successMessage, successTitle, JOptionPane.INFORMATION_MESSAGE);\n }\n } catch (NullPointerException ex) {\n\n } catch (IllegalArgumentException ex) {\n\n String warningMessage = \"There is no more resources to add\";\n String warningTitle = \"No more resources in system\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n\n } catch (Exception ex) {\n\n String warningMessage = \"Something wen't wrong please try again.\";\n String warningTitle = \"ERROR 404\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n }\n\n }\n });\n return addBtn;\n }",
"private void addCard(){\n WebDriverHelper.clickElement(addCard);\n }",
"protected JButton createAddButton() {\n JButton butAdd = new JButton();\n butAdd.setIcon(new ImageIcon(getClass().getClassLoader().getResource(\"image/add.jpg\")));\n butAdd.setToolTipText(\"Add a new item\");\n butAdd.addActionListener(new AddItemListener());\n return butAdd;\n }",
"private JButton getAddQuantityCardButton() {\n\t\tif (addQuantityCardButton == null) {\n\t\t\taddQuantityCardButton = new JButton();\n\t\t\taddQuantityCardButton.setText(\"Добавить\");\n\t\t\taddQuantityCardButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tDefaultListModel model = (DefaultListModel) functionList.getModel();\n\t\t\t\t\tParseElement el = new ParseElement((ListElement) cardType.getSelectedItem(), (String)condition.getSelectedItem(), (String)value.getSelectedItem());\n\n\t\t\t\t\t((DefaultListModel) functionList.getModel()).add(model.getSize(), el);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn addQuantityCardButton;\n\t}",
"private void addButton()\n {\n JButton button = new JButton();\n button.setSize(200, 30);\n button.setName(\"login\");\n button.setAction(new CreateUserAction());\n add(button);\n button.setText(\"Login\");\n }",
"public void addAnswerButtons(String opponentLogin){\n\t\tgetController().changeFree(false);\n\t\tgetCentralPanel().removeAll();\n\t\tgetCentralPanel().add(answButPanel); \n\t\tanswButPanel.getQueryLabel().setText(\"do you want play with \"+opponentLogin);\n\t\tvalidate();\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAssociations();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAssociations();\n\t\t\t\t\t}",
"public void actionPerformed(ActionEvent e){\n\t\t\topenAdd();\n\t\t}",
"public void makeEarnButton() {\r\n JButton earn = new JButton(\"Earn in game currency\");\r\n new Button(earn, main);\r\n// earn.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// earn.setPreferredSize(new Dimension(2500, 100));\r\n// earn.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n earn.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n doEarnBlueEssence();\r\n }\r\n });\r\n// main.add(earn);\r\n }",
"@Then(\"^product in shown as available\")\n public void clicks_On_Add_Button(){\n }",
"private void createAddButton(final Composite parent, final FunctionParameter fp, boolean addEnabled) {\n \t\t// create add button -> left\n\t\tfinal Button addButton = new Button(parent, SWT.PUSH);\n\t\taddButtons.put(fp, addButton);\n \t\taddButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false, 2, 1));\n \t\taddButton.setText(\"Add parameter value\");\n \t\taddButton.setEnabled(addEnabled);\n \n \t\t// create selection listeners\n \t\taddButton.addSelectionListener(new SelectionAdapter() {\n \t\t\t@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\t// add text field\n \t\t\t\tList<Pair<Text, Button>> texts = inputFields.get(fp);\n \t\t\t\tboolean removeButtonsDisabled = texts.size() == fp.getMinOccurrence();\n \t\t\t\tPair<Text, Button> added = createField(addButton.getParent(), fp, null);\n \t\t\t\tadded.getFirst().moveAbove(addButton);\n \t\t\t\tadded.getSecond().moveAbove(addButton);\n \t\t\t\t\n \t\t\t\t// update add button\n \t\t\t\tif (texts.size() == fp.getMaxOccurrence())\n \t\t\t\t\taddButton.setEnabled(false);\n \n \t\t\t\t// need to enable all remove buttons or only the new one?\n \t\t\t\tif (removeButtonsDisabled)\n \t\t\t\t\tfor (Pair<Text, Button> pair : texts)\n \t\t\t\t\t\tpair.getSecond().setEnabled(true);\n \t\t\t\telse\n \t\t\t\t\tadded.getSecond().setEnabled(true);\n \n \t\t\t\t// do layout\n \t\t\t\t((Composite) getControl()).layout();\n \t\t\t\t// run validator to update ControlDecoration and updateState\n \t\t\t\tadded.getFirst().setText(\"\");\n \t\t\t\t// pack to make wizard larger if necessary\n \t\t\t\tgetWizard().getShell().pack();\n \t\t\t}\n \t\t});\n \t}",
"void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}",
"private void createButton(){\n addButton();\n addStartButton();\n }",
"public void clickCreateButton() {\n this.action.click(this.createButton);\n }",
"@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }",
"@Override\n public void onClick(View view) {\n addCredit();\n }",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\n\t\t\t\t\tshowwindow(presentadd_group);\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\n\t\t\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.layout_addinfo);\n\t\t\t\tif(currStatus == 0)\n\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\tAdditionalInfo.webCallServiceRequired(web_param);\n\t\t\t\t\t\n\t\t\t\t\t//btnAddInfo.setEnabled(false);\n\t\t\t\t\tDrawable icon=getApplicationContext().getResources().getDrawable(R.drawable.minus);\t\t\t\t\t\n\t\t\t\t\tbtnAddInfo.setCompoundDrawablesWithIntrinsicBounds(null, null, icon, null);\t\t\n\t\t\t\t\tcurrStatus =1;\t\t\t\t\t\n\t\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tDrawable icon=getApplicationContext().getResources().getDrawable(R.drawable.add);\t\t\t\t\t\n\t\t\t\t\tbtnAddInfo.setCompoundDrawablesWithIntrinsicBounds(null, null, icon, null);\n\t\t\t\t\tcurrStatus = 0;\n\t\t\t\t\tlayout.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t\t// values from fragment additional info\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}",
"private void initCreateDeckBtn() {\n createBtn = new Button((editWidth - 310) / 2, 400, \"CREATE NEW DECK\", MasterGUI.green, titleField.getWidth(), titleField.getHeight());\n createBtn.setFont(MasterGUI.poppinsFont);\n createBtn.setForeground(MasterGUI.white);\n createBtn.setContentAreaFilled(true);\n createBtn.setFocusPainted(false);\n ActionListener createAction = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createDeckFromInput();\n user.updateDeckList();\n repaintDeckCards();\n HomeView.repaintHomeView();\n }\n };\n createBtn.addActionListener(e -> {\n MainGUI.confirmDialog(createAction, \"Create new Deck?\");\n });\n editPanel.add(createBtn);\n }",
"private void showSaveAndAdd() {\n\t\tButton saveButton = (Button) findViewById(R.id.b_recipeSave);\n\t\tButton addButton = (Button) findViewById(R.id.bNewIngredient);\n\t\tsaveButton.setVisibility(1);\n\t\taddButton.setVisibility(1);\n\t}",
"public void add(JButton a){\n\t\tif(c%2 == 1){\n\t\t\t\n\t\t\ta.setText(\"X\");\n\t\t\thh.setText(\"Player O's turn\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\ta.setText(\"O\");\n\t\t\t\thh.setText(\"Player X's turn\");\n\t\t\t}\n\t\t\tc++;\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tadd();\n\t\t\t}",
"public void clickAutoInsurance() {\n\t\tselectAutoInsurance.click();\n\t}",
"private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}",
"@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException 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\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }",
"@Override\n public void onClick(View v) {\n buttonAddClicked();\n }",
"private void addOneActionPerformed(ActionEvent evt) {\n\t\t//if the reels are nor spinning perform the the action\n\t\tif (!isSpining) {\n\t\t\t//credit should be above 1\n\t\t\tif (obj.getCredit() > 0) {\n\t\t\t\t//add 3 to the bet and update the labels and buttons\n\t\t\t\tobj.setBet(obj.getBet() + 1);\n\t\t\t\tobj.setCredit(obj.getCredit() - 1);\n\t\t\t\tupdateLabels();\n\t\t\t\tupdateDisabledButtons();\n\t\t\t}\n\t\t}\n\t}",
"private void onClickBtAdd() {\n\t\tDbAdapter db = new DbAdapter(this);\n\t\tdb.open();\n\n\t\tfloat amount = 0;\n\n\t\ttry {\n\t\t\tamount = Float.parseFloat(etAmount.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\tamount = 0;\n\t\t}\n\n\t\t// create a medicine event\n\t\tdb.createMedicineEvent(amount,\n\t\t\t\tnew Functions().getDateAsStringFromCalendar(mCalendar),\n\t\t\t\tspMedicine.getSelectedItemId());\n\n\t\tdb.close();\n\n\t\tActivityGroupTracking.group.restartThisActivity();\n\n\t\t// clear the edittext\n\t\tetAmount.setText(\"\");\n\n\t\t// Go to tracking tab when clicked on add\n\t\tShowHomeTab parentActivity;\n\t\tparentActivity = (ShowHomeTab) this.getParent().getParent();\n\t\tparentActivity.goToTab(DataParser.activityIDTracking);\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}",
"@FXML\n void addButton(ActionEvent event) {\n\n Part selectedPart = partTableView.getSelectionModel().getSelectedItem();\n\n if (selectedPart == null) {\n AlartMessage.displayAlertAdd(6);\n } else {\n assocParts.add(selectedPart);\n assocPartTableView.setItems(assocParts);\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tnew Histo_avance(client);\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}",
"public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}",
"void enableAddContactButton();",
"private void setupSubmitButton() {\n\t\tImageIcon submit_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"submit.png\");\n\t\tJButton submit_button = new JButton(\"\", submit_button_image);\n\t\tsubmit_button.setBorderPainted(false);\n\t\tsubmit_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tsubmit_button.addMouseListener(new VoxMouseAdapter(submit_button,null));\n\t\tadd(submit_button);\n\t\tsubmit_button.setBounds(32, 598, 177, 100);\n\t}",
"public void buttonClicked();",
"void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }",
"private void onAddClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\t\r\n\t\t\tif(!chart.addStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"There are no seats available.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void addButton(ActionEvent event) {\n\t\tString daysOfWeek = \"\";\n\t\tif (sundayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Sunday\";\n\t\t\telse daysOfWeek += \", Sunday\";\n\t\t}\n\t\tif (mondayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Monday\";\n\t\t\telse daysOfWeek += \", Monday\";\n\t\t}\n\t\tif (tuesdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Tuesday\";\n\t\t\telse daysOfWeek += \", Tuesday\";\n\t\t}\n\t\tif (wednesdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Wednesday\";\n\t\t\telse daysOfWeek += \", Wednesday\";\n\t\t}\n\t\tif (thursdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Thursday\";\n\t\t\telse daysOfWeek += \", Thursday\";\n\t\t}\n\t\tif (fridayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Friday\";\n\t\t\telse daysOfWeek += \", Friday\";\n\t\t}\n\t\tif (saturdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Saturday\";\n\t\t\telse daysOfWeek += \", Saturday\";\n\t\t}\n\t\t\n\t\t// Make the proper string for the medication and then add it to the medList\n\t\tString tempFullDay = daysOfWeek + \" - \" + hourDropDown.getValue() + \":\" + minuteDropDown.getValue() + \":00\";\n\t\tmedList.add(new Medication(nameField.getText(), tempFullDay, descriptionField.getText()));\n\t\t//upcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + medList.get(medList.size() - 1).toString());\n\t\t//calls the save method to save the new medication to the txt file\n\t\tsave(tempFullDay);\n\t\tload();\n\t}",
"private void addUniqueToViewNodes() {\n\t\taddFilterButton();\n\t\t\n\t\t/* Button Initialization */\n\t\t//This Button Creates a Report\n\t\tcreateReportBtn = new Button(\"Create Report\");\n\t\tcreateReportBtn.getStyleClass().add(\"GreenButton\");\n\t\tcreateReportBtn.setOnAction(e -> {\n\t\t\tCreateReportPopup crPopup = new CreateReportPopup(\"Create Report\");\n\t\t\tcrPopup.show();\n\t\t});\n\t\t\n\t\t// This Button views the currently selected report in more detail\n\t\treportDetailsBtn = new Button(\"Report Details\");\n\t\treportDetailsBtn.getStyleClass().add(\"GreenButton\");\n\t\t\n\t\t/* Assembly */\n\t\tactionButtons.getChildren().addAll(createReportBtn, reportDetailsBtn);\n\t\t\n\t\tactionButtons.setPrefHeight(Values.ACTION_BUTTONS_PREF_WIDTH);\n\t}",
"@Override\n public void onClick(View view) {\n if (!Constants.getActivateBottomNavigationWidgetButton().equals(\"Test Preparation\")) {\n disabledActivateBottomNavigationWidgetButton();\n\n testPreparationButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.ic_test_preparation, 0, 0);\n testPreparationButton.setTypeface(null, Typeface.BOLD);\n testPreparationButton.setTextColor(getResources().getColor(R.color.bottom_navigation_widget_button_enable_color));\n\n Utils.showLibrary(LibraryActivity.this, \"test_preparation, mock_test\");\n Utils.triggerGAEvent(LibraryActivity.this, \"BottomNavigation\", \"Test Preparation\", customerId);\n }\n }",
"WebElement getNewAccountButton();",
"@When(\"click on create exam button1\")\r\n\tpublic void click_on_create_exam_button1() throws Exception {\t\r\n\t\t\r\n\t}",
"public void clickadd_card() \n\t{\n\t\n\t\tdriver.findElement(add_card).click();\n\n }",
"public void clickCreate() {\n\t\tbtnCreate.click();\n\t}",
"public void createOrderBtn(){\n createOrderBtn = new Button(\"Create order\");\n createOrderBtn.setLayoutX(305);\n createOrderBtn.setLayoutY(710);\n createOrderBtn.setPrefWidth(480);\n createOrderBtn.setPrefHeight(50);\n createOrderBtn.setStyle(\"-fx-background-color: #34ffb9\");\n createOrderBtn.setFont(new Font(18));\n createOrderBtn.setOnAction(event -> createOrderInDB());\n\n root.getChildren().addAll(createOrderBtn);\n }",
"public void onAddPaymentClickListner(){\n AddPayment = (Button)findViewById(R.id.btnAdd);\n\n AddPayment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addPayment(StudentIDPos, ClassIDPos);\n }\n });\n\n }",
"private void showButtonDemo(){\n Button submitButton = new Button(\"Submit\");\n\n Button cancelButton = new Button(\"Cancel\");\n\n submitButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n Question2Query ans = new Question2Query();\n String val= \"Sorry, we are unable to answer\";\n try {\n val = ans.ask(text.getText());\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n statusLabel.setText(\"\\n\"+val);\n }\n });\n\n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(\"Cancel Button clicked.\");\n }\n });\n\n //controlPanel.add(okButton);\n controlPanel.add(submitButton);\n controlPanel.add(cancelButton);\n mainFrame.setVisible(true);\n }",
"public Button createEditButtonWithGraphic() {\n ImageView editPencil = new ImageView(new Image(\"Pencil-icon.png\"));\n editPencil.setFitHeight(20);\n editPencil.setPreserveRatio(true);\n editPencil.setSmooth(true);\n\n Button editButton = new Button();\n editButton.setGraphic(editPencil);\n editButton.setTooltip(new Tooltip(\"Edit the Row\"));\n return editButton;\n }",
"private JButton getAddButton() {\n if (addButton == null) {\n addButton = new JButton();\n addButton.setText(\"Add\");\n addButton.setToolTipText(\"Add new notification settings for a site\");\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n addBalloonSettings();\n }\n });\n }\n return addButton;\n }",
"private void newOrderbutton(String txt) {\n Button btn = new Button(txt);\n newBtnStyle(btn);\n\n boolean containsbtn = false;\n btn.setId(txt);\n for (Node node : activeOrders.getChildren()) {\n String button = ((Button) node).getText();\n if (txt.equals(button))\n containsbtn = true;\n\n }\n if (!containsbtn) {\n activeOrders.getChildren().add(btn);\n\n changeActive(btn);\n } else {\n //Alert clerc about the amount to pay back.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Nyt bord\");\n alert.setHeaderText(\"Bord: \" + txt + \" eksistere allerede\");\n alert.showAndWait();\n }\n }",
"protected void addActivePathToolbarButton ()\n {\n\n }",
"public void addButton(HtmlSubmitButton b) {\r\n\t\t_buttons.add(b);\r\n\t\tadd(b, TYPE_COMP);\r\n\t}",
"void clickOnVehicleAddStatus() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\n\t}",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"public void adding() {\n\t\t By cr=By.xpath(\"//a[@href=\\\"/cart?add&itemId=EST-2\\\"]\"); \r\n\t\tWebElement we_cr=wt.ElementToBeClickable(cr, 20);\r\n\t\twe_cr.click();\r\n\t}",
"private void setUpAddBookButton()\n {\n setComponentAlignment(addBookButton, Alignment.BOTTOM_LEFT);\n addBookButton.setCaption(\"Add\");\n addBookButton.addClickListener(new Button.ClickListener() {\n public void buttonClick(Button.ClickEvent event)\n {\n Object id = bookTable.getValue();\n int book_id = (int)bookTable.getContainerProperty(id,\"id\").getValue();\n basket.add(allBooksBean.getIdByIndex(book_id-1));\n //basket.add(allBooks.get(book_id-1));\n errorLabel.setCaption(\"Successfully added book to Basket\");\n }\n });\n }",
"public DynaForm addButton(Button button) {\n\t\treturn null;\r\n\t}",
"public void makeReceiveButton() {\r\n JButton receive = new JButton(\"Receive a new champion recommendation\");\r\n new Button(receive, main);\r\n// receive.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// receive.setPreferredSize(new Dimension(2500, 100));\r\n// receive.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n receive.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n receiveChampionRecommendation();\r\n }\r\n });\r\n// main.add(receive);\r\n }",
"@Override\n\tprotected void buildButton() {\n\t\t\n\t}",
"private JButton setUpAcceptButton(final Player player) {\n JButton offerDeal = new JButton(\"Make Offer\");\n offerDeal.setAction(new AbstractAction(\"Make Offer\") {\n {\n putValue(Action.ACTION_COMMAND_KEY, getValue(Action.NAME));\n }\n @Override\n public void actionPerformed(ActionEvent e) {\n HumanPlayer humanPlayer = (HumanPlayer)player;\n if (humanPlayer.askPlayerYesOrNoQuestion(\"Are you sure you want to make \"\n + \"this deal?\", \"Deal Confirmation\")) {\n establishDealOffer();\n }\n }\n });\n return offerDeal;\n }",
"private void addForwardButton() {\n\t\tforwardButton = new EAdSimpleButton(EAdSimpleButton.SimpleButton.FORWARD);\n\t\tforwardButton.setEnabled(false);\n toolPanel.add(forwardButton);\n\t\tforwardButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcontroller.getNavigationController().goForward();\n\t\t\t}\n\t\t});\n\t}",
"public void onClick(ClickEvent event) {\n\t \t\r\n\t \tdynFormCT1.addChild(canvas4);\r\n\t \tSC.say(\"Clicou\");\r\n\t \t\r\n\t }",
"public RegistrationRutPage clickOnAddUserButton() {\n Log.info(\"Clicking on Add user button\");\n clickElement(addUserButton);\n return this;\n }",
"public JButton getAddButton(){ return addCustomTraitButton; }",
"private void addClick() {\n\t\tfindViewById(R.id.top_return).setOnClickListener(this);\n\t\tfm1_jhtx.setOnClickListener(this);\n\t\tfm1_sx.setOnClickListener(this);\n\t}",
"@Override\n public void onClick(View view) {\n //Executing based on the View Id\n switch (view.getId()) {\n case R.id.btn_product_config_add_attrs:\n //For \"Add More\" button, present under Additional Attributes\n\n //Add an Empty row for capturing Additional Attribute\n mProductAttributesAdapter.addEmptyRecord();\n break;\n }\n }",
"private void designBtnActionPerformed(ActionEvent evt) {\n }",
"protected void renderAddNewDataButton () {\n\t\tnew Timer() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tdataGrid.appendButton(I18Utilities.getInstance().getInternalitionalizeText(getAddDataIconCaptionI18nCode(), getAddDataIconDefaultCaption()), \"ui-icon-document\", new Command() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tshoAddNewDataEditor();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t}.schedule(100);\n\t}"
] | [
"0.6914137",
"0.67005384",
"0.65787315",
"0.65446293",
"0.65343815",
"0.65290785",
"0.6461869",
"0.6393111",
"0.6393111",
"0.6372382",
"0.63692844",
"0.63301927",
"0.63253367",
"0.6182456",
"0.61656755",
"0.6160912",
"0.6132663",
"0.60974526",
"0.6088479",
"0.6074254",
"0.60724396",
"0.6071596",
"0.6069039",
"0.6064208",
"0.6056477",
"0.60279423",
"0.60137516",
"0.6005207",
"0.6000056",
"0.5982296",
"0.5978738",
"0.59694713",
"0.59666353",
"0.59654045",
"0.59456533",
"0.59402674",
"0.59267366",
"0.59243155",
"0.59243155",
"0.5919136",
"0.5912511",
"0.5886041",
"0.58822703",
"0.5880854",
"0.58716464",
"0.58686244",
"0.58677864",
"0.5853711",
"0.5851617",
"0.58484954",
"0.58440006",
"0.5839883",
"0.58344555",
"0.58189744",
"0.5809112",
"0.58047235",
"0.5803973",
"0.57998604",
"0.57982767",
"0.5792256",
"0.5791533",
"0.5791533",
"0.57904005",
"0.57850593",
"0.5784421",
"0.57828224",
"0.57800883",
"0.57798594",
"0.57610244",
"0.5759593",
"0.5756298",
"0.57518184",
"0.5749477",
"0.5748518",
"0.5748319",
"0.57449025",
"0.5734852",
"0.5734256",
"0.57298553",
"0.57298285",
"0.57272696",
"0.572535",
"0.5723601",
"0.57125425",
"0.5708526",
"0.57065034",
"0.5705155",
"0.57012635",
"0.57010233",
"0.5698948",
"0.56966984",
"0.56935084",
"0.5692106",
"0.56917274",
"0.5691289",
"0.5690427",
"0.56884825",
"0.5686779",
"0.5678427",
"0.5669976",
"0.5666003"
] | 0.0 | -1 |
Constructors Create a detached SpecialOffer | public SpecialOffer() {
super(org.jooq.examples.sqlserver.adventureworks.sales.tables.SpecialOffer.SpecialOffer);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Offer() {\n }",
"public Offer() {\n }",
"public OrderOffered() {\r\n }",
"public OfferBean() {\n\n }",
"public Partage() {\n }",
"Offer getOffer();",
"public @NotNull Bidder newBidder();",
"public LesserDemandDetail() {\n //For serialization.\n }",
"public Offer makeOffer(Map<String, Object> makeOfferArgs) {\n\t\tOffer offer = new Offer();\n\n\t\t// this is making me think that I need a\n\n\t\toffer.setItem((Item) makeOfferArgs.get(\"item\"));\n\t\toffer.setQuantity((Integer) makeOfferArgs.get(\"quantity\"));\n\t\toffer.setOffer_price((Double) makeOfferArgs.get(\"offer_price\"));\n\t\toffer.setUser((User) makeOfferArgs.get(\"user\"));\n\t\toffer.setInstallments((Integer) makeOfferArgs.get(\"installments\"));\n\n\t\toffer = offerDao.create(offer);\n\n\t\t// will return an ID that is greater than 0 or not null\n\t\t// if it returns null, then that means that an offer wasn't made\n\t\treturn offer;\n\t}",
"@NotNull public Builder expectsAcceptanceOf(@NotNull Offer offer) {\n putValue(\"expectsAcceptanceOf\", offer);\n return this;\n }",
"public OfferingException() {\n }",
"public PurchaseRequestAttachment() {\r\n }",
"@NotNull public Builder expectsAcceptanceOf(@NotNull Offer.Builder offer) {\n putValue(\"expectsAcceptanceOf\", offer.build());\n return this;\n }",
"public Supermarket() {\n }",
"@NotNull public Builder offers(@NotNull Offer.Builder offer) {\n putValue(\"offers\", offer.build());\n return this;\n }",
"@NotNull public Builder offers(@NotNull Offer offer) {\n putValue(\"offers\", offer);\n return this;\n }",
"public ExpertiseEntity() {\n }",
"public TransferMarket() {\n }",
"public Supermarket() {\n }",
"private Reservation(Integer id, Person person, Seat seat, Showing showing, boolean objectOnly)\n throws PersistenceException{\n super();\n this.setId(id);\n personReservationSupervisor.getInstance().set(this, person);\n reservationSeatSupervisor.getInstance().set(this, seat);\n if(objectOnly) return;\n try{reservationShowingSupervisor.getInstance().add(showing,this);}catch(ConstraintViolation cv){}// Ok, because consistency is guaranteed with this statement\n }",
"public CreateAuctionInput(String language, String title, String shortDescription, String description, Integer adVisibility, String price, String offerPrice, Integer categoryId, Integer createdUserId, String addressInfo,\n String contactInfo, Integer conditionId, Integer locationsId, Integer shippingPackageId, String mainCat, String length, String breadth, String weight, String width, String auctionFromDateTime, String auctionToDateTime, String isHomePageLive, String lowerLimit, String priceLimit, String reservePrice) {\n super();\n this.language = language;\n this.title = title;\n this.shortDescription = shortDescription;\n this.description = description;\n this.adVisibility = adVisibility;\n this.price = price;\n this.offerPrice = offerPrice;\n this.categoryId = categoryId;\n this.createdUserId = createdUserId;\n this.addressInfo = addressInfo;\n this.contactInfo = contactInfo;\n this.conditionId = conditionId;\n this.locationsId = locationsId;\n this.shippingPackageId = shippingPackageId;\n this.mainCat = mainCat;\n this.length = length;\n this.breadth = breadth;\n this.weight = weight;\n this.width = width;\n this.auctionFromDateTime = auctionFromDateTime;\n this.auctionToDateTime = auctionToDateTime;\n this.isHomePageLive = isHomePageLive;\n this.lowerLimit = lowerLimit;\n this.priceLimit = priceLimit;\n this.reservePrice = reservePrice;\n }",
"private Triplet(Builder builder) {\n super(builder);\n }",
"private Equip(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Bid() {}",
"public Employe() {\r\n this(NOM_BIDON, null);\r\n }",
"private FavouriteContract() {\n }",
"public Supermarket()\n {\n }",
"public ClientDetailsEntity() {\n\t\t\n\t}",
"public void setNewFittedOffer(Offer offer){ \r\n\t\t//System.out.println(\"previous offer list size= \"+ this.FittedOffers.size());\r\n\t\tthis.FittedOffers.add(offer);\r\n\t\t//System.out.println(\"current offer list size= \"+ this.FittedOffers.size());\r\n\t}",
"public AbstractEntity() {\r\n\t}",
"public Market() {\n }",
"private HabitContract() {\n }",
"public SpecialDepot() {\n specialContainers = new ArrayList<>();\n }",
"public PromoBonusImpl() {\n }",
"public Offer(ItemStack offer, ItemStack original, ItemStack cost, int index) {\n this.offer = offer;\n this.original = original;\n this.cost = cost;\n this.index = index;\n }",
"public Potencial() {\r\n }",
"private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Experience(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Party() {\n // empty constructor\n }",
"private void createOffer() {\n// showToast(\"createOffer\");\n Log.d(TAG, \"createOffer: \");\n sdpConstraints = new MediaConstraints();\n sdpConstraints.mandatory.add(\n new MediaConstraints.KeyValuePair(\"OfferToReceiveAudio\", \"true\"));\n sdpConstraints.mandatory.add(\n new MediaConstraints.KeyValuePair(\"OfferToReceiveVideo\", \"true\"));\n localPeer.createOffer(new CustomSdpObserver(\"localCreateOffer\") {\n @Override\n public void onCreateSuccess(SessionDescription sessionDescription) {\n super.onCreateSuccess(sessionDescription);\n localPeer.setLocalDescription(new CustomSdpObserver(\"localSetLocalDesc\"), sessionDescription);\n Log.d(TAG, \"send offer sdp emit \");\n SignallingClient.getInstance().sendOfferSdp(sessionDescription);\n }\n }, sdpConstraints);\n }",
"public SupplyDemand() {\r\n\t\t//begin\r\n\t\tproducerList = new ArrayList<>();\r\n\t\tretailerList = new ArrayList<>();\r\n\t\t//end\r\n\t}",
"private PriceMapOffer buildPriceMapOffer(FacilityPriceMapOfferEntity offer) {\n PriceMapEmbed priceMap = (offer.getPriceMap() != null ? offer.priceMap().priceMap()\n : offer.getOffering().priceMap().priceMap());\n // @formatter:off\n return PriceMapOffer.newBuilder()\n .setOfferId(ProtobufUtils.uuidForUuid(offer.getId()))\n .setWhen(ProtobufUtils.timestampForInstant(offer.getOffering().getStartDate()))\n .setPriceMap(ProtobufUtils.priceMapForPriceMapEmbed(priceMap))\n .setRoute(DerRoute.newBuilder()\n .setExchangeUid(exchangeUid)\n .setFacilityUid(offer.getFacility().getFacilityUid())\n .setSignature(generateMessageSignature(cryptoHelper, exchangeKeyPair,\n decodePublicKey(cryptoHelper, offer.getFacility().getFacilityPublicKey()),\n asList(\n exchangeUid, \n offer.getFacility().getFacilityUid(), \n offer)))\n .build())\n .build();\n // @formatter:on\n }",
"public BillResource() {\n super();\n }",
"public LdPublisher newMyEntity() {\r\n return new LdPublisher();\r\n }",
"public Vendor(VendorBuilder builder){\r\n this.owner = builder.owner;\r\n this.address = builder.address;\r\n this.firstBrand = builder.firstBrand;\r\n this.secondBrand = builder.secondBrand;\r\n }",
"private MarketSnapshot() {\n\n }",
"private Vehicle(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public boolean Create(OfferModel offer)\n\t{\n\t\toffer.setId(850);\n\t\t\n\t\ttry {\t\n\t\t\t\n\t\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\t\tFile file = new File(classLoader.getResource(\"offer.txt\").getFile());\n\t\t\tFileOutputStream f = new FileOutputStream(file);\n\t\t\tObjectOutputStream o = new ObjectOutputStream(f);\n\t\t\t\n\t\t\to.writeObject(offer);\t\n\n\t\t\to.close();\n\t\t\tf.close();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}",
"protected Settlement() {\n // empty constructor\n }",
"private BookContract() {}",
"@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }",
"public Market(ArrayList<G> goods, ArrayList<B> bidders) throws MarketCreationException{\n // Create immutable goods list.\n if(goods == null || goods.size() == 0){\n throw new MarketCreationException(\"A market must contain at least one good.\");\n }\n ImmutableList.Builder<G> goodsBuilder = ImmutableList.builder();\n goodsBuilder.addAll(goods);\n this.goods = goodsBuilder.build();\n // Sets bidders\n this.setBidders(bidders);\n }",
"@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn new Book(this);\n\t\t//\t\treturn super.clone();\n\t}",
"public FlyerFeaturedItem() {}",
"@Test\n public void testSetOffer() {\n \n assertNull(o2.getOffer());\n o2.setOffer(\"testOffer2\");\n assertNotNull(o2.getOffer());\n assertEquals(\"testOffer2\", o2.getOffer());\n }",
"private void asignSpecial() {\n\t\tpizza = new Special();\n\t\tBaguette pz = new PizzaAdapter(pizza);\n\t\tSystem.out.println(pz.getDescription() + \". Total: $\" + pz.cost());\n\t}",
"public BasicDriveTeleOp() {\n\n }",
"public BrowseOffenceAMClient() {\r\n }",
"public void addOfferToOfferBook(Offer offer) {\n\n HashMap<Long, OfferBook> currentOfferBooks = getOfferBooks();\n OfferBook offerBook = getOfferBook(offer, currentOfferBooks);\n offerBook.addOfferHelper(new Offer(\n offer.getId(),\n offer.getOrganisationalUnit(),\n offer.getAsset(),\n offer.getQuantity(),\n offer.getType(),\n offer.getPrice(),\n offer.getTimestamp()\n ));\n\n setOfferBooks(currentOfferBooks);\n\n }",
"private PBPoker(Builder builder) {\n super(builder);\n }",
"public Household() {\n }",
"public Investment() {\r\n\t\t\r\n\t}",
"private A(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<com.xubao.test.simpleTest.protobufTest.ForExtendTest.A, ?> builder) {\n super(builder);\n }",
"public ProposalSpecialReviewForm() {\r\n }",
"private InheritableBuildingBlock() {\r\n super(IInheritableBuildingBlock.TYPE_ID);\r\n }",
"public ParticipantBehaviorDescription(){\n\t\t\n\t}",
"private BeeMessage(Builder builder) {\n super(builder);\n }",
"private ProtocolMessage(Builder builder) {\n super(builder);\n }",
"public ProductListContract() {}",
"public Employe () {\n this ( NOM_BIDON, null );\n }",
"public Entity(int n, Type t, Priority p, O thing, WhoAmI imposedId, WhoAmI creatorId, AttributeReader a) throws ThingsException {\r\n\t\t\r\n\t\t// Set fields\r\n\t\tnumeric = n;\r\n\t\tmyThing = thing;\r\n\t\tmyPriority = p;\r\n\t\tmyType = t;\r\n\t\tmyId = imposedId;\r\n\t\tmyCreatorId = creatorId;\r\n\t\t\r\n\t\t// Fix ids?\r\n\t\tif (myId == null) myId = cachedNobody;\r\n\t\tif (myCreatorId == null) myCreatorId = cachedNobody;\t\r\n\t\t\r\n\t\t// Stamp the time.\r\n\t\tstamp = System.currentTimeMillis();\r\n\t\t\r\n\t\t// Attributes\r\n\t\tif (a==null) throw new ThingsException(\"Cannot set attribute object as null.\", ThingsException.DATA_ATTRIBUTE_OBJECT_NULL);\r\n\t\tattributes = a;\t\r\n\t}",
"public TOfferGoodsRecord() {\n super(TOfferGoods.T_OFFER_GOODS);\n }",
"@Override\r\n\tpublic AbstractBoxGift createBoxGift() {\n\t\treturn new HardPlastic();\r\n\t}",
"private Person(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private D(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<com.xubao.test.simpleTest.protobufTest.ForExtendTest.D, ?> builder) {\n super(builder);\n }",
"@PostMapping(\"/offers\")\n @Timed\n public ResponseEntity<OfferDTO> createOffer(@RequestBody OfferDTO offerDTO) throws URISyntaxException {\n log.debug(\"REST request to save Offer : {}\", offerDTO);\n if (offerDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new offer cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n OfferDTO result = offerService.save(offerDTO);\n return ResponseEntity.created(new URI(\"/api/offers/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public PartyFeedbackDTO() {\n\t}",
"private ProfitPerTariffType ()\n {\n super();\n }",
"public Camp newEntity() { return new Camp(); }",
"public ClientEntity(final Entity e) {\r\n\t\tsuper(e);\r\n\t}",
"public MMCAgent() {\n\n\t}",
"protected Depot() {\n\t\tthis(null);\n\t}",
"private Part(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private DataObject(Builder builder) {\n super(builder);\n }",
"private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Trade(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }",
"public VirtualNetworkPeeringInner() {\n }",
"public ExchangeDesk(){\n }",
"public PremiumRoom(Hotel hotel, String nomor_kamar)\r\n {\r\n super(hotel, nomor_kamar);\r\n }",
"private Payload(Builder builder) {\n super(builder);\n }",
"private C_SellItem(Builder builder) {\n super(builder);\n }",
"public Poem(){}",
"public Person(Person o){\n destinationFloor=o.getDestinationFloor();\n }",
"public BaseContract() {}",
"Individual createIndividual();",
"private TrainingContract() {\n }",
"Builder addOffers(Offer.Builder value);",
"public PriceBreakdown() {\n }",
"@Override\n public IOffer getOffer() {\n return offer;\n }"
] | [
"0.690949",
"0.690949",
"0.5719668",
"0.5599704",
"0.5505847",
"0.5474923",
"0.5451186",
"0.54372406",
"0.54142237",
"0.5358425",
"0.53576946",
"0.5328825",
"0.52983737",
"0.5280226",
"0.52746105",
"0.5274302",
"0.526329",
"0.5253213",
"0.5247926",
"0.5240414",
"0.5183246",
"0.5165101",
"0.51547575",
"0.5142613",
"0.5140647",
"0.5136595",
"0.5136095",
"0.5120001",
"0.51176256",
"0.5110971",
"0.5104484",
"0.50767565",
"0.50464404",
"0.50462765",
"0.5032909",
"0.50243163",
"0.50217927",
"0.50207585",
"0.49977228",
"0.49954814",
"0.499408",
"0.4984892",
"0.4982289",
"0.49749008",
"0.49588573",
"0.49549383",
"0.49509194",
"0.49467644",
"0.4946624",
"0.49407488",
"0.49387807",
"0.49381396",
"0.49339193",
"0.49329212",
"0.4928258",
"0.49264672",
"0.49230453",
"0.4913867",
"0.4911911",
"0.4911493",
"0.49096596",
"0.49091452",
"0.49023706",
"0.49023402",
"0.49007544",
"0.49001387",
"0.48949358",
"0.48833823",
"0.48793945",
"0.4873076",
"0.48723787",
"0.48711684",
"0.486887",
"0.48651305",
"0.48619062",
"0.48617887",
"0.48612508",
"0.48610416",
"0.4854581",
"0.4844268",
"0.4843024",
"0.48398265",
"0.48379543",
"0.48367205",
"0.4833081",
"0.48313418",
"0.48313162",
"0.48274934",
"0.48222098",
"0.48213732",
"0.48169222",
"0.48165143",
"0.4811221",
"0.48088452",
"0.4807635",
"0.48048285",
"0.48043975",
"0.48043168",
"0.48040104",
"0.48038307"
] | 0.6993641 | 0 |
Given an array such that every next element differs from the previous by +/ 1. (i.e. a[i+1] = a[i] +/1 ) Find the local max OR min in O(1) time. The interviewer mentioned one more condition that the min or max should be nonedge elements of the array. Example: 1 2 3 4 5 4 3 2 1 > Local max is 5 5 4 3 2 1 2 3 4 5 > Local min is 1 1 2 3 4 5 > No local max or min exists 5 4 3 2 1 > No local max or min exists | private static void findLocalMaxOrMin() {
// Find the integer with no duplicates
// Priority Queues / Double ended priority queues are efficient O(1) with remove the min / max
Integer[] a = new Integer[]{0,1,2,3,4,5,6,7,8,7,6};
// int[] a2 = new int[]{5,4,3,2,1,2,3,4};
MinPQ<Integer> minPQ = new MinPQ<Integer>(a);
System.out.print(minPQ.min());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int serachMaxOrMinPoint(int [] A){\r\n\t\r\n\tint mid, first=0,last=A.length-1;\r\n\t\r\n\twhile( first <= last){\r\n\t\tif(first == last){\r\n\t\t\treturn A[first];\r\n\t\t}\r\n\t\telse if(first == last-1){\r\n\t\t\treturn Math.max(A[first], A[last]);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmid= first + (last-first)/2;\r\n\t\t\t\r\n\t\t\tif(A[mid]>A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\treturn A[mid];\r\n\t\t\telse if(A[mid]>A[mid-1] && A[mid]<A[mid+1])\r\n\t\t\t\tfirst=mid+1;\r\n\t\t\telse if(A[mid]<A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\tlast=mid-1;\r\n\t\t\telse return -1;\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n\t\r\n}",
"public static void minMaxDifference() {\n //int arr[] = {4,3,5,6,7,1,2};\n int arr[] = {6, 1, 7, -1, 3, 5, 9};\n int min_number = Integer.MAX_VALUE;\n int max_diff = Integer.MIN_VALUE;\n int current_difference;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] < min_number)\n min_number = arr[i];\n current_difference = arr[i] - min_number;\n if (current_difference > max_diff)\n max_diff = current_difference;\n }\n System.out.println(\"Max diff : \" + max_diff);\n }",
"public int solution(int[] a) {\n int max = 0;\n int min = Integer.MIN_VALUE;\n for (int i=0;i<a.length;i++) {\n if (i == 0) {\n min = a[i];\n } else if (a[i] > min) {\n max = Math.max(a[i] - min, max);\n } else if (a[i] < min) {\n min = a[i];\n }\n }\n return max;\n }",
"public List<List<Integer>> minimumAbsDifference(int[] arr) {\n\n int minNum = 10000000;\n int maxNum = -10000000;\n for (int num : arr) {\n if (num < minNum)\n minNum = num;\n\n if (maxNum < num)\n maxNum = num;\n }\n int[] cnt = new int[maxNum - minNum + 1];\n for (int num : arr)\n cnt[num - minNum] += 1;\n\n int ind = 0;\n for (int i = 0; i < maxNum - minNum + 1; i++) {\n for (int j = 0; j < cnt[i]; j++) {\n arr[ind] = i + minNum;\n ind += 1;\n }\n }\n\n List<List<Integer>> ret = new ArrayList<>();\n\n int minDiff = 10000000;\n for (int i = 0; i < arr.length - 1; i++) {\n int diff = arr[i + 1] - arr[i];\n if (minDiff > diff)\n minDiff = diff;\n }\n\n for (int i = 0; i < arr.length - 1; i++) {\n int diff = arr[i + 1] - arr[i];\n if (diff == minDiff)\n addPair(ret, arr[i], arr[i + 1]);\n }\n\n return ret;\n }",
"private static int maxDifference(int[] arr) {\n\t\tint maxDiff = arr[1] - arr[0];\n\t\tint minElement = arr[0];\n\t\t\n\t\tfor(int i = 1 ; i < arr.length; i++)\n\t\t{\n\t\t\tif(arr[i] - minElement > maxDiff)\n\t\t\t{\n\t\t\t\tmaxDiff = arr[i] - minElement;\n\t\t\t}\n\t\t\tif(arr[i] < minElement)\n\t\t\t{\n\t\t\t\tminElement = arr[i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn maxDiff;\n\t}",
"private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}",
"public static int[] minmax(int[] a)\n {\n \tint[] b= {0,0};\n \tint min=(int)1e9;\n \tint max=(int)-1e9;\n \tfor(int i=0;i<a.length;i++)\n \t{\n \t\tmin=Math.min(min, a[i]);\n \t\tmax=Math.max(max, a[i]);\n \t}\n \tb[0]=min;\n \tb[1]=max;\n \treturn b;\n }",
"static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }",
"void findLeadrsInArray2(int[] a){\n\t\tint n = a.length;\n\t\tSystem.out.println(a[n-1]);\n\t\tint max = a[n-1];\n\t\tfor(int i = n-2; i>=0 ; i--){\n\t\t\tif(a[i] < max){\n\t\t\t\tmax = a[i];\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public static int[] findMinMax(int[] nums){\n int[] minMax = new int[2];\n\n if(nums == null || nums.length == 0) return minMax;\n\n minMax[0] = nums[0];\n minMax[1] = nums[1];\n\n int bound = nums.length;\n\n if(nums.length % 2 == 1){\n bound = bound-1; \n }\n\n int min = 0; int max = 0;\n for(int i =0;i<bound;i =i+2){\n if(nums[i]<nums[i+1]){\n min = nums[i];\n max = nums[i+1]; \n }\n else{\n min = nums[i+1];\n max = nums[i];\n }\n if(min<minMax[0]){\n minMax[0] = min;\n }\n if(max>minMax[1]){\n minMax[1] = max;\n }\n }\n\n if(bound != nums.length){\n if(nums[bound] < minMax[0] ){\n minMax[0] = nums[bound];\n }\n if(nums[bound] > minMax[1] ){\n minMax[1] = nums[bound];\n }\n }\n return minMax;\n }",
"int arrayMaximalAdjacentDifference(int[] inputArray) {\n\n\t int maximum = Math.abs(inputArray[1]- inputArray[0]);\n\t int result = 0;\n\t for(int i =1; i<inputArray.length-1; i++){\n\t result =Math.abs(inputArray[i+1]- inputArray[i]);\n\t if(result>=maximum){\n\t maximum = result;\n\t }\n\t }\n\t \n\t return maximum;\n\t}",
"private static int max1DArrRecursive(int[] myArr1D, int min, int max)\n {\n int huge = 0;\n if(min == max)\n {\n huge = myArr1D[max];\n return huge;\n }\n else\n {\n huge = Math.max(myArr1D[min], max1DArrRecursive(myArr1D, min+1,max));\n return huge;\n }\n }",
"private int go(int a[]) {\n int n = a.length;\n int maxsofar = Integer.MIN_VALUE;\n int minsofar = Integer.MAX_VALUE;\n int curmin = 0, curmax = 0, total = 0;\n int ans = 0;\n\n for (int i = 0; i < n; i++) {\n curmax = Math.max(curmax + a[i], a[i]);\n curmin = Math.min(curmin + a[i], a[i]);\n maxsofar = Math.max(maxsofar, curmax);\n minsofar = Math.min(minsofar, curmin);\n total += a[i];\n }\n\n if (maxsofar > 0) {\n ans = Math.max(maxsofar, total - minsofar);\n } else {\n ans = maxsofar;\n }\n return ans;\n }",
"static void miniMaxSum(int[] arr) {\n int min=arr[0];\n int max=0;\n long maxsum=0,minsum=0;\n for(int i:arr)\n {\n if(i<min)\n {\n min=i;\n }\n if(i>max)\n {\n max=i;\n }\n }\n for(int i:arr)\n {\n if(i==max)\n {\n max=0;\n continue;\n }\n else\n {\n minsum+=i;\n }\n }\n for(int i:arr)\n {\n if(i==min)\n {\n min=0;\n continue;\n }\n else\n {\n maxsum+=i;\n }\n }\n System.out.println(minsum+\" \"+maxsum);\n }",
"static int minimumAbsoluteDifferenceSlower(int[] arr) {\n int smallest = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n int current = Math.abs(arr[i] - arr[j]);\n if (i == 0) {\n smallest = current;\n } else if (smallest > current) {\n smallest = current;\n }\n }\n }\n\n return smallest;\n }",
"private static int arrayDpHopper(int[] array) {\n\t\tint[] jumps = new int[array.length];\n\t\tif(array[0]==0||array.length==0){\n\t\t\treturn Integer.MAX_VALUE;\n\t\t}\n\t\tjumps[0]=0;\n\t\tfor(int i=1;i<array.length;i++){\n\t\t\tjumps[i]=Integer.MAX_VALUE;\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tif(i<=j + array[j] && jumps[j]!=Integer.MAX_VALUE){\n\t\t\t\t\tjumps[i] = arrayHopper.getMin(jumps[i],jumps[j]+1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn jumps[array.length-1];\n\t}",
"public static int minimumAbsoluteDifference(Integer[] input){\n List<Integer> sortedList = Arrays.asList(input);\n Collections.sort(sortedList);\n\n int minimumAbsoluteDifference = Integer.MAX_VALUE;\n\n for(int i = 0; i < sortedList.size() - 1; i ++){\n int currentAbsoluteDifference = Math.abs(sortedList.get(i) - sortedList.get(i + 1));\n\n if(currentAbsoluteDifference < minimumAbsoluteDifference){\n minimumAbsoluteDifference = currentAbsoluteDifference;\n }\n }\n\n return minimumAbsoluteDifference;\n }",
"public static int minimumAbsoluteDifference(int[] arr) {\n Arrays.sort(arr);\n int smallest = Math.abs(arr[0] - arr[arr.length - 1]);\n\n for (int i = 0; i < arr.length; i++) {\n if (i + 1 < arr.length) {\n int current = Math.abs(arr[i + 1] - arr[i]);\n if (smallest > current) {\n smallest = current;\n }\n }\n }\n\n return smallest;\n }",
"public int minDifference2(int[] array) {\n\t\tint sum = sum(array);\n\t\tboolean[][] matrix = new boolean[array.length][sum + 1];\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tfor (int j = 0; j <= sum; j++) {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tmatrix[i][j] = (j == 0) || (array[i] == j);\n\t\t\t\t} else {\n\t\t\t\t\tmatrix[i][j] = matrix[i - 1][j] || (j - array[i] >= 0 && matrix[i - 1][j - array[i]]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// post processing\n\t\tint offset = 0, index = sum / 2;\n\t\twhile (!matrix[array.length - 1][index + offset] && !matrix[array.length - 1][index - offset]) {\n\t\t\toffset++;\n\t\t}\n\t\treturn Math.min(\n\t\t\t\t(matrix[array.length - 1][index - offset]) ? Integer.MAX_VALUE : Math.abs(sum - 2 * (index - offset)),\n\t\t\t\t(matrix[array.length - 1][index + offset]) ? Integer.MAX_VALUE : Math.abs(sum - 2 * (index + offset)));\n\t}",
"static int minimumDistances(int[] a) {\n int l = a.length;\n Map<Integer, List<Integer>> map = new HashMap<>();\n for (int i = 0; i <l ; i++) {\n List<Integer> val = map.get(a[i]);\n if(val == null){\n val = new ArrayList<>();\n }\n val.add(i);\n map.put(a[i], val);\n }\n int min = Integer.MAX_VALUE;\n for (List<Integer> value:\n map.values()) {\n int c = value.size();\n if(c>1){\n for (int i = 0; i < c-1 ; i++) {\n min = Math.min(min, value.get(i+1)- value.get(i));\n }\n }\n }\n if(min == Integer.MAX_VALUE) min = -1;\n return min;\n\n\n }",
"public static Point minmax (int[] a) {\n int n = a.length;\n Point mm = new Point (a[0], a[0]);\n\n for (int i=1; i<n; i++) {\n if (a[i] > mm.x) mm.x = a[i];\n if (a[i] < mm.y) mm.y = a[i];\n }\n return mm;\n }",
"static void miniMaxSum(int[] arr) {\n long minSum=0,maxSum=0;\n int temp=0;\n for(int k=0; k<arr.length-1; k++) {\n for(int i=0; i <arr.length-k-1;i++) {\n if(arr[i]>arr[i+1] ) {\n temp=arr[i];\n arr[i]=arr[i+1];\n arr[i+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n minSum+=arr[i-1];\n maxSum+=arr[i];\n }\n System.out.print(minSum+\" \"+maxSum);\n\n }",
"static int[] closestNumbers(int[] arr) {\n\t\t\n \tList<Integer> res = new ArrayList<Integer>();\n \tArrays.sort(arr);\n \tint min=arr[1]-arr[0];\n \tres.add(arr[0]);\n \tres.add(arr[1]);\n \tfor(int i=2;i<arr.length;i++) {\n \t\tint nMin = arr[i]-arr[i-1];\n \t\tif(nMin<min) {\n \t\t\tres.clear();\n \t\t\tres.add(arr[i-1]);\n \t\t\tres.add(arr[i]);\n \t\t\tmin=nMin;\n \t\t}else if(nMin==min) {\n \t\t\tres.add(arr[i-1]);\n \t\t\tres.add(arr[i]);\n \t\t}\n \t}\n \tint res_f [] = new int[res.size()];\n \tfor(int j=0; j<res_f.length; j++) {\n \t\tres_f[j]=res.get(j);\n \t} \n \treturn res_f;\n }",
"public int findMin(int[] nums) {\n\t\t// corner\n\t\tif (nums.length == 1) {\n\t\t\treturn nums[0];\n\t\t}\n\t\t// Not rotated.\n\t\tif (nums[0] < nums[nums.length - 1]) {\n\t\t\treturn nums[0];\n\t\t}\n\n\t\t// Binary Search.\n\t\tint left = 0;\n\t\tint right = nums.length - 1;\n\t\t// int right = nums.length; // NG! (R = M version)\n\t\twhile (left <= right) {\n\t\t\t// while (left < right) { // NG! (R = M version)\n\t\t\tint mid = left + (right - left) / 2;\n\n\t\t\t// Find the valley.\n\t\t\t// nums[mid + 1] could cause array index out of bound when nums[mid] is the last\n\t\t\t// element.\n\t\t\t// However, for this problem, when nums[mid] is the second to the last, it\n\t\t\t// returns and\n\t\t\t// nums[mid] never reaches to the last element.\n\t\t\t// R = M version is NG because nums[mid] skips the second to the last and hits\n\t\t\t// the last\n\t\t\t// element depending on the case, in which case, nums[mid + 1] causes array\n\t\t\t// index out of bound.\n\t\t\tif (nums[mid] > nums[mid + 1]) {\n\t\t\t\treturn nums[mid + 1];\n\t\t\t}\n\t\t\t// Assert nums[mid] < nums[mid + 1] (no duplicates)\n\n\t\t\t// nums[mid - 1] could cause array index out of bound when the target is the\n\t\t\t// first element or\n\t\t\t// the second element.\n\t\t\t// However, for this problem, the code above returns when mid is equal to 0.\n\t\t\t// To be exact, when you use R = M - 1 version, mid is approaching index 0 as\n\t\t\t// the following:\n\t\t\t// 1. 2 -> 0 -> 1\n\t\t\t// 2. 3 -> 1 -> 0\n\t\t\t// ex) 1. [ 5, 1, 2, 3, 4 ], 2. [ 6, 1, 2, 3, 4, 5]\n\t\t\t// For case 1, the code above returns when mid is equal to 0, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t// For case 2, the code below returns when mid is equal to 1, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t//\n\t\t\t// Be careful!\n\t\t\t// Not rotated array can cause nums[-1] here for both of the two cases above\n\t\t\t// because\n\t\t\t// the code above does not return when mid is equal to 0, which causes index out\n\t\t\t// of bound here.\n\t\t\t// So, eliminate this case in advance.\n\t\t\tif (nums[mid - 1] > nums[mid]) {\n\t\t\t\treturn nums[mid];\n\t\t\t}\n\n\t\t\t// If the mid does not hit the valley, then keep searching.\n\t\t\t// I don't know why nums[mid] > nums[0] is ok in the LeetCode solution yet.\n\t\t\t// (No need to explore any further)\n\t\t\tif (nums[mid] > nums[left]) {\n\t\t\t\t// The min is in the right subarray.\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\t// The min is in the left subarray.\n\t\t\t\tright = mid - 1;\n\t\t\t\t// right = mid; // NG! (R = M version)\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}",
"static long[] riddle(long[] arr) {\n \t\n \tint len = arr.length; \n \tlong[] a = new long[len]; \t\n\t\tfor (int t = 0; t < len; t++) {\n\t\t\tlong max = 0;\n\t\t\tfor (int i = 0; i < len; i++) {\t\t\t\t\n\t\t\t\tlong min = 0;\n\t\t\t\tSystem.out.println();\n\t\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\t\tif (min == 0) {\n\t\t\t\t\t\tmin = arr[j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (min < arr[j]) {\n\t\t\t\t\t\t\tmin = arr[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(min + \" \" );\n\t\t\t\t}\n\t\t\t\tif (max == 0) {\n\t\t\t\t\tmax = min;\n\t\t\t\t} else {\n\t\t\t\t\tif (min > max) {\n\t\t\t\t\t\tmax = min;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta[t] = max;\t\t\t\t\n\t\t\t}\n\t\t} \t\n \treturn a;\n }",
"public int getIndexOfMaxNumber(int[] array) {\n\t\tint left = 0, right = array.length - 1;\n\t\twhile (left < right - 1) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid - 1] > array[mid]) {\n\t\t\t\treturn mid - 1;\n\t\t\t}\n\t\t\tif (array[mid] > array[mid + 1]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// up to this point,\n\t\t\t// mid == right || array[mid] < array[mid + 1] ||\n\t\t\t// mid == left || array[mid - 1] < array[mid]\n\t\t\tif (array[mid] <= array[left]) {\n\t\t\t\tright = mid;\n\t\t\t} else {\n\t\t\t\tleft = mid;\n\t\t\t}\n\t\t}\n\t\t// up to this point, left == right - 1;\n\t\treturn array[left] >= array[right] ? left : right;\n\t}",
"private static int maxDifferenceBetweenNumbers(int[] arr, int size) {\n\t\tint maximumDifference = 0;\n\t\t// minimum number seen is first element\n\t\tint minimumNumberSeen = arr[0];\n\t\t// Iterate over all the elements in the list\n\t\tfor (int index = 1; index < size; index++) {\n\t\t\t// Calculate the maximum difference and update\n\t\t\tmaximumDifference = Math.max(maximumDifference, arr[index] - minimumNumberSeen);\n\t\t\t// Check and update if number seen is less than minimum see sofar\n\t\t\tminimumNumberSeen = Math.min(minimumNumberSeen, arr[index]);\n\t\t}\n\t\treturn maximumDifference;\n\t}",
"public int maxWidthRamp(int[] A) {\r\n int n = A.length, res = 0;\r\n Stack<Integer> s = new Stack<Integer>();\r\n for (int i = 0; i < n; i++)\r\n if (s.isEmpty() || A[s.peek()] > A[i])\r\n s.push(i);\r\n for (int i = n - 1; i > res; i--)\r\n while (!s.isEmpty() && A[s.peek()] <= A[i])\r\n res = Math.max(res, i - s.pop());\r\n return res;\r\n }",
"public static int solution(int[] arr) {\n int[] dp = new int[arr.length];\n dp[0] = arr[0];\n int max = Integer.MIN_VALUE;\n \n for(int i = 1; i < arr.length; i++){\n if(dp[i - 1] > 0) dp[i] = arr[i] + dp[i - 1];\n else dp[i] = arr[i];\n max = Math.max(max, dp[i]);\n }\n \n return max;\n }",
"private static int peakOneD(int i, int[] nums) {\n if (i > 0 && nums[i] < nums[i - 1])\n return -1;\n if (i < nums.length - 1 && nums[i] < nums[i + 1])\n return 1;\n return 0;\n }",
"static void miniMaxSum(int[] arr) {\n\t\tlong max = Long.MIN_VALUE;\n\t\tlong min = Long.MAX_VALUE;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tlong compareMax = sum(i, arr);\n\t\t\tlong compareMin = sum(i, arr);\n\n\t\t\tif (max < compareMax)\n\t\t\t\tmax = compareMax;\n\t\t\tif (min > compareMin)\n\t\t\t\tmin = compareMin;\n\n\t\t}\n\t\tSystem.out.print(min);\n\t\tSystem.out.print(\" \");\n\t\tSystem.out.print(max);\n\t}",
"int absoluteValuesSumMinimization(int[] a) {\n return a[(a.length-1)/2];\n }",
"public int maxDiffSubArrays(int[] nums) {\n int[] leftMins = new int[nums.length];\n int[] leftMaxs = new int[nums.length];\n int[] rightMins = new int[nums.length];\n int[] rightMaxs = new int[nums.length];\n leftMins[0] = nums[0];\n leftMaxs[0] = nums[0];\n rightMins[nums.length-1] = nums[nums.length-1];\n rightMaxs[nums.length-1] = nums[nums.length-1];\n int leftSum = nums[0], rightSum = nums[nums.length-1];\n int leftMin=0, leftMax=0, rightMin=0, rightMax=0;\n for (int i=1;i < nums.length;i++) {\n leftMin = Math.min(leftMin, leftSum);\n leftMax = Math.max(leftMax, leftSum);\n leftSum += nums[i];\n leftMins[i] = Math.min(leftMins[i-1], leftSum-leftMax);\n leftMaxs[i] = Math.max(leftMaxs[i-1], leftSum-leftMin);\n }\n\n for (int i=nums.length-2;i>=0;i--) {\n rightMin = Math.min(rightMin, rightSum);\n rightMax = Math.max(rightMax, rightSum);\n rightSum += nums[i];\n rightMins[i] = Math.min(rightMins[i+1], rightSum-rightMax);\n rightMaxs[i] = Math.max(rightMaxs[i+1], rightSum-rightMin);\n }\n int result = Integer.MIN_VALUE;\n for (int i=0;i < nums.length-1;i++) {\n result = Math.max(result, Math.max(Math.abs(rightMaxs[i+1]-leftMins[i])\n ,Math.abs(leftMaxs[i]-rightMins[i+1])));\n }\n return result;\n }",
"public int findMinII(int[] nums) {\n int n = nums.length;\n int l = 0;\n int r = n - 1;\n int m;\n while (l + 1 < r) {\n while (r > 0 && nums[r] == nums[r-1]) r --;\n while (l < n-1 && nums[l] == nums[l+1]) l ++;\n m = (l + r) / 2;\n if (nums[m] > nums[l]) {\n l = m;\n }\n else if (nums[m] < nums[r]) {\n r = m;\n }\n }\n return Math.min(nums[0], Math.min(nums[l], nums[r]));\n }",
"public static int maxSubsetSumNoAdjacent(int[] array) {\n\t\tint[] solution = array.clone();\n\t\t\n\t\t//edge cases\n\t\tif(array.length ==0){\n\t\t\treturn 0;\n\t\t}else if(array.length==1){\n\t\t\treturn array[0];\n\t\t}\n\t\t//base case\t\t\n\t\tsolution[1] = Math.max(array[0], array[1]);\n\t\t//Dynamic programming implemntation\n\t\tfor(int i=2; i< array.length; i++){\n\t\t\tsolution[i] = Math.max((solution[i-2] + array[i]), solution[i-1]);\n\t\t\t\n\t\t}\n return solution[array.length-1];\n }",
"private static Pair<Double, Integer> findMaxEntry(double[] array) {\n int index = 0;\n double max = array[0];\n for (int i = 1; i < array.length; i++) {\n if ( array[i] > max ) {\n max = array[i];\n index = i;\n }\n }\n return new Pair<Double, Integer>(max, index);\n }",
"public int solution(int[] A) {\n\n List<Integer> seen = new ArrayList<Integer>();\n\n int minvalue = Integer.MAX_VALUE;\n int currentMin = 0;\n\n for (int i = 0; i < A.length; i++) {\n seen.add(A[i]);\n if (A[i] < minvalue)\n minvalue = A[i];\n if (minvalue < 0)\n minvalue = 1;\n }\n\n currentMin = setMinNotInList(seen, minvalue);\n\n return currentMin;\n\n }",
"private static ArrayList<Integer> findMaximumUnsortedSubArray(int[] input) {\n ArrayList<Integer> result = new ArrayList<>();\n int previous = -1;\n int left = -1;\n int right = -1;\n boolean failed = false;\n int minimumAfterFailure = Integer.MAX_VALUE;\n int maximumAfterFailure = Integer.MIN_VALUE;\n for(int i=0;i<input.length;i++) {\n if(input[i] < previous && !failed) {\n failed = true;\n minimumAfterFailure = input[i];\n maximumAfterFailure = input[i-1];\n right = i;\n continue;\n }\n if(input[i] < maximumAfterFailure) {\n right = i;\n } else {\n maximumAfterFailure = input[i];\n }\n if(input[i] < minimumAfterFailure) {\n minimumAfterFailure = input[i];\n }\n previous = input[i];\n }\n if(failed) {\n for(int i=0;i<input.length;i++) {\n if(input[i] > minimumAfterFailure) {\n left = i;\n break;\n }\n }\n result.add(left);\n result.add(right);\n }\n return result;\n }",
"public int findPeak(int[] A) {\n // write your code here\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] < A[mid + 1]) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n return A[start] > A[end] ? start : end;\n }",
"public static int max1Max2(number[] arr, int start, int end){\n\n if(start < end){\n int max1Index = 0;\n int middle = (end+start)/2;\n int index1 = max1Max2(arr, start, middle);\n int index2 = max1Max2(arr, middle+1, end);\n if (arr[index1].getKey() > arr[index2].getKey()){\n arr[index1].getPotentialMax2().push(arr[index2].getKey());\n max1Index = index1;\n }\n else{\n arr[index2].getPotentialMax2().push(arr[index1].getKey());\n max1Index = index2;\n }\n return max1Index; //recursion will arrive to this line at the end after it will split to pairs.\n }\n return start; // when the condition of (start<end) will be false because start==end,\n // it will tell us that the recursion split and arrived to subarray in length 1 (one node)\n // so we will return start\\end and it will enter to index1 / index2 params\n // depend on who calls the function max1Max2 with params of start, middle when\n //middle == start. or middle==end....\n //after this will happen it will get in to the code at lines 37-43 will be executed on the first pair\n //then the next pair and so on, each pair will return to index1 and index2 the index of the bigger\n // number from the pair, and will create new pair and so on\n }",
"static int minimumInRange(int a[], int from, int to){ //\"O(to-from+1)\" O(m)\n int min = from;\n for(int i = from+1; i<= to; i++){ //n times\n if(a[i]<a[min]){\n min = i;\n }\n }\n return min;\n }",
"public static int findMax(int[] a) {\r\n int max = a[0];\r\n\r\n //10th error , n = 1\r\n for (int n = 1; n < a.length; n++) {\r\n if (a[n] > max) {\r\n max = a[n];\r\n }\r\n }\r\n return max;\r\n\r\n }",
"@Test\n public void minDifferenceTest() {\n assertEquals(0, minDifference(new int[]{5, 3, 2, 4}));\n /**\n * Example 2:\n * Input: nums = [1,5,0,10,14]\n * Output: 1\n * Explanation: Change the array [1,5,0,10,14] to [1,1,0,1,1].\n * The difference between the maximum and minimum is 1-0 = 1.\n */\n assertEquals(1, minDifference(new int[]{1, 5, 0, 10, 14}));\n /**\n * Example 3:\n * Input: nums = [6,6,0,1,1,4,6]\n * Output: 2\n */\n assertEquals(2, minDifference(new int[]{6, 6, 0, 1, 1, 4, 6}));\n /**\n * Example 4:\n * Input: nums = [1,5,6,14,15]\n * Output: 1\n */\n assertEquals(1, minDifference(new int[]{1, 5, 6, 14, 15}));\n /**\n * Example 5:\n * Input: nums = [82,81,95,75,20]\n * Output: 1\n */\n assertEquals(1, minDifference(new int[]{82, 81, 95, 75, 20}));\n }",
"public int findMinOptimization(int[] nums) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n int target = nums[end];\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] <= target) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n if (nums[start] <= nums[end]) return nums[start];\n return nums[end];\n }",
"public int maxDistance(List<List<Integer>> arrays) {\r\n int min1 = Integer.MAX_VALUE, min2 = Integer.MAX_VALUE;\r\n int max1 = Integer.MIN_VALUE, max2 = Integer.MIN_VALUE;\r\n int min1Idx=-1, min2Idx=-1, max1Idx=-1, max2Idx=-1;\r\n\r\n for (int i=0; i<arrays.size(); ++i){\r\n int curMin = arrays.get(i).get(0);\r\n int curMax = arrays.get(i).get(arrays.get(i).size()-1);\r\n if (curMin < min1){\r\n min2=min1;\r\n min2Idx=min1Idx;\r\n min1=curMin;\r\n min1Idx=i;\r\n }\r\n else if (curMin<min2){\r\n min2=curMin;\r\n min2Idx=i;\r\n }\r\n\r\n if (curMax>max1){\r\n max2=max1;\r\n max2Idx=max1Idx;\r\n max1=curMax;\r\n max1Idx=i;\r\n }\r\n else if (curMax>max2){\r\n max2=curMax;\r\n max2Idx=i;\r\n }\r\n }\r\n if (min1Idx!=max1Idx) return max1-min1;\r\n return Math.max(max1-min2, max2-min1);\r\n }",
"static void miniMaxSum(int[] arr) {\n\n\n ArrayList<Long> numbers = new ArrayList<>();\n for (int i : arr\n ) {\n numbers.add(new Long(String.valueOf(i)));\n }\n //max sum\n Long maxSum=numbers.stream().sorted().skip(1).collect(Collectors.summingLong(x->x));\n Long minSum=numbers.stream().sorted(Comparator.reverseOrder()).skip(1).collect(Collectors.summingLong(x->x));\n System.out.println(minSum+\" \"+maxSum);\n }",
"public static int getMax(int[] inputArray){ \n int maxValue = inputArray[0]; \n for(int i=1;i < inputArray.length;i++){ \n if(inputArray[i] > maxValue){ \n maxValue = inputArray[i]; \n } \n } \n return maxValue; \n }",
"static int LCS(int arr[])\n {\n int size = arr.length;\n int max_so_far = Integer.MIN_VALUE, max_ending_here = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here = max_ending_here + arr[i];\n if (max_so_far < max_ending_here)\n max_so_far = max_ending_here;\n if (max_ending_here < 0)\n max_ending_here = 0;\n }\n return max_so_far;\n }",
"public int findMin(int[] nums) {\n int n = nums.length;\n int l = 0;\n int r = n - 1;\n int m;\n while (l + 1 < r) {\n m = (l + r) / 2;\n if (nums[m] > nums[l]) {\n l = m;\n }\n else if (nums[m] < nums[r]) {\n r = m;\n }\n }\n \n return Math.min(nums[0], Math.min(nums[l], nums[r]));\n }",
"public boolean check(int[] arr){\n\t\t\n\t\tint i,max=Integer.MIN_VALUE,min=Integer.MAX_VALUE;\n\t\tfor(i=0;i< arr.length;i++){\n\t\t\tif(arr[i]>max){\n\t\t\t\tmax=arr[i];\n\t\t\t}\n\t\t\tif(arr[i] < min){\n\t\t\t\tmin = arr[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max-min+1 != arr.length){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(i=0;i<arr.length;i++){\n\t\t\tif(arr[Math.abs(arr[i])-min] < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(arr[Math.abs(arr[i])-min] > 0){\n\t\t\t\tarr[Math.abs(arr[i])-min]= -arr[Math.abs(arr[i])-min]; \n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private static int[] findGreatestNumInArray(int[] array) {\r\n\t\tint maxValue = Integer.MIN_VALUE;\r\n \r\n\t\tint secondValue = Integer.MIN_VALUE;\r\n\t\t\r\n\t\tint thirdValue = Integer.MIN_VALUE;\r\n\t\t\r\n\t int[] result = new int[2];\r\n\t \r\n\t int[] result2 = new int[3];\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tif (array[i] > maxValue) {\r\n\t\t\t\tthirdValue = secondValue;\r\n\t\t\t\tsecondValue = maxValue;\r\n\t\t\t\tmaxValue = array[i];\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(array[i]>secondValue)\r\n\t\t\t{\r\n\t\t\t\tsecondValue = array[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(array[i]>thirdValue)\r\n\t\t\t{\r\n\t\t\t\tthirdValue = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\tallowResult( result,maxValue,secondValue);\r\n\t\t\r\n\t\tallowResult( result2,maxValue,secondValue,thirdValue);\r\n\t\t//return maxValue;\r\n\t\treturn result2;\r\n\t}",
"double largestNumber(double[] a) {\n\t\tdouble max = a[0];\n\t\tdouble no = 0;\n\t\tfor (int index = 1; index < a.length; index++) {\n\t\t\tif (max > a[index] && max > a[index + 1]) {\n\t\t\t\tno = max;\n\t\t\t\tbreak;\n\t\t\t} else if (a[index] > max && a[index] > a[index + 1]) {\n\t\t\t\tno = a[index];\n\t\t\t\tbreak;\n\t\t\t} else if (a[index + 1] > max && a[index + 1] > a[index]) {\n\t\t\t\tno = a[index + 1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn no;\n\t}",
"public int rob1(int[] nums) {\n int n = nums.length;\n if(n == 0) return 0;\n if(n == 1) return nums[0];\n int max = nums[0];\n for(int i = 1; i < n; i++){\n int local = Math.max(nums[i - 1], nums[i] + (i > 1 ? nums[i - 2] : 0));\n nums[i] = local;\n max = Math.max(local, max);\n }\n return max;\n }",
"static int getMaxCoinValMine(int vals[], int n) {\n int[][] maxVals = new int[n][n];\n for(int wind = 0; wind < n; wind++) {\n // start is always less than or equal to end\n for(int start=0, end = start+wind; end<n; start++,end++ ) {\n // no elements element\n if(wind==0) {\n maxVals[start][end] = 0;\n }\n else if(start == end) {\n // only single element\n maxVals[start][end] = vals[start];\n }\n else {\n // start >=0\n // calculate wind[start][end]\n // chose end, then value is val[end] for P1, val[start][end-1] for P2 and val[start][end-2] for P1\n int valEnd = vals[end] + (( start < end-2)? maxVals[start][end-2]:0);\n // chose start, then value is val[start] for P1, val[start+1][end] for P2 and val[start+2][end] for P1\n int valStart = vals[start] + ((start+2 < end)? maxVals[start+2][end]:0);\n maxVals[start][end] = max(valEnd, valStart);\n }\n }\n }\n return maxVals[0][n-1];\n\n }",
"private static int MinJumps(int array[], int n)\n\t{\n\t int[] jumps_array = new int[n];\n\t if (n == 0 || array[0] == 0)\n\t {\n\t return Integer.MAX_VALUE;\n\t }\n\t jumps_array[0] = 0;//initializing jumps_array\n\t for (int i = 1; i < n; ++i)\n\t {\n\t jumps_array[i] = Integer.MAX_VALUE;\n\t }\n\t for (int i = 1; i < n; i++)\n\t {\n\t for (int j = 0; j < i; j++)\n\t {\n\t if (i <= j + array[j] && jumps_array[j] != Integer.MAX_VALUE)//minimum number jumps to reach i \n\t {\n\t jumps_array[i] = min(jumps_array[i], jumps_array[j] + 1);//by comparing with previous points\n\t break;\n\t }\n\t }\n\t }\n\t return jumps_array[n-1];\n\t}",
"private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }",
"static void miniMaxSum(int[] arr) {\n Arrays.sort(arr);\n long sum = 0;\n for (int i : arr) {\n sum += i;\n }\n System.out.println((sum - arr[4]) + \" \" + (sum - arr[0]));\n }",
"private static int upperBound(int[] A, int target) {\n int max = A.length;\n int min = -1;\n while (max - min > 1) {\n int mid = ( max + min ) / 2;\n if(A[mid] <= target) {\n min = mid;\n } else {\n max = mid;\n }\n }\n\n return max;\n\n }",
"public int maxSubArray(int[] nums) {\n int maxNow = Integer.MIN_VALUE, maxEnd = 0;\n for (int i = 0; i < nums.length; i++) {\n maxEnd = maxEnd + nums[i];\n if (maxNow < maxEnd) {\n maxNow = maxEnd;\n }\n if (maxEnd < 0) {\n maxEnd = 0;\n }\n }\n return maxNow;\n\n }",
"int maxSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMin = findMin(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMin) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}",
"public static int maxSubsetSumNoAdjacent( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tif( array.length == 0 )\n\t\t\treturn 0;\n\t\tif( array.length == 1 )\n\t\t\treturn array[0];\n\n\t\tarray[1] = array[0] > array[1] ? array[0] : array[1];\n\n\t\tfor( int i = 2; i < array.length; i++ ) {\n\t\t\tint prevIndexSum = array[i - 1];\n\t\t\tint currentIdxSum = array[i - 2] + array[i];\n\n\t\t\tarray[i] = prevIndexSum > currentIdxSum ? prevIndexSum : currentIdxSum;\n\t\t}\n\n\t\treturn array[array.length - 1];\n\t}",
"public static void main(String[] args) {\n\t\tint arr[] = {2,4,11,5,8,1,9};\r\n\t\tint res = arr[1] - arr[0];\r\n\t\tfor(int i = 0; i < arr.length; i++) {\r\n\t\t\tfor(int j = i + 1; j < arr.length; j++) {\r\n\t\t\t\tres = Math.max(res, arr[j] - arr[i]);\r\n\t\t\t}\r\n\t\t}\r\n//\t\tSystem.out.println(first + \" : \" + last + \" : \" + max);\r\n\t\tSystem.out.println(res);\r\n\t}",
"static int findPeakWithDuplicates(int[] a) {\n int start = 0, end = a.length - 1;\n\n while (start <= end) {\n int mid = start + (end - start) / 2;\n\n if (mid < end && a[mid] > a[mid + 1])\n return mid;\n if (mid > start && a[mid] < a[mid - 1])\n return mid - 1;\n\n // if elements at start and end are duplicates then just skip them\n if (a[mid] == a[start] && a[mid] == a[start]) {\n if (a[start] > a[start + 1])\n return start;\n start++;\n\n if (a[end] < a[end - 1])\n return end - 1;\n end--;\n } else if (a[start] < a[mid] || a[start] == a[mid] && a[mid] > a[start])\n start = mid + 1;\n else\n end = mid - 1;\n\n }\n\n return -1;\n }",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"public static void main(String[] args) {\n int maxposition = -1;\n int i = 0;\n Random rnd = new Random();\n Scanner scanner = new Scanner(System.in);\n int arraylength = 0;\n while (arraylength < 2 || arraylength > 100){\n System.out.print(\"Enter desirable array range between 2 and 100 - \");\n arraylength = scanner.nextInt();\n }\n int array[] = new int[arraylength];\n for (i = 0; i <= (array.length - 1); i++) {\n array[i] = rnd.nextInt(255);\n }\n System.out.print(\"initial given array: \" + array[0]);\n for (i = 1; i <= (array.length - 1); i++) {\n System.out.print(\", \" + array[i]);\n }\n System.out.println(\";\");\n int max = array[0];\n//sorting\n // taking local maximums left\n while (maxposition != array.length - 1) {\n for (i = 1; maxposition < 0; i++) {\n if (i > array.length - 2) {\n maxposition = array.length - 1;\n }\n else {\n if (array[i] > array[i - 1]) {\n if (array[i] > array[i + 1]){\n max = array[i];\n maxposition = i;\n }\n }\n if (array[i] = array[i - 1]) {\n if (array[i] > array[i + 1]){\n max = array[i];\n maxposition = i;\n }\n }\n }\n }\n for (i = maxposition; i > 0; i--) {\n if (array[i] > array[i - 1]) {\n max = array[i];\n array[i] = array[i - 1];\n array[i - 1] = max;\n }\n }\n if (maxposition != array.length - 1) {\n maxposition = -1;\n }\n \n }\n // taking local minimums right\n maxposition = -1;\n max = array[0];\n while (maxposition != array.length - 1) {\n for (i = 1; maxposition < 0; i++) {\n if (i > array.length - 2) {\n maxposition = array.length - 1;\n }\n else {\n if (array[i] < array[i - 1]) {\n if (array[i] < array[i + 1]){\n max = array[i];\n maxposition = i;\n }\n }\n }\n }\n for (i = maxposition; i < arraylength -1; i++) {\n if (array[i] < array[i + 1]) {\n max = array[i];\n array[i] = array[i + 1];\n array[i + 1] = max;\n }\n }\n if (maxposition != array.length - 1) {\n maxposition = -1;\n }\n \n }\n\n // while (array[arraylength - 1] > array[arraylength - 2]) {\n // for (i = array.length - 1; i > 0; i--) {\n // if (array[i] > array[i - 1]) {\n // max = array[i];\n // array[i] = array[i - 1];\n // array[i - 1] = max;\n // }\n // }\n // }\n\n//showing user sorted array\n System.out.print(\"array sorted descending: \" + array[0]);\n for (i = 1; i <= (array.length - 1); i++) {\n System.out.print(\", \" + array[i]);\n }\n System.out.println(\";\");\n\t}",
"public int FindMinRotatedArray(int[] ar){\n\n int n = ar.length;\n int lo = 0;\n int hi = n - 1;\n while(lo <= hi){\n\n if(ar[lo] <= ar[hi]) // (sub) array is already sorted, yay!\n return ar[lo];\n\n int mid = lo + (hi - lo)/2; //prevent int overflow, assumes all are positive\n int next = (mid + 1) % n; //modulus is needed if mid is the start/end of the array\n int prev = (mid + n - 1) % n;\n\n //check if mid is the min. Both it's previous and next are higher\n if((ar[mid] <=ar[prev])&&(ar[mid] <=ar[next]))\n return ar[mid];\n\n //figure out where is the dip\n if(ar[mid] <= ar[lo])\n hi = mid - 1; //the dip is in the half left side\n else\n lo = mid + 1;\n }\n\n return -1;\n }",
"static int findMin0(int[] nums) {\r\n \r\n // **** sanity check ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[nums.length - 1] > nums[0])\r\n return nums[0];\r\n\r\n // **** loop looking for the next smallest value ****\r\n for (int i = 0; i < nums.length - 1; i++) {\r\n if (nums[i] > nums[i + 1])\r\n return nums[i + 1];\r\n }\r\n\r\n // **** min not found ****\r\n return -1;\r\n }",
"public int[] findMaxMinAvg(int[] arr){\n int max = 0, min = 0, sum = 0;\n for(int val : arr){\n if(val > max){\n max = val;\n } else if(val < min) {\n min = val;\n }\n sum += val;\n }\n\n int avg = sum / arr.length;\n return new int[]{max, min, avg};\n }",
"public static int arrayMax(int[] arr, int starting, int ending) {\n int ans = 0;\n for (int i = starting; i < ending; i++) {\n ans = Math.max(ans, arr[i]);\n }\n return ans;\n }",
"public static void solution(int a[])\n {\n Arrays.sort(a);\n int Min = 999999;\n for(int i = 1 ; i < a.length;i++)\n {\n if(a[i]-a[i-1]<Min) {\n Min = a[i] - a[i-1];\n }\n }\n for(int i = 0 ; i < a.length-1;i++)\n {\n if(a[i+1]-a[i] == Min)\n {\n System.out.print(a[i] + \" \" + a[i + 1] + \" \");\n }\n }\n }",
"public static int findPeakElement(int[] nums) {\n int l = 0, r = nums.length - 1;\n while (l < r) {\n int mid = l + (r - l) / 2;\n if (nums[mid] > nums[mid + 1])\n r = mid;\n else\n l = mid + 1;\n }\n return l;\n }",
"private static double findExtremum(final double[] data, final boolean min) {\n if (data.length > 0) {\n double extremum = data[0];\n if (min) {\n for (int i = 0; i < data.length; i++) {\n extremum = Math.min(extremum, data[i]);\n }\n } else {\n for (int i = 0; i < data.length; i++) {\n extremum = Math.max(extremum, data[i]);\n }\n }\n return extremum;\n }\n throw new IllegalArgumentException(\"Array of \" + (min ? \"min\" : \"max\") + \" values is empty.\");\n }",
"public int findLatestStep(int[] arr, int m) {\n int last = -1 ;\n Set<Integer> list = new HashSet<>();\n int n = arr.length;\n int num = 1;\n for (int i = 0; i < n; i++) {\n num <<= 1;\n }\n for (int i = 0; i < arr.length; i++) {\n int tmp = arr[i];\n\n int con = move(tmp);\n num = num|con;\n\n int copy = num;\n\n list = check(copy,n);\n\n for (int x :\n list) {\n if (x == m)\n last = i+1;\n }\n\n\n }\n return last;\n\n }",
"public double maxOfAbsoluteValues(double[] arr) {\n return 0;\n }",
"public static int getMaximum(int[] array) {\n int length = array.length;\n int max = array[0];\n for (int i = 1; i < length; i++) {\n if(max < array[i]) {\n max = array[i];\n }\n }\n\n Arrays.sort(array);\n// return array[length - 1];\n return max;\n }",
"int max(){\r\n int auxMax = array[0];\r\n for (int i=1;i<array.length;i++){\r\n if(array[i] > auxMax){\r\n auxMax = array[i];\r\n }\r\n }\r\n return auxMax;\r\n }",
"public int findMin(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n if (nums.length == 1) {\n return nums[0];\n }\n int l = 0;\n int r = nums.length - 1;\n while (l < r) {\n int m = (l + r) / 2;\n if (m > 0 && nums[m] < nums[m - 1]) {\n return nums[m];\n }\n if (nums[l] <= nums[m] && nums[m] > nums[r]) {\n l = m + 1;\n } else {\n r = m - 1;\n }\n }\n return nums[l];\n }",
"public static int max(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n\t\t\tif( m < a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"public static int secondaryArgmax(double[] a) {\n\t\tint mi = argmax(a);\n\t\t// scan left until increasing\n\t\tint i;\n\t\tfor (i=mi-1; i>=0 && a[i]<=a[i+1]; i--);\n\t\tint l = argmax(a,0,i+1);\n\t\tfor (i=mi+1; i<a.length && a[i]<=a[i-1]; i++);\n\t\tint r = argmax(a,i,a.length);\n\t\tif (l==-1) return r;\n\t\tif (r==-1) return l;\n\t\treturn a[l]>=a[r]?l:r;\n\t}",
"public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}",
"public int findMaxLength(int[] nums) {\n int[] arr = new int[2*nums.length+1];\n Arrays.fill(arr, -2);\n arr[nums.length] = -1;\n int max = 0;\n int count=0;\n for(int i=0;i<nums.length;i++){\n count += (nums[i]==0?-1:1);\n if(arr[count+nums.length]>=-1){\n max = Math.max(max,i-arr[count+nums.length]);\n }else{\n arr[count+nums.length]= i;\n }\n }\n return max;\n }",
"public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }",
"public int dp_os(int[] arr) {\n\n\t\tint[][] dp = new int[arr.length][arr.length];\n\t\t\n\t\tfor (int gap=0; gap<arr.length; gap++) {\n\t\t\n\t\t\tfor (int i=0,j=gap; j<arr.length; i++, j++) {\n\t\t\t\n\t\t\t\tint x = (i+2 <= j) ? dp[i+2][j] : 0;\n\t\t\t\tint y = (i+1 <= j-1) ? dp[i+1][j-1] : 0;\n\t\t\t\tint z = (i <= j-2) ? dp[i][j-2] : 0;\n\n\t\t\t\tdp[i][j] = Math.max(arr[i] + Math.min(x,y), arr[j] + Math.min(y,z));\n\t\t\t}\n\t\t}\n\n\t\treturn dp[0][arr.length-1];\n\t}",
"public static void main(String[] args) {\n int[] nums = {1, 3, 4, 5, 8, 9, 4};\n\n\n for (int i = nums.length - 1; i >= 0; i--) {\n System.out.print(\"reverse order \" + nums[i]);\n System.out.print(\"->\");\n }\n System.out.println(\"****\");\n int lastItem = nums[nums.length - 1];\n System.out.println(\"Last Item value \" + lastItem);\n System.out.println(\"middle item index value=\" + nums[nums.length / 2]);\n int sum = 0;\n for (int x = 0; x < nums.length; x++) {\n\n sum = sum + nums[x];\n }\n System.out.println(\"sum= \" + sum);\n int max =nums[0];\n for (int eachnums : nums) {\n if(eachnums>max){\n max=eachnums;\n }\n\n }\n System.out.println(\"max value = \"+max);\n int min=nums[0];\n\n for(int eachnums:nums){\n if(eachnums<min){\n min=eachnums;\n }\n }\n System.out.println(\"min = \"+min);\n }",
"void findLeadrsInArray1(int[] a){\n\t\tint n = a.length;\n\t\tboolean flag = true;\n\t\tfor(int i =0;i<n;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tif(a[i] < a[j]){\n\t\t\t\t\tflag = false; \n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag != false){\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}\n\t}",
"private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}",
"static int maxMin(int k, int[] arr) {\n Arrays.sort(arr);\n return IntStream.range(0, arr.length - k + 1).map(i -> arr[i + k - 1] - arr[i]).min().getAsInt();\n }",
"public int longestMountain(int[] arr) {\n int start = 0, res = 0;\n while(start < arr.length) {\n int peak = findPeak(arr, start);\n if(peak == start) {\n start = peak + 1;\n continue;\n }\n\n int valley = findValley(arr, peak);\n if(valley == peak) {\n start = valley + 1;\n continue;\n }\n\n res = Math.max(valley - start + 1, res);\n start = valley;\n }\n return res;\n }",
"public int findLHSOrigin(int[] nums) {\n if (nums.length < 2)\n return 0;\n\n Map<Double, Integer> map = new HashMap<>();\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < nums.length; i++) {\n map.put(nums[i] - 0.5, map.getOrDefault(nums[i] - 0.5, 0) + 1);\n map.put(nums[i] + 0.5, map.getOrDefault(nums[i] + 0.5, 0) + 1);\n set.add(nums[i]);\n }\n\n int ans = 0;\n for (Double d : map.keySet()) {\n// System.out.println(d +\" \"+ map.get(d));\n if (set.contains((int) (d - 0.5)) && set.contains((int) (d + 0.5))) {\n ans = ans < map.get(d) ? map.get(d) : ans;\n }\n }\n return ans;\n }",
"public void findMax(int[] arr){\n int max = arr[0];\n for(int val : arr){\n if(max < val){\n max = val;\n }\n }\n System.out.println( \"Maximum values: \" + max );\n }",
"private static int findMaxInArr(int[] arr) {\n\n\t\tint max = arr[0];\n\t\tfor (int elem : arr) {\n\t\t\tif (elem > max) {\n\t\t\t\tmax = elem;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public static int longestConsecutive(int[] num) {\n // Start typing your Java solution below\n // DO NOT write main() function\n \n if(num == null || num.length == 0) return 0;\n \n int min = Integer.MAX_VALUE;\n int max = Integer.MIN_VALUE;\n for(int i= 0; i< num.length; i++){\n if(num[i] > max){\n max = num[i];\n }\n if(num[i] < min){\n min = num[i];\n }\n }\n \n int range = max - min +1;\n BitSet bs = new BitSet(range);\n System.out.println(\"range \" + range);\n \n for(int i=0; i< num.length; i++){\n bs.set(num[i] - min);\n }\n \n int maxCount = 0;\n int start = -1;\n int i = 0;\n \n System.out.println(\"bs size \" + bs.size());\n while(i < bs.size() && !bs.get(i)){\n i++;\n }\n if(i < bs.size()){\n start = i;\n maxCount = 1;\n }\n \n //System.out.println(\"start \" + start + \" max \" + maxCount);\n for(int j=i+1; j< bs.size() && j >=1; j++){\n if(bs.get(j) != bs.get(j-1)){\n if(bs.get(j) && start == -1){\n start = j;\n }\n if(!bs.get(j) && start != -1){\n if(maxCount < j - start){\n maxCount = j - start;\n }\n start = -1;\n }\n //System.out.println(\"start \" + start + \" max \" + maxCount);\n \n }\n }\n return maxCount;\n }",
"public static int[] minUnsortedArray(int []sample){\n\t\tint s=0;\n\t\t//O(n)\n\t\twhile(s<sample.length-1 && sample[s]<=sample[s+1]){\n\t\t\ts++;\n\t\t}\n\t\tif(s==sample.length-1){\n\t\t\treturn null;\n\t\t}\n\t\tint e=sample.length-1;\n\t\t//O(n)\n\t\twhile(e>=1 && sample[e]>=sample[e-1]){\n\t\t\te--;\n\t\t}\n\t\t\n\t\tint min=sample[s];\n\t\tint max=sample[s];\n\t\t\n\t\t//O(n)\n\t\tfor(int i=s+1;i<=e;i++){\n\t\t\tif(min>sample[i]){\n\t\t\t\tmin=sample[i];\n\t\t\t}\n\t\t\tif(max<sample[i]){\n\t\t\t\tmax=sample[i];\n\t\t\t}\n\t\t}\n\t\t//O(n)\n\t\tfor(int i=0;i<s;i++){\n\t\t\tif(sample[i]>min){\n\t\t\t\ts=i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//O(n)\n\t\tfor(int i=sample.length-1;i>e;i--){\n\t\t\tif(sample[i]<max){\n\t\t\t\te=i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint []result={s,e};\n\t\treturn result;\n\t\n\t}",
"public static int maxValue(int [] array){\n int hold = array[0];\n for(int i = 1; i < array.length; i++){\n if(array[i] > hold){\n hold = array[i];\n }\n }\n return hold;\n }",
"static int recurseMaxStolenValue(int[] values,int i){\r\n\t if(i >= values.length) return 0;\r\n\t if(i == values.length -1) return values[values.length-1];\r\n\t \r\n\t return Math.max( values[i] + recurseMaxStolenValue(values,i+2)\r\n\t ,values[i+1] + recurseMaxStolenValue(values,i+3)\r\n\t );\r\n\t /*\r\n\t *Approach #2 for Recursion --> This approach won't work to convert to DP,but recursion yields right result\r\n\t */\r\n\t \r\n\t /*\r\n\t if(i >= values.length) return 0; \r\n\t int result1 = values[i]+recurseMaxStolenValue(values,i+2);\r\n\t int result2 = recurseMaxStolenValue(values,i+1);\r\n\t return (Math.max(result1,result2));\r\n\t */\r\n\t \r\n\t }",
"public static int minAdjDiff(int arr[], int n) {\n\n // Your code here\n int min = Math.abs(arr[0] - arr[1]);\n for(int i =1;i<n-1;i++){\n min = Math.min(min, Math.abs(arr[i]-arr[i+1]));\n }\n min = Math.min(min, Math.abs(arr[n-1]-arr[0]));\n return min;\n }",
"public static int[] findSmallestRangeOfNumbersIfYouHaveToPickOneNumberFromEveryList(int[][] source) {\n int[] spread = { 0, Integer.MAX_VALUE };\n //\n int[] arrayOfPointersAsOfNow = new int[source.length];\n int[] arrayAsOfNow = new int[source.length];\n for (int i = 0; i < source.length; i++)\n arrayAsOfNow[i] = source[i][0];\n \n while (!allPointersAtEnd(arrayOfPointersAsOfNow, source)) {\n int pos = findNextSmallestElementsWhoHasntReachedTheEndPos(arrayAsOfNow, arrayOfPointersAsOfNow, source);\n arrayOfPointersAsOfNow[pos]++;\n arrayAsOfNow[pos] = source[pos][arrayOfPointersAsOfNow[pos]];\n int[] newSpread = calculateSpread(arrayAsOfNow);\n if (newSpreadSmallerThanOldSpread(newSpread, spread))\n spread = newSpread;\n }\n return spread;\n }",
"static int maxSubArraySum(int a[], int size)\n {\n int Cur_Max = a[0];\n int Prev_Max = a[0];\n \n for (int i = 1; i < size; i++)\n {\n //we want to know if the summition is increassing or not\n Prev_Max = Math.max(a[i], Prev_Max+a[i]);\n //Take Decision to change the value of the largest sum or not\n Cur_Max = Math.max(Cur_Max, Prev_Max);\n }\n return Cur_Max;\n }",
"public int maxSubArray(int[] nums) {\n int[] dp = new int[nums.length];\n dp[0] = nums[0];\n int res = nums[0];\n for (int i = 1; i < nums.length; i++) {\n dp[i] = nums[i] + (dp[i - 1] < 0 ? 0 : dp[i - 1]);\n res = Math.max(res, dp[i]);\n }\n return res;\n }",
"include<stdio.h>\nint main()\n{\n int arr_size;\n scanf(\"%d\",&arr_size);\n int arr[10];\n // Get the array elements\n for(int idx = 0; idx <= arr_size - 1; idx++)\n {\n scanf(\"%d\",&arr[idx]);\n }\n // Get the searching element 1\n int max;\n if(arr[0]>arr[1])\n {\n max=arr[0];\n }\n else\n {\n max=arr[1];\n }\n \n for(int idx = 2; idx <= arr_size - 1; idx++)\n {\n if(max< arr[idx])\n {\n max= arr[idx];\n }\n }\n printf(\"%d\\n\",max);\n return 0;\n}"
] | [
"0.7186482",
"0.7112237",
"0.68484336",
"0.67237645",
"0.66650313",
"0.64264834",
"0.63945454",
"0.6377091",
"0.63741934",
"0.6367418",
"0.6356753",
"0.63455755",
"0.6341456",
"0.629266",
"0.6276331",
"0.6265875",
"0.623666",
"0.6232323",
"0.6204513",
"0.62014705",
"0.6158751",
"0.6152701",
"0.6152665",
"0.6152114",
"0.6145626",
"0.6126327",
"0.6097197",
"0.6090191",
"0.6069951",
"0.606757",
"0.60350394",
"0.60272604",
"0.60266805",
"0.60121924",
"0.60107434",
"0.5989158",
"0.59748614",
"0.5972459",
"0.5971603",
"0.59638774",
"0.5946626",
"0.59086984",
"0.59059536",
"0.5905383",
"0.5897169",
"0.58968335",
"0.5883987",
"0.58815587",
"0.58607304",
"0.5860694",
"0.58595616",
"0.5849579",
"0.5849452",
"0.5846089",
"0.58372337",
"0.5833319",
"0.58307654",
"0.58292174",
"0.58290976",
"0.5828214",
"0.5824376",
"0.5823783",
"0.5818135",
"0.58167315",
"0.5816534",
"0.5814145",
"0.5813298",
"0.5813211",
"0.5812741",
"0.5809119",
"0.58015406",
"0.5801425",
"0.57984626",
"0.579439",
"0.57837975",
"0.5782719",
"0.57757884",
"0.5769817",
"0.5766281",
"0.5758894",
"0.57585686",
"0.5753886",
"0.57496154",
"0.57474405",
"0.5745207",
"0.57415533",
"0.5738244",
"0.57319355",
"0.5723153",
"0.5717658",
"0.5716188",
"0.571106",
"0.57096875",
"0.57084584",
"0.5707399",
"0.5703906",
"0.5703895",
"0.5698197",
"0.56973994",
"0.56953055"
] | 0.65996146 | 5 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.ROLE_ID | public Integer getRoleId() {
return roleId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public Long getRoleid() {\n return roleid;\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public int getRolesRolId() throws DataStoreException {\r\n return getInt(ROLES_ROL_ID);\r\n }",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"public SecRole getRoleById(Long role_Id);",
"public SysRole getSysRole(final Long roleId);",
"SysRole selectByPrimaryKey(String id);",
"public int getRolesRolId(int row) throws DataStoreException {\r\n return getInt(row,ROLES_ROL_ID);\r\n }",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"public Long getRolemenuid() {\n return rolemenuid;\n }",
"SysRoleDO selectByPrimaryKey(Long id);",
"public Integer getRolePid() {\n return rolePid;\n }",
"public Role getByRoleId(long roleId);",
"SecurityRole getRole();",
"public String getRolecode() {\n return rolecode;\n }",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }",
"public String getRoleCode() {\n return roleCode;\n }",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"public Role getRoleById(int id);",
"UsercontrollerRole selectByPrimaryKey(Integer roleId);",
"public String getClRoleId() {\r\n\t\treturn clRoleId;\r\n\t}",
"@Transient\n public String getCurrentRole() {\n \tString currentRole = \"\";\n \tif (this.roles != null) {\n \t\tIterator<Role> it = roles.iterator();\n \t\tcurrentRole = it.next().getName().substring(5);\n \t\twhile (it.hasNext()) {\n \t\t\tRole role = it.next();\n \t\t\tcurrentRole += \"/\" + role.getName().substring(5);\n \t\t}\n \t}\n \treturn currentRole;\n }",
"@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"com.message.MessageInfo.RoleVO getRole();",
"String getRole();",
"String getRole();",
"@Override\n\tpublic int getIDByName(String rolename) {\n\t\treturn this.RoleDao.getIDByName(rolename);\n\t}",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"public List getSysRoles(SysRole sysRole);",
"public String getRole() {\r\n return role;\r\n }",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"public java.lang.String getRole() {\n return role;\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public String getRole_name() {\n return role_name;\n }",
"String getRoleName();",
"User_Role selectByPrimaryKey(Integer id);",
"public static String getRole(int id) throws SQLException {\n boolean cdt1 = Checker.checkValidRolesId(id);\n // if it is a valid role id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n String role = DatabaseSelector.getRole(id, connection);\n connection.close();\n return role;\n }\n return null;\n }",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public String getLoginRole() {\n return loginRole;\n }",
"public String getRole() {\n\t\t\treturn role;\n\t\t}",
"public String getRole() {\n return this.role;\n }",
"SysRoleUser selectByPrimaryKey(Long id);",
"public String getRole() {\n return this.state.getRole();\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\n\treturn strRoleName;\n }",
"public String getUserSubMenuRole() {\n return sessionData.getUserSubMenuRole();\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }",
"TDLRoleEntity getTDLRole(Long id);",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"RoleType getRoleType();",
"public Integer RoleByUser(Integer id) {\n\t\treturn userDao.RoleByUser(id);\r\n\t}",
"public String getCurrentRole() {\r\n return currentRole;\r\n }",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n AUserRole selectByPrimaryKey(Integer id);",
"public String roleName() {\n return this.roleName;\n }",
"JindouyunRole selectByPrimaryKey(Integer id);",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public com.a9.spec.opensearch.x11.QueryType.Role xgetRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n return target;\n }\n }",
"public List<Role> getRole() {\n\t\treturn userDao.getRole();\r\n\t}",
"TblRoles findByIdRol(long idRol);",
"public AXValue getRole() {\n return role;\n }",
"public String getrole(String id){\n User user = getById(id);\n return user.getRole();\n }"
] | [
"0.7381317",
"0.71698076",
"0.7151655",
"0.7138239",
"0.7087284",
"0.70804995",
"0.70601827",
"0.7056786",
"0.7056786",
"0.7056786",
"0.7056786",
"0.7046369",
"0.70424557",
"0.70424557",
"0.70424557",
"0.70123386",
"0.70123386",
"0.70123386",
"0.69764704",
"0.69633734",
"0.68863577",
"0.6808878",
"0.6782671",
"0.67376363",
"0.65142834",
"0.64433324",
"0.64167887",
"0.6373495",
"0.63231224",
"0.6312188",
"0.6261393",
"0.6246735",
"0.61857104",
"0.6183796",
"0.61832285",
"0.61712736",
"0.6149505",
"0.6139015",
"0.6118225",
"0.60760283",
"0.6074799",
"0.60720646",
"0.6069631",
"0.60678595",
"0.6061335",
"0.60505116",
"0.60505116",
"0.6035476",
"0.6033805",
"0.6029795",
"0.60237193",
"0.60066694",
"0.60061425",
"0.6001683",
"0.5991524",
"0.5987728",
"0.5981212",
"0.59759915",
"0.5972391",
"0.594537",
"0.5939421",
"0.59320587",
"0.59249175",
"0.5919334",
"0.59049755",
"0.58805895",
"0.58805895",
"0.5878938",
"0.5873517",
"0.58675045",
"0.58498544",
"0.58468246",
"0.58468246",
"0.58468246",
"0.58468246",
"0.58468246",
"0.58468246",
"0.58443165",
"0.5842649",
"0.58355635",
"0.5834812",
"0.5829233",
"0.5828088",
"0.5812234",
"0.5807108",
"0.5807108",
"0.579836",
"0.579836",
"0.5797719",
"0.5788257",
"0.57800156",
"0.5775821",
"0.577014"
] | 0.71220535 | 11 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.ROLE_ID | public void setRoleId(Integer roleId) {
this.roleId = roleId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public Long getRoleid() {\n return roleid;\n }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public void setRolesRolId(int row,int newValue) throws DataStoreException {\r\n setInt(row,ROLES_ROL_ID, newValue);\r\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"public void setRoleid(Integer roleid) {\r\n this.roleid = roleid;\r\n }",
"public void setRoleId(Long roleId) {\r\n this.roleId = roleId;\r\n }",
"public void setRoleId(int roleId) {\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public SysRole getSysRole(final Long roleId);",
"public void saveSysRole(SysRole sysRole);",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public void setRoleId(Integer roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"public void setRolesRolId(int newValue) throws DataStoreException {\r\n setInt(ROLES_ROL_ID, newValue);\r\n }",
"@Override\n\tpublic Integer updatemenuroleId(String roleId) {\n\t\tInteger updatemenuroleId = mapper.updatemenuroleId(roleId);\n\t\treturn updatemenuroleId;\n\t}",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"SysRole selectByPrimaryKey(String id);",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"public void setRoleId(String roleId)\r\n\t{\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public void setRoleId(String roleId) {\n\t\tthis.role_id = roleId;\n\t}",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId;\n }",
"public SecRole getRoleById(Long role_Id);",
"LoggedUser changeRole(String roleId) throws IOException;",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"public void setRoleId(Long roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"public void xsetRole(com.a9.spec.opensearch.x11.QueryType.Role role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().add_attribute_user(ROLE$0);\n }\n target.set(role);\n }\n }",
"public void setRoleid(Long roleid) {\n this.roleid = roleid;\n }",
"public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }",
"public void setRoleId(BigDecimal roleId) {\r\n this.roleId = roleId;\r\n }",
"public void setRole(String role)\n {\n _role=role;\n }",
"SysRoleDO selectByPrimaryKey(Long id);",
"public void setRole(com.a9.spec.opensearch.x11.QueryType.Role.Enum role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ROLE$0);\n }\n target.setEnumValue(role);\n }\n }",
"void setRole(final SecurityRole role);",
"public int getRolesRolId() throws DataStoreException {\r\n return getInt(ROLES_ROL_ID);\r\n }",
"@Insert({\n \"replace into A_USER_ROLE (id, user_id, \",\n \"role_id)\",\n \"values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, \",\n \"#{roleId,jdbcType=INTEGER})\"\n })\n int insert(AUserRole record);",
"@Update({\n \"update A_USER_ROLE\",\n \"set user_id = #{userId,jdbcType=INTEGER},\",\n \"role_id = #{roleId,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(AUserRole record);",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"void setRole(String roles);",
"public void setRole(Integer role) {\n\t\tthis.role = role;\n\t}",
"public void setRolePid(Integer rolePid) {\n this.rolePid = rolePid;\n }",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }",
"public void setRole(Map<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }",
"public Long getRolemenuid() {\n return rolemenuid;\n }",
"void setRoleDao(final RoleDao roleDao);",
"int updateByPrimaryKey(SystemRoleUserMapperMo record);",
"public void setRoleid(String roleid) {\n this.roleid = roleid == null ? null : roleid.trim();\n }",
"public void setRoleid(String roleid) {\n this.roleid = roleid == null ? null : roleid.trim();\n }",
"public void setRoleid(String roleid) {\n this.roleid = roleid == null ? null : roleid.trim();\n }",
"@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}",
"public void setRole(String strRole) {\n\t\tif (\"ADMIN\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.ADMIN);\n\t\t}else if (\"DEVELOPER\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.DEVELOPER);\n\t\t}else if (\"SUPPORT\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.SUPPORT);\n\t\t}\n\t}",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }",
"SysRoleUser selectByPrimaryKey(Long id);",
"public ManageRoleManagedBean() {\r\n selectedRole = new RoleEntity();\r\n }",
"public void removeSysRole(final Long roleId);",
"void changeRole(User user, Role role, String token) throws AuthenticationException;",
"@Override\n\tpublic void addRole(Role role) {\n\t\tSnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);\n\t\tlong id = idWorker.nextId();\n\t\trole.setRoleid(Long.toString(id));\n\t\troleMapper.addRole(role);\n\t}",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"public Role getByRoleId(long roleId);",
"public List getSysRoles(SysRole sysRole);",
"public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }",
"public abstract void setRoleManager(OwRoleManager roleManager_p);",
"public void setRole(String role) {\r\n this.role = role;\r\n }"
] | [
"0.7143289",
"0.64473665",
"0.6446819",
"0.64380366",
"0.6425378",
"0.6387396",
"0.6387396",
"0.6387396",
"0.6387396",
"0.6387396",
"0.6387396",
"0.6387396",
"0.6387396",
"0.6383851",
"0.63802797",
"0.63736385",
"0.6362358",
"0.6362358",
"0.6362358",
"0.6362358",
"0.6349118",
"0.6349118",
"0.6349118",
"0.6346246",
"0.6333422",
"0.63252103",
"0.6318743",
"0.6318743",
"0.6318743",
"0.6303502",
"0.629193",
"0.6273388",
"0.6209472",
"0.6199917",
"0.6199162",
"0.6154907",
"0.6138375",
"0.61088705",
"0.6076585",
"0.60731906",
"0.6058374",
"0.6058374",
"0.6058374",
"0.6058374",
"0.6050037",
"0.60293216",
"0.60105586",
"0.5987073",
"0.59781665",
"0.59781665",
"0.5977411",
"0.5937865",
"0.5918294",
"0.5914864",
"0.5913498",
"0.5911634",
"0.5889627",
"0.5884126",
"0.58609927",
"0.5840588",
"0.5835702",
"0.58284974",
"0.5779965",
"0.57743",
"0.57475984",
"0.5721086",
"0.5713055",
"0.5676825",
"0.56448865",
"0.5641074",
"0.56370133",
"0.5624696",
"0.5617351",
"0.56076473",
"0.56048566",
"0.5601",
"0.5591532",
"0.5591532",
"0.5591532",
"0.5570108",
"0.556818",
"0.5564442",
"0.5546903",
"0.5529798",
"0.55211604",
"0.5503355",
"0.549822",
"0.5496538",
"0.5492024",
"0.54903084",
"0.5478938",
"0.547128",
"0.5451041"
] | 0.62828743 | 38 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.PLAT_ID | public Integer getPlatId() {
return platId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getp_org_id() {\n return (String)getNamedWhereClauseParam(\"p_org_id\");\n }",
"public Integer getPlatformId() {\r\n return platformId;\r\n }",
"public YangString getPlmnIdValue() throws JNCException {\n return (YangString)getValue(\"plmn-id\");\n }",
"SysRole selectByPrimaryKey(String id);",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public Integer getSysId() {\n return sysId;\n }",
"Integer getRealmId();",
"public long getOrganizationId();",
"SysRoleDO selectByPrimaryKey(Long id);",
"public String getSysCompanyId() {\n return sysCompanyId;\n }",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public StrColumn getEbiExpressionSystemPlasmid() {\n return delegate.getColumn(\"ebi_expression_system_plasmid\", DelegatingStrColumn::new);\n }",
"public StrColumn getAuthAsymId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_asym_id\", StrColumn::new) :\n getBinaryColumn(\"auth_asym_id\"));\n }",
"public StrColumn getBindingPartnerAsymId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"binding_partner_asym_id\", StrColumn::new) :\n getBinaryColumn(\"binding_partner_asym_id\"));\n }",
"public Long getRoleid() {\n return roleid;\n }",
"public java.lang.String getOrganizationId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORGANIZATIONID$4, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"public abstract java.lang.Long getId_causal_peticion();",
"public Integer getSysid() {\r\n\t\treturn sysid;\r\n\t}",
"@Id\n @WhereSQL(sql = \"id=:WxPayconfig_id\")\n public java.lang.String getId() {\n return this.id;\n }",
"public String getSysId() {\n return sysId;\n }",
"public String getSysId() {\n return sysId;\n }",
"SysOrganization selectByPrimaryKey(Long id);",
"public static Integer getLoginUserId() {\n\t\treturn null;\r\n\t}",
"public Number getProdLId() {\n return (Number)getAttributeInternal(PRODLID);\n }",
"com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType();",
"@Id\n\t@Column(name = \"SERV_PROV_CODE\")\n\t@AccelaGenerator(env = Context.AGENCY_CODE)\n\tpublic String getServiceProviderCode()\n\t{\n\t\treturn serviceProviderCode;\n\t}",
"@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }",
"public String getLoginRole() {\n return loginRole;\n }",
"public Number getOrganizationId() {\n return (Number)getAttributeInternal(ORGANIZATIONID);\n }",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public long getCompanyId();",
"public long getCompanyId();",
"public long getCompanyId();",
"public long getCompanyId();",
"public long getCompanyId();",
"public Integer getRolePid() {\n return rolePid;\n }",
"protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }",
"public StrColumn getAuthSeqId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_seq_id\", StrColumn::new) :\n getBinaryColumn(\"auth_seq_id\"));\n }",
"public StrColumn getAuthSeqId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_seq_id\", StrColumn::new) :\n getBinaryColumn(\"auth_seq_id\"));\n }",
"@Override\n public long getOrganizationId() {\n return _usersCatastropheOrgs.getOrganizationId();\n }",
"public StrColumn getIprId() {\n return delegate.getColumn(\"ipr_id\", DelegatingStrColumn::new);\n }",
"java.lang.String getLoginId();",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public Number getOrgId() {\n return (Number)getAttributeInternal(ORGID);\n }",
"long getLoginId();",
"long getLoginId();",
"long getLoginId();",
"public java.lang.Long getUsua_id();",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"String labPlanId();",
"@Override\r\n\tpublic Integer getIdRol(String usuario) {\t\r\n\t\tInteger rolId = null;\r\n\t\t\r\n\t\ttry\r\n\t\t{\t\t\t\r\n\t\t\trolId = jdbcTemplate.queryForObject(\r\n\t\t\t\t\tSQL_SELECT_ROL_USUARIO, \r\n\t\t\t\t\tnew RowMapper<Integer>() {\r\n\t\t\t\t public Integer mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n\t\t\t\t return rs.getInt(\"id\");\r\n\t\t\t\t }\r\n\t\t\t\t },\r\n\t\t\t\t\tusuario);\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\r\n\t\treturn rolId;\t\r\n\t}",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"PensionRoleMenu selectByPrimaryKey(Long id);",
"public int getM_Production_ID();",
"public String getProjectRole() {\n return this.projectRole;\n }",
"public Long getRolemenuid() {\n return rolemenuid;\n }",
"String getLoginId();",
"@Id\n\t@Column(name = \"SERV_PROV_CODE\", length = 15)\n\tpublic String getServiceProviderCode() \n\t{\n\t\treturn serviceProviderCode;\n\t}",
"public Integer getProgramId();",
"public String l3IsolationDomainId() {\n return this.innerProperties() == null ? null : this.innerProperties().l3IsolationDomainId();\n }",
"public org.apache.axis2.databinding.types.soapencoding.String getLSPID(){\n return localLSPID;\n }",
"public String getRolecode() {\n return rolecode;\n }",
"public int getSysID() {\n return sysID_;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public int getJDBCTypeId()\n {\n return JDBCTypeId;\n }",
"@AutoEscape\n\tpublic String getOrgId();",
"@Override\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\t@Column(name = \"pepe_sq_id\")\n\tpublic Long getId() {\n\t\treturn super.getId();\n\t}",
"public int getSysID() {\n return sysID_;\n }",
"SysId selectByPrimaryKey(String id);",
"int getLoginId();",
"int getLoginId();",
"int getLoginId();",
"int getLoginId();",
"int getLoginId();",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"String getOrganizationPartyId();",
"public Number getOrgId() {\n return (Number) getAttributeInternal(ORGID);\n }",
"@Transient\n public String getCurrentRole() {\n \tString currentRole = \"\";\n \tif (this.roles != null) {\n \t\tIterator<Role> it = roles.iterator();\n \t\tcurrentRole = it.next().getName().substring(5);\n \t\twhile (it.hasNext()) {\n \t\t\tRole role = it.next();\n \t\t\tcurrentRole += \"/\" + role.getName().substring(5);\n \t\t}\n \t}\n \treturn currentRole;\n }",
"public int getJDBCTypeId() {\r\n return typeId.getJDBCTypeId();\r\n }",
"private String getRowIdColumn(ConnectorTableMetadata meta)\n {\n String rowIdColumn = AccumuloTableProperties.getRowId(meta.getProperties());\n if (rowIdColumn == null) {\n rowIdColumn = meta.getColumns().get(0).getName();\n }\n return rowIdColumn.toLowerCase();\n }",
"public String getPropertyID()\n {\n String v = (String)this.getFieldValue(FLD_propertyID);\n return StringTools.trim(v);\n }"
] | [
"0.5753069",
"0.5437293",
"0.54073566",
"0.5370071",
"0.5347063",
"0.53431064",
"0.5335102",
"0.53109497",
"0.52658993",
"0.525448",
"0.520345",
"0.51893157",
"0.5179825",
"0.516772",
"0.51596963",
"0.5152309",
"0.51468605",
"0.51466",
"0.51405996",
"0.51380736",
"0.5136922",
"0.5120596",
"0.5116944",
"0.5116944",
"0.51138645",
"0.51052815",
"0.5098149",
"0.50917447",
"0.508753",
"0.50813156",
"0.5073958",
"0.5073747",
"0.50692964",
"0.5068186",
"0.5068186",
"0.5068186",
"0.5068186",
"0.5068186",
"0.50613046",
"0.5057168",
"0.5051769",
"0.5051769",
"0.504929",
"0.50412416",
"0.5040703",
"0.5033879",
"0.5023307",
"0.5005591",
"0.5003919",
"0.5003919",
"0.5003919",
"0.49951857",
"0.4989488",
"0.49701294",
"0.49667805",
"0.49664792",
"0.49664792",
"0.49664792",
"0.49600768",
"0.49600768",
"0.49600768",
"0.49600768",
"0.49600768",
"0.49600768",
"0.49600768",
"0.49600768",
"0.49585864",
"0.4958401",
"0.49570853",
"0.4946424",
"0.49425268",
"0.49418384",
"0.49381986",
"0.49362028",
"0.49352145",
"0.4931781",
"0.49302277",
"0.49298424",
"0.49235225",
"0.49235225",
"0.49235225",
"0.49235225",
"0.49208987",
"0.49138075",
"0.49091536",
"0.48949212",
"0.48894915",
"0.48876455",
"0.48876455",
"0.48876455",
"0.48876455",
"0.48876455",
"0.48832592",
"0.4877793",
"0.4874742",
"0.4869367",
"0.48688468",
"0.48656294",
"0.4859681",
"0.4859465"
] | 0.5700123 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.PLAT_ID | public void setPlatId(Integer platId) {
this.platId = platId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSysPK(Integer SysPK) {\n\t\tthis.sysPK.set(SysPK);\n\t}",
"public void setp_org_id(String value) {\n setNamedWhereClauseParam(\"p_org_id\", value);\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"public void setLSPID(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localLSPID=param;\n \n\n }",
"@JsonSetter(\"orgId\")\r\n public void setOrgId (long value) { \r\n this.orgId = value;\r\n }",
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"SysRole selectByPrimaryKey(String id);",
"public void setSpId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpIdTracker = true;\r\n } else {\r\n localSpIdTracker = false;\r\n \r\n }\r\n \r\n this.localSpId=param;\r\n \r\n\r\n }",
"void setLspId(String lspId);",
"public void setSystemId(int val) {\n systemId = val;\n }",
"SysOrganization selectByPrimaryKey(Long id);",
"public Builder setSysID(int value) {\n bitField0_ |= 0x00002000;\n sysID_ = value;\n onChanged();\n return this;\n }",
"public void setSysId(Integer sysId) {\n this.sysId = sysId;\n }",
"public void setSpid(int param){\n localSpidTracker = true;\n \n this.localSpid=param;\n \n\n }",
"public void setM_Production_ID (int M_Production_ID);",
"public void saveSysRole(SysRole sysRole);",
"@Override\n public void setPrimaryKey(long primaryKey) {\n _usersCatastropheOrgs.setPrimaryKey(primaryKey);\n }",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_scienceApp.setPrimaryKey(primaryKey);\n\t}",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public void setAD_Org_ID (int AD_Org_ID);",
"public Integer getPlatId() {\n return platId;\n }",
"public void setPresentid(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localPresentidTracker = true;\r\n } else {\r\n localPresentidTracker = false;\r\n \r\n }\r\n \r\n this.localPresentid=param;\r\n \r\n\r\n }",
"int updateByPrimaryKey(SystemRoleUserMapperMo record);",
"SysRoleDO selectByPrimaryKey(Long id);",
"public void setPortalPriv(Connection dbConn, int id, String role,\n String user, String dept) throws Exception {\n Statement ps = null;\n try {\n String sql = \"update PORTAL set DEPT_ID = '\" + dept\n + \"' , PRIV_ID = '\" + role + \"' ,USER_ID = '\" + user\n + \"' where SEQ_ID=\" + id;\n ps = dbConn.createStatement();\n ps.executeUpdate(sql);\n } catch (Exception ex) {\n throw ex;\n } finally {\n T9DBUtility.close(ps, null, log);\n }\n }",
"public void setAuthId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localAuthIdTracker = true;\r\n } else {\r\n localAuthIdTracker = false;\r\n \r\n }\r\n \r\n this.localAuthId=param;\r\n \r\n\r\n }",
"public void setSysid(Integer sysid) {\r\n\t\tthis.sysid = sysid;\r\n\t}",
"public void setId(long param) {\n localIdTracker = param != java.lang.Long.MIN_VALUE;\r\n\r\n this.localId = param;\r\n }",
"public void secondarySetOrganization(com.hps.july.persistence.Organization anOrganization) throws java.rmi.RemoteException;",
"public void setRolesRolId(int row,int newValue) throws DataStoreException {\r\n setInt(row,ROLES_ROL_ID, newValue);\r\n }",
"public String getSysCompanyId() {\n return sysCompanyId;\n }",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_esfShooterAffiliationChrono.setPrimaryKey(primaryKey);\n\t}",
"void setLoginId(long loginId);",
"void setLoginId(long loginId);",
"void setLoginId(long loginId);",
"public abstract void setCod_actividad(java.lang.Long newCod_actividad);",
"int updateByPrimaryKey(SysRole record);",
"public void setRoomstid(Long newVal) {\n if ((newVal != null && this.roomstid != null && (newVal.compareTo(this.roomstid) == 0)) || \n (newVal == null && this.roomstid == null && roomstid_is_initialized)) {\n return; \n } \n this.roomstid = newVal; \n roomstid_is_modified = true; \n roomstid_is_initialized = true; \n }",
"public void setRoomstlogid(Long newVal) {\n if ((newVal != null && this.roomstlogid != null && (newVal.compareTo(this.roomstlogid) == 0)) || \n (newVal == null && this.roomstlogid == null && roomstlogid_is_initialized)) {\n return; \n } \n this.roomstlogid = newVal; \n roomstlogid_is_modified = true; \n roomstlogid_is_initialized = true; \n }",
"public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }",
"@Update({\n \"update A_USER_ROLE\",\n \"set user_id = #{userId,jdbcType=INTEGER},\",\n \"role_id = #{roleId,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(AUserRole record);",
"SysRoleUser selectByPrimaryKey(Long id);",
"public void setSalesRep_ID (int SalesRep_ID);",
"public void setSalesRep_ID (int SalesRep_ID);",
"int updateByPrimaryKey(SysRoleDO record);",
"@Insert({\n \"replace into A_USER_ROLE (id, user_id, \",\n \"role_id)\",\n \"values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, \",\n \"#{roleId,jdbcType=INTEGER})\"\n })\n int insert(AUserRole record);",
"public abstract void setId_causal_peticion(\n\t\tjava.lang.Long newId_causal_peticion);",
"@Override\n\tpublic int updateRoleInfo(FRoleCustom fRoleCustom) throws Exception {\n\t\tDBContextHolder.setDBType(\"0\");\n\t\treturn froleMapper.updateRoleInfo(fRoleCustom);\n\t}",
"public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}",
"public void setIdTutorIndustrial(long idTutorIndustrial) {\n this.id = this.idTutorIndustrial = idTutorIndustrial;\n }",
"@Override\n public void setPrimaryKey(long primaryKey) {\n _partido.setPrimaryKey(primaryKey);\n }",
"public void setBundleID(long param){\n localBundleIDTracker = true;\n \n this.localBundleID=param;\n \n\n }",
"public Integer getPlatformId() {\r\n return platformId;\r\n }",
"public void setSysId(String sysId) {\n this.sysId = sysId;\n }",
"public void setSysId(String sysId) {\n this.sysId = sysId;\n }",
"public void setC_Decoris_PreSalesLine_ID (int C_Decoris_PreSalesLine_ID);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setPrimaryKey(long primaryKey) {\n\t\t_telefonoSolicitudProducto.setPrimaryKey(primaryKey);\n\t}",
"int updateByPrimaryKey(PlatformAdminRoleUser record);",
"public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"public String getp_org_id() {\n return (String)getNamedWhereClauseParam(\"p_org_id\");\n }",
"int updateByPrimaryKey(SysRoleUser record);",
"public Integer getSysId() {\n return sysId;\n }",
"public int Approvecomp(Long id) throws SQLException {\n\tLong idd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+id+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tidd=rs.getLong(1);\r\n\t}\r\n\tSystem.out.println(idd);\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+idd+\"\");\r\n\treturn i;\r\n\t\r\n}",
"private void setRoomId(long value) {\n \n roomId_ = value;\n }",
"public void setLoginId(int value) {\n this.loginId = value;\n }",
"private void setupSpalteID() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteID.setCellValueFactory(new PropertyValueFactory<>(\"idExtern\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteID.setCellFactory(EditCell.<ArbeitspaketTableData>forTableColumn());\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteID.setOnEditCommit(event -> {\r\n\t\t\tfinal String value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setIdExtern(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}",
"int updateByPrimaryKeySelective(SystemRoleUserMapperMo record);",
"public void setCompanycode(java.lang.Integer newCompany) {\n\tcompanycode = newCompany;\n}",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"public void setStagingSolarSystemId(int val) {\n stagingSolarSystemId = val;\n }",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_buySellProducts.setPrimaryKey(primaryKey);\n\t}",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_permissionType.setPrimaryKey(primaryKey);\n\t}",
"@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }",
"@Update(\n \"UPDATE \" + ServeInfoSqlProvider.TABLE_NAME +\n \" SET owner_id = #{ownerId} \" +\n \" WHERE id = #{serveId}\"\n )\n int changeServeOwner(@Param(\"serveId\") Long serveId, @Param(\"ownerId\") Long ownerId);",
"int updateByPrimaryKey(PensionRoleMenu record);",
"@Override\n\tpublic ShiroRolesPermissionsPoEntity selectById(Integer pk) {\n\t\treturn null;\n\t}",
"private void setIdentifiedPlatform(ControllerType identfiedPlatformType) {\r\n\t\tthis.identifiedControllerType = identfiedPlatformType;\r\n\r\n\t}",
"public void setLBR_ProtestCode (String LBR_ProtestCode);",
"public void setUWCompany(entity.UWCompany value);",
"public Integer getSysid() {\r\n\t\treturn sysid;\r\n\t}",
"public void setUsua_id(java.lang.Long newUsua_id);",
"@Override\n\tpublic void setPrimaryKey(int primaryKey) {\n\t\t_locMstLocation.setPrimaryKey(primaryKey);\n\t}"
] | [
"0.5364907",
"0.49619827",
"0.49479982",
"0.48955247",
"0.4849193",
"0.48390114",
"0.4836656",
"0.48262966",
"0.48000485",
"0.47969076",
"0.476575",
"0.47649136",
"0.4760998",
"0.47601208",
"0.47513825",
"0.47423562",
"0.47377884",
"0.4736399",
"0.4735433",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47278747",
"0.47060186",
"0.47059992",
"0.47055525",
"0.4704627",
"0.4700537",
"0.46673462",
"0.46672702",
"0.46591824",
"0.46570414",
"0.46357417",
"0.46234632",
"0.46205622",
"0.4620075",
"0.4620075",
"0.4620075",
"0.46142557",
"0.46063653",
"0.45925182",
"0.45840034",
"0.45762566",
"0.4574569",
"0.45725387",
"0.45721567",
"0.45721567",
"0.45659953",
"0.45656186",
"0.45568886",
"0.45411503",
"0.4538896",
"0.45356497",
"0.45286074",
"0.45267203",
"0.45256338",
"0.45223936",
"0.45223936",
"0.4519385",
"0.45053244",
"0.45053244",
"0.45053244",
"0.45053244",
"0.45053244",
"0.45034078",
"0.45007885",
"0.44999775",
"0.44992468",
"0.4494601",
"0.44923356",
"0.44914198",
"0.44903687",
"0.44863206",
"0.4485373",
"0.4459222",
"0.44549057",
"0.4454085",
"0.44512963",
"0.44490156",
"0.44420135",
"0.4440372",
"0.44368166",
"0.44338453",
"0.4427155",
"0.44187295",
"0.44169745",
"0.44119242",
"0.4411062",
"0.44023994",
"0.43934214",
"0.4388616"
] | 0.47421217 | 16 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.ROLE_NAME | public String getRoleName() {
return roleName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getRoleName();",
"public String getRole_name() {\n return role_name;\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleName() {\n\treturn strRoleName;\n }",
"public java.lang.String getRoleName()\n {\n return roleName;\n }",
"public String roleName() {\n return this.roleName;\n }",
"String roleName();",
"public String getRoleName() {\n\t\treturn roleName;\n\t}",
"public String getRoleName() {\n return (String) getAttributeInternal(ROLENAME);\n }",
"@Override\n public String getName() {\n return this.role.getName();\n }",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"@Transient\n public String getCurrentRole() {\n \tString currentRole = \"\";\n \tif (this.roles != null) {\n \t\tIterator<Role> it = roles.iterator();\n \t\tcurrentRole = it.next().getName().substring(5);\n \t\twhile (it.hasNext()) {\n \t\t\tRole role = it.next();\n \t\t\tcurrentRole += \"/\" + role.getName().substring(5);\n \t\t}\n \t}\n \treturn currentRole;\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public java.lang.String getRole() {\n return role;\n }",
"String getRole();",
"String getRole();",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public List getSysRoles(SysRole sysRole);",
"SecurityRole getRole();",
"public String getRole() {\r\n return role;\r\n }",
"public String getRole() {\n return this.state.getRole();\n }",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"public String getUserSubMenuRole() {\n return sessionData.getUserSubMenuRole();\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public String getRole() {\n\t\t\treturn role;\n\t\t}",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleDesc() {\n return (String) getAttributeInternal(ROLEDESC);\n }",
"public String getRole() {\n return this.role;\n }",
"public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }",
"public String getRolename() {\n return rolename;\n }",
"public String getRolename() {\n return rolename;\n }",
"public String getCurrentRole() {\r\n return currentRole;\r\n }",
"public SysRole getSysRole(final Long roleId);",
"@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}",
"public String getRolelabel() {\n return rolelabel;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Role : \"+name().toLowerCase();\n\t}",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public java.lang.String getTeamRole() {\r\n return teamRole;\r\n }",
"public List<Role> getRole() {\n\t\treturn userDao.getRole();\r\n\t}",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"com.message.MessageInfo.RoleVO getRole();",
"@Override\n\tpublic List<Map<String, Object>> getRole() {\n\t\treturn this.RoleDao.getRole();\n\t}",
"public String getLoginRole() {\n return loginRole;\n }",
"public SecRole getRoleById(Long role_Id);",
"@Transient\n\tpublic List<String> getRoleNames()\n\t{\n\t\tList<String> roleNames = new ArrayList<String>();\n\t\t\n\t\tfor (Role role : getRoles())\n\t\t{\n\t\t\troleNames.add(role.getRolename());\n\t\t}\n\t\t\n\t\treturn roleNames;\n\t}",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public static String roleToString(@RoleName int role) {\n switch (role) {\n case ROLE_NONE:\n return \"ROLE_NONE\";\n case ROLE_BUTTON:\n return \"ROLE_BUTTON\";\n case ROLE_CHECK_BOX:\n return \"ROLE_CHECK_BOX\";\n case ROLE_DROP_DOWN_LIST:\n return \"ROLE_DROP_DOWN_LIST\";\n case ROLE_EDIT_TEXT:\n return \"ROLE_EDIT_TEXT\";\n case ROLE_GRID:\n return \"ROLE_GRID\";\n case ROLE_IMAGE:\n return \"ROLE_IMAGE\";\n case ROLE_IMAGE_BUTTON:\n return \"ROLE_IMAGE_BUTTON\";\n case ROLE_LIST:\n return \"ROLE_LIST\";\n case ROLE_RADIO_BUTTON:\n return \"ROLE_RADIO_BUTTON\";\n case ROLE_SEEK_CONTROL:\n return \"ROLE_SEEK_CONTROL\";\n case ROLE_SWITCH:\n return \"ROLE_SWITCH\";\n case ROLE_TAB_BAR:\n return \"ROLE_TAB_BAR\";\n case ROLE_TOGGLE_BUTTON:\n return \"ROLE_TOGGLE_BUTTON\";\n case ROLE_VIEW_GROUP:\n return \"ROLE_VIEW_GROUP\";\n case ROLE_WEB_VIEW:\n return \"ROLE_WEB_VIEW\";\n case ROLE_PAGER:\n return \"ROLE_PAGER\";\n case ROLE_CHECKED_TEXT_VIEW:\n return \"ROLE_CHECKED_TEXT_VIEW\";\n case ROLE_PROGRESS_BAR:\n return \"ROLE_PROGRESS_BAR\";\n case ROLE_ACTION_BAR_TAB:\n return \"ROLE_ACTION_BAR_TAB\";\n case ROLE_DRAWER_LAYOUT:\n return \"ROLE_DRAWER_LAYOUT\";\n case ROLE_SLIDING_DRAWER:\n return \"ROLE_SLIDING_DRAWER\";\n case ROLE_ICON_MENU:\n return \"ROLE_ICON_MENU\";\n case ROLE_TOAST:\n return \"ROLE_TOAST\";\n case ROLE_ALERT_DIALOG:\n return \"ROLE_ALERT_DIALOG\";\n case ROLE_DATE_PICKER_DIALOG:\n return \"ROLE_DATE_PICKER_DIALOG\";\n case ROLE_TIME_PICKER_DIALOG:\n return \"ROLE_TIME_PICKER_DIALOG\";\n case ROLE_DATE_PICKER:\n return \"ROLE_DATE_PICKER\";\n case ROLE_TIME_PICKER:\n return \"ROLE_TIME_PICKER\";\n case ROLE_NUMBER_PICKER:\n return \"ROLE_NUMBER_PICKER\";\n case ROLE_SCROLL_VIEW:\n return \"ROLE_SCROLL_VIEW\";\n case ROLE_HORIZONTAL_SCROLL_VIEW:\n return \"ROLE_HORIZONTAL_SCROLL_VIEW\";\n case ROLE_KEYBOARD_KEY:\n return \"ROLE_KEYBOARD_KEY\";\n case ROLE_TALKBACK_EDIT_TEXT_OVERLAY:\n return \"ROLE_TALKBACK_EDIT_TEXT_OVERLAY\";\n case ROLE_TEXT_ENTRY_KEY:\n return \"ROLE_TEXT_ENTRY_KEY\";\n default:\n return \"(unknown role \" + role + \")\";\n }\n }",
"public String getProjectRole() {\n return this.projectRole;\n }",
"public String getRoleDesc() {\r\n return roleDesc;\r\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n if (roleBuilder_ == null) {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n } else {\n return roleBuilder_.getMessage();\n }\n }",
"public String getRolecode() {\n return rolecode;\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public String getRole() { return this.role; }",
"public String getRoleDesc() {\n return roleDesc;\n }",
"public String getRoleDesc() {\n return roleDesc;\n }",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"public com.a9.spec.opensearch.x11.QueryType.Role xgetRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n return target;\n }\n }",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"@Override\r\n\tpublic String employeeRole() {\n\t\treturn ((WebUserRole) webContext.get()).getEmployee();\r\n\t}",
"public String getRoleCode() {\n return roleCode;\n }",
"public Long getRoleid() {\n return roleid;\n }",
"List<RoleEntity> getSystemRoles();",
"public List<SecRole> getRolesLikeRoleName(String aRoleName);",
"public AXValue getRole() {\n return role;\n }",
"public String getRolesNombre() throws DataStoreException {\r\n return getString(ROLES_NOMBRE);\r\n }",
"RoleType getRoleType();",
"@Override\n\tpublic List<Role> getRoleList() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM role\", new RoleRowMapper());\n\t}",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"public String getRoleType() {\n return roleType;\n }"
] | [
"0.72192764",
"0.7085413",
"0.7023157",
"0.7023157",
"0.6978406",
"0.6978406",
"0.6936103",
"0.6930613",
"0.69200706",
"0.6801413",
"0.6792453",
"0.6771913",
"0.6665461",
"0.65924776",
"0.65504473",
"0.6532844",
"0.64373547",
"0.6418677",
"0.64141536",
"0.64141536",
"0.63844746",
"0.6367911",
"0.6294643",
"0.62851554",
"0.62610734",
"0.62349147",
"0.6217447",
"0.62152135",
"0.61819255",
"0.6174743",
"0.61740947",
"0.6152823",
"0.6152823",
"0.6152823",
"0.61525047",
"0.6143814",
"0.6143742",
"0.6055138",
"0.6055138",
"0.6054333",
"0.6049518",
"0.60141915",
"0.5992422",
"0.5977449",
"0.59747666",
"0.5968987",
"0.5968987",
"0.5968987",
"0.5966623",
"0.59550923",
"0.59481925",
"0.59458673",
"0.59458673",
"0.59458673",
"0.59458673",
"0.59371537",
"0.59312975",
"0.59281224",
"0.59121597",
"0.5901485",
"0.59005666",
"0.5899666",
"0.58947587",
"0.58947587",
"0.58947587",
"0.58947587",
"0.58947587",
"0.58947587",
"0.58947587",
"0.58947587",
"0.5891242",
"0.5871102",
"0.58692193",
"0.5867278",
"0.5866777",
"0.5866048",
"0.58479756",
"0.5846342",
"0.5845245",
"0.5845245",
"0.58447814",
"0.5829916",
"0.5829149",
"0.5825616",
"0.5814032",
"0.5812854",
"0.58087736",
"0.5803744",
"0.58029443",
"0.5781214",
"0.5769568",
"0.5767839",
"0.5757564",
"0.5755945",
"0.5749763"
] | 0.6978026 | 11 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.ROLE_NAME | public void setRoleName(String roleName) {
this.roleName = roleName == null ? null : roleName.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }",
"public void setRoleName(String value) {\n setAttributeInternal(ROLENAME, value);\n }",
"public void setRoleName(java.lang.String _roleName)\n {\n roleName = _roleName;\n }",
"@Override\n public void setRole(String roleName) {\n this.role = roleName;\n }",
"public void setRole_name(String role_name) {\n this.role_name = role_name;\n }",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"public String getRole_name() {\n return role_name;\n }",
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public void setRoleName(String roleName) {\n this.roleName = roleName;\n }",
"public void setRoleName(String roleName) {\r\n this.roleName = roleName == null ? null : roleName.trim();\r\n }",
"public void setRoleName(String roleName) {\r\n this.roleName = roleName == null ? null : roleName.trim();\r\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleName() {\n\treturn strRoleName;\n }",
"public RunAsType<T> setRoleName(String roleName)\n {\n childNode.getOrCreate(\"role-name\").text(roleName);\n return this;\n }",
"public java.lang.String getRoleName()\n {\n return roleName;\n }",
"public String getRoleName() {\n\t\treturn roleName;\n\t}",
"public void setRole(String role)\n {\n _role=role;\n }",
"public void setRoleName(final String roleNameValue) {\n this.roleName = roleNameValue;\n }",
"public void setRoleName(final String roleNameValue) {\n this.roleName = roleNameValue;\n }",
"public void setRoleName(String roleName) {\n\t\tthis.roleName = roleName;\n\t}",
"public void saveSysRole(SysRole sysRole);",
"void setRole(String roles);",
"public String roleName() {\n return this.roleName;\n }",
"String getRoleName();",
"@Override\n public String getName() {\n return this.role.getName();\n }",
"public void setRole(String strRole) {\n\t\tif (\"ADMIN\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.ADMIN);\n\t\t}else if (\"DEVELOPER\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.DEVELOPER);\n\t\t}else if (\"SUPPORT\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.SUPPORT);\n\t\t}\n\t}",
"public void setRole( String role )\n {\n if ( roles == null )\n {\n roles = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );\n }\n\n this.roles.add( role );\n }",
"void setRole(final SecurityRole role);",
"@Override\n\tpublic Role selectRoleByName(String ro_name) {\n\t\treturn rd.selectRoleByName(ro_name);\n\t}",
"public List getSysRoles(SysRole sysRole);",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"@Override\r\n\tpublic String definedRole() {\n\t\treturn DEF_ROLE;\r\n\t}",
"void changeRole(User user, Role role, String token) throws AuthenticationException;",
"public void setNamedRole(ApplicationRole namedRole) {\n if (namedRole == null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-008) namedRole can't be null\"); // FIXME See how this can be null (used from Extension)\n }\n if (permission != null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-009) SimpleNamedRole already set and not allowed to change it.\");\n }\n\n permission = new RolePermission(namedRole.name());\n }",
"public void setRole(com.a9.spec.opensearch.x11.QueryType.Role.Enum role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ROLE$0);\n }\n target.setEnumValue(role);\n }\n }",
"public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.String value) {\n validate(fields()[6], value);\n this.role = value;\n fieldSetFlags()[6] = true;\n return this; \n }",
"LoggedUser changeRole(String roleId) throws IOException;",
"public String getRole() {\r\n return role;\r\n }",
"public void xsetRole(com.a9.spec.opensearch.x11.QueryType.Role role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().add_attribute_user(ROLE$0);\n }\n target.set(role);\n }\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"public void setRoleDesc(String value) {\n setAttributeInternal(ROLEDESC, value);\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public void setTeamRole(java.lang.String teamRole) {\r\n this.teamRole = teamRole;\r\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public void setRolename(String rolename) {\n this.rolename = rolename;\n }",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"public SysRole getSysRole(final Long roleId);",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleName() {\n return (String) getAttributeInternal(ROLENAME);\n }",
"@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}",
"public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}",
"public String getRole() {\n return this.role;\n }",
"public void setRole(String role) {\n this.role = role;\n }",
"public void setAdminRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_adminRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeAdminRole();\r\n }\r\n }",
"public String getRole() {\n\t\t\treturn role;\n\t\t}",
"private UserRole(String name) {\n\t\tthis.name = name;\n\t}",
"protected void setRoleFileName(String roleFileName) \n\t{\n\t\tthis.roleFileName = roleFileName;\n\t}",
"public String getRole() { return this.role; }",
"public void setUserRole(java.lang.String userRole) {\r\n this.userRole = userRole;\r\n }",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public String getRolename() {\n return rolename;\n }",
"public String getRolename() {\n return rolename;\n }",
"public void setRole(String role) {\n\t\t\tthis.role = role;\n\t\t}",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }",
"public final void setRoles(final String roles) {\n this.roles = roles;\n }",
"String roleName();",
"public void setRole(String role) {\n\t\tthis.role = role;\n\t}",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"SecurityRole getRole();",
"String getRole();",
"String getRole();",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }"
] | [
"0.7075855",
"0.6618446",
"0.65166533",
"0.6478542",
"0.64024514",
"0.63646513",
"0.63237286",
"0.6271113",
"0.6199135",
"0.6199135",
"0.61750275",
"0.617325",
"0.617325",
"0.61388505",
"0.6109223",
"0.6109223",
"0.6109223",
"0.6109223",
"0.6109223",
"0.6109223",
"0.60930485",
"0.60930485",
"0.60478777",
"0.6007565",
"0.5968311",
"0.59621596",
"0.5946652",
"0.59360296",
"0.59360296",
"0.5934358",
"0.5929572",
"0.5888149",
"0.5873203",
"0.5870192",
"0.57855326",
"0.57798237",
"0.5730471",
"0.56907105",
"0.5681985",
"0.5644707",
"0.5641872",
"0.5623301",
"0.5621315",
"0.5604765",
"0.55826646",
"0.5579316",
"0.5577806",
"0.5567873",
"0.55478954",
"0.5541388",
"0.5531459",
"0.5495993",
"0.5494088",
"0.54937994",
"0.5488317",
"0.5486246",
"0.5484972",
"0.5468496",
"0.546211",
"0.5447736",
"0.54452676",
"0.5441062",
"0.5441062",
"0.5441062",
"0.54138786",
"0.54080856",
"0.54011464",
"0.53864104",
"0.53761774",
"0.53731364",
"0.5366197",
"0.53587484",
"0.5354408",
"0.53494096",
"0.5340704",
"0.53366685",
"0.5324573",
"0.5324573",
"0.5321575",
"0.53186494",
"0.53181314",
"0.5308548",
"0.5307212",
"0.5305213",
"0.52889556",
"0.52889556",
"0.52889556",
"0.5284694",
"0.52843577",
"0.5268988",
"0.5268988",
"0.5268816",
"0.5268816",
"0.5268816",
"0.5268816",
"0.5267568"
] | 0.6109505 | 18 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.ROLE_PID | public Integer getRolePid() {
return rolePid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public Long getRoleid() {\n return roleid;\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public void setRolePid(Integer rolePid) {\n this.rolePid = rolePid;\n }",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public Long getRolemenuid() {\n return rolemenuid;\n }",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"public int getRolesRolId() throws DataStoreException {\r\n return getInt(ROLES_ROL_ID);\r\n }",
"public String getRolecode() {\n return rolecode;\n }",
"public String getRoleCode() {\n return roleCode;\n }",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"public String getProjectRole() {\n return this.projectRole;\n }",
"public SecRole getRoleById(Long role_Id);",
"public String getClRoleId() {\r\n\t\treturn clRoleId;\r\n\t}",
"SysRoleDO selectByPrimaryKey(Long id);",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }",
"public String getPId() {\n return (String)getAttributeInternal(PID);\n }",
"@Override\n\tpublic Integer getRoleCount() {\n\t\tfinal String sql =\"select count(id) from role\";\n\t\treturn jdbcTemplate.queryForObject(sql, Integer.class);\n\t}",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"public String getRole() {\r\n return role;\r\n }",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"public String getRole() {\n return this.role;\n }",
"public Long getAdminRoleId() {\n\t\treturn this.adminRoleId;\n\t}",
"public java.lang.String getRole() {\n return role;\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public String getRole() {\n\t\t\treturn role;\n\t\t}",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"public SysRole getSysRole(final Long roleId);",
"public Integer RoleByCode(String roleCode) {\n\t\treturn userDao.RoleByCode(roleCode);\r\n\t}",
"public void setRoleid(Integer roleid) {\r\n this.roleid = roleid;\r\n }",
"public String getRole_name() {\n return role_name;\n }",
"SysRole selectByPrimaryKey(String id);",
"public YangString getPlmnIdValue() throws JNCException {\n return (YangString)getValue(\"plmn-id\");\n }",
"public String getLoginRole() {\n return loginRole;\n }",
"public StrColumn getAuthSeqId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_seq_id\", StrColumn::new) :\n getBinaryColumn(\"auth_seq_id\"));\n }",
"public StrColumn getAuthSeqId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_seq_id\", StrColumn::new) :\n getBinaryColumn(\"auth_seq_id\"));\n }",
"int getParticipantRoleValue();",
"@Override\n\tpublic Integer updatemenuroleId(String roleId) {\n\t\tInteger updatemenuroleId = mapper.updatemenuroleId(roleId);\n\t\treturn updatemenuroleId;\n\t}",
"public String getUserSubMenuRole() {\n return sessionData.getUserSubMenuRole();\n }",
"public AXValue getRole() {\n return role;\n }",
"public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }",
"public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }",
"public String getPropertyID()\n {\n String v = (String)this.getFieldValue(FLD_propertyID);\n return StringTools.trim(v);\n }",
"public String getRoleName() {\n\treturn strRoleName;\n }",
"public int getRolesRolId(int row) throws DataStoreException {\r\n return getInt(row,ROLES_ROL_ID);\r\n }",
"String getRole();",
"String getRole();",
"public String roleName() {\n return this.roleName;\n }",
"UsercontrollerRole selectByPrimaryKey(Integer roleId);",
"@Override\n\tpublic int getIDByName(String rolename) {\n\t\treturn this.RoleDao.getIDByName(rolename);\n\t}",
"@Transient\n public String getCurrentRole() {\n \tString currentRole = \"\";\n \tif (this.roles != null) {\n \t\tIterator<Role> it = roles.iterator();\n \t\tcurrentRole = it.next().getName().substring(5);\n \t\twhile (it.hasNext()) {\n \t\t\tRole role = it.next();\n \t\t\tcurrentRole += \"/\" + role.getName().substring(5);\n \t\t}\n \t}\n \treturn currentRole;\n }",
"String getRoleName();",
"public String getRole() {\n return this.state.getRole();\n }",
"public Role getByRoleId(long roleId);",
"public String getRole() { return this.role; }",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"public void setRoleId(BigDecimal roleId) {\r\n this.roleId = roleId;\r\n }",
"public QName getMyRolePortType() {\r\n QName portType = null;\r\n if (getPartnerLinkType() != null) {\r\n portType = getDef().getMyRolePortType();\r\n }\r\n return portType;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public Long getId() {\n return pid;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public String getRoleName() {\n return this.roleName;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }"
] | [
"0.6676989",
"0.666791",
"0.66040003",
"0.6502794",
"0.64767885",
"0.64554983",
"0.64548016",
"0.64548016",
"0.64548016",
"0.64548016",
"0.64548016",
"0.64548016",
"0.64548016",
"0.64548016",
"0.64305395",
"0.64305395",
"0.64305395",
"0.64288485",
"0.64288485",
"0.64288485",
"0.64288485",
"0.6389892",
"0.637143",
"0.63702196",
"0.63521206",
"0.63521206",
"0.63521206",
"0.6352102",
"0.6347131",
"0.6271826",
"0.5971104",
"0.58848876",
"0.57256216",
"0.5720921",
"0.56328934",
"0.55816823",
"0.55636233",
"0.5550654",
"0.55197835",
"0.54842764",
"0.54791707",
"0.5459035",
"0.5455089",
"0.5436396",
"0.5413605",
"0.5413475",
"0.540985",
"0.54091084",
"0.5407604",
"0.5407227",
"0.5399447",
"0.53970534",
"0.53636557",
"0.5354401",
"0.5339227",
"0.53264046",
"0.53261685",
"0.5321426",
"0.53168815",
"0.53148735",
"0.5307747",
"0.5293947",
"0.5283589",
"0.5275741",
"0.5275741",
"0.5270674",
"0.5266282",
"0.5263216",
"0.52558523",
"0.52530754",
"0.52415735",
"0.52412844",
"0.5238852",
"0.5237282",
"0.5236809",
"0.5236809",
"0.5235999",
"0.5230745",
"0.52224535",
"0.5175342",
"0.5166253",
"0.516518",
"0.5162679",
"0.5161862",
"0.5161815",
"0.51503634",
"0.51442677",
"0.51368153",
"0.51368153",
"0.51281714",
"0.51270264",
"0.5118542",
"0.5118542",
"0.51147914",
"0.51147914",
"0.51147914",
"0.51147914",
"0.51147914",
"0.51147914",
"0.51147914"
] | 0.7300338 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.ROLE_PID | public void setRolePid(Integer rolePid) {
this.rolePid = rolePid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"public Integer getRolePid() {\n return rolePid;\n }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public Long getRoleid() {\n return roleid;\n }",
"public void setRoleid(Integer roleid) {\r\n this.roleid = roleid;\r\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public void setRoleId(BigDecimal roleId) {\r\n this.roleId = roleId;\r\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public void setRoleId(Long roleId) {\r\n this.roleId = roleId;\r\n }",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"@Override\n\tpublic Integer updatemenuroleId(String roleId) {\n\t\tInteger updatemenuroleId = mapper.updatemenuroleId(roleId);\n\t\treturn updatemenuroleId;\n\t}",
"public void setRoleId(int roleId) {\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public void xsetRole(com.a9.spec.opensearch.x11.QueryType.Role role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().add_attribute_user(ROLE$0);\n }\n target.set(role);\n }\n }",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleid(Long roleid) {\n this.roleid = roleid;\n }",
"public void setRoleId(Integer roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"public void setRole(Integer role) {\n\t\tthis.role = role;\n\t}",
"int updateByPrimaryKey(SystemRoleUserMapperMo record);",
"public void setRole(String role)\n {\n _role=role;\n }",
"@Override\n\tpublic void setPID(int pid) {\n\t\tthis.pID = pid;\n\t\t\n\t}",
"public void setRoleId(String roleId)\r\n\t{\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"public void setRoleId(String roleId) {\n\t\tthis.role_id = roleId;\n\t}",
"public void setRole(com.a9.spec.opensearch.x11.QueryType.Role.Enum role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ROLE$0);\n }\n target.setEnumValue(role);\n }\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }",
"public void setRoleId(Long roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"@Update({\n \"update A_USER_ROLE\",\n \"set user_id = #{userId,jdbcType=INTEGER},\",\n \"role_id = #{roleId,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(AUserRole record);",
"public abstract void setProcessID(long pid);",
"public void setRoleId(String roleId) {\n this.roleId = roleId;\n }",
"public Long getRolemenuid() {\n return rolemenuid;\n }",
"public void setRolesRolId(int row,int newValue) throws DataStoreException {\r\n setInt(row,ROLES_ROL_ID, newValue);\r\n }",
"int updateByPrimaryKeySelective(SystemRoleUserMapperMo record);",
"@Insert({\n \"replace into A_USER_ROLE (id, user_id, \",\n \"role_id)\",\n \"values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, \",\n \"#{roleId,jdbcType=INTEGER})\"\n })\n int insert(AUserRole record);",
"public void setPortalPriv(Connection dbConn, int id, String role,\n String user, String dept) throws Exception {\n Statement ps = null;\n try {\n String sql = \"update PORTAL set DEPT_ID = '\" + dept\n + \"' , PRIV_ID = '\" + role + \"' ,USER_ID = '\" + user\n + \"' where SEQ_ID=\" + id;\n ps = dbConn.createStatement();\n ps.executeUpdate(sql);\n } catch (Exception ex) {\n throw ex;\n } finally {\n T9DBUtility.close(ps, null, log);\n }\n }",
"@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}",
"public void setRoleid(String roleid) {\n this.roleid = roleid == null ? null : roleid.trim();\n }",
"public void setRoleid(String roleid) {\n this.roleid = roleid == null ? null : roleid.trim();\n }",
"public void setRoleid(String roleid) {\n this.roleid = roleid == null ? null : roleid.trim();\n }",
"public void setRole(String strRole) {\n\t\tif (\"ADMIN\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.ADMIN);\n\t\t}else if (\"DEVELOPER\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.DEVELOPER);\n\t\t}else if (\"SUPPORT\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.SUPPORT);\n\t\t}\n\t}",
"public void saveSysRole(SysRole sysRole);",
"public void setRole(Map<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }",
"public void setRolemenuid(Long rolemenuid) {\n this.rolemenuid = rolemenuid;\n }",
"@Override\r\n\tpublic void saveRole(Integer uid) {\n\t\tum.saveRole(uid);\r\n\t}",
"public void setPID_IDX(int PID_IDX){\n this.PID_IDX = PID_IDX;\n }",
"public abstract void setRoleManager(OwRoleManager roleManager_p);",
"void setRoleDao(final RoleDao roleDao);",
"@Override\n\tpublic int updateRoleInfo(FRoleCustom fRoleCustom) throws Exception {\n\t\tDBContextHolder.setDBType(\"0\");\n\t\treturn froleMapper.updateRoleInfo(fRoleCustom);\n\t}",
"SystemRoleUserMapperMo selectByPrimaryKey(Integer id);",
"private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"SysRoleDO selectByPrimaryKey(Long id);",
"int updateByPrimaryKey(SysRoleDO record);",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }",
"LoggedUser changeRole(String roleId) throws IOException;",
"int updateByPrimaryKey(SysRoleUser record);",
"public void setPid(Long pid) {\n this.pid = pid;\n }",
"public void setPid(Long pid) {\n this.pid = pid;\n }",
"public void setPriUsuariosRoles(List<OmsUsuariosRole> priUsuariosRoles) {\n\t\tthis.priUsuariosRoles = priUsuariosRoles;\n\t}",
"public void setRolesRolId(int newValue) throws DataStoreException {\r\n setInt(ROLES_ROL_ID, newValue);\r\n }",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }"
] | [
"0.6383322",
"0.6357655",
"0.58979994",
"0.58612275",
"0.5803716",
"0.5803455",
"0.5795738",
"0.57948655",
"0.5725117",
"0.5725117",
"0.5725117",
"0.5725117",
"0.5718792",
"0.5718792",
"0.5718792",
"0.5718792",
"0.5718792",
"0.5718792",
"0.5718792",
"0.5718792",
"0.57139796",
"0.57139796",
"0.57139796",
"0.5679376",
"0.5659081",
"0.5650088",
"0.5647423",
"0.56387115",
"0.5638335",
"0.56257343",
"0.56257343",
"0.56257343",
"0.56257343",
"0.56257343",
"0.56257343",
"0.56257343",
"0.56257343",
"0.56152856",
"0.56152856",
"0.56152856",
"0.56124085",
"0.5607528",
"0.55982095",
"0.5543755",
"0.55366653",
"0.5524817",
"0.5520756",
"0.5486124",
"0.5486124",
"0.5486124",
"0.5486124",
"0.548466",
"0.5456587",
"0.54262084",
"0.54232967",
"0.537623",
"0.53630286",
"0.53552157",
"0.5349561",
"0.53459775",
"0.53432506",
"0.5342948",
"0.5340147",
"0.5340147",
"0.5337851",
"0.5337158",
"0.53299135",
"0.52762777",
"0.5267524",
"0.5264927",
"0.5247077",
"0.52243805",
"0.5204845",
"0.51652247",
"0.51633734",
"0.5130591",
"0.5130591",
"0.5130591",
"0.51119536",
"0.51072806",
"0.508666",
"0.50857955",
"0.50772524",
"0.50566584",
"0.5051445",
"0.50487596",
"0.5046166",
"0.5036868",
"0.50348824",
"0.50331306",
"0.5031534",
"0.49936265",
"0.4993508",
"0.4985407",
"0.49789873",
"0.4963502",
"0.4963502",
"0.49619755",
"0.49617642",
"0.49521464"
] | 0.70101786 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.CREATER | public Integer getCreater() {
return creater;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}",
"public String getRol() \n {\n \t return rol;\n }",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"@Transient\n public String getCurrentRole() {\n \tString currentRole = \"\";\n \tif (this.roles != null) {\n \t\tIterator<Role> it = roles.iterator();\n \t\tcurrentRole = it.next().getName().substring(5);\n \t\twhile (it.hasNext()) {\n \t\t\tRole role = it.next();\n \t\t\tcurrentRole += \"/\" + role.getName().substring(5);\n \t\t}\n \t}\n \treturn currentRole;\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public String getRole() {\r\n return role;\r\n }",
"public Byte getRole() {\n return role;\n }",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"String getRole();",
"String getRole();",
"public String getRole() {\n return this.role;\n }",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"com.message.MessageInfo.RoleVO getRole();",
"public int getRolesRolId() throws DataStoreException {\r\n return getInt(ROLES_ROL_ID);\r\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"public String getRoleCode() {\n return roleCode;\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public String getRolecode() {\n return rolecode;\n }",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"public String getRole() {\n\t\t\treturn role;\n\t\t}",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"public String getRole() {\n return this.state.getRole();\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }",
"public String getRole() { return this.role; }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public TableRole getTableRole();",
"@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"RoleType getRoleType();",
"public Long getRoleid() {\n return roleid;\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n if (roleBuilder_ == null) {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n } else {\n return roleBuilder_.getMessage();\n }\n }",
"public String getRole_name() {\n return role_name;\n }",
"public Role getRole()\n {\n return role;\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public List<Role> getRole() {\n\t\treturn userDao.getRole();\r\n\t}",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public int getRolesRolId(int row) throws DataStoreException {\r\n return getInt(row,ROLES_ROL_ID);\r\n }",
"@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }",
"@Override\n\tpublic List<Map<String, Object>> getRole() {\n\t\treturn this.RoleDao.getRole();\n\t}",
"String roleName();",
"public String getCurrentRole() {\r\n return currentRole;\r\n }",
"@Override\r\n\tpublic String definedRole() {\n\t\treturn DEF_ROLE;\r\n\t}",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"String getRoleName();",
"public String getRoleDesc() {\r\n return roleDesc;\r\n }",
"public Userrole getUserrole() {\n return getEntity();\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }",
"SecurityRole getRole();",
"public AXValue getRole() {\n return role;\n }",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"@Override\n public String toString(){\n return role;\n }",
"public String getRoleName() {\n\treturn strRoleName;\n }",
"@Basic\n\t@Column(name = \"CUSTOMER_ROLE\", nullable = false)\n\tpublic String getAuthority() {\n\t\treturn this.authority;\n\t}",
"public String getRoleDesc() {\n return roleDesc;\n }",
"public String getRoleDesc() {\n return roleDesc;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ECFParticipantFunction_Ext getRole() {\n return (typekey.ECFParticipantFunction_Ext)__getInternalInterface().getFieldValue(ROLE_PROP.get());\n }",
"public String roleName() {\n return this.roleName;\n }",
"public String getRolesNombre(int row) throws DataStoreException {\r\n return getString(row,ROLES_NOMBRE);\r\n }",
"String computeRole();",
"public String getRolesDescripcion(int row) throws DataStoreException {\r\n return getString(row,ROLES_DESCRIPCION);\r\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"public String getRoleName() {\r\n return roleName;\r\n }",
"@Generated\n public Rol getRol() {\n Long __key = this.usu_rol_id;\n if (rol__resolvedKey == null || !rol__resolvedKey.equals(__key)) {\n __throwIfDetached();\n RolDao targetDao = daoSession.getRolDao();\n Rol rolNew = targetDao.load(__key);\n synchronized (this) {\n rol = rolNew;\n \trol__resolvedKey = __key;\n }\n }\n return rol;\n }",
"@JsonProperty(\"rangerAuditRole\")\n public String getRangerAuditRole() {\n return rangerAuditRole;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn wcRole.toString();\n\t}",
"public String checkrole() \n { \n \ttry\n {\n String sql =\"select * from user where login='true'\";\n \n Cursor mCur = mDb.rawQuery(sql, null);\n Log.d(\"LEE\",\"hi2\");\n if(mCur.getCount()>0)\n {\n \tmCur.moveToFirst();\n \treturn mCur.getString(mCur.getColumnIndex(\"role\"));\n } \n else\n {\n \treturn \"logout\";\n }\n }\n catch (SQLException mSQLException) \n {\n Log.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n throw mSQLException;\n }\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"private int insertUserRole(String type) {\n\n int userRoleId = 0;\n\n try (Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"INSERT INTO ers_user_roles(user_role) VALUES (?);\";\n\n PreparedStatement ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, type); //the 1st \"?\"\n\n ps.executeUpdate();\n\n //PRINTING THE PRIMARY KEY\n ResultSet rs = ps.getGeneratedKeys();\n if (rs.next()) {\n System.out.println(\"The returned PK: \"+ rs.getInt(\"ers_user_role_id\"));\n userRoleId = rs.getInt(\"ers_user_role_id\");\n }\n\n } catch(SQLException e) {\n e.printStackTrace();\n }\n\n return userRoleId;\n }",
"@Override\n public String toString() {\n return Role.class + \"[id=\" + this.id + \",desc=\" + this.getName() + \"]\";\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getRoleName() {\n return roleName;\n }",
"public String getLoginRole() {\n return loginRole;\n }",
"public String getRolename() {\n return rolename;\n }",
"public String getRolename() {\n return rolename;\n }"
] | [
"0.599307",
"0.596743",
"0.59319013",
"0.59149796",
"0.59090054",
"0.5862053",
"0.58382034",
"0.583541",
"0.58310825",
"0.58310825",
"0.5805491",
"0.58034545",
"0.57655096",
"0.5763286",
"0.5751509",
"0.574603",
"0.5744334",
"0.5732264",
"0.5730475",
"0.5723159",
"0.5714386",
"0.56644696",
"0.56537706",
"0.5650912",
"0.5650912",
"0.5613487",
"0.5600227",
"0.5593136",
"0.5583265",
"0.55815023",
"0.5580273",
"0.5567431",
"0.55665725",
"0.55529624",
"0.5552147",
"0.5536564",
"0.55356526",
"0.55354357",
"0.5531207",
"0.5523609",
"0.5523609",
"0.5523609",
"0.55149573",
"0.5511737",
"0.5503264",
"0.5500959",
"0.5498095",
"0.5495317",
"0.5474785",
"0.5474383",
"0.5454536",
"0.54489696",
"0.54427475",
"0.5438947",
"0.54383117",
"0.5435111",
"0.5433738",
"0.542826",
"0.5426672",
"0.5425584",
"0.5425584",
"0.54208213",
"0.5420562",
"0.5415892",
"0.54134524",
"0.54129684",
"0.54106236",
"0.5381885",
"0.5381885",
"0.5381885",
"0.5381885",
"0.5381885",
"0.5381885",
"0.5381885",
"0.5381885",
"0.5375156",
"0.53704625",
"0.5368526",
"0.5368526",
"0.5365723",
"0.5362892",
"0.53580886",
"0.5355621",
"0.53535867",
"0.53535867",
"0.53535867",
"0.53535867",
"0.53446525",
"0.5342595",
"0.5342214",
"0.5342214",
"0.5342214",
"0.5338127",
"0.5338127",
"0.5338127",
"0.5338127",
"0.5338127",
"0.5338127",
"0.5333928",
"0.5327781",
"0.5327781"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.CREATER | public void setCreater(Integer creater) {
this.creater = creater;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"public void saveSysRole(SysRole sysRole);",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"public void setRole(Map<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }",
"@Override\r\n\tpublic String definedRole() {\n\t\treturn DEF_ROLE;\r\n\t}",
"public void setRole(String role)\n {\n _role=role;\n }",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"public SecUserrole getNewSecUserrole();",
"public void setRole(HashMap<String, Object> role) {\n //First create a dummy Repo class object for customer.\n RoleRepository roleRepository = new RoleRepository();\n Role role1 = roleRepository.createObject(role);\n setRole(role1);\n }",
"public void setRolesRolId(int row,int newValue) throws DataStoreException {\r\n setInt(row,ROLES_ROL_ID, newValue);\r\n }",
"public String getRole() {\r\n return role;\r\n }",
"public void setRol(String rol) {\r\n\t\tthis.rol = rol;\r\n\t}",
"public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.String value) {\n validate(fields()[6], value);\n this.role = value;\n fieldSetFlags()[6] = true;\n return this; \n }",
"void setRole(String roles);",
"public String getRole() {\r\n\t\treturn role;\r\n\t}",
"public String getRole()\n\t{\n\t\treturn role;\n\t}",
"public String getRol() \n {\n \t return rol;\n }",
"public String getRole() {\n return this.role;\n }",
"public String getRole() { return this.role; }",
"private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"public ManageRoleManagedBean() {\r\n selectedRole = new RoleEntity();\r\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"@Override\n\tpublic int updateRoleInfo(FRoleCustom fRoleCustom) throws Exception {\n\t\tDBContextHolder.setDBType(\"0\");\n\t\treturn froleMapper.updateRoleInfo(fRoleCustom);\n\t}",
"public void setDocumenterRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_documenterRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeDocumenterRole();\r\n }\r\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public Byte getRole() {\n return role;\n }",
"public void setViewRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_viewRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeViewRole();\r\n }\r\n }",
"public void xsetRole(com.a9.spec.opensearch.x11.QueryType.Role role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Role target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (com.a9.spec.opensearch.x11.QueryType.Role)get_store().add_attribute_user(ROLE$0);\n }\n target.set(role);\n }\n }",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }",
"public String getRole() {\n\t\t\treturn role;\n\t\t}",
"@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}",
"private int insertUserRole(String type) {\n\n int userRoleId = 0;\n\n try (Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"INSERT INTO ers_user_roles(user_role) VALUES (?);\";\n\n PreparedStatement ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, type); //the 1st \"?\"\n\n ps.executeUpdate();\n\n //PRINTING THE PRIMARY KEY\n ResultSet rs = ps.getGeneratedKeys();\n if (rs.next()) {\n System.out.println(\"The returned PK: \"+ rs.getInt(\"ers_user_role_id\"));\n userRoleId = rs.getInt(\"ers_user_role_id\");\n }\n\n } catch(SQLException e) {\n e.printStackTrace();\n }\n\n return userRoleId;\n }",
"public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"private static boolean initializeRolesTable() {\n try {\n UserHelper.insertRole(\"STUDENT\");\n UserHelper.insertRole(\"PROFESSOR\");\n return true;\n } catch (RoleAlreadyExistsException e) {\n return false;\n }\n }",
"public void executeConstantAction(Activation activation) throws StandardException {\n \tSpliceLogUtils.trace(LOG, \"executeConstantAction with activation {%s}\",activation);\n LanguageConnectionContext lcc = activation.getLanguageConnectionContext();\n DataDictionary dd = lcc.getDataDictionary();\n TransactionController tc = lcc.getTransactionExecute();\n DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();\n if (roleName.equals(Authorizer.PUBLIC_AUTHORIZATION_ID)) {\n throw StandardException.newException(SQLState.AUTH_PUBLIC_ILLEGAL_AUTHORIZATION_ID);\n }\n\n // currentAuthId is currently always the database owner since\n // role definition is a database owner power. This may change\n // in the future since this SQL is more liberal.\n //\n final String currentAuthId = lcc.getCurrentUserId(activation);\n\n /*\n * We don't need to set the ddl mode here, because we don't need to do 2-phase commit\n * for create role statements\n */\n dd.startWriting(lcc,false);\n\n //\n // Check if this role already exists. If it does, throw.\n //\n RoleGrantDescriptor rdDef = dd.getRoleDefinitionDescriptor(roleName);\n\n if (rdDef != null) {\n throw StandardException.\n newException(SQLState.LANG_OBJECT_ALREADY_EXISTS,\n rdDef.getDescriptorType(), roleName);\n }\n\n // Check if the proposed role id exists as a user id in\n // a privilege grant or as a built-in user (\"best effort\"; we\n // can't guarantee against collision if users are externally\n // defined or added later).\n if (knownUser(roleName, currentAuthId, lcc, dd, tc)) {\n throw StandardException.\n newException(SQLState.LANG_OBJECT_ALREADY_EXISTS,\n \"User\", roleName);\n }\n\n rdDef = ddg.newRoleGrantDescriptor(\n dd.getUUIDFactory().createUUID(),\n roleName,\n currentAuthId,// grantee\n Authorizer.SYSTEM_AUTHORIZATION_ID,// grantor\n true, // with admin option\n true); // is definition\n\n dd.addDescriptor(rdDef,\n null, // parent\n DataDictionary.SYSROLES_CATALOG_NUM,\n false, // duplicatesAllowed\n tc);\n }",
"public void setRole(typekey.ECFParticipantFunction_Ext value) {\n __getInternalInterface().setFieldValue(ROLE_PROP.get(), value);\n }",
"public void setRole(Byte role) {\n this.role = role;\n }",
"public Long getRoleid() {\n return roleid;\n }",
"public void setRole(Integer role) {\n\t\tthis.role = role;\n\t}",
"private void fillRoleTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n PreparedStatement ps = connection.prepareStatement(INIT.FILL_ROLES.toString())) {\n ResultSet rs = statement.executeQuery(INIT.GET_ALL_ROLES.toString());\n if(!rs.next()) {\n connection.setAutoCommit(false);\n ps.setString(1, \"user\");\n ps.setString(2, \"No permissions\");\n ps.addBatch();\n ps.setString(1, \"moderator\");\n ps.setString(2, \"Some permissions\");\n ps.addBatch();\n ps.setString(1, \"admin\");\n ps.setString(2, \"All permissions\");\n ps.addBatch();\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"@Insert({\n \"replace into A_USER_ROLE (id, user_id, \",\n \"role_id)\",\n \"values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, \",\n \"#{roleId,jdbcType=INTEGER})\"\n })\n int insert(AUserRole record);",
"@Override\n\tpublic int addRoleInfo(FRoleCustom fRoleCustom) throws Exception {\n\t\tDBContextHolder.setDBType(\"0\");\n\t\treturn froleMapper.addRoleInfo(fRoleCustom);\n\t}",
"public SecRole getNewSecRole();",
"public SecRole getNewSecRole();",
"public void setRole(com.a9.spec.opensearch.x11.QueryType.Role.Enum role)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ROLE$0);\n }\n target.setEnumValue(role);\n }\n }",
"public Role getRole()\n {\n return role;\n }",
"public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }",
"void setRole(final SecurityRole role);",
"public java.lang.String getRole() {\n return role;\n }",
"@Override\n public String getRoleProperty() {\n return \"visibleAtRole.id\";\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public TableRole getTableRole();",
"public String getRolecode() {\n return rolecode;\n }",
"private void initialData() {\n\n// if (MorphiaObject.datastore.createQuery(SecurityRole.class).countAll() == 0) {\n// for (final String roleName : Arrays\n// .asList(controllers.Application.USER_ROLE)) {\n// final SecurityRole role = new SecurityRole();\n// role.roleName = roleName;\n// MorphiaObject.datastore.save(role);\n// }\n// }\n }",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"com.message.MessageInfo.RoleVO getRole();",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}",
"ISModifyProvidedRole createISModifyProvidedRole();",
"public void resetCreationRights() {\r\n creationRights = false;\r\n \r\n try {\r\n String[] roles = processModel.getCreationRoles();\r\n \r\n for (int i = 0; i < roles.length; i++) {\r\n if (roles[i].equals(currentRole))\r\n creationRights = true;\r\n }\r\n } catch (Exception e) {\r\n creationRights = false;\r\n }\r\n }",
"public int getRolesRolId() throws DataStoreException {\r\n return getInt(ROLES_ROL_ID);\r\n }",
"public void setRole(String role) {\n this.role = role;\n }",
"public String getRoleCode() {\n return roleCode;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public AXValue getRole() {\n return role;\n }",
"public com.message.MessageInfo.RoleVO getRole() {\n return role_ == null ? com.message.MessageInfo.RoleVO.getDefaultInstance() : role_;\n }",
"String getRole();",
"String getRole();",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public String getRole_name() {\n return role_name;\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}",
"public void setRolesNombre(int row,String newValue) throws DataStoreException {\r\n setString(row,ROLES_NOMBRE, newValue);\r\n }",
"public void setAdminRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_adminRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeAdminRole();\r\n }\r\n }",
"@Override\r\n\tpublic void saveRole(Integer uid) {\n\t\tum.saveRole(uid);\r\n\t}",
"@XmlAttribute\r\n public String getRole() {\r\n return role;\r\n }",
"public SysPermissionRoleRecord() {\n super(SysPermissionRole.SYS_PERMISSION_ROLE);\n }",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }"
] | [
"0.56477433",
"0.5615241",
"0.55544955",
"0.55113244",
"0.54727656",
"0.54624426",
"0.5459205",
"0.5449298",
"0.543087",
"0.53272694",
"0.5317581",
"0.527379",
"0.5259821",
"0.5245029",
"0.52247435",
"0.5215496",
"0.52012956",
"0.5192343",
"0.5188368",
"0.5174618",
"0.51744556",
"0.51673317",
"0.5147568",
"0.5145599",
"0.5136579",
"0.51267767",
"0.51172674",
"0.5108891",
"0.510173",
"0.50753224",
"0.506522",
"0.5060171",
"0.50574094",
"0.5046641",
"0.50418687",
"0.5038357",
"0.50367004",
"0.5029446",
"0.5027424",
"0.5026891",
"0.50144726",
"0.50015837",
"0.4994225",
"0.49932545",
"0.49862403",
"0.49823466",
"0.49803078",
"0.4977112",
"0.4977112",
"0.49754295",
"0.49745354",
"0.4970335",
"0.4968947",
"0.49662867",
"0.49660257",
"0.4955212",
"0.4955212",
"0.4955212",
"0.49501407",
"0.49436936",
"0.49435416",
"0.49366787",
"0.49331328",
"0.4928778",
"0.49219346",
"0.4918962",
"0.49182364",
"0.49182364",
"0.49165154",
"0.49164888",
"0.49140796",
"0.4912088",
"0.4906793",
"0.490539",
"0.48961794",
"0.48961794",
"0.48961794",
"0.48961794",
"0.48913828",
"0.48853377",
"0.48829535",
"0.48829535",
"0.4881466",
"0.4881466",
"0.4881466",
"0.4881466",
"0.4881466",
"0.4881466",
"0.4881466",
"0.4881466",
"0.48780394",
"0.48777092",
"0.48758358",
"0.487368",
"0.48685035",
"0.48530987",
"0.48492107",
"0.48437443",
"0.48434663",
"0.48428246",
"0.48428246"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.CREATE_TIME | public Timestamp getCreateTime() {
return createTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Long getCreateTime() {\n return createTime;\n }",
"public java.sql.Timestamp getCreateTime () {\r\n\t\treturn createTime;\r\n\t}",
"public Long getCreatetime() {\n return createtime;\n }",
"public long getCreateTime() {\n return this.createTime;\n }",
"public Integer getCreateTime() {\r\n return createTime;\r\n }",
"public Integer getCreateTime() {\n return createTime;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getCreateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(CREATETIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getCreateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(CREATETIME_PROP.get());\n }",
"public long getCreateTime() {\n return createTime_;\n }",
"public long getCreateTime() {\n return createTime_;\n }",
"public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public String getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}",
"public String getCreateTime() {\r\n return createTime;\r\n }",
"public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public int getCreateTime() {\n return createTime_;\n }",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public int getCreateTime() {\n return createTime_;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }"
] | [
"0.7149876",
"0.7120729",
"0.70870537",
"0.7059983",
"0.70333254",
"0.6991706",
"0.6977354",
"0.6945468",
"0.693896",
"0.69252163",
"0.6902853",
"0.68757224",
"0.68757224",
"0.68757224",
"0.68757224",
"0.6859601",
"0.6858192",
"0.68405956",
"0.68387365",
"0.68387365",
"0.68387365",
"0.68387365",
"0.68387365",
"0.6810174",
"0.6810174",
"0.6777871",
"0.6777871",
"0.6777871",
"0.6777871",
"0.6777871",
"0.6777051",
"0.6777051",
"0.6775352",
"0.6760977",
"0.6760977",
"0.6748868",
"0.6735682",
"0.6734121",
"0.6734121",
"0.6734121",
"0.6734121",
"0.6734121",
"0.6734121",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609",
"0.6718609"
] | 0.68268776 | 23 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.CREATE_TIME | public void setCreateTime(Timestamp createTime) {
this.createTime = createTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCreateTime (java.sql.Timestamp createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }",
"private void setCreateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(CREATETIME_PROP.get(), value);\n }",
"public void setCreateTime(Long createTime) {\n\t\tthis.createTime = createTime;\n\t}",
"public void setCreateTime(Long createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }",
"public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }",
"public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }",
"public void setCreateTime(Integer createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(createTime);\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Integer createTime) {\n this.createTime = createTime;\n }",
"public void setCreatetime(Long createtime) {\n this.createtime = createtime;\n }",
"public void setCreateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(CREATETIME_PROP.get(), value);\n }",
"public void setCreateTime (java.util.Date createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime (java.util.Date createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(String createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(String createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(String createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(String createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(Date createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(Date createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setTimeCreate(Date timeCreate) {\n this.timeCreate = timeCreate;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }"
] | [
"0.6769487",
"0.67149806",
"0.65248054",
"0.65184677",
"0.6487098",
"0.6462815",
"0.6441337",
"0.6441337",
"0.643075",
"0.640389",
"0.63837945",
"0.6378756",
"0.6378756",
"0.6378756",
"0.6378756",
"0.6378756",
"0.6378756",
"0.6373783",
"0.6365461",
"0.63650596",
"0.6360757",
"0.6360757",
"0.6349813",
"0.6349813",
"0.6349813",
"0.6349813",
"0.63461655",
"0.63461655",
"0.631132",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535",
"0.6304535"
] | 0.63275045 | 28 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.UPDATER | public Integer getUpdater() {
return updater;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUpdator() {\r\n return updator;\r\n }",
"public String getUpdator() {\n return updator;\n }",
"public String getUpdateUser () {\r\n\t\treturn updateUser;\r\n\t}",
"public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}",
"public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}",
"public String getUpdatedby() {\n return (String)getAttributeInternal(UPDATEDBY);\n }",
"public String getUpdatedBy() {\n return (String)getAttributeInternal(UPDATEDBY);\n }",
"public String getUpdatedBy() {\n return (String)getAttributeInternal(UPDATEDBY);\n }",
"public String getUpdateUser() {\r\n return updateUser;\r\n }",
"public String getUpdateUser() {\r\n return updateUser;\r\n }",
"public String getUpdatedBy() {\n return (String) getAttributeInternal(UPDATEDBY);\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public Integer getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUserId() {\r\n return updateUserId;\r\n }",
"public String getUpdateUser() {\n return updateUser; \n }",
"public String updatedBy() {\n return this.updatedBy;\n }",
"public Long getUpdatedBy() {\n\t\treturn updatedBy;\n\t}",
"public String getUpdatedBy() {\r\n return updatedBy;\r\n }",
"public Long getUpdateUser() {\n return updateUser;\n }",
"public String getUpdatedBy() {\r\n\t\treturn updatedBy;\r\n\t}",
"public String getUpdatedBy() {\n\t\treturn updatedBy;\n\t}",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public String getUpdateBy() {\r\n return updateBy;\r\n }",
"public Integer getUpdateby() {\n return updateby;\n }",
"public String getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateBy() {\n return updateBy;\n }",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"public String getUpdateBy() {\n\t\treturn updateBy;\n\t}",
"public Long getUpdateBy() {\n return updateBy;\n }",
"public Long getUpdateBy() {\n return updateBy;\n }",
"public Long getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateUsername() {\r\n\t\treturn updateUsername;\r\n\t}",
"public Integer getUpdateUserid() {\n return updateUserid;\n }",
"public Long getUpdateUserid() {\r\n\t\treturn updateUserid;\r\n\t}",
"public String getUpdaterId() {\n return updaterId;\n }",
"public String getUpdateEmp() {\n return updateEmp;\n }",
"public String getLastUpdateBy() {\r\n\t\treturn lastUpdateBy;\r\n\t}",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy()\n {\n return (Number)getAttributeInternal(LASTUPDATEDBY);\n }",
"public String getCVCTG_USUARIO_UPDATE(){\n\t\treturn this.myCvctg_usuario_update;\n\t}",
"public String getUpdater() {\r\n return updater;\r\n }",
"public String getUpdaterName() {\n return updaterName;\n }",
"public UserItem getUpdatedBy() {\n return updatedBy;\n }",
"public Integer getModifyUser() {\n return modifyUser;\n }",
"public String getUpdater() {\n return updater;\n }",
"public String getUpdater() {\n return updater;\n }",
"public String getUpdater() {\n return updater;\n }",
"public Number getLastUpdatedBy() {\r\n return (Number) getAttributeInternal(LASTUPDATEDBY);\r\n }",
"public String getUpdatePerson() {\n return updatePerson;\n }",
"public String getLastupdateby() {\n return lastupdateby;\n }",
"public Number getLastUpdatedBy() {\n return (Number) getAttributeInternal(LASTUPDATEDBY);\n }",
"public Number getLastUpdatedBy() {\n return (Number) getAttributeInternal(LASTUPDATEDBY);\n }",
"public String getLastUpdatedBy() {\n return (String) getAttributeInternal(LASTUPDATEDBY);\n }",
"public String getLastUpdatedBy() {\n return (String) getAttributeInternal(LASTUPDATEDBY);\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"@Override\n\tpublic java.lang.String getModifiedBy() {\n\t\treturn _locMstLocation.getModifiedBy();\n\t}",
"public void setUpdator(String updator) {\n this.updator = updator;\n }",
"public String getLastUpdatedBy() {\n return lastUpdatedBy;\n }",
"@Schema(description = \"Details of the user who last updated the worklog.\")\n public AllOfWorklogUpdateAuthor getUpdateAuthor() {\n return updateAuthor;\n }",
"public String getLastUpdateUser() {\n return lastUpdateUser;\n }",
"public String getLastUpdateUser() {\n return lastUpdateUser;\n }",
"public String getUpdateRule () {\n return updateRule;\n }",
"public String getUpdateRule () {\n return updateRule;\n }",
"public static String selectDef5765_2(ConnectionProvider connectionProvider, String UpdatedByR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(table1.Name), '') ) as UpdatedBy FROM AD_User table1 WHERE table1.isActive='Y' AND table1.AD_User_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, UpdatedByR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"updatedby\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }",
"public User getChangedBy() {\n\t\treturn null;\n\t}",
"public User getModifiedBy()\n\t{\n\t\treturn (User) this.getKeyValue(\"Modified_By\");\n\n\t}",
"public String getAdminRole() {\r\n\t\treturn adminRole;\r\n\t}",
"public java.lang.Integer getModifiedby() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.Integer) __getCache(\"modifiedby\")));\n }",
"public static String selectDefA74C2A2DE5A1433BA2FBD3B2FAE70201_0(ConnectionProvider connectionProvider, String UpdatedbyR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(table1.Name), '') ) as Updatedby FROM AD_User table1 WHERE table1.isActive='Y' AND table1.AD_User_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, UpdatedbyR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"updatedby\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }"
] | [
"0.65739715",
"0.6557077",
"0.6233158",
"0.6196265",
"0.6196265",
"0.61799586",
"0.6125228",
"0.6125228",
"0.61218905",
"0.61218905",
"0.60797125",
"0.6067366",
"0.6067366",
"0.6067366",
"0.6067366",
"0.6067366",
"0.6067366",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60575885",
"0.60269815",
"0.59983575",
"0.5993871",
"0.5982491",
"0.59781384",
"0.5950051",
"0.5930298",
"0.59284645",
"0.5922166",
"0.5900566",
"0.5900566",
"0.5900566",
"0.5900566",
"0.58937645",
"0.58796996",
"0.5834359",
"0.5834359",
"0.5834359",
"0.5822534",
"0.57991654",
"0.5787299",
"0.5787299",
"0.5787299",
"0.5768013",
"0.57424915",
"0.5694302",
"0.56643057",
"0.55712044",
"0.55607265",
"0.55573565",
"0.55573565",
"0.55573565",
"0.55573565",
"0.55573565",
"0.55573565",
"0.55573565",
"0.5551603",
"0.554808",
"0.55430675",
"0.55093646",
"0.5507751",
"0.5502622",
"0.5498996",
"0.5498996",
"0.5498996",
"0.54974604",
"0.5489109",
"0.54806125",
"0.54803604",
"0.54803604",
"0.54635835",
"0.54635835",
"0.54567873",
"0.54567873",
"0.54567873",
"0.54567873",
"0.54567873",
"0.54253376",
"0.54152936",
"0.5412139",
"0.5411696",
"0.5383083",
"0.5383083",
"0.53741246",
"0.53741246",
"0.53412205",
"0.53267485",
"0.5326376",
"0.53155565",
"0.5308259",
"0.52988285"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.UPDATER | public void setUpdater(Integer updater) {
this.updater = updater;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setUpdator(String updator) {\n this.updator = updator;\n }",
"public void setUpdator(String updator) {\r\n this.updator = updator == null ? null : updator.trim();\r\n }",
"@Override\n\tpublic void updateRoleUtilisateur(RoleUtilisateur r) {\n\t\troleUtilisateurDAO.udpateRoleUtilisateur(r);\n\t}",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public String getUpdator() {\r\n return updator;\r\n }",
"public String getUpdator() {\n return updator;\n }",
"public void setUpdateUser(String newVal) {\n if ((newVal != null && this.updateUser != null && (newVal.compareTo(this.updateUser) == 0)) || \n (newVal == null && this.updateUser == null && updateUser_is_initialized)) {\n return; \n } \n this.updateUser = newVal; \n\n updateUser_is_modified = true; \n updateUser_is_initialized = true; \n }",
"public void setUpdateUser(Integer updateUser) {\n this.updateUser = updateUser;\n }",
"public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser;\n }",
"public void setUpdateUser (String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}",
"public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }",
"public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }",
"public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }",
"public void setUpdatedby( String updatedby )\n {\n this.updatedby = updatedby;\n }",
"@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}",
"public void setUpdateUser(String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}",
"public void setUpdateUser(String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}",
"int updateByPrimaryKey(SystemRoleUserMapperMo record);",
"public void setUpdateUser(Long updateUser) {\n this.updateUser = updateUser;\n }",
"public void setDocumenterRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_documenterRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeDocumenterRole();\r\n }\r\n }",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public void setUpdatedBy( Integer updatedBy ) {\n this.updatedBy = updatedBy;\n }",
"public Long getUpdatedBy() {\n\t\treturn updatedBy;\n\t}",
"public void setUpdater(String updater) {\n this.updater = updater;\n }",
"public void setRolesRolId(int row,int newValue) throws DataStoreException {\r\n setInt(row,ROLES_ROL_ID, newValue);\r\n }",
"void setUpdateby(final U lastModifiedBy);",
"public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }",
"public String getUpdatedBy() {\r\n\t\treturn updatedBy;\r\n\t}",
"public String updatedBy() {\n return this.updatedBy;\n }",
"public String getUpdatedBy() {\r\n return updatedBy;\r\n }",
"int updateByPrimaryKeySelective(SystemRoleUserMapperMo record);",
"public String getUpdateBy() {\r\n return updateBy;\r\n }",
"public String getUpdateUser () {\r\n\t\treturn updateUser;\r\n\t}",
"public String getUpdatedBy() {\n\t\treturn updatedBy;\n\t}",
"public void setRangerAuditRole(String rangerAuditRole) {\n this.rangerAuditRole = rangerAuditRole;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public Long getUpdatedBy() {\n return updatedBy;\n }",
"public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}",
"public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}",
"public void setUpdatedBy(String updatedBy) {\r\n\t\tthis.updatedBy = updatedBy;\r\n\t}",
"@Override\n\tpublic void update(ERS_USERS entity) {\n\t\t\n\t}",
"public void setUpdateUser(String updateUser) {\r\n this.updateUser = updateUser == null ? null : updateUser.trim();\r\n }",
"public void setUpdateUser(String updateUser) {\r\n this.updateUser = updateUser == null ? null : updateUser.trim();\r\n }",
"public String getUpdateBy() {\n\t\treturn updateBy;\n\t}",
"public void setLastUpdatedBy(String value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }",
"public void setLastUpdatedBy(String value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }",
"public void setUpdateBy(int updateBy) {\n inputParameters.Update_By = updateBy;\n\n }",
"public void setAdminRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_adminRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeAdminRole();\r\n }\r\n }",
"public String getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateUser() {\r\n return updateUser;\r\n }",
"public String getUpdateUser() {\r\n return updateUser;\r\n }",
"@Override\n\tpublic int update(Rol r) {\n\t\treturn rolDao.update(r);\n\t}",
"int updateByPrimaryKey(SysRoleUser record);",
"public void setUpdatedBy(String updatedBy) {\r\n this.updatedBy = updatedBy == null ? null : updatedBy.trim();\r\n }",
"public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }",
"public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }",
"public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }",
"public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }",
"public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }",
"public void setLastUpdatedBy(Number value)\n {\n setAttributeInternal(LASTUPDATEDBY, value);\n }",
"public void setUpdatedBy(String updatedBy) {\n\t\tthis.updatedBy = updatedBy;\n\t}",
"public Integer getUpdateby() {\n return updateby;\n }",
"@Override\n\tpublic void update(UserRole vo) {\n\n\t}",
"@Override\r\n\tpublic Admin changeRole(Admin admin) {\n\t\treturn null;\r\n\t}",
"public void setUpdateBy( String updateBy ) {\n this.updateBy = updateBy;\n }",
"public abstract void setRoleManager(OwRoleManager roleManager_p);",
"int updateByPrimaryKey(PlatformAdminRoleUser record);",
"public String getUpdateUser() {\n return updateUser; \n }",
"public Long getUpdateBy() {\n return updateBy;\n }",
"public Long getUpdateBy() {\n return updateBy;\n }",
"public Long getUpdateBy() {\n return updateBy;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public String getUpdateUser() {\n return updateUser;\n }",
"public boolean update(Enrollee enrollee) throws DBException {\n PreparedStatement statement = null;\n boolean isUpdated = false;\n try {\n connection = DBManager.getConnection();\n statement = connection.prepareStatement(UPDATE_ENROLLEE);\n statement.setString(1, enrollee.getFirst_name());\n statement.setString(2, enrollee.getLast_name());\n statement.setString(3, enrollee.getPatronymic());\n statement.setLong(4, enrollee.getId());\n\n if (statement.executeUpdate() != 0) {\n isUpdated = true;\n }\n } catch (SQLException e) {\n DBManager.rollback(connection);\n LOG.error(e.getMessage(), e);\n throw new DBException(Message.CANNOT_UPDATE_USER, e);\n } finally {\n DBManager.closeStatement(statement);\n DBManager.closeConnection(connection);\n }\n return isUpdated;\n }",
"@Update({\n \"update A_USER_ROLE\",\n \"set user_id = #{userId,jdbcType=INTEGER},\",\n \"role_id = #{roleId,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(AUserRole record);",
"public void setModifiedBy(int tmp) {\n this.modifiedBy = tmp;\n }",
"public void setUpdateby(Integer updateby) {\n this.updateby = updateby;\n }",
"public void setUpdateUserId(String updateUserId) {\r\n this.updateUserId = updateUserId;\r\n }",
"public void setUpdatedBy(Long updatedBy) {\n\t\tthis.updatedBy = updatedBy;\n\t}",
"public String getUpdatedby() {\n return (String)getAttributeInternal(UPDATEDBY);\n }",
"public String getUpdateUserId() {\r\n return updateUserId;\r\n }"
] | [
"0.6275057",
"0.5899884",
"0.5844805",
"0.5834415",
"0.5622571",
"0.56027037",
"0.5535963",
"0.55177003",
"0.54792833",
"0.5475531",
"0.5444558",
"0.5444558",
"0.5444558",
"0.5422731",
"0.5398561",
"0.53883076",
"0.53883076",
"0.5247005",
"0.5219853",
"0.521547",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.52018756",
"0.51863855",
"0.5186274",
"0.517644",
"0.5170457",
"0.516835",
"0.51498884",
"0.5147529",
"0.5144699",
"0.5140457",
"0.51308745",
"0.51284796",
"0.5117532",
"0.51119125",
"0.511116",
"0.51059395",
"0.51059395",
"0.51059395",
"0.51059395",
"0.50964797",
"0.50964797",
"0.5084945",
"0.50758594",
"0.5075422",
"0.5075422",
"0.5074552",
"0.50662196",
"0.50662196",
"0.50601393",
"0.5056613",
"0.50559705",
"0.50559705",
"0.50559705",
"0.50548565",
"0.50548565",
"0.50545686",
"0.50495845",
"0.504467",
"0.5043959",
"0.5043959",
"0.5043959",
"0.5043959",
"0.5043959",
"0.5041307",
"0.5034988",
"0.5031678",
"0.5023386",
"0.50184894",
"0.5001508",
"0.49942106",
"0.4992362",
"0.49889728",
"0.49872008",
"0.49872008",
"0.49872008",
"0.4981966",
"0.4981966",
"0.4981966",
"0.4981966",
"0.4981966",
"0.4981966",
"0.4981804",
"0.4973973",
"0.49667636",
"0.49647465",
"0.496191",
"0.49585736",
"0.49584475",
"0.4955997"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.UPDATE_TIME | public Timestamp getUpdateTime() {
return updateTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Long getUpdateDatetime() {\n return updateDatetime;\n }",
"public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\r\n return updatetime;\r\n }",
"public Long getUpdateTime() {\n\t\treturn updateTime;\n\t}",
"public Date getUpdatedTime() {\n return updatedTime;\n }",
"public Date getUpdatedTime() {\n return updatedTime;\n }",
"public Date getUpdatedTime() {\n return updatedTime;\n }",
"public Long getUpdateTime() {\n return updateTime;\n }",
"public Long getUpdateTime() {\n return updateTime;\n }",
"public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }",
"public String getUpdTime() {\n return updTime;\n }",
"public Integer getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}",
"public Date getTimeUpdate() {\n return timeUpdate;\n }",
"public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }",
"public String getUpdateTime() {\r\n return updateTime;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public java.lang.Long getTsUpdate() {\n return ts_update;\n }",
"public Date getUpdateDatime() {\r\n return updateDatime;\r\n }",
"public Date getUpdateDatime() {\r\n return updateDatime;\r\n }",
"public Date getUpdateTime()\n {\n return data.updateTime;\n }",
"public Date getUpdateTime() {\n\t\treturn this.updateTime;\n\t}",
"public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}",
"public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }",
"public Date getUpdateTime() {\r\n\t\treturn this.updatedTime;\r\n\t}",
"int getUpdateTriggerTime();",
"public java.lang.Long getTsUpdate() {\n return ts_update;\n }",
"public Integer getModifyTime() {\n\t\treturn modifyTime;\n\t}",
"public Date getUpdateTime() {\n return this.updateTime;\n }",
"public Date getUpdateTime() {\r\n\t\treturn updateTime;\r\n\t}",
"public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}",
"public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}",
"public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}",
"public Date getUpdateDatetime();",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"public Date getUpdateTime() {\r\n return updateTime;\r\n }",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@ApiModelProperty(value = \"修改时间\")\n public Date getRowUpdateTime() {\n return rowUpdateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public Date getUpdateTime() {\n return updateTime;\n }",
"public String getModifytime() {\n return modifytime;\n }",
"public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}",
"public long getTsUpdate() {\n return tsUpdate_;\n }",
"public String getModifyTime() {\r\n\t\treturn modifyTime;\r\n\t}"
] | [
"0.6985458",
"0.6947638",
"0.6947638",
"0.69012684",
"0.69012684",
"0.6843616",
"0.674141",
"0.6737202",
"0.6737202",
"0.67317086",
"0.66414034",
"0.6620773",
"0.6620773",
"0.6620773",
"0.6567524",
"0.6567524",
"0.65524584",
"0.65251803",
"0.6521317",
"0.65121496",
"0.64860296",
"0.64798075",
"0.64773864",
"0.6473872",
"0.64624405",
"0.6443312",
"0.6443312",
"0.6443312",
"0.6443312",
"0.64261824",
"0.6424522",
"0.6424522",
"0.6423452",
"0.6416687",
"0.6404642",
"0.6402834",
"0.640245",
"0.6397353",
"0.63891715",
"0.6356819",
"0.6348143",
"0.63422227",
"0.6326803",
"0.6326803",
"0.6326803",
"0.6308676",
"0.62952834",
"0.62952834",
"0.62952834",
"0.62952834",
"0.6277583",
"0.62603235",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.62569606",
"0.6253927",
"0.6243786",
"0.62388617",
"0.6220328"
] | 0.6423322 | 33 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.UPDATE_TIME | public void setUpdateTime(Timestamp updateTime) {
this.updateTime = updateTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}",
"void setLastUpdatedTime();",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }",
"public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }",
"public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }",
"public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }",
"public void setUpdateTime(Long updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(DateTime updateTime) {\n this.updated = updateTime;\n }",
"public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdTime(String updTime) {\n this.updTime = updTime;\n }",
"public void setUpdateTime(Date updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }",
"public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }",
"public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}",
"public void setUpdateTime(Integer updateTime) {\n this.updateTime = updateTime;\n }",
"private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }",
"public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n this.updateTime = updateTime;\n }",
"public Long getUpdateDatetime() {\n return updateDatetime;\n }",
"public void setUpdateTime(String updateTime) {\n\t\t\tthis.updateTime = updateTime;\n\t\t}",
"public void updateActualTime() {\n if (role.getText().equals(\"Member\")) {\n warning.setText(\"\");\n String orderNumber = orderNo.getText();\n int orderNum = 0;\n String realTime = actualTime.getText();\n int actlTime = 0;\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else if (actualTime.getText().isEmpty() || !Validation.isValidActualTime(realTime)) {\n warning.setText(invalidActualTime);\n } else {\n orderNum = Integer.parseInt(orderNo.getText());\n actlTime = Integer.parseInt(actualTime.getText());\n\n UserDAO userDAO = new UserDAO();\n User user = userDAO.getUser(logname.getText());\n PlanDAO planDAO = new PlanDAO();\n int userId = user.getId();\n Plan plan = new Plan(orderNum, actlTime);\n planDAO.editActualTime(plan, userId);\n updateTableFromDB(orderNumber);\n warning.setText(\"Actual time of order \" + orderNum + \" updated successfully \");\n }\n } else {\n warning.setText(\"Please use Update button\");\n }\n }",
"public void setUpdateTime(com.flexnet.opsembedded.webservices.DateTimeQueryType updateTime) {\n this.updateTime = updateTime;\n }",
"public Date getUpdatetime() {\r\n return updatetime;\r\n }",
"public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }",
"public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }",
"public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(Date updateTime) {\n\t\tsetField(\"updateTime\", updateTime);\n\t}",
"@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}",
"public void setUpdateTimeDb(Date updateTimeDb) {\r\n\t\tthis.updateTimeDb = updateTimeDb;\r\n\t}",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"@Override\n\tpublic void setLastUpdatedTime(Date lastUpdated) {\n\n\t}",
"public void setUpdateTime(java.util.Date updateTime) {\n this.updateTime = updateTime;\n }",
"public void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }",
"public final void updateModifyDateTime() {\n \tm_modifyDate = System.currentTimeMillis();\n \tm_accessDate = m_modifyDate;\n }",
"public final void updateModifyDateTime( long modTime) {\n \tm_modifyDate = modTime;\n }"
] | [
"0.6754228",
"0.6754228",
"0.6652315",
"0.6539041",
"0.64388514",
"0.63925403",
"0.63925403",
"0.627658",
"0.6205883",
"0.6205883",
"0.6205883",
"0.6179789",
"0.61775494",
"0.6151208",
"0.6151208",
"0.6146265",
"0.61204946",
"0.6113754",
"0.6113754",
"0.6113754",
"0.6113754",
"0.6097129",
"0.6083973",
"0.60793245",
"0.60708034",
"0.6062336",
"0.6062336",
"0.6062336",
"0.6051384",
"0.6051384",
"0.60358983",
"0.6035021",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.60290194",
"0.6013169",
"0.59972566",
"0.5988404",
"0.59743875",
"0.5959387",
"0.5954535",
"0.5954535",
"0.59534615",
"0.59534615",
"0.5939303",
"0.59322274",
"0.59219456",
"0.5919097",
"0.5919097",
"0.5915529",
"0.5915529",
"0.5915529",
"0.58821535",
"0.58821535",
"0.5872253",
"0.58614343",
"0.5857452",
"0.5856863",
"0.58440363"
] | 0.6074483 | 24 |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sys_role.ADMIN_USER | public String getAdminUser() {
return adminUser;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAdminRole() {\r\n\t\treturn adminRole;\r\n\t}",
"public Long getAdminRoleId() {\n\t\treturn this.adminRoleId;\n\t}",
"public String getAdminUserName() {\n return adminUserName;\n }",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"private ApplicationUser getAdminUser() {\n GroupManager groupManager = ComponentAccessor.getGroupManager();\n\n Collection <ApplicationUser> adminUsers = groupManager.getUsersInGroup(\"jira-administrators\",false);\n if ( adminUsers != null && adminUsers.size() > 0 ) {\n return adminUsers.iterator().next();\n }\n return null;\n }",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"java.lang.String getAdmin();",
"public String getJdbcUser()\n {\n return getStringValue(DataSourceDobj.FLD_JDBC_USER);\n }",
"public String getUserSubMenuRole() {\n return sessionData.getUserSubMenuRole();\n }",
"public String getAdminUsername() {\n\treturn adminUsername;\n}",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"public int getAdmin() {\n return admin;\n }",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"static public int getADMIN() {\n return 1;\n }",
"PlatformAdminRoleUser selectByPrimaryKey(@Param(\"roleId\") String roleId, @Param(\"adminId\") String adminId);",
"public String getPermissionAdmin() {\n return permissionAdmin;\n }",
"public String getAdminPwd() {\n return adminPwd;\n }",
"public String getAdminCode(){\n return this.adminCode;\n }",
"public String getLoginRole() {\n return loginRole;\n }",
"public String getAdminId() {\n return adminId;\n }",
"public String getAdminId() {\n return adminId;\n }",
"public java.lang.String getAdmin() {\n java.lang.Object ref = admin_;\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 admin_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public List<Role> getRole() {\n\t\treturn userDao.getRole();\r\n\t}",
"@Override\r\n\tpublic AdminUser selectadminif(String name) {\n\t\treturn adminUserMapper.selectadminif(name);\r\n\t}",
"public String getAdminname() {\n return adminname;\n }",
"public String getAdminpwd() {\r\n return adminpwd;\r\n }",
"public String getAdminid() {\r\n return adminid;\r\n }",
"public String getAdminName() {\n return adminName;\n }",
"public String getAdminName() {\n return adminName;\n }",
"public IUser getAdmin() {\n\t\t// TODO Read from file\n\t\treturn User.get()\n\t\t\t\t\t.setPerson(Person.get()\n\t\t\t\t\t\t\t\t\t.setFirstname(\"Адміністратор\")\n\t\t\t\t\t\t\t\t\t.setLastname(\"Адміністратор\")\n\t\t\t\t\t\t\t\t\t.setEmail(\"[email protected]\")\n\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t.setMiddlename(\"Адміністратор\")\n\t\t\t\t\t\t\t\t\t.setPhonenumber(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.setAccount(Account.get()\n\t\t\t\t\t\t\t\t\t.setLogin(\"admin\")\n\t\t\t\t\t\t\t\t\t.setPassword(\"admin\")\n\t\t\t\t\t\t\t\t\t.setRole(\"Адміністратор\")\n\t\t\t\t\t\t\t\t\t.setStatus(\"Активний\")\n\t\t\t\t\t\t\t\t\t.setCommunity(\"Україна\")\n\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t.setData(\"\")\n\t\t\t\t\t\t\t\t\t.setRegisterNumber(\"0\")\n\t\t\t\t\t\t\t\t\t.setRegistratorNumber(\"0\")\n\t\t\t\t\t\t\t\t\t.setVolumeNumber(\"0\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.build()\n\t\t\t\t\t.setAddress(Address.get()\n\t\t\t\t\t\t\t.setRegion(\"Львівська\")\n\t\t\t\t\t\t\t.setDistrict(\"Галицький\")\n\t\t\t\t\t\t\t.setCity(\"Львів\")\n\t\t\t\t\t\t\t.setStreet(\"Вітовського\")\n\t\t\t\t\t\t\t.setBuilding(\"48\")\n\t\t\t\t\t\t\t.setFlat(\"31\")\n\t\t\t\t\t\t\t.setPostcode(\"00000\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.setPassport(Passport.get()\n\t\t\t\t\t\t\t.setSeria(\"AA\")\n\t\t\t\t\t\t\t.setNumber(\"00000\")\n\t\t\t\t\t\t\t.setPublished(\"Народом України\")\n\t\t\t\t\t\t\t);\n\t}",
"public Integer getModifyUser() {\n return modifyUser;\n }",
"public String getIsAdmin() {\n return isAdmin;\n }",
"@java.lang.Override\n public java.lang.String getAdmin() {\n java.lang.Object ref = admin_;\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 admin_ = s;\n return s;\n }\n }",
"public int getAdminId() {\n\t\treturn adminId;\n\t}",
"public Userrole getUserrole() {\n return getEntity();\n }",
"@Override\n\tpublic AdminUserDTO getAdminUserUserNo(String userNo) {\n\t\treturn memberDao.getAdminUserUserNo(userNo);\n\t}",
"public Integer getAdminStatus() {\n return adminStatus;\n }",
"public User getDefaultAdminUser() {\n //try and find an admin user matching the company contact info\n User adminUser = \n User.find(\"byCompanyAndEmail\", this, contactEmail).first();\n if(adminUser != null && adminUser.hasRole(RoleValue.COMPANY_ADMIN) && \n adminUser.status.equals(UserStatus.ACTIVE)){\n \n return adminUser;\n }\n\n List<User> activeUsers = User.find(\"byCompanyAndStatus\", this, \n UserStatus.ACTIVE).fetch();\n \n for (User activeUser : activeUsers) {\n if(activeUser.hasRole(RoleValue.COMPANY_ADMIN)){\n return activeUser;\n }\n }\n\n throw new IllegalStateException(\"No active, admin user for company \" +\n name + \".\");\n }",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getAdminBytes() {\n java.lang.Object ref = admin_;\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 admin_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAdminBytes() {\n java.lang.Object ref = admin_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n admin_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"SysRoleUser selectByPrimaryKey(Long id);",
"@Override\r\n\tpublic Integer findAdminPassword(Admin admin) {\n\t\treturn adminMapper.findAdminPassword(admin);\r\n\t}",
"public String getAdminName() {\n\t\treturn adminName;\n\t}",
"public Short getModifyUserIdentity() {\n return modifyUserIdentity;\n }",
"public Short getModifyUserIdentity() {\n return modifyUserIdentity;\n }",
"public String getAdminOther() {\n return adminOther;\n }",
"@Override\r\n\tpublic String employeeRole() {\n\t\treturn ((WebUserRole) webContext.get()).getEmployee();\r\n\t}",
"public Integer getIsadmin() {\r\n return isadmin;\r\n }",
"public String getDbUser() {\n\t\treturn textFieldDbUser.getText();\n\t}",
"public int getCod_admin() {\r\n return cod_admin;\r\n }",
"public Integer getAdminSex() {\n return adminSex;\n }",
"String getRole();",
"String getRole();",
"public String checkrole() \n { \n \ttry\n {\n String sql =\"select * from user where login='true'\";\n \n Cursor mCur = mDb.rawQuery(sql, null);\n Log.d(\"LEE\",\"hi2\");\n if(mCur.getCount()>0)\n {\n \tmCur.moveToFirst();\n \treturn mCur.getString(mCur.getColumnIndex(\"role\"));\n } \n else\n {\n \treturn \"logout\";\n }\n }\n catch (SQLException mSQLException) \n {\n Log.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n throw mSQLException;\n }\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"public String getModifyUser() {\n return modifyUser;\n }",
"com.google.protobuf.ByteString\n getAdminBytes();",
"public int getUserNumber() throws AdminPersistenceException {\n return getCount(\"ST_User\", \"id\", \"accessLevel <> ?\", \"R\");\n }",
"public int getAdminLevel()\n\t{\n\t\treturn m_adminLevel;\n\t}",
"@Override\n\tpublic Admin getAdminByLoginNameAndPassword(int parseInt) {\n\t\tString hql = \"from Admin a where a.id=?\";\n\t\tList<Admin> al = getHibernateTemplate().find(hql,parseInt);\n\t\treturn al.isEmpty()||al==null?null:al.get(0);\n\t}",
"@Override\r\n\tpublic AdminRole getAdminRole(int roleid) {\n\t\treturn adminRoleDao.selectByPrimaryKey(roleid);\r\n\t}",
"protected String getDefaultUserName()\n {\n return \"admin\";\n }",
"@Override\n\tpublic List<RoleUtilisateur> listRoleUtilisateur() {\n\t\treturn roleUtilisateurDAO.listRoleUtilisateur();\n\t}",
"public void setAdminUser(String adminUser) {\n this.adminUser = adminUser == null ? null : adminUser.trim();\n }",
"public DBSequence getRoleId() {\n return (DBSequence)getAttributeInternal(ROLEID);\n }",
"public String getUserAlias() {\n return userItem.getUserAlias();\n }",
"@Override\n\tpublic List<Map<String, Object>> getRole() {\n\t\treturn this.RoleDao.getRole();\n\t}",
"public String getDatabaseUser();",
"public ServerResponse checkAdminRole(User user){\n if (user != null && user.getRole().intValue() == Const.Role.ROLE_ADMIN)\n return ServerResponse.createBySuccess();\n return ServerResponse.createByError();\n }",
"public UserRole getRole(User user) {\n\t UserRole role = user.getRole();\n return role;\n\t}",
"@Transient\n public String getCurrentRole() {\n \tString currentRole = \"\";\n \tif (this.roles != null) {\n \t\tIterator<Role> it = roles.iterator();\n \t\tcurrentRole = it.next().getName().substring(5);\n \t\twhile (it.hasNext()) {\n \t\t\tRole role = it.next();\n \t\t\tcurrentRole += \"/\" + role.getName().substring(5);\n \t\t}\n \t}\n \treturn currentRole;\n }",
"public String getRole() {\r\n return role;\r\n }",
"public int getEditAuthUserType() {\n return editAuthUserType;\n }",
"public boolean getIsAdmin() {\n return isAdmin;\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public Integer getRole() {\n\t\treturn role;\n\t}",
"public String getAccesslevel() {\n\t\treturn adminLevel;\r\n\t}",
"public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}",
"public String getAdminpass() {\n return adminpass;\n }",
"public com.a9.spec.opensearch.x11.QueryType.Role.Enum getRole()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ROLE$0);\n if (target == null)\n {\n return null;\n }\n return (com.a9.spec.opensearch.x11.QueryType.Role.Enum)target.getEnumValue();\n }\n }",
"public String getRole_name() {\n return role_name;\n }",
"public java.lang.String getRole() {\n return role;\n }",
"public java.lang.String getAdministrator () {\n\t\treturn administrator;\n\t}",
"public AdminEAO getAdminEAO()\n {\n return adminEAO;\n }",
"@Override\n\tpublic Admin adminLogin(Admin admin) {\n\t\tString sql = \"select * from admin where adminName = ? and adminPwd = ?\";\n\t\tAdmin admin1 = (Admin) JDBCUtil.executeQueryOne(sql, new adminMapping(), admin.getAdminName(),admin.getAdminPwd());\n\t\tif(admin1 != null){\n\t\t\treturn admin1;\n\t\t}\n\t\treturn null;\n\t}",
"String getRoleName();",
"SecurityRole getRole();",
"@XmlElement(required = true, name = \"tenant_admin\")\n public String getTenantAdmin() {\n return tenantAdmin;\n }",
"public Optional<String> getRole() {\n return Optional.ofNullable(properties.getProperty(MESOS_ROLE));\n }",
"public LocalUser getLoginUser(){\n\t\treturn new Select().from(LocalUser.class).executeSingle();\n\t}",
"public int getSuperAdminPassword(String login){\r\n int value = DEFAULT_VALUE;\r\n try (Connection connection = jdbcUtils.getConnection();){\r\n preparedStatement = connection.prepareStatement(GET_ADMIN_BY_LOGIN_SQL);\r\n preparedStatement.setString(LOGIN_SQL_GET_ADMIN_BY_LOGIN_NUMBER, login);\r\n resultSet = preparedStatement.executeQuery();\r\n while (resultSet.next()) {\r\n value = resultSet.getInt(ADMIN_PASSWORD_COLUMN_NUMBER);\r\n }\r\n } catch (SQLException ex) {\r\n configLog.init();\r\n logger.info(LOG_SQL_EXCEPTION_MESSAGE + AdminDao.class.getName());\r\n Logger.getLogger(AdminDao.class.getName()).log(Level.SEVERE, null, ex);\r\n throw new RuntimeException();\r\n }\r\n return value;\r\n }",
"public String getRole() {\n return this.state.getRole();\n }",
"public String getUserId() {\r\n return (String) getAttributeInternal(USERID);\r\n }",
"@Override\r\n\tpublic String employeeSupervisorRole() {\n\t\treturn ((WebUserRole) webContext.get()).getEmployeeSupervisor();\r\n\t}",
"@Override\n\tpublic String getUsername() {\n\t\treturn admin.getPassword();\n\t}",
"public static String getAdminIdIfLoggedIn(final Http.Context ctx){\n AuthUser u = PlayAuthenticate.getUser(ctx.session());\n if (u == null) return null;\n if (ADMIN_ID.equals(u.getId())) {\n System.out.println(\"SECURED ADMIN nech sa paci\");\n User user = User.find.ref(u.getId());\n if (new Date().getTime() - user.lastUpdate > 1_700_000){\n System.out.println(\"--------------------update access token from SecuredAdmin\");\n try {\n user.updateAccessToken();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n ctx.session().put(\"accessToken\", user.accessToken);\n }else{\n System.out.println(\"Secured Admin A sakra POST sa nerobil ubehlo zatial: \" + (new Date().getTime() - user.lastUpdate));\n }\n return u.getId();\n }\n System.out.println(\"SECURED ADMIN vracia NULL pristup odoporeny\");\n return null;\n }"
] | [
"0.6685724",
"0.658823",
"0.65352625",
"0.6304824",
"0.62857383",
"0.6207274",
"0.61368483",
"0.60879886",
"0.6067572",
"0.6036986",
"0.5998139",
"0.5993258",
"0.5960802",
"0.5916567",
"0.58302593",
"0.5785279",
"0.577832",
"0.5775571",
"0.57576233",
"0.5729611",
"0.5729611",
"0.5720327",
"0.56978023",
"0.56778497",
"0.5647289",
"0.5646585",
"0.5642663",
"0.56214374",
"0.56214374",
"0.5613175",
"0.5609937",
"0.56061447",
"0.55976444",
"0.55708843",
"0.5554704",
"0.55492073",
"0.5532821",
"0.5498119",
"0.549634",
"0.5492266",
"0.54773706",
"0.5454051",
"0.54463774",
"0.54411936",
"0.54316753",
"0.54316753",
"0.542841",
"0.5426345",
"0.54250175",
"0.54242784",
"0.5421018",
"0.5418817",
"0.53906804",
"0.53906804",
"0.53879696",
"0.53862244",
"0.53862244",
"0.53862244",
"0.53862244",
"0.53862244",
"0.53801304",
"0.5350551",
"0.53455013",
"0.53207743",
"0.5315849",
"0.5314141",
"0.52840954",
"0.52827823",
"0.527676",
"0.5271314",
"0.5263391",
"0.52563494",
"0.5243961",
"0.52400017",
"0.52380466",
"0.5229296",
"0.5225849",
"0.5220335",
"0.521695",
"0.52145237",
"0.5208881",
"0.5203643",
"0.52032065",
"0.5198267",
"0.5186525",
"0.5173202",
"0.51700085",
"0.516178",
"0.51567495",
"0.51566017",
"0.515257",
"0.5149528",
"0.5148036",
"0.5146542",
"0.5146017",
"0.5145606",
"0.51450753",
"0.51338387",
"0.51326364",
"0.51289004"
] | 0.6799451 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column t_sys_role.ADMIN_USER | public void setAdminUser(String adminUser) {
this.adminUser = adminUser == null ? null : adminUser.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setAdminStatus(User user, boolean adminStatus);",
"public void setUserAdmin(boolean isUserAdmin) {\r\n this.userAdmin = isUserAdmin;\r\n }",
"public void setAdminRole(org.semanticwb.model.Role value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swpres_adminRole, value.getSemanticObject());\r\n }else\r\n {\r\n removeAdminRole();\r\n }\r\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public void assignCurrentAdminUser(final String val) {\n currentAdminUser = val;\n }",
"public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }",
"public String getAdminUser() {\n return adminUser;\n }",
"public String getAdminRole() {\r\n\t\treturn adminRole;\r\n\t}",
"public String getAdminUserName() {\n return adminUserName;\n }",
"public synchronized void promoteToAdmin(User user) throws AmbariException{\n addRoleToUser(user, getAdminRole());\n }",
"private final void initializeAdminUser() throws Exception {\r\n String adminEmail = server.getServerProperties().get(ADMIN_EMAIL_KEY);\r\n String adminPassword = server.getServerProperties().get(ADMIN_PASSWORD_KEY);\r\n // First, clear any existing Admin role property.\r\n for (User user : this.email2user.values()) {\r\n user.setRole(\"basic\");\r\n }\r\n // Now define the admin user with the admin property.\r\n if (this.email2user.containsKey(adminEmail)) {\r\n User user = this.email2user.get(adminEmail);\r\n user.setPassword(adminPassword);\r\n user.setRole(\"admin\");\r\n }\r\n else {\r\n User admin = new User();\r\n admin.setEmail(adminEmail);\r\n admin.setPassword(adminPassword);\r\n admin.setRole(\"admin\");\r\n this.updateCache(admin);\r\n }\r\n }",
"public Long getAdminRoleId() {\n\t\treturn this.adminRoleId;\n\t}",
"public void setORM_Jefeadministracion(orm.Jefeadministracion value) {\n\t\tthis.jefeadministracion = value;\n\t}",
"public void setAdmin(boolean value) {\r\n this.admin = value;\r\n }",
"public void setJdbcUser(String val)\n {\n setValue(DataSourceDobj.FLD_JDBC_USER, val);\n }",
"public void setAdmin(int admin) {\n this.admin = admin;\n }",
"@Override\n\tpublic int modifyUser(User_role newUser) throws Exception{\n\t\treturn userMapper.updateUser(newUser);\n\t}",
"@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }",
"public void setUserRole(java.lang.String userRole) {\r\n this.userRole = userRole;\r\n }",
"public void setAdminPwd(String adminPwd) {\n this.adminPwd = adminPwd == null ? null : adminPwd.trim();\n }",
"public void setIsAdmin(boolean isAdmin) {\r\n this.isAdmin = isAdmin;\r\n }",
"@Override\r\n\tpublic Admin changeRole(Admin admin) {\n\t\treturn null;\r\n\t}",
"void userChangeByAdmin(AdminUserDTO adminUserDTO) throws RecordExistException;",
"public void setIsadmin(Integer isadmin) {\r\n this.isadmin = isadmin;\r\n }",
"public void setAdminUsername(String adminUsername) {\n\tthis.adminUsername = adminUsername;\n}",
"public void setEditAuthUserContentAdmin(final boolean val) {\n editAuthUserType |= UserAuth.contentAdminUser;\n }",
"public void setAdmin( boolean admin )\n {\n this.admin = admin;\n }",
"public void setUserSubMenuRole(String userSubMenuRole) {\n sessionData.setUserSubMenuRole(userSubMenuRole);\n }",
"@RolesAllowed(RoleEnum.ROLE_ADMIN)\n\tpublic Integer saveAdmin(Admin admin);",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"public void setPortalPriv(Connection dbConn, int id, String role,\n String user, String dept) throws Exception {\n Statement ps = null;\n try {\n String sql = \"update PORTAL set DEPT_ID = '\" + dept\n + \"' , PRIV_ID = '\" + role + \"' ,USER_ID = '\" + user\n + \"' where SEQ_ID=\" + id;\n ps = dbConn.createStatement();\n ps.executeUpdate(sql);\n } catch (Exception ex) {\n throw ex;\n } finally {\n T9DBUtility.close(ps, null, log);\n }\n }",
"public ServerResponse checkAdminRole(User user){\n if (user != null && user.getRole().intValue() == Const.Role.ROLE_ADMIN)\n return ServerResponse.createBySuccess();\n return ServerResponse.createByError();\n }",
"public void setLoggedUser(PersAdministrativo usuario){\n this.usuario = usuario;\n }",
"public void removeAdminRole()\r\n {\r\n getSemanticObject().removeProperty(swpres_adminRole);\r\n }",
"public void setAdminStatus(Integer adminStatus) {\n this.adminStatus = adminStatus;\n }",
"private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }",
"@External\n\tpublic void set_super_admin(Address _super_admin) {\n\t\tif (Context.getCaller().equals(Context.getOwner())) {\n\t\t\tthis.super_admin.set(_super_admin);\n\t\t\tthis.admin_list.add(_super_admin);\n\t\t}\n\t\t\n\t}",
"@External\n\tpublic void set_admin(Address _admin) {\n\t\t\n\t\tif (Context.getCaller().equals(this.super_admin.get())) {\n\t\t\tthis.admin_list.add(_admin);\n\t\t}\t\t\n\t}",
"public void setAdminRights (String email, int rights){\r\n try (Connection connection = jdbcUtils.getConnection();){\r\n preparedStatement = connection.prepareStatement(SET_ADMIN_RIGHTS_SQL);\r\n preparedStatement.setInt(IS_ADMIN_SET_ADMIN_RIGHTS_SQL_NUMBER, IS_ADMIN);\r\n preparedStatement.setInt(IS_ADMIN_SET_ADMIN_RIGHTS_SQL_NUMBER, rights);\r\n preparedStatement.setString(EMAIL_SET_ADMIN_RIGHTS_SQL_NUMBER, email);\r\n preparedStatement.executeUpdate();\r\n } catch (SQLException ex) {\r\n configLog.init();\r\n logger.info(LOG_SQL_EXCEPTION_MESSAGE + AdminDao.class.getName());\r\n Logger.getLogger(AdminDao.class.getName()).log(Level.SEVERE, null, ex);\r\n throw new RuntimeException();\r\n }\r\n }",
"public void setAdmin(String username, Map<String, User> map) {\n\t\tmap.get(username).setAdmin(1);\n\t\tuserdata.open();\n\t\tuserdata.updateUser(map.get(username));\n\t\tuserdata.updateMap();\n\t\tuserdata.close();\n\t}",
"LoggedUser changeRole(String roleId) throws IOException;",
"public void setAdmin(boolean admin) {\n this.admin = admin;\n }",
"public void setRole(User user, UserRole role) {\n\t user.setRole(role);\n\t}",
"static public int getADMIN() {\n return 1;\n }",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FROM user_role, users WHERE (users.user_id=? AND user_role.role_id=users.role)\";\n\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveUserRole)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n if (rs.next() == false) {\n roleFromDatabase = \"\";\n } else {\n roleFromDatabase = rs.getString(\"role\");\n }\n } catch (SQLException se) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n roleFromDatabase = \"\";\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return roleFromDatabase;\n }",
"@Override\r\n\tpublic AdminUser selectadminif(String name) {\n\t\treturn adminUserMapper.selectadminif(name);\r\n\t}",
"public void setIsAdmin(String isAdmin) {\n this.isAdmin = isAdmin == null ? null : isAdmin.trim();\n }",
"public void updateUserRole(UserRole userRole) throws ClassNotFoundException, SQLException {\n\t\tsave(\"update user_role set name = ? where id = ?\", new Object[] { userRole.getName(), userRole.getId() });\n\t}",
"public String getAdminUsername() {\n\treturn adminUsername;\n}",
"PlatformAdminRoleUser selectByPrimaryKey(@Param(\"roleId\") String roleId, @Param(\"adminId\") String adminId);",
"@Override\r\n\tpublic int updateAdminPassword(Admin admin) {\n\t\treturn adminMapper.updateAdminPassword(admin);\r\n\t}",
"@Update({\n \"update A_USER_ROLE\",\n \"set user_id = #{userId,jdbcType=INTEGER},\",\n \"role_id = #{roleId,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(AUserRole record);",
"public UserModel saveUserAdmin(UserModel userModel) {\n URole role = uRoleRepository.findByName(\"ROLE_ADMIN\");\n Set<URole> roles = new HashSet<>();\n roles.add(role);\n role = uRoleRepository.findByName(\"ROLE_USER\");\n roles.add(role);\n userModel.setRoles(roles);\n userModel.setPassword(bCryptPasswordEncoder.encode(userModel.getPassword()));\n userModel.setCreated_at(new Date());\n userModel.setUpdated_at(new Date());\n return userRepository.save(userModel);\n }",
"public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }",
"public void setDataAccessRole(String dataAccessRole) {\n this.dataAccessRole = dataAccessRole;\n }",
"public void setModifyUser(Integer modifyUser) {\n this.modifyUser = modifyUser;\n }",
"public void setRole(String strRole) {\n\t\tif (\"ADMIN\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.ADMIN);\n\t\t}else if (\"DEVELOPER\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.DEVELOPER);\n\t\t}else if (\"SUPPORT\".equals(strRole)) {\n\t\t\tthis.setRole(userRole.SUPPORT);\n\t\t}\n\t}",
"public void setPermissionAdmin(String permissionAdmin) {\n this.permissionAdmin = permissionAdmin == null ? null : permissionAdmin.trim();\n }",
"public void setAdminpwd(String adminpwd) {\r\n this.adminpwd = adminpwd == null ? null : adminpwd.trim();\r\n }",
"public void setAdminLevel(int adminLevel)\n\t{\n\t\tm_adminLevel = adminLevel;\n\t}",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}",
"@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}",
"public int getAdmin() {\n return admin;\n }",
"public void setAdminSex(Integer adminSex) {\n this.adminSex = adminSex;\n }",
"@objid (\"b2af5733-9ba2-4eee-b137-cec975f6ba46\")\n void setUserMngr(UserManager value) {\n this.userMngr = value;\n }",
"void changeRole(User user, Role role, String token) throws AuthenticationException;",
"public void grantAdministrate(User user) throws ServiceException{\n }",
"public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}",
"public void setApplicationUserDao(ApplicationUserDao applicationUserDao){\n \tthis.applicationUserDao = applicationUserDao;\n }",
"int updateByPrimaryKey(PlatformAdminRoleUser record);",
"public String getAdminPwd() {\n return adminPwd;\n }",
"@RequestMapping(value = \"/updateAdmin\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic void updateUserAdmin(HttpServletRequest httpServletRequest) {\n\t\tint isAdmin = Integer.parseInt(httpServletRequest.getParameter(\"isAdmin\"));\n\t\tint userID = Integer.parseInt(httpServletRequest.getParameter(\"userID\"));\n\t\tuserService.updateUserAdmin(isAdmin, userID);\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 setCod_admin(int cod_admin) {\r\n this.cod_admin = cod_admin;\r\n }",
"public void setLoggedUser(CustomEmployee user) {\n loggedUser = user;\n }",
"public Builder setAdmin(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n admin_ = value;\n onChanged();\n return this;\n }",
"public Integer getModifyUser() {\n return modifyUser;\n }",
"public synchronized void grantAdminPrivilege(UserEntity userEntity) {\n final PrivilegeEntity adminPrivilege = new PrivilegeEntity();\n adminPrivilege.setPermission(permissionDAO.findAmbariAdminPermission());\n adminPrivilege.setPrincipal(userEntity.getPrincipal());\n adminPrivilege.setResource(resourceDAO.findAmbariResource());\n if (!userEntity.getPrincipal().getPrivileges().contains(adminPrivilege)) {\n privilegeDAO.create(adminPrivilege);\n userEntity.getPrincipal().getPrivileges().add(adminPrivilege);\n principalDAO.merge(userEntity.getPrincipal()); //explicit merge for Derby support\n userDAO.merge(userEntity);\n }\n }",
"public void grantAdminOnIndividualToSystemUser(Individual i, SystemUser user);",
"private ApplicationUser getAdminUser() {\n GroupManager groupManager = ComponentAccessor.getGroupManager();\n\n Collection <ApplicationUser> adminUsers = groupManager.getUsersInGroup(\"jira-administrators\",false);\n if ( adminUsers != null && adminUsers.size() > 0 ) {\n return adminUsers.iterator().next();\n }\n return null;\n }",
"public void setAdminAddr(String adminAddr) {\n this.adminAddr = adminAddr == null ? null : adminAddr.trim();\n }",
"public void setAdminName(String adminName) {\n\t\tAdminName = adminName;\n\t}",
"@Override\n\tpublic void update(UserRole vo) {\n\n\t}",
"public void setUpdateUser(String newVal) {\n if ((newVal != null && this.updateUser != null && (newVal.compareTo(this.updateUser) == 0)) || \n (newVal == null && this.updateUser == null && updateUser_is_initialized)) {\n return; \n } \n this.updateUser = newVal; \n\n updateUser_is_modified = true; \n updateUser_is_initialized = true; \n }",
"@Override\n\tpublic void saveAdmin(Admin myAdmin) {\n\t\tgetHibernateTemplate().saveOrUpdate(myAdmin);\n\t}",
"public boolean updateUserRole(String oldUserName, String oldRoleName, String newUserName, String newRoleName) {\n \tboolean updateResult = false;\n\tString sql = \"UPDATE users_roles SET user_name = ? , role_name = ? WHERE user_name = ? and role_name = ?\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, newUserName);\n this.statement.setString(2, newRoleName);\n this.statement.setString(3, oldUserName);\n this.statement.setString(4, oldRoleName);\n \n this.statement.executeUpdate();\n updateResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return updateResult; \n }",
"@Override//修改信息\r\n\tpublic void AdminUpdata(String oldpassword, Admin admin) {\n\t\tString AdminUpdatasql = \"update Admin set Password=? where id=? and Password=?\" ;\r\n\t\ttry {\r\n\t\t\tPreparedStatement pStatement=this.connection.prepareStatement(AdminUpdatasql);\r\n\t\t\tpStatement.setString(1, admin.getAdminpassword());\r\n\t\t\tpStatement.setInt(2, admin.getId());\r\n\t\t\tpStatement.setString(3, oldpassword);\r\n\t\t\tpStatement.execute();//ִ执行\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}\r\n\r\n\t}",
"public String getAdminpwd() {\r\n return adminpwd;\r\n }",
"public String getUserSubMenuRole() {\n return sessionData.getUserSubMenuRole();\n }",
"public void setCreateUser(String newVal) {\n if ((newVal != null && this.createUser != null && (newVal.compareTo(this.createUser) == 0)) || \n (newVal == null && this.createUser == null && createUser_is_initialized)) {\n return; \n } \n this.createUser = newVal; \n\n createUser_is_modified = true; \n createUser_is_initialized = true; \n }",
"private void setPrivilagesToModifyUser(User user){\n\t\tsetFields(false);\n\t\tif (!LoginWindowController.loggedUser.getPermissions().equals(\"administrator\"))\n\t\t{\n\t\t\tif (LoginWindowController.loggedUser.getId() != user.getId()){\n\t\t\t\tif ((user.getPermissions().equals(\"manager\")) \n\t\t\t\t\t\t|| (user.getPermissions().equals(\"administrator\"))){\n\t\t\t\t\tsetFields(true);\n\t\t\t\t}\n\t\t\t\tif (user.getPermissions().equals(\"pracownik\")){\n\t\t\t\t\tsetFields(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tsetFields(false);\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (LoginWindowController.loggedUser.getId() == user.getId()){\n\t\t\t\tdeleteMenuItem.setDisable(true);\n\t\t\t\tuserPermissionsBox.setDisable(true);\n\t\t\t}\n\t\t}\n\t}",
"public void saveSysRole(SysRole sysRole);",
"protected String getDefaultUserName()\n {\n return \"admin\";\n }",
"public void setAdminId(String adminId) {\n this.adminId = adminId == null ? null : adminId.trim();\n }",
"public void setAdminId(String adminId) {\n this.adminId = adminId == null ? null : adminId.trim();\n }",
"public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }",
"public void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }",
"public String getPermissionAdmin() {\n return permissionAdmin;\n }",
"public void setRole(java.lang.String value) {\n this.role = value;\n }"
] | [
"0.6385285",
"0.6179194",
"0.6150615",
"0.614014",
"0.61034536",
"0.5933567",
"0.5916483",
"0.58570266",
"0.5836196",
"0.5751878",
"0.57406014",
"0.57364976",
"0.56728727",
"0.5664593",
"0.56584746",
"0.5640096",
"0.56159806",
"0.5562513",
"0.5545829",
"0.5503098",
"0.54934937",
"0.54844284",
"0.5483608",
"0.5477154",
"0.54614127",
"0.5429931",
"0.5412683",
"0.5403547",
"0.53944117",
"0.5391543",
"0.537208",
"0.53699446",
"0.53589255",
"0.5328653",
"0.53207827",
"0.5305388",
"0.53044677",
"0.52954495",
"0.52951694",
"0.5292077",
"0.52897936",
"0.526984",
"0.52563757",
"0.52489424",
"0.52434754",
"0.5240588",
"0.52356344",
"0.52276766",
"0.5227548",
"0.52274376",
"0.5207901",
"0.5204024",
"0.52005535",
"0.51969117",
"0.5185825",
"0.51840645",
"0.51821077",
"0.51736003",
"0.5162457",
"0.5155838",
"0.5147723",
"0.51451576",
"0.5135755",
"0.51310396",
"0.5129304",
"0.5127595",
"0.5126581",
"0.51090133",
"0.51049674",
"0.5094161",
"0.5091281",
"0.50838244",
"0.5079446",
"0.5079265",
"0.5063092",
"0.5061012",
"0.5050852",
"0.50365317",
"0.50264746",
"0.50250775",
"0.50125396",
"0.4999863",
"0.4998697",
"0.49961725",
"0.49941525",
"0.49937174",
"0.49918005",
"0.49903366",
"0.49885827",
"0.4980071",
"0.49777162",
"0.49753195",
"0.49718332",
"0.49689904",
"0.49679944",
"0.49679944",
"0.49665576",
"0.49629316",
"0.49529043",
"0.49472833"
] | 0.6324459 | 1 |
TODO Autogenerated method stub | @Override
public boolean InsertStreamingLike(StreamingLikeVO vo) {
return false;
} | {
"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 boolean DeleteStreamingLike(StreamingLikeVO vo) {
return false;
} | {
"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 boolean CheckStreamingLike(String mail) {
return false;
} | {
"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 int CountStreamingLike(String idx) {
return 0;
} | {
"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 |
// //// this way is possible to have 2 path to same endopoint | @GetMapping({"/", "/list"}) // when is active true -> printing only with done=true, using stream in service
public String list (Model model, @RequestParam (required = false) boolean isActive, @RequestParam(required = false) String searchInput) {
if (isActive == true) {
model.addAttribute("todos", todoService.onlyActive());
}
else if(searchInput==null) {
model.addAttribute("assignees", assigneeService.allAssignee());
model.addAttribute("todos", todoService.allTodos());
}
else if (searchInput!=null) {
model.addAttribute("todos",todoService.searchBy_TITLE_DATE_DESCRIPTION(searchInput));
}
return "todoList";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Path createPath(AStarNode start, AStarNode end) {\n Path path = new Path();\n AStarNode ptr = end;\n while (!ptr.equals(start)) {\n path.addFirst(ptr);\n ptr = ptr.getPrevious();\n }\n path.addFirst(start);\n\n return path;\n }",
"@Override\n\tpublic ArrayList<Edge<Object>> getPath(String startNode, String endNode) {\n\t\treturn null;\n\t}",
"private List<Point> getPath(int index) {\n\t\t \n\t \n\t\t Node fromNode = oEdge.fromNode;\n\t\t Node toNode = oEdge.toNode;\n\t\t float x1 = fromNode.longitude;\n\t\t float x2 = toNode.longitude;\n\t\t float y1 = fromNode.latitude;\n\t\t float y2 = toNode.latitude;\n\t\t double slope, angle;\n\t\t if(x1!=x2) {\n\t\t\t slope = (y2-y1)/(x2-x1);\n\t\t\t \tangle = Math.atan(slope);\n\t\t\t \t} else {\n\t\t\t \t\tangle = Math.PI/2;\n\t\t\t \t}\n\t\t Double L = Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\t\t float offsetPixels=0;\n\t\t if(Math.toDegrees(angle)>Math.toDegrees(90)) {\n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=roadWidth*1/10;\n\t\t\t }\n\t\t\t \n\t\t } else {\n\t\t\t \n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=-roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=-roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=-roadWidth*1/10;\n\t\t\t }\n\t\t }\n\t\t \n\t\t // This is the first parallel line\n\t\t float x1p1 = x1 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float x2p1 = x2 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float y1p1 = y1 + offsetPixels * (x1-x2) / L.floatValue();\n\t\t float y2p1 = y2 + offsetPixels * (x1-x2) / L.floatValue();\n//\t\t if(oEdge.edgeID==16) {\n//\t\t\t System.out.println(\"testing\");\n//\t\t }\n\t\t \n\t\t Point P1 = new Point(x1p1,y1p1);\n\t\t Point P2 = new Point(x2p1,y2p1);\n\t\t List<Point> gP = GetPoints(P1, P2);\n\t\t return gP;\n\t \n\t}",
"private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }",
"org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D addNewPath();",
"@Override\r\n\tpublic Path findSeaPath(Point start, Point end) {\n\t\treturn null;\r\n\t}",
"@Override\n public void setEnd(double x1, double y1) {\n super.setEnd(x1,y1);\n path.add(new Point2D(x1,y1));\n }",
"public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }",
"@Override\r\n\tpublic ArrayList<String> getPath(String actor1, String actor2)\r\n\t{\r\n\t\tActor act1 = new Actor(actor1);\r\n\t\tActor act2 = new Actor(actor2);\r\n\t\t\r\n\t\tif(graph.containsEdge(act1,act2 ))\r\n\t\t{\r\n\t\t\treturn graph.shortestPath(act1, act2);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }",
"private List<Edge<String>> getPath(Vertex<String> end,\n Vertex<String> start) {\n if (graph.label(end) != null) {\n List<Edge<String>> path = new ArrayList<>();\n\n Vertex<String> cur = end;\n Edge<String> road;\n while (cur != start) {\n road = (Edge<String>) graph.label(cur); // unchecked cast ok\n path.add(road);\n cur = graph.from(road);\n }\n return path;\n }\n return null;\n }",
"public static Path getPath(IPoint a, IPoint b) throws PathNotFoundException {\n\t\tIPoint[] destinations = new IPoint[2];\n\t\tdestinations[0] = a;\n\t\tdestinations[1] = b;\n\n\t\treturn getPath(destinations);\n\t}",
"PathSegments getPath();",
"private ShapeDrawable addPointToShapeDrawablePath_quad(float x, float y, float x_next, float y_next, android.graphics.Path path){\n path.quadTo(x,y,(x_next+x)/2,(y_next+y)/2);\n\n // make local copy of path and store in new ShapeDrawable\n android.graphics.Path currPath = new android.graphics.Path(path);\n\n ShapeDrawable shapeDrawable = new ShapeDrawable();\n //shapeDrawable.getPaint().setColor(Color.MAGENTA);\n float[] color = {40,100,100};\n shapeDrawable.getPaint().setColor(Color.HSVToColor(color));\n shapeDrawable.getPaint().setStyle(Paint.Style.STROKE);\n shapeDrawable.getPaint().setStrokeWidth(10);\n shapeDrawable.getPaint().setStrokeJoin(Paint.Join.ROUND);\n shapeDrawable.getPaint().setStrokeCap(Paint.Cap.ROUND);\n shapeDrawable.getPaint().setPathEffect(new CornerPathEffect(30));\n shapeDrawable.getPaint().setAntiAlias(true); // set anti alias so it smooths\n shapeDrawable.setIntrinsicHeight(displayManager.getHeight());\n shapeDrawable.setIntrinsicWidth(displayManager.getWidth());\n shapeDrawable.setBounds(0, 0, displayManager.getWidth(), displayManager.getHeight());\n\n shapeDrawable.setShape(new PathShape(currPath,displayManager.getWidth(),displayManager.getHeight()));\n\n return shapeDrawable;\n }",
"public static boolean getPath2(int x, int y, ArrayList<Point> path) {\n\t\t// If out of bounds or not available, return.\n\t\tif (y < 0 || x < 0 || !isFree(x, y)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtOrigin = (x == 0) && (y == 0);\n\t\t\n\t\t// If there's a path from the start to my current location, add my location.\n\t\tif (isAtOrigin || getPath2(x, y - 1, path) || getPath2(x - 1, y, path)) { \n\t\t\tPoint p = new Point(x, y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }",
"private void Create_Path() {\n lines = new Line[getPoints().size()];\n for (int i = 1; i < getLines().length; i++) {\n lines[i] = new Line(getPoints().get(way[i]).getX(), getPoints().get(way[i]).getY(), getPoints().get(way[i - 1]).getX(), getPoints().get(way[i - 1]).getY());\n }\n lines[0] = new Line(getPoints().get(way[getLines().length - 1]).getX(), getPoints().get(way[getLines().length - 1]).getY(), getPoints().get(way[0]).getX(), getPoints().get(way[0]).getY());\n\n }",
"private void processPath(String str) {\r\n if (str.equals(\"\")) {\r\n return;\r\n }\r\n\r\n int id1 = Integer.valueOf(str.split(\"->\")[0].trim());\r\n int id2 = Integer.valueOf(str.split(\"->\")[1].trim());\r\n Node node1 = null;\r\n Node node2 = null;\r\n\r\n // Find node according to its id\r\n for (Node node : NodeSet) {\r\n if (node.getID() == id1) {\r\n node1 = node;\r\n } else if (node.getID() == id2) {\r\n node2 = node;\r\n }\r\n }\r\n\r\n g.add(new Edge(node1, node2));\r\n }",
"public String path(String path1, String path2);",
"private boolean commonEndPoint (Coordinate endPoint_in, Coordinate endPoint_out) {\r\n\t\tif (endPoint_in.equals3D(endPoint_out)) {\r\n\t\t\treturn true;\r\n\t\t} else return false;\t\r\n\t}",
"public abstract Shape createPath();",
"int placePathFollowingElement(String elementName, PathList pathList);",
"public void setCellToPath(int pos){//how to check for the end???\n\t\t\n\t\tif(pos<0||pos>width*height-1||getCompletePath())\n\t\t\treturn;// the position entered is not valid or the path has already been completed\n\t\t\n\t\telse if(temp.isEmpty()){//no path tile have been defined\n\t\t\tif(currentPos<0){//start hasn't been placed\t\t\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\n\t\t\t\tsetEntryPoint(currentPath);\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint d = currentPath.getDirection(pos);\n\t\t\t\tif (d<0||d>=4)\n\t\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\tPathType type =Map.createPathTileOfType(d, caseEdge);\n\t\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\t\n\t\t\t\t//fix direction of tile\n\t\t\t\tif(p.getEntry()==pos)\n\t\t\t\t\tp.rotate();\n\t\t\t\t//validate spot (for entry/exit)\n\t\t\t\t\n\t\t\t\t//set as Path entry point \n\t\t\t\tp.setStart();\n\t\t\t\tsetEntryPoint(p);\n\t\t\t\t\n\t\t\t\t//add to grid and list\n\t\t\t\tp.storePathTile();\n\n\t\t\t\t//update current\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\t\t\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif (getGrid(pos/width, pos%width)!=null)\n\t\t\t\tif(getGrid(pos/width, pos%width).isPath())\n\t\t\t\t\treturn;//causes intersection\n\t\t\t\n\t\t\tint dExit = currentPath.getDirection(pos);\n\t\t\tint lastPos= temp.peekLast().getPos();\n\t\t\tint dEntry= currentPath.getDirection(lastPos);\n\n\t\t\t\n\t\t\tif (dExit<0||dExit>3||dEntry<0||dEntry>3)\n\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\n\t\t\t\n\t\t\tPathType type =Map.createPathTileOfType(dExit,dEntry);\n\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\n\t\t\t//fix direction of tile\n\t\t\tif(p.getEntry()==pos)\n\t\t\t\tp.rotate();\n\t\t\t\n\t\t\tif(!inValidSpot(p))\n\t\t\t\treturn; //\n\t\t\t\n\t\t\t//add to grid and list\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\t//update current\n\t\t\tcurrentPos=pos;\n\t\t\tcurrentPath=new Path(currentPos);\t\n\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t}\n\t}",
"public interface PathNodeMember extends PathNode {\n}",
"protected abstract int[] getPathElements();",
"void printPath(Coordinate endName) {\n if (!graph.containsKey(endName)) {\n // test use, display point\n // System.err.printf(\"Graph doesn't contain end vertex \\\"%s\\\"\\n\", endName);\n return;\n }\n graph.get(endName).printPath();\n }",
"org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D insertNewPath(int i);",
"private Stack path(Graph graph, GraphNode start, GraphNode end) throws GraphException {\n\t\tGraph g = graph;\n\t\tGraphNode b = start;\n\t\tGraphNode e = end;\n\t\tGraphNode temp;\n\t\tStack p;\n\n\t\t// mark the beginning point and push it to the stack.\n\t\tb.setMark(true);\n\t\tedgeStack.push(b);\n\n\t\t// check if the starting and end point are equal.\n\t\tif (b == e) {\n\t\t\treturn edgeStack;\n\t\t}\n\t\t// iterates until it reaches the end point\n\t\telse {\n\t\t\t// initializes edges to the edges incident on node b\n\t\t\tIterator<GraphEdge> edges = graph.incidentEdges(b);\n\n\t\t\t// iterates until it reaches the end of nodes\n\t\t\twhile (edges.hasNext()) {\n\t\t\t\ttemp = edges.next().secondEndpoint();\n\n\t\t\t\t// checks if the second point of the edge has been discovered\n\t\t\t\tif (temp.getMark() == false ) {\n\t\t\t\t\tp = path(g, temp, e);\n\n\t\t\t\t\t// if the path ends return null\n\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tedgeStack.pop();\n\t\t}\n\t\treturn null;\n\t}",
"public List<MapPoint> buildPath(MapPoint point) { // Palauttaa polun alusta loppuun listana.\n List<MapPoint> finalPath = new ArrayList<>();\n MapPoint tempPoint = point;\n while (true) {\n finalPath.add(0, tempPoint);\n \n if (!tempPoint.hasPrevious()) {\n break;\n }\n tempPoint = tempPoint.getPrevious();\n }\n return finalPath; \n }",
"public void connect(int startY, int startX, int endY, int endX) {\n this.paths[startY][startX] = true;\n this.newPaths.add(new Cell(startY, startX));\n //Same row\n if (startX == endX) {\n //start is up\n if (startY < endY) {\n this.paths[startY + 1][startX] = true;\n this.newPaths.add(new Cell(startY + 1, startX));\n } else {\n this.paths[startY - 1][startX] = true;\n this.newPaths.add(new Cell(startY - 1, startX));\n }\n }\n\n //Same column\n if (startY == endY) {\n //start on left\n if (startX < endX) {\n this.paths[startY][startX + 1] = true;\n this.newPaths.add(new Cell(startY, startX + 1));\n } else {\n this.paths[startY][startX - 1] = true;\n this.newPaths.add(new Cell(startY, startX - 1));\n }\n }\n\n paths[endY][endX] = true;\n }",
"public void\nsetPath(SoPath path)\n{\n // ref the input path\n if (path != null)\n path.ref();\n\n // nuke the old path\n if (pathOfInterest != null) {\n pathOfInterest.unref();\n pathOfInterest = null;\n }\n // and copy the new path\n if (path != null) {\n pathOfInterest = path.copy();\n pathOfInterest.ref();\n }\n\n // unref the input path\n if (path != null)\n path.unref();\n\n}",
"public void alignPath() {\n Waypoint first = path.get(0);\n Waypoint second = path.get(1);\n\n double m = (first.getY() - second.getY()) / (first.getX() - second.getX());\n double angle = Math.atan(m);\n\n Paths.rotate((Math.PI / 2) - angle, path);\n\n if(second.getY() < first.getY())\n Paths.rotate(Math.PI, path);\n }",
"public Pair<Integer, Boolean> findPath(BabelSynset bs1, BabelSynset bs2) throws Exception {\n\t\tif(bs1.equals(bs2) && !bs1.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(0, false);\n\t\tif(bs1.equals(bs2) && bs1.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(0, true);\n\t\t\n\t\tA_parentsHigh = new ArrayList<String>();\n\t\t\n\t\tPair<Integer, Boolean> default_result = new Pair<Integer, Boolean>(0, true);\n\t\t\n\t\tint A_path = 0;\n\t\tString A_parent = bs1.getId().toString();\n\t\tB_recoverAncestors(bs2, 25);\n\t\t\n\t\tSystem.out.println(B_Ancestors+\"\\n\\n\");\n\t\t\n\t\tif(A_parent == null) return new Pair<Integer, Boolean>(B_Ancestors.size(), true);\n\t\tif(A_parent.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(B_Ancestors.size()+1, true);\n\t\tfor(int i=0; i<50; i++) {\n\t\t\tSystem.out.println(A_parent);\n\t\t\tint B_path = 0;\n\t\t\tfor(String id : B_Ancestors) {\n\t\t\t\tif(A_parent.equals(id)) {\n\t\t\t\t\tSystem.out.println(\"Path di A: \" + A_path + \"\\nPath di B: \" + B_path);\n\t\t\t\t\tif(id.equals(\"bn:00031027n\")) return new Pair<Integer, Boolean>(A_path+B_path, true);\n\t\t\t\t\telse return new Pair<Integer, Boolean>(A_path+B_path, false);\n\t\t\t\t}\n\t\t\t\tB_path++;\n\t\t\t}\n\t\t\tif(A_parent.equals(\"bn:00031027n\")) break;\n\t\t\tA_parent = recoverParent(bn.getSynset(new BabelSynsetID(A_parent)));\n\t\t\tA_path++;\n\t\t}\n\t\treturn default_result;\n\t}",
"public void setPathOrigin(int x, int y);",
"private static void createPath(Path path) {\r\n\t\tString tempStr = \"\";\r\n\t\tint finished = 1;\r\n\t\tint tempId = -1;\r\n\t\tList<GeoCoordinate> polyline = new ArrayList<GeoCoordinate>();\r\n\t\tList<Place> placeList = new ArrayList<Place>();\r\n\t\tContainerNII pathNii = new ContainerNII();\r\n\t\tPlace place;\r\n\t\t\r\n\t\twhile (finished == 1){\r\n\t\t\t\r\n\t\t\tplace = new Place();\r\n\t\t\tcreatePlace(place);\r\n\t\t\tplaceList.add(place);\r\n\t\t\tfinished = checkContinue(\"place\");\r\n\t\t}\r\n\t\tpath.setPlaces(placeList);\r\n\t\t\r\n\t\tif ((tempId = insertInteger(\"path id: \")) != -1)\r\n\t\t\tpath.setId(tempId);\t\r\n\t\t\r\n\t\tinsertNIIValues(pathNii, \"path\");\r\n\t\tpath.setNii(pathNii);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path length: \")) != null)\r\n\t\t\tpath.setLength(tempStr);\r\n\t\t\r\n\t\tinsertPolyline(polyline, strPath);\r\n\t\tpath.setPolyline(polyline);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path duration: \")) != null)\r\n\t\t\tpath.setDuration(tempStr);\r\n\t\t\r\n\t}",
"public SoNode \ngetCurPathTail() \n{\n//#ifdef DEBUG\n if (currentpath.getTail() != (SoFullPath.cast(getCurPath())).getTail()){\n SoDebugError.post(\"SoAction::getCurPathTail\\n\", \n \"Inconsistent path tail. Did you change the scene graph\\n\"+\n \"During traversal?\\n\");\n }\n//#endif /*DEBUG*/\n return(currentpath.getTail());\n}",
"public static Path getOnePathTo(ARGState pLastElement) {\n Path path = new Path();\n Set<ARGState> seenElements = new HashSet<ARGState>();\n\n // each element of the path consists of the abstract state and the outgoing\n // edge to its successor\n\n ARGState currentARGState = pLastElement;\n // add the error node and its -first- outgoing edge\n // that edge is not important so we pick the first even\n // if there are more outgoing edges\n\n CFANode loc = extractLocation(currentARGState);\n CFAEdge lastEdge = null;\n if (loc.getNumLeavingEdges() > 0) {\n lastEdge = loc.getLeavingEdge(0);\n }\n /*\n\n */\n path.addFirst(Pair.of(currentARGState, lastEdge));\n seenElements.add(currentARGState);\n\n while (!currentARGState.getParents().isEmpty()) {\n Iterator<ARGState> parents = currentARGState.getParents().iterator();\n\n ARGState parentElement = parents.next();\n //System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n while (!seenElements.add(parentElement) && parents.hasNext()) {\n // while seenElements already contained parentElement, try next parent\n parentElement = parents.next();\n // System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n }\n\n CFAEdge edge = parentElement.getEdgeToChild(currentARGState);\n path.addFirst(Pair.of(parentElement, edge));\n //输出当前路径\n //System.out.println(currentARGState.getStateId()+\",\"+currentARGState.getValuesOfKeyVariables());\n //System.out.println(edge);\n currentARGState = parentElement;\n\n //测试用\n /*if(!(edge instanceof CAssumeEdge) &&edge.getRawStatement().contains(\"a3\")){\n System.out.println(currentARGState.getStateId()+\":\"+currentARGState.getValuesOfKeyVariables());\n }*/\n\n }\n // System.out.println(\"跳出getOnePathTo\");\n return path;\n }",
"@Override\n\tpublic void pathFinderVisited(int x, int y) {\n\t}",
"public static boolean getPath(int x, int y, ArrayList<Point> path) {\n\t\tif (x > size-1 || y > size-1 || !isFree(x, y)) { // !isFree -> [x][y] = 0\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtFinal = (x == size-1) && (y == size-1); //destination: 5, 5\n\t\t\n\t\t//if there is a path from my current to end, add it\n\t\tif(isAtFinal || getPath(x, y+1, path) || getPath(x+1, y, path)){\n\t\t\tPoint p = new Point(x,y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public String getType() {\n return \"AutoPathing\";\n }",
"private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }",
"private boolean findPath(Node b, Node e) throws GraphException{\n\t\t\n\t\t//mark start node and push it on stack\n\t\tb.setMark(true);\n\t\tthis.S.push(b);\n\t\t\t\t\n\t\t// base case, start is the end and we did not exceed the number of bus changes limit\n\t\tif (this.changeCount <= this.changes && b == e){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// variables to hold old values in case we need to change back\n\t\tint holdOldValue = this.changeCount;\n\t\tString holdLine = this.testLine;\n\t\t\n\t\t//iterator over the edges incident on the start node\n\t\tIterator<Edge> iter = this.graph.incidentEdges(b);\n\t\t\n\t\t// loop through incident edges\n\t\twhile(iter.hasNext()){\n\t\t\tEdge line = iter.next();\n\t\t\tString s = line.getBusLine();\n\t\t\t// increase the bus changes count if we change busLines\n\t\t\tif (!s.equals(this.testLine)){\n\t\t\t\tthis.changeCount++;\n\t\t\t}\n\t\t\t// set the bus line to the current one we are on\n\t\t\tthis.testLine = s;\n\t\t\t\n\t\t\t// take the node that is connected to start node via the edge\n\t\t\tNode u;\n\t\t\tif(line.secondEndpoint().equals(b)){\n\t\t\t\tu = line.firstEndpoint();\n\t\t\t}else{\n\t\t\t\tu = line.secondEndpoint();\n\t\t\t}\n\t\t\t// make sure node is not marked and perform a recursive call on it if\n\t\t\t// also make sure that the number of changes allowed has not already been exceeded\n\t\t\tif (u.getMark() != true && this.changeCount <= this.changes){\n\t\t\t\tif (findPath(u, e) == true){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// undo changes to bus change count and current bus line if we move backwards\n\t\t\tif (holdOldValue < this.changeCount){\n\t\t\t\tthis.changeCount--;\n\t\t\t\tthis.testLine = holdLine;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// unset the start node so that other recursive calls can use it and pop it off the stack\n\t\tb.setMark(false);\n\t\tthis.S.pop();\n\t\t\n\t\treturn false;\n\t}",
"public void closepath() \n {\n\tLine line = new Line(_currentx, _currenty, _startx, _starty);\n\t_currentPath.add(line);\n\t_currentx = _startx;\n\t_currenty = _starty;\n\t_closedPath = true;\n }",
"public void setLine(int x1, int y1, int x2, int y2){\n\t\tint slope = 0;\n\t\tboolean vert = true;\n\t\t\n\t\tif((x2 - x1) != 0){\n\t\t\tslope = (y2 - y1) / (x2 - x1);\n\t\t\tvert = false;\n\t\t}\n\t\tif(!vert){\n\t\t\tfor(int a = 0; a < Math.abs(x2 - x1) + 1; a++){\n\t\t\t\tif(a >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tif((x2 - x1) < 0){\n\t\t\t\t\tpathX[a] = x1 - a;\n\t\t\t\t\tpathY[a] = y1 - (a * slope);\n\t\t\t\t}\n\t\t\t\telse if((x2 - x1) > 0){\n\t\t\t\t\tpathX[a] = x1 + a;\n\t\t\t\t\tpathY[a] = y1 + (a * slope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(vert && (y2 - y1) < 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){\n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 - b;\n\t\t\t}\n\t\t}\n\t\telse if(vert && (y2 - y1) > 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){ \n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 + b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t\t\n\t}",
"public static ArrayList<XYLocation> findPath2(String CHAR1, String CHAR2,CampusRouteFindingModel campusModel) {\n\t\t ArrayList<XYLocation> retrn = new ArrayList<XYLocation>();\n\t\t graph<String, Float> g = campusModel.getGraph();\n\t\t Map<String, String> idFirst = campusModel.getName();\n\t\t Map<String,String> nameFirst = campusModel.getID();\n\t\t Map<String, XYLocation> locations = campusModel.getLocations();\n\t\t if(!(nameFirst.containsKey(CHAR1))&&(!(idFirst.containsKey(CHAR1)))) { \n\t\t\t if(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\t if (CHAR1.equals(CHAR2)) {\n\t\t\t\t\t retrn.add(locations.get(CHAR1));\n\t\t\t\t\t return retrn;\n\t\t\t\t }\n\t\t\t\t retrn.add(locations.get(CHAR1));\n\t\t\t\t retrn.add(locations.get(CHAR2));\n\t\t\t\t return retrn;\n\t\t\t }\n\t\t\t retrn.add(locations.get(CHAR1));\n\t\t\t return retrn;\n\t\t\t}\n\t\t\tif(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\tretrn.add(locations.get(CHAR2));\n\t\t\t\treturn retrn;\n\t\t\t}\n\t\tif (nameFirst.containsKey(CHAR1)) {\n\t\t\tCHAR1 = nameFirst.get(CHAR1);\n\t\t}\n\t\tif (nameFirst.containsKey(CHAR2)) {\n\t\t\tCHAR2 = nameFirst.get(CHAR2);\n\t\t}\n\t\tretrn.add(locations.get(CHAR1));\n\t\tif (!(CHAR1.equals(CHAR2))) {\n\t\t\tArrayList<edges<String, Double>> tmp = Dijkstra(CHAR1,CHAR2,g);\n\t\t\tif (tmp==null) {\n\t\t\t\tretrn.add(locations.get(CHAR1));\n\t\t\t\tretrn.add(locations.get(CHAR1));\n\t\t\t\treturn retrn;\n\t\t\t}\n\t\t\tIterator<edges<String, Double>> print = tmp.iterator();\n\t\t\tprint.next();\n\t\t\twhile (print.hasNext()) {\n\t\t\t\tedges<String, Double> temp = print.next();\n\t\t\t\tretrn.add(locations.get(temp.getDest()));\n\t\t\t}\n\t\t}\n\t\treturn retrn;\n\t}",
"private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}",
"public String getPath(String from, String to, String pathAlgo);",
"private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }",
"public ObjectNode resolvePaths();",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"private void pathFill(Vertex<E> src, Vertex<E> dst, ArrayList<E> path) {\r\n\t\tif(src == dst) {\r\n\t\t\tpath.add(src.getElement());\r\n\t\t} else {\r\n\t\t\tpathFill(src, dst.getPredecessor(), path);\r\n\t\t\tpath.add(dst.getElement());\r\n\t\t}\r\n\t}",
"private void readPaths(List<Element> pathElements,\n List<Element> pointElements,\n Model model)\n throws ObjectExistsException {\n // Add the paths.\n for (int i = 0; i < pathElements.size(); i++) {\n Element curPathElement = pathElements.get(i);\n Integer pathID;\n try {\n pathID = Integer.valueOf(curPathElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n pathID = null;\n }\n String srcName = curPathElement.getAttributeValue(\"sourcePoint\");\n if (srcName == null || srcName.isEmpty()) {\n srcName = \"SourcePoint\" + i + \"Unknown\";\n }\n Point srcPoint = model.getPoint(srcName);\n String destName = curPathElement.getAttributeValue(\"destinationPoint\");\n if (destName == null || destName.isEmpty()) {\n destName = \"DestinationPoint\" + i + \"Unknown\";\n }\n Point destPoint = model.getPoint(destName);\n Path curPath = model.createPath(\n pathID, srcPoint.getReference(), destPoint.getReference());\n TCSObjectReference<Path> pathRef = curPath.getReference();\n String pathName = curPathElement.getAttributeValue(\"name\");\n if (pathName == null || pathName.isEmpty()) {\n pathName = \"PathName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(pathRef, pathName);\n model.setPathLength(pathRef,\n Long.parseLong(curPathElement.getAttributeValue(\"length\", \"1\")));\n model.setPathRoutingCost(pathRef,\n Long.parseLong(curPathElement.getAttributeValue(\"routingCost\", \"1\")));\n model.setPathLocked(pathRef,\n Boolean.parseBoolean(curPathElement.getAttributeValue(\"locked\", \"false\")));\n int maxV;\n try {\n maxV = Integer.parseInt(curPathElement.getAttributeValue(\"maxVelocity\"));\n }\n catch (NumberFormatException e) {\n maxV = 0;\n }\n model.setPathMaxVelocity(pathRef, maxV);\n int maxRV;\n try {\n maxRV = Integer.parseInt(curPathElement.getAttributeValue(\"maxReverseVelocity\"));\n }\n catch (NumberFormatException e) {\n maxRV = 0;\n }\n model.setPathMaxReverseVelocity(pathRef, maxRV);\n List<Element> properties = curPathElement.getChildren(\"property\");\n for (int m = 0; m < properties.size(); m++) {\n Element curPropElement = properties.get(m);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + m + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + m + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(pathRef, curKey, curValue);\n }\n }\n\n // Loop through all paths. Add the path to its source point as an outgoing\n // path and to its destination point as an incoming path.\n for (Path curPath : model.getPaths(null)) {\n model.addPointOutgoingPath(curPath.getSourcePoint(),\n curPath.getReference());\n model.addPointIncomingPath(curPath.getDestinationPoint(),\n curPath.getReference());\n }\n }",
"public void testConjunctionFailsToResolveWhenSecondPathFails() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"g\", \"f :- g, h\" }, \"?- f\");\n }",
"protected abstract String getBaseEndpointPath();",
"public static List<Edge<String,String>> findPath(Graph<String,String> temp, String char1, String char2) {\n\t Node<String> firstCharacter = new Node<String>(char1);\n\t Node<String> endCharacter = new Node<String>(char2);\n\t Queue<Node<String>> worklist = new LinkedList<Node<String>>();\n\t Map<Node<String>, List<Edge<String,String>>> nodeToPath = \n\t \t\tnew HashMap<Node<String>, List<Edge<String,String>>>();\n\t \n\t worklist.add(firstCharacter);\n\t nodeToPath.put(firstCharacter, new ArrayList<Edge<String,String>>());\n\t \t \n\t // Uses BFS algorithm here\n\t while(!worklist.isEmpty()) {\n\t \tNode<String> current = worklist.remove();\n\t \tif(current.equals(endCharacter)) {\n\t \t\treturn nodeToPath.get(current);\n\t \t}\n\t \tfor(Edge<String,String> value : temp.getChildren(current)) { \n\t \t\tNode<String> valueChild = value.getChild(); \n\t \t if(!nodeToPath.containsKey(valueChild)) { \n\t \t \tList<Edge<String,String>> newPath = \n\t \t \t\t\tnew ArrayList<Edge<String,String>>(nodeToPath.get(current)); \n\t \t \tnewPath.add(value);\n\t \t \tnodeToPath.put(valueChild, newPath);\n\t \t \tworklist.add(valueChild);\n\t \t }\n\t \t}\n\n\t }\n\t //return pathToString(null, char1, char2);\n\t return null;\n\t}",
"private Square[] returnPath(Vertex v, GameBoard b) {\n // because we're starting at the end point,\n // we need build the path in 'reverse'\n Stack<Square> path = new Stack<Square>();\n\n // while we're not at the start point\n while ( v.dist != 0 ) {\n path.push(vertexToSquare(v,b));\n v = v.path;\n }\n\n // place the locations in the proper order\n Square[] road = new Square[path.size()];\n for ( int i = 0; i < path.size(); i++ )\n road[i] = path.pop();\n\n return road;\n }",
"@Override\n public void draw(GraphicsContext gc){\n for(int i = 1; i < path.size(); i++) {\n Point2D from = path.get(i-1);\n Point2D to = path.get(i);\n gc.strokeLine(from.getX(), from.getY(), to.getX(), to.getY());\n }\n }",
"private ShapeDrawable addPointToShapeDrawablePath(float x, float y, android.graphics.Path path){\n path.lineTo(x,y);\n\n // make local copy of path and store in new ShapeDrawable\n android.graphics.Path currPath = new android.graphics.Path(path);\n\n ShapeDrawable shapeDrawable = new ShapeDrawable();\n float[] color = {40,100,100};\n shapeDrawable.getPaint().setColor(Color.HSVToColor(color));//Color.MAGENTA);\n shapeDrawable.getPaint().setStyle(Paint.Style.STROKE);\n shapeDrawable.getPaint().setStrokeWidth(10);\n shapeDrawable.getPaint().setStrokeJoin(Paint.Join.ROUND);\n shapeDrawable.getPaint().setStrokeCap(Paint.Cap.ROUND);\n shapeDrawable.getPaint().setPathEffect(new CornerPathEffect(30));\n shapeDrawable.getPaint().setAntiAlias(true); // set anti alias so it smooths\n shapeDrawable.setIntrinsicHeight(displayManager.getHeight());\n shapeDrawable.setIntrinsicWidth(displayManager.getWidth());\n shapeDrawable.setBounds(0, 0, displayManager.getWidth(), displayManager.getHeight());\n\n shapeDrawable.setShape(new PathShape(currPath,displayManager.getWidth(),displayManager.getHeight()));\n\n return shapeDrawable;\n}",
"@Override\r\n public ArrayList<PathXNode> generatePath() throws VertexNotFoundException {\r\n return null;\r\n }",
"public abstract ScaledPathArray getPathList();",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"List<Edge> getPath() throws NoPathFoundException;",
"@Override\n\tpublic boolean findPath(PathfindingNode start, PathfindingNode end, ArrayList<PathfindingNode> path) \n\t{\n\t\tpath.clear();\n\t\t\n\t\t_visited.clear();\n\t\t_toVisit.clear();\n\t\t_parents.clear();\n\t\t_costsFromStart.clear();\n\t\t_totalCosts.clear();\n\n\t\t_costsFromStart.put(start, 0);\n\t\t_toVisit.add(start);\n\t\t_parents.put(start, null);\n\t\t\n\t\twhile (!_toVisit.isEmpty() && !_toVisit.contains(end))\n\t\t{\n\t\t\tPathfindingNode m = _toVisit.remove();\n\t\t\t\n\t\t\tint mCost = _costsFromStart.get(m);\n\t\t\t\n\t\t\tfor (int i = 0; i < m.getNeighbors().size(); ++i)\n\t\t\t{\n\t\t\t\tPathfindingNodeEdge n = m.getNeighbors().get(i);\n\t\t\t\tif (n.getNeighbor() != null && !_visited.contains(n.getNeighbor()))\n\t\t\t\t{\n\t\t\t\t\tint costFromSource = mCost + n.getCost();\n\t\t\t\t\tint totalCost = costFromSource + _estimator.estimate(n.getNeighbor(), end);\n\t\t\t\t\tif (!_toVisit.contains(n.getNeighbor()) || totalCost < _totalCosts.get(n.getNeighbor()))\n\t\t\t\t\t{\n\t\t\t\t\t\t_parents.put(n.getNeighbor(), m);\n\t\t\t\t\t\t_costsFromStart.put(n.getNeighbor(), costFromSource);\n\t\t\t\t\t\t_totalCosts.put(n.getNeighbor(), totalCost);\n\t\t\t\t\t\tif (_toVisit.contains(n.getNeighbor()))\n\t\t\t\t\t\t\t_toVisit.remove(n.getNeighbor());\n\t\t\t\t\t\t_toVisit.add(n.getNeighbor());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t_visited.add(m);\n\t\t}\n\t\t\n\t\tif (_toVisit.contains(end))\n\t\t{\n\t\t\t_reversePath.clear();\n\t\t\t\n\t\t\tPathfindingNode current = end;\n\t\t\twhile (current != null)\n\t\t\t{\n\t\t\t\t_reversePath.push(current);\n\t\t\t\tcurrent = _parents.get(current);\n\t\t\t}\n\t\t\t\n\t\t\twhile (!_reversePath.isEmpty())\n\t\t\t\tpath.add(_reversePath.pop());\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.add(start);\n\t\t\treturn false;\n\t\t}\n\t}",
"public java.lang.String getPath1() {\n return path1;\n }",
"private void computePath(){\n LinkedStack<T> reversePath = new LinkedStack<T>();\n // adding end vertex to reversePath\n T current = end; // first node is the end one\n while (!current.equals(start)){\n reversePath.push(current); // adding current to path\n current = closestPredecessor[vertexIndex(current)]; // changing to closest predecessor to current\n }\n reversePath.push(current); // adding the start vertex\n \n while (!reversePath.isEmpty()){\n path.enqueue(reversePath.pop());\n }\n }",
"public void setEndPoint(Point2D p)throws NoninvertibleTransformException{\n if(p == null){ //if given null it removes the point and path.\n end = null;\n fastestPath = null;\n removePointer(\"endPointIcon\");\n closeDirectionList();\n routePanel.getEndAddressField().setForeground(Color.gray);\n routePanel.getEndAddressField().setText(\"Enter end address\");\n return;\n }\n Insets x = getInsets(); //Recalibrate position for precision\n p.setLocation(p.getX(), p.getY() - x.top + x.bottom);\n end = transformPoint(p);\n\n addPointer(new MapPointer(end, \"endPointIcon\".intern()));\n if(end != null && start != null)\n findFastestRoute(start, end);\n repaint();\n }",
"@Override\n\tpublic void getPathToMRT() {\n\n\t}",
"private void ruleR2(Node a, Node b, Node c, Graph graph) {\n if (!graph.isAdjacentTo(a, c)) {\n return;\n }\n\n if (graph.getEndpoint(b, a) == Endpoint.TAIL && graph.getEndpoint(a, b) == Endpoint.ARROW\n && graph.getEndpoint(b, c) == Endpoint.ARROW && graph.getEndpoint(a, c) == Endpoint.CIRCLE) {\n if (!isArrowpointAllowed(graph, a, c)) {\n return;\n }\n\n graph.setEndpoint(a, c, Endpoint.ARROW);\n } else if (graph.getEndpoint(a, b) == Endpoint.ARROW && graph.getEndpoint(c, b) == Endpoint.TAIL\n && graph.getEndpoint(b, c) == Endpoint.ARROW && graph.getEndpoint(a, c) == Endpoint.CIRCLE\n ) {\n if (!isArrowpointAllowed(graph, a, c)) {\n return;\n }\n\n graph.setEndpoint(a, c, Endpoint.ARROW);\n }\n }",
"Iterable<Vertex> computePath(Vertex start, Vertex end) throws GraphException;",
"public PathExpressionIF createPathExpression();",
"protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}",
"IPath getPath();",
"abstract public List<S> getPath();",
"public void testConjunctionResolvesWhenSecondPathRevisitsFirst() throws Exception\n {\n resolveAndAssertSolutions(\"[[g, (h :- g), (f :- g, h)], (?- f), [[]]]\");\n }",
"@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}",
"public Path select(int start, int end)\n\t{\n\t\tString newPath = \"\";\n\t\t\n\t\t\n\t\tif(this.isAbsolute() && start == 0){\n\t\t\tnewPath = \"/\";\n\t\t}\n\t\t\n\t\tfor(int i = start; i <= end; i++)\n\t\t{\n\t\t\tnewPath += this.elements.get(i) + \"/\";\n\t\t}\n\t\t\n\t\treturn new Path(newPath);\n\t}",
"public Path findLandPath(Point start, Point end) {\n\t\treturn null;\r\n\t}",
"private LinkedList<Point> constructPath(Point a, HashMap<Point, Point> allPaths) {\n\t\tLinkedList<Point> ret = new LinkedList<Point>();\n\t\tret.addLast(a);\n\t\tPoint current = a;\n\t\twhile (allPaths.containsKey(current)) {\n\t\t\tcurrent = allPaths.get(current);\n\t\t\tret.addLast(current);\n\t\t}\n\t\treturn ret;\n\t}",
"private HashMap<String, Integer> getShortestPath(Node start, Node end){\n if(start.equals(end)) {\n return getShortestPath(start);\n }\n return getShortestPathBetweenDifferentNodes(start,end);\n }",
"public PolytopeEdge(PolytopePoint s1, PolytopePoint s2){\n\t\t\tstart = s1;\n\t\t\tend = s2;\n\t\t}",
"public RDFList path(RDFList exp) {\r\n RDFList ll = new RDFList(exp.head(), exp.getList());\r\n Expression re = list();\r\n\r\n for (Expression ee : exp.getList()){\r\n Triple t = createPath(exp.head(), re, ee);\r\n ll.add(t);\r\n }\r\n \r\n return ll;\r\n }",
"private void checkAndAddMidPoints(DoubleBinding startY, DoubleBinding endY){\n if(target.rowLocationProperty.get() - source.rowLocationProperty.get() > 1\n || target.rowLocationProperty.get() - source.rowLocationProperty.get() < 0){\n if(!addedMidPoints){\n path.addPoint(midLineX.add(0), startY.subtract(TreeLayout.V_SPACING/3.), 1);\n path.addPoint(midLineX.add(0), endY.add(TreeLayout.V_SPACING/2.), 2);\n this.addedMidPoints = true;\n }\n }else{\n if(addedMidPoints){\n path.removePoint(2);\n path.removePoint(1);\n this.addedMidPoints = false;\n }\n }\n }",
"public interface Paths extends Constructible, Extensible<Paths> {\n\n /**\n * Adds the given path item to this Paths and return this instance of Paths\n *\n * @param name\n * a path name in the format valid for a Paths object. The field name MUST begin with a slash.\n * @param item\n * the path item added to the list of paths. null values will be rejected (implementation will throw an\n * exception) or ignored.\n * @return the current Paths instance\n */\n Paths addPathItem(String name, PathItem item);\n\n /**\n * Removes the given path item to this Paths.\n *\n * @param name\n * a path name that will be removed.\n */\n void removePathItem(String name);\n\n /**\n * Returns a copy map (potentially immutable) of the path items.\n *\n * @return all items\n */\n Map<String, PathItem> getPathItems();\n\n /**\n * Set the path items map to this Paths\n *\n * @param items\n * a map containing the list of paths. Keys MUST begin with a slash.\n */\n void setPathItems(Map<String, PathItem> items);\n\n /**\n * Check whether a path item is present in the map. This is a convenience method for\n * <code>getPathItems().containsKey(name)</code>\n *\n * @param name\n * a path name in the format valid for a Paths object.\n * @return a boolean to indicate if the path item is present or not.\n */\n default boolean hasPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return false;\n }\n return map.containsKey(name);\n }\n\n /**\n * Returns a path item for a given name. This is a convenience method for <code>getPathItems().get(name)</code>\n *\n * @param name\n * a path name in the format valid for a Paths object.\n * @return the corresponding path item or null.\n */\n default PathItem getPathItem(String name) {\n Map<String, PathItem> map = getPathItems();\n if (map == null) {\n return null;\n }\n return map.get(name);\n }\n\n}",
"private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }",
"public PointRelation pointSegmentRelation(Coordinates point, Coordinates segmExtremityA, Coordinates segmExtremityB);",
"private void tracePath(Node lastVisitedNode)\r\n {\r\n Node pathPtr = lastVisitedNode;\r\n while (pathPtr != Start)\r\n {\r\n pathPtr.isVisited = true;\r\n pathPtr = pathPtr.parent;\r\n }\r\n }",
"final public void updatePath(EventPacket<?> in) {\n if (!pathsEnabled) {\n return;\n }\n path.add(new PathPoint(location.x, location.y, in.getLastTimestamp(), numEvents - previousNumEvents));\n previousNumEvents = numEvents;\n if (path.size() > getPathLength()) {\n path.remove(path.get(0));\n }\n updateVelocity();\n }",
"public List<Node> findPath(Node start);",
"public static boolean recursiveFindPath(Edge edge, Shape end) {\n\t\tif (edge.getDest() instanceof JoinPoint) {\n\t\t\tif (recursiveFindPath((Edge) ((JoinPoint)edge.getDest()).getDest(), end)) {\n\t\t\t\tedge.setColor(Color.green);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (edge.getDest().equals(end)) {\n\t\t\tedge.setColor(Color.green);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private Paths(Iterable<Integer> fromA, Iterable<Integer> fromB) {\n\n this.fromA = fromA;\n this.fromB = fromB;\n\n ArrayList<Integer> aPath = path(fromA);\n ArrayList<Integer> bPath = path(fromB);\n\n /* Find component path lengths and common ancestor candidate. */\n int numA = aPath.size();\n int numB = bPath.size();\n int ancestorA = aPath.get(numA - 1);\n int ancestorB = bPath.get(numB - 1);\n\n // Validate that nearest ancestor really is shared/common.\n if (ancestorA != ancestorB) {\n String errMsg = String.format(\n \"Ancestor disagreement: %d and %d\", ancestorA, ancestorB\n );\n throw new IllegalArgumentException(errMsg);\n }\n\n /* Set nearest common ancestor and length of path through it. */\n this.ancestor = ancestorA;\n this.length = numA + numB - 2;\n\n }",
"public void updatePath() {\n\t\tString oldPath = this.path;\n\t\tif (materializePath()) {\n\t\t\tPageAlias.create(this, oldPath);\n\t\t\tupdateChildPaths();\n\t\t}\n\t}",
"public static void findPaths(FacilityImpl start, FacilityImpl end, ArrayList<FacilityImpl> pathList){\n\t\tif(start.getFacilityId().equals(end.getFacilityId())){\r\n\t\t\tif(lowPath.isEmpty()){\r\n\t\t\t\tlowPath = pathList;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse{\r\n\t\t\t\tint pathListSum = 0;\r\n\t\t\t\tfor(int i = 0; i < pathList.size()-1; i++){\r\n\t\t\t\t\tpathListSum = pathListSum + pathList.get(i).getDistance(pathList.get(i+1).getFacilityId());\r\n\t\t\t\t}\r\n\t\t\t\tint lowPathSum = 0;\r\n\t\t\t\tfor(int i = 0; i < lowPath.size()-1; i++){\r\n\t\t\t\t\tlowPathSum = lowPathSum + lowPath.get(i).getDistance(lowPath.get(i+1).getFacilityId());\r\n\t\t\t\t}\r\n\t\t\t\tif(pathListSum < lowPathSum){\r\n\t\t\t\t\tlowPath = pathList;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn; }\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tHashSet<String> fromHere = new HashSet<>();\r\n\t\t\tfor(String pair : pairs.keySet()){\r\n\t\t\t\tString[] parts = pair.split(\":\");\r\n\t\t\t\tString parts1 = parts[0];\r\n\t\t\t\tString parts2 = parts[1];\r\n\t\t\t\tif(parts1.equals(start.getFacilityId())){\r\n\t\t\t\t\tfromHere.add(pair); //Adds \"FacilityId1:FacilityId2\"\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\tfor(String pair: fromHere){\r\n\t\t\t\tString[] parts = pair.split(\":\");\r\n\t\t\t\tString parts1 = parts[0];\r\n\t\t\t\tString parts2 = parts[1];\r\n\t\t\t\tif(!pathList.contains(FacilityManager.getInstance().getFacility(parts2))){\r\n\t\t\t\t\tArrayList<FacilityImpl> newPath = new ArrayList<>(pathList);\r\n\t\t\t\t\tnewPath.add(FacilityManager.getInstance().getFacility(parts2));\r\n\t\t\t\t\tfindPaths(FacilityManager.getInstance().getFacility(parts2), end, newPath);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t} \r\n\t}",
"public static Set<ARGState> getOnePathToARGStateForSimpleProperty(ARGState source, ARGState destination) {\n Set<Integer> seenElements = new HashSet<Integer>();\n ARGState currentARGState = source;\n seenElements.add(source.getStateId());\n List<ARGState> path = new ArrayList<ARGState>();\n path.add(currentARGState);\n // Set<ARGState> result = new HashSet<ARGState>();\n while (currentARGState.getStateId() != destination.getStateId()) {\n boolean end = true;\n if (!currentARGState.getChildren().isEmpty()) {\n Iterator<ARGState> children = currentARGState.getChildren().iterator();\n ARGState childrenElement ;\n do {\n childrenElement = children.next();\n if (!seenElements.contains(childrenElement.getStateId())) {\n path.add(childrenElement);\n currentARGState=childrenElement;\n seenElements.add(childrenElement.getStateId());\n end = false;\n break;\n }\n } while(children.hasNext());\n if(end){\n path.remove(path.size()-1);\n if(path.size()!=0){\n currentARGState=path.get(path.size()-1);\n seenElements.add(currentARGState.getStateId());\n }\n else\n break;\n }\n\n }\n else{\n path.remove(path.size()-1);\n if(path.size()!=0){\n currentARGState=path.get(path.size()-1);\n seenElements.add(currentARGState.getStateId());\n }\n else\n break;\n }\n }\n if(currentARGState.getStateId() != destination.getStateId())\n return null;\n if(!destination.getChildren().contains(source))\n return null;\n System.out.println(\"path.size=\"+path.size());\n Iterator<ARGState> it=path.iterator();\n for(int i=0;i<path.size()-1;i++){\n ARGState pre=path.get(i);\n ARGState suc=path.get(i+1);\n CFAEdge edge=pre.getEdgeToChild(suc);\n if(edge.getRawStatement().equals(\"BLANKEDGE\")){\n pre.getChildren().remove(suc);\n suc.getParents().remove(pre);\n AbstractStates.extractLocation(pre).getLeavingEdge().remove(edge);\n AbstractStates.extractLocation(suc).getEnteringEdges().remove(edge);\n }\n }\n return new HashSet<ARGState>(path);\n }",
"public void pathTo(int x1, int y1, int x2, int y2, int x3, int y3);",
"public interface AssignmentPath extends DebugDumpable, ShortDumpable, Cloneable {\n\n\tList<? extends AssignmentPathSegment> getSegments();\n\t\n\t/**\n\t * Returns segment specified by index. Negative indexes work in reverse direction.\n\t * @throws IndexOutOfBoundsException\n\t */\n\tAssignmentPathSegment getSegment(int index);\n\n\tAssignmentPathSegment first();\n\n\tboolean isEmpty();\n\n\tint size();\n\n//\tEvaluationOrder getEvaluationOrder();\n\n\tAssignmentPathSegment last();\n\n\t// beforeLast(0) means last()\n\t// beforeLast(1) means one before last()\n\tAssignmentPathSegment beforeLast(int n);\n\n\tint countTargetOccurrences(ObjectType target);\n\n\t/**\n\t * Returns a \"user understandable\" part of this path. I.e. only those objects that are of \"order 1\" above the focal object.\n\t * E.g. from chain of\n\t *\n\t * jack =(a)=> Engineer =(i)=> Employee =(a)=> PersonMetarole =(i2)=> Person =(i)=> Entity\n\t *\n\t * the result would be\n\t *\n\t * Engineer -> Employee -> Person -> Entity\n\t *\n\t * TODO find a better name\n\t */\n\t@NotNull\n\tList<ObjectType> getFirstOrderChain();\n\t\n\t/**\n\t * In the context of meta-roles this is the role that the currently-processed inducement \"applies to\".\n\t * I.e. the role that would contain this inducement in case that meta-roles were not used.\n\t * Technically, this is the last element in the \"first order chain\" or roles.\n\t * \n\t * Note: proto- is the opposite of meta-\n\t */\n\tObjectType getProtoRole();\n\n\t/**\n\t * Shallow clone.\n\t */\n\tAssignmentPath clone();\n\n\tAssignmentPath cloneFirst(int n);\n\n\tAssignmentPathType toAssignmentPathType(boolean includeAssignmentsContent);\n\n\tExtensionType collectExtensions(int startAt) throws SchemaException;\n\n\tstatic ExtensionType collectExtensions(AssignmentPathType path, int startAt, ModelService modelService, Task task, OperationResult result)\n\t\t\tthrows CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException,\n\t\t\tConfigurationException, ExpressionEvaluationException {\n\t\treturn AssignmentPathUtil.collectExtensions(path, startAt, modelService, task, result);\n\t}\n\t\n\t// Groovy [] operator\n\tdefault AssignmentPathSegment getAt(int index) {\n\t\treturn getSegment(index);\n\t}\n\n\t/**\n\t * Returns true if the path matches specified order constraints. All of them must match.\n\t * Although there are some defaults, it is recommended to specify constraints explicitly.\n\t * Currently not supported on empty paths.\n\t *\n\t * Not all parts of OrderConstraintsType are supported. Namely, resetOrder item has no meaning here.\n\t */\n\tboolean matches(@NotNull List<OrderConstraintsType> orderConstraints);\n\n\t/**\n\t * Preliminary (limited) implementation. To be used to compare paths pointing to the same target object. Use with care.\n\t */\n\tboolean equivalent(AssignmentPath other);\n}",
"boolean checkIfPathExists(List<WayPointDto> path);",
"public interface JsonPath {\n\n JsonPath parent();\n\n Optional<JsonObject> getJsonObject(JsonObject jsonObject);\n\n Optional<JsonArray> getJsonArray(JsonObject jsonObject);\n\n static JsonPath root() {\n return new JsonPathImpl(ImmutableList.of());\n }\n\n boolean isRoot();\n\n JsonPath concat(JsonObjectPathSpecImpl jsonObjectPathSpec);\n\n JsonPath concat(JsonArrayPathSpecImpl jsonArrayPathSpec);\n\n JsonPath concat(JsonPath jsonPath);\n\n List<PathSpec> parts();\n\n JsonPath subpath(int start, int end);\n\n int size();\n\n static JsonPath parse(final String pathStr) {\n\n Objects.requireNonNull(pathStr);\n\n ImmutableList.Builder<PathSpec> listBuilder = ImmutableList.builder();\n\n String[] split = pathStr.split(\"\\\\.\");\n for (int i = 0; i < split.length; i++) {\n String strPart = split[i];\n\n if (strPart.isEmpty()) {\n continue;\n }\n\n int start = strPart.indexOf('[');\n\n if (start > 0) {\n int end = strPart.indexOf(']');\n\n listBuilder.add(\n new JsonArrayPathSpecImpl(\n strPart.substring(0, start),\n Integer.parseInt(strPart.substring(start + 1, end))\n )\n );\n continue;\n }\n\n listBuilder.add(\n new JsonObjectPathSpecImpl(\n strPart\n )\n );\n }\n return new JsonPathImpl(\n listBuilder.build()\n );\n }\n\n static void main(String[] asdf) {\n\n String[] ss = {};\n JsonPath parse = JsonPath.parse(\"departments[0].department.department.employee.departments[0].name\");\n System.out.println(\"path: [\" + parse + \"] size: \" + parse.size());\n }\n}",
"private List<Node> getIntermediatePath(final Node source, final Node target) {\n if (P[source.id][target.id] == null) {\n return new ArrayList<Node>();\n }\n final List<Node> path = new ArrayList<Node>();\n path.addAll(getIntermediatePath(source, P[source.id][target.id]));\n path.add(P[source.id][target.id]);\n path.addAll(getIntermediatePath(P[source.id][target.id], target));\n return path;\n }",
"PathKeys getPathKeys();",
"org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D getPathArray(int i);"
] | [
"0.6538824",
"0.6409859",
"0.6331982",
"0.6184033",
"0.61769384",
"0.6134308",
"0.6110176",
"0.6108165",
"0.6043562",
"0.59998614",
"0.5992017",
"0.59343636",
"0.5933722",
"0.5920987",
"0.5903256",
"0.59031475",
"0.5901441",
"0.5847032",
"0.5833657",
"0.5832778",
"0.57866985",
"0.5777647",
"0.57576084",
"0.5754129",
"0.5751448",
"0.574995",
"0.57328606",
"0.5730959",
"0.5711024",
"0.56797844",
"0.56734693",
"0.56588274",
"0.56574595",
"0.5652449",
"0.56504893",
"0.56353664",
"0.563407",
"0.56232786",
"0.5616878",
"0.5606593",
"0.5594864",
"0.5573794",
"0.5569146",
"0.55573183",
"0.5529053",
"0.5527823",
"0.5517326",
"0.5516873",
"0.5508417",
"0.5507858",
"0.5507137",
"0.55060005",
"0.5492035",
"0.54903615",
"0.5490284",
"0.5489021",
"0.54872155",
"0.548049",
"0.5476996",
"0.54734254",
"0.5458279",
"0.5440881",
"0.54377866",
"0.5437114",
"0.5417851",
"0.5402883",
"0.5397594",
"0.5381476",
"0.5377784",
"0.53775847",
"0.53773713",
"0.5375046",
"0.5362212",
"0.5355602",
"0.53537345",
"0.5352778",
"0.53501207",
"0.534667",
"0.53406537",
"0.53395635",
"0.5337877",
"0.53374124",
"0.5333597",
"0.533199",
"0.53317136",
"0.53274065",
"0.5322052",
"0.5318932",
"0.53140837",
"0.53133214",
"0.53086793",
"0.52958846",
"0.52943736",
"0.52929497",
"0.52881765",
"0.52856684",
"0.52724165",
"0.5268754",
"0.52674794",
"0.52672666",
"0.526595"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_calendar_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\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}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.7904066",
"0.7804976",
"0.7766218",
"0.7726716",
"0.7631313",
"0.76221544",
"0.7584775",
"0.7530617",
"0.74878734",
"0.7457033",
"0.7457033",
"0.74380976",
"0.7421477",
"0.7402898",
"0.7391322",
"0.7386477",
"0.73788774",
"0.7370012",
"0.7362617",
"0.73555875",
"0.73451835",
"0.73418057",
"0.73298967",
"0.73283297",
"0.7325109",
"0.7318501",
"0.73162323",
"0.7313179",
"0.7303658",
"0.7303658",
"0.7301155",
"0.7297718",
"0.7292956",
"0.7286341",
"0.72828627",
"0.72805357",
"0.7278157",
"0.72596914",
"0.72593665",
"0.72593665",
"0.72593665",
"0.7259005",
"0.724937",
"0.72248167",
"0.7219095",
"0.7217289",
"0.72042423",
"0.7200424",
"0.72000813",
"0.71935385",
"0.71848804",
"0.7178161",
"0.71682125",
"0.71670973",
"0.7153767",
"0.71535325",
"0.7136499",
"0.71345866",
"0.71345866",
"0.7129392",
"0.7128763",
"0.71239245",
"0.7122973",
"0.7122687",
"0.7122104",
"0.71169454",
"0.7116821",
"0.71165425",
"0.71165425",
"0.71165425",
"0.71165425",
"0.71160954",
"0.711461",
"0.711215",
"0.71094537",
"0.71084976",
"0.7105594",
"0.70996004",
"0.7098039",
"0.7095679",
"0.70935696",
"0.70935696",
"0.70862824",
"0.70829386",
"0.70803833",
"0.70799434",
"0.7073132",
"0.70682305",
"0.7061713",
"0.7060338",
"0.7060053",
"0.70512676",
"0.7037155",
"0.7037155",
"0.7035636",
"0.70352966",
"0.70352966",
"0.70329386",
"0.70302224",
"0.7029258",
"0.70191014"
] | 0.0 | -1 |
Subsets and Splits