I add contact records -
try {
-
InitialContext ic = new InitialContext();
-
Object objContactBean = ic.lookup("java:comp/env/ejb/ContactRef");
-
LocalContactHome contactHome = (LocalContactHome) objContactBean;
-
-
contactHome.create("01", "Andrzej", "Miążek","andrzej_miazek@op.pl");
-
contactHome.create("02", "Michał", "Kacper","michal_kacper@op.pl");
-
contactHome.create("03", "Aleksandra", "Owczarek","aleksa1981@wp.pl");
-
contactHome.create("04", "Krzysztof", "Żak","zaczek@poczta.onet.pl");
-
contactHome.create("05", "Oskar", "Paprocki","oskarek1984@qmail.com");
-
-
} catch(Exception e) {
-
e.printStackTrace();
-
out.println("Create Contacts Failed : " + e.toString());
-
}
-
then i want to add phones and addresses records
do i use only the "create" method defined in LocalAddressHome and in LocalPhoneHome
the relationship between ContactBean and PhoneBean is one to many the same with addresses the referencing field from ContactBean to PhoneBean is "phones" a collection and from ContactBean to AddressBean is "addresses" a collection
Does the contactID go to the database when i invoke "create" method of LocalAddressHome or LocalPhoneHome
my interfaces
LocalAddressHome: -
public interface LocalAddressHome extends EJBLocalHome {
-
public LocalAddress create (
-
String contactID,
-
String addressID,
-
String street,
-
String city,
-
String zip,
-
String country)
-
throws CreateException;
-
-
public LocalAddress findByPrimaryKey(String addressID)
-
throws FinderException;
-
}
-
LocalPhoneHome: -
public interface LocalPhoneHome extends EJBLocalHome {
-
public LocalPhone create (
-
String contactID,
-
String phoneID,
-
String phone)
-
throws CreateException;
-
public Collection findAllPhones ()
-
throws FinderException;
-
public LocalPhone findByPrimaryKey(String phoneID)
-
throws FinderException;
-
public Collection findByContactID(String contactID)
-
throws FinderException;
-
-
}
-
2 1162
hihi i'm addicted ... another addiction on my list :) but it's a good addiction
Sorry if this seems weird, but what is your actual question here?
Greetings,
Nepomuk
Sign in to post your reply or Sign up for a free account.
Similar topics
by: grlgeek |
last post by:
I have a report for creating the switchboard labels for our phone system
receptionist switchboard. The template has 12 records per column.
I setup a report that will create the labels and put a...
|
by: Andrew |
last post by:
Hey all,
I am very new to ASP.Net (and .Net in general), but that isn't stopping the
boss from wanting to begin new projects in it. This latest project has me
kinda stumped and after a couple...
|
by: JJ_377 |
last post by:
I want a JavaScript validation function to fire on an ASP.NET textbox's
change event.
Here's what I've been trying and it is not working. The following added
in the webform's page load event:
...
|
by: Ankit Aneja |
last post by:
I have a strange situation and I have no idea how to solve this.
Its a Recruitment Search Page,in the Admin Page, for every button click
event the Admin Person has to create a checkbox on the users...
|
by: ReidarT |
last post by:
I use ADODB to add some records from one table to another. It seems that the
last record is missing in the updated table.
call LeggTilFirma()
....
Public Function LeggTilFirma()
Dim...
|
by: mcse4u |
last post by:
I would like to be able to add a hyperlink to the posted form below
that automatically creates a hyperlink of the email address of the
person submitting the form. Can someone please help me with...
|
by: Tony A. |
last post by:
I'm using VB .Net 2005 with Access 2003 for the database. The database has
two tables: tblContact (ContactNum (k), lastname, firstname, phone, email,
compNum) and tblCompany (CompNun (k),...
|
by: David |
last post by:
I'm trying to add a date and time to an html form, but I'm having a
bit of trouble getting it working. Any suggestions?
Thanks!
~ David (merlin001_at_gmail_dot_com)
|
by: jhansi |
last post by:
hi...
I have created a form it's working properly.... but i want to consider phone number and STD code in two different text field for a single lable phone number.....
and I have considered...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |