Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Recensione vivo X300 Pro: è ancora lui il re della fotografia mobile, peccato per la batteria
Recensione vivo X300 Pro: è ancora lui il re della fotografia mobile, peccato per la batteria
vivo X300 Pro rappresenta un'evoluzione misurata della serie fotografica del produttore cinese, con un sistema di fotocamere migliorato, chipset Dimensity 9500 di ultima generazione e l'arrivo dell'interfaccia OriginOS 6 anche sui modelli internazionali. La scelta di limitare la batteria a 5.440mAh nel mercato europeo, rispetto ai 6.510mAh disponibili altrove, fa storcere un po' il naso
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo
Lenovo Legion Go 2 è la nuova handheld PC gaming con processore AMD Ryzen Z2 Extreme (8 core Zen 5/5c, GPU RDNA 3.5 16 CU) e schermo OLED 8,8" 1920x1200 144Hz. È dotata anche di controller rimovibili TrueStrike con joystick Hall effect e una batteria da 74Wh. Rispetto al dispositivo che l'ha preceduta, migliora ergonomia e prestazioni a basse risoluzioni, ma pesa 920g e costa 1.299€ nella configurazione con 32GB RAM/1TB SSD e Z2 Extreme
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti
A re:Invent 2025, AWS mostra un’evoluzione profonda della propria strategia: l’IA diventa una piattaforma di servizi sempre più pronta all’uso, con agenti e modelli preconfigurati che accelerano lo sviluppo, mentre il cloud resta la base imprescindibile per governare dati, complessità e lock-in in uno scenario sempre più orientato all’hybrid cloud
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 01-10-2013, 10:08   #1
gaiapuffo
Member
 
Iscritto dal: Jul 2011
Messaggi: 152
ejb 3.0 dubbi sull utilizzo

Allora per l'uni devo fare uno stage dove devo imparare java server faces e ejb 3.0..Il primo l'ho imparato,ho qualche difficoltà con ejb 3.0 sto leggendo un libro e mi sono bloccato qui:
@Entity
public class Employee {
@Id private int id;
private String name;
private long salary;
public Employee() {}
public Employee(int id) { this.id = id; }
public int getId() { return id; }
public void setId(int id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public long getSalary() { return salary; }
public void setSalary (long salary) { this.salary = salary; }
}


Persisting an entity is the operation of taking a transient entity, or one that does not yet have
any persistent representation in the database, and storing its state so that it can be retrieved
later. This is really the basis of persistence—creating state that may outlive the process that
created it. We are going to start by using the entity manager to persist an instance of Employee.
Here is a code example that does just that:
Employee emp = new Employee(158);
em.persist(emp);
The first line in this code segment is simply creating an Employee instance that we want to persist.
If we ignore the sad fact that we seem to be employing a nameless individual and paying
them nothing (we are setting only the id, not the name or salary) the instantiated Employee is
just a regular Java object.a regular Java object.
The next line obtains an entity manager and uses it to persist the entity. Calling persist()
is all that is required to initiate it being persisted in the database. If the entity manager encounters
a problem doing this, then it will throw an unchecked PersistenceException; otherwise
the employee will be stored in the database. When the persist() call returns, emp will be a
managed entity within the entity manager’s persistence context

Io::
Non ho capito ma devo implementare io la funzione persist e creare l'entity manager ,inoltre introdurre un campo entity manager nella classe o viene fatto in automatico????Perchè da come descrive il libro sembra che tutto venga fatto in automatico?

Ultima modifica di gaiapuffo : 01-10-2013 alle 10:18.
gaiapuffo è offline   Rispondi citando il messaggio o parte di esso
Old 01-10-2013, 11:11   #2
gaiapuffo
Member
 
Iscritto dal: Jul 2011
Messaggi: 152
risolto
gaiapuffo è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Recensione vivo X300 Pro: è ancora lui il re della fotografia mobile, peccato per la batteria Recensione vivo X300 Pro: è ancora lui il...
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'...
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti AWS re:Invent 2025: inizia l'era dell'AI-as-a-Se...
Cos'è la bolla dell'IA e perché se ne parla Cos'è la bolla dell'IA e perché se...
BOOX Palma 2 Pro in prova: l'e-reader diventa a colori, e davvero tascabile BOOX Palma 2 Pro in prova: l'e-reader diventa a ...
Toyota usa giochi e premi per spingere i...
HarmonyOS ha raggiunto la soglia di sopr...
Le offerte Amazon più convenienti...
Un gruppo di ladri ha usato Google Maps ...
Apple non si fida di Samsung per la real...
Windows 11: un nuovo driver nativo mette...
Vi hanno regalato buoni Amazon? Intanto ...
Via acari, polvere e sporco da materassi...
Cuffie Beats in super offerta su Amazon,...
Xbox Cloud Gaming arriva su Amazon Fire ...
Un blackout a San Francisco manda in til...
Windows 11 è diventato più...
Apple cambia strategia a causa della cri...
007 First Light: uscita rimandata di due...
Samsung Galaxy A37 e A57: il comparto fo...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 22:36.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Served by www3v