This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 106656 - Setter method for id fields should be protected in generated code
Summary: Setter method for id fields should be protected in generated code
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-14 14:08 UTC by Tomasz Slota
Modified: 2007-08-28 10:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Slota 2007-06-14 14:08:27 UTC
Setter methods for id fields should have protected access to prevent the users from misusing them. The JPA Verification now generates warning if a setter 
method is public. Our wizards should generate exemplary code with no warnings.
Comment 1 Andrei Badea 2007-07-03 10:16:00 UTC
Fixed.

Checking in src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGenerator.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGenerator.java,v  <-- 
JavaPersistenceGenerator.java
new revision: 1.18; previous revision: 1.17
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateOneEntity.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateOneEntity.pass,v
 <--  testGenerateOneEntity.pass
new revision: 1.3; previous revision: 1.2
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateEntityFromSampleSchema/Customer.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateEntityFromSampleSchema/Customer.pass,v
 <--  Customer.pass
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateOneEntity/User.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateOneEntity/User.pass,v
 <--  User.pass
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Manufacturer.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Manufacturer.pass,v
 <--  Manufacturer.pass
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Product.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Product.pass,v
 <--  Product.pass
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/ProductCode.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/ProductCode.pass,v
 <--  ProductCode.pass
new revision: 1.2; previous revision: 1.1
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/Product.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/Product.pass,v
 <--  Product.pass
new revision: 1.4; previous revision: 1.3
done
Checking in
test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/User.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/User.pass,v
 <--  User.pass
new revision: 1.4; previous revision: 1.3
done