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

Generating specific number in a random way in Java [duplicate]
Unable to understand which Java SDK to use when developing AWS Lambda Function
Dagger2 - Injection of replacement modules without duplicating code
Custom tag in JSP not working with Spring Session filter
Issues for finding neighbours (Conways Game of Life)
getting deadlock for 2 instances of same transaction with serializable isolation
Error getting the Android ID in NDK
How To Convert Android APK Into Java & XML File? [duplicate]
How to create an empty XML file from schema in IntelliJ IDEA
Retrieve max value from table using hibernate
Spring Data Rest - PersistentEntity must not be null
Including classes and jars from a local war file with maven
Not able to print output using JAXB
How to render sprite array efficiently in j2me game?
Flink: Window evaluation
notifydatasetchanged() not working after onbackpressed()

Categories

HOME
twitter
testing
clips
hook
c#-4.0
iterator
stock
tesseract
youtube-dl
callback
amazon-cloudformation
spring-kafka
spring-xd
imacros
php-7.1
fortumo
jsprit
windows-7-x64
reactcsstransitiongroup
http-status-code-504
nhibernate-envers
custom-wordpress-pages
nas
chromium-embedded
pass-by-reference
devops
dynamic-featured-image
bootstrap-material-design
fifo
bpel
ioio
hybridauth
gammu
x11-forwarding
azure-ml
unoconv
ensembles
gulp-sourcemaps
quadratic-programming
arena-simulation
unixodbc
acoustics
executenonquery
xml-documentation
network-flow
chain-builder
diagnostics
np-complete
windows-mobile-6.5
qtwebview
pillow
watchconnectivity
static-ip-address
radtreelist
mikroc
thrust
gstreamer-0.10
angstrom-linux
bgp
lemon
citrus-pay
sysinternals
method-parameters
processmodel
ami
streambase
c++03
nsmutabledictionary
rake-task
mdt
xcode-6.2
rdl
terminfo
android-radiobutton
funcunit
marmalade
braille
rtmfp
sitemesh
runtime.exec
bluepill
hosts-file
objective-c-2.0
eclipse-templates
gnu-prolog
qt-jambi
deobfuscation
heartbeat
coercion
xmemcached
sql-server-profiler
datareader
yslow
sustainable-pace
defensive-programming
geneva-server
.net-1.0

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App