java


How to create RecordN for generated DAO lookup


I am using jOOQ's code generator with DAOs.
I have a table with a composite primary key like this:
CREATE TABLE telefon_client
(
telefon VARCHAR(15) NOT NULL,
client VARCHAR(5) NOT NULL,
data_alta DATE NOT NULL,
pendent_ajustar TINYINT(1) DEFAULT '1' NOT NULL,
CONSTRAINT `PRIMARY` PRIMARY KEY (telefon, data_alta)
);
The generated DAO has a method with this interface:
public void deleteById(Record2<String, LocalDate>... ids);
I want to implement this method:
public void delete(String telefon, LocalDate dataAlta) {
new TelefonClientDao(configuration).deleteById(????);
}
What's the recommended way of building an instance of a Record2 with those two values?
This is one option:
DSL.using(configuration)
.newRecord(TELEFON_CLIENT.TELEFON, TELEFON_CLIENT.DATA_ALTA)
.values(telefon, dataAlta);

Related Links

Java= arbitrary placement of if statement gives different output? [duplicate]
Do Orphaned object in java lead to performance Issues [duplicate]
How do I mock an object of a class with parameterized constructor?
How to concatenate strings in Java?
How can I convert java.util.Calendar to org.quartz.impl.calendar.DailyCalendar?
Lose focus when user clicks outside Node's bound in JavaFX
Parallel Stream gives null items, How to do in Java 8
Extending the ObjectFactory in EclipseLink MOXy
is my implementation of builder violates mutability
Inserting a node into the n-th position in a LinkedList for Hackerrank Java
How to Split Strings into Words WITHOUT the split method or using Arrays?
Groovy gdk namespace collision
How to turn off slf4j logging
ConnectException when one Kafka broker of cluster is down
Exception in thread “JobGenerator” java.lang.NoClassDefFoundError: org/apache/spark/streaming/scheduler/InputInfo
Under what circumstances could closing a stream fail? [duplicate]

Categories

HOME
testing
ionic-framework
osgi
webpack
tizen
rsync
filtering
maven-3
jsrender
frameworks
v8
enterprise-library-5
after-effects
fatal-error
shared-hosting
visjs
paging
web-sql
extjs5
dxf
opennlp
centos6.5
user-interaction
internet-explorer-9
rst2pdf
linkerd
oracle-fusion-middleware
ioio
pim
usbserial
windows-dev-center
openoffice.org
android-nestedscrollview
streamsets
ssjs
webdriver-manager
dynamic-reports
isbn
user-accounts
magma
r-forge
pearson
imanage
synchronous
crosswalk-runtime
parallel-data-warehouse
gridpane
file-writing
login-control
simplewebrtc
xpath-1.0
photobucket
freedesktop.org
hsv
unity-networking
intel-fortran
lemon
cannon.js
android-listview
dundas
proj4js
operator-precedence
xc16
angularjs-ng-click
gui-test-framework
funcunit
comexception
prettify
ftps
file-locking
lcs
android-hardware
angularjs-controller
simba
libstdc++
word-processor
hosts-file
online-compilation
asyncfileupload
eclipse-templates
gnustep
zpt
tomcat-valve
winbugs14
disclosure
sortable-tables
perfect-hash
javap
ti-dsp
w3wp
dbisam

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App