You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Seelmann (JIRA)" <ji...@apache.org> on 2010/07/17 23:40:49 UTC

[jira] Created: (DIRSTUDIO-682) Generate DAO classes

Generate DAO classes
--------------------

                 Key: DIRSTUDIO-682
                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-682
             Project: Directory Studio
          Issue Type: New Feature
          Components: studio-persistence-tooling
            Reporter: Stefan Seelmann


We need DAOs (Data Access Objects) for mapping LDAP entries to Java objects. 

The first version should just generate one DAO for one Java bean class and only map simple data types (no relationships between objects).

The DAO should support basic CRUD operations:
- T getById( String id ) - where id is the RDN attribute value
- Collection<T> getAll()
- create( T object)
- update(T object)
- delete(T object)

Required parameters, to be added to wizard:
- Container entry (by default the parent of the selected entry): for read operations this information is used as search base; for write operations this information is used to determine the DN of the entry.
- Object classes of the LDAP entries (by default the object classes of the selected entry). For read operations this information is used to compose the search filter; for the create operation this information is used to set the object classes of the entry
- The RDN attribute to use (by default the RDN attribute of the selected entry): this information is used to determine the RDN and DN of the entry
- Connection parameters like hostname, port, encryption, bind DN, password (for default values this information can be obtained from IEntry.getBrowserConnection().getConnection()

The new Apache Directory LDAP API should be used.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-682) Generate DAO classes

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893960#action_12893960 ] 

Stefan Seelmann commented on DIRSTUDIO-682:
-------------------------------------------

I added an example how a generated project could look like: http://code.google.com/p/dirstudio-ldap-tooling/source/detail?r=99

- The com.example.domain.InetOrgPerson represents the generated Java bean. The used Java member names differ from the LDAP attribute names, the original LDAP attribute names are added as comments

- The com.example.dao.GenericLdapDao is an abstrtract class and can be used as base for the generated DAO. It doesn't contain any dynamic code, so it can be used as is. It provides 

- The com.example.dao.InetOrgPersonDao represents the generated DAO class. It extends GenericLdapDao. In the constructor all required parameters in the super class are set. Additional the two mapToEntry and mapFromEntry must be generated.

- the pom.xml contains a dependency to ldap-client-api 0.1

> Generate DAO classes
> --------------------
>
>                 Key: DIRSTUDIO-682
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-682
>             Project: Directory Studio
>          Issue Type: New Feature
>          Components: studio-persistence-tooling
>            Reporter: Stefan Seelmann
>
> We need DAOs (Data Access Objects) for mapping LDAP entries to Java objects. 
> The first version should just generate one DAO for one Java bean class and only map simple data types (no relationships between objects).
> The DAO should support basic CRUD operations:
> - T getById( String id ) - where id is the RDN attribute value
> - Collection<T> getAll()
> - create( T object)
> - update(T object)
> - delete(T object)
> Required parameters, to be added to wizard:
> - Container entry (by default the parent of the selected entry): for read operations this information is used as search base; for write operations this information is used to determine the DN of the entry.
> - Object classes of the LDAP entries (by default the object classes of the selected entry). For read operations this information is used to compose the search filter; for the create operation this information is used to set the object classes of the entry
> - The RDN attribute to use (by default the RDN attribute of the selected entry): this information is used to determine the RDN and DN of the entry
> - Connection parameters like hostname, port, encryption, bind DN, password (for default values this information can be obtained from IEntry.getBrowserConnection().getConnection()
> The new Apache Directory LDAP API should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-682) Generate DAO classes

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896270#action_12896270 ] 

Stefan Seelmann commented on DIRSTUDIO-682:
-------------------------------------------

I just tested the existing code and saw that only generation for members of type "String" work, other types (int, long, boolean, Calendar) and multi-valued (Set, List, array) don't work.

> Generate DAO classes
> --------------------
>
>                 Key: DIRSTUDIO-682
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-682
>             Project: Directory Studio
>          Issue Type: New Feature
>          Components: studio-persistence-tooling
>            Reporter: Stefan Seelmann
>
> We need DAOs (Data Access Objects) for mapping LDAP entries to Java objects. 
> The first version should just generate one DAO for one Java bean class and only map simple data types (no relationships between objects).
> The DAO should support basic CRUD operations:
> - T getById( String id ) - where id is the RDN attribute value
> - Collection<T> getAll()
> - create( T object)
> - update(T object)
> - delete(T object)
> Required parameters, to be added to wizard:
> - Container entry (by default the parent of the selected entry): for read operations this information is used as search base; for write operations this information is used to determine the DN of the entry.
> - Object classes of the LDAP entries (by default the object classes of the selected entry). For read operations this information is used to compose the search filter; for the create operation this information is used to set the object classes of the entry
> - The RDN attribute to use (by default the RDN attribute of the selected entry): this information is used to determine the RDN and DN of the entry
> - Connection parameters like hostname, port, encryption, bind DN, password (for default values this information can be obtained from IEntry.getBrowserConnection().getConnection()
> The new Apache Directory LDAP API should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSTUDIO-682) Generate DAO classes

Posted by "Kasun Lakpriya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSTUDIO-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896804#action_12896804 ] 

Kasun Lakpriya commented on DIRSTUDIO-682:
------------------------------------------

- As discussed with Stefan added Set as the only multi-valued type for now. 
- All the other data types are added. 
- Added some integration tests to check whether the generated code is correct or not. 

Latest revision : http://code.google.com/p/dirstudio-ldap-tooling/source/detail?r=113

> Generate DAO classes
> --------------------
>
>                 Key: DIRSTUDIO-682
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-682
>             Project: Directory Studio
>          Issue Type: New Feature
>          Components: studio-persistence-tooling
>            Reporter: Stefan Seelmann
>
> We need DAOs (Data Access Objects) for mapping LDAP entries to Java objects. 
> The first version should just generate one DAO for one Java bean class and only map simple data types (no relationships between objects).
> The DAO should support basic CRUD operations:
> - T getById( String id ) - where id is the RDN attribute value
> - Collection<T> getAll()
> - create( T object)
> - update(T object)
> - delete(T object)
> Required parameters, to be added to wizard:
> - Container entry (by default the parent of the selected entry): for read operations this information is used as search base; for write operations this information is used to determine the DN of the entry.
> - Object classes of the LDAP entries (by default the object classes of the selected entry). For read operations this information is used to compose the search filter; for the create operation this information is used to set the object classes of the entry
> - The RDN attribute to use (by default the RDN attribute of the selected entry): this information is used to determine the RDN and DN of the entry
> - Connection parameters like hostname, port, encryption, bind DN, password (for default values this information can be obtained from IEntry.getBrowserConnection().getConnection()
> The new Apache Directory LDAP API should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRSTUDIO-682) Generate DAO classes

Posted by "Kasun Lakpriya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSTUDIO-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kasun Lakpriya resolved DIRSTUDIO-682.
--------------------------------------

    Resolution: Fixed

Resolved : http://code.google.com/p/dirstudio-ldap-tooling/source/detail?r=113

> Generate DAO classes
> --------------------
>
>                 Key: DIRSTUDIO-682
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-682
>             Project: Directory Studio
>          Issue Type: New Feature
>          Components: studio-persistence-tooling
>            Reporter: Stefan Seelmann
>
> We need DAOs (Data Access Objects) for mapping LDAP entries to Java objects. 
> The first version should just generate one DAO for one Java bean class and only map simple data types (no relationships between objects).
> The DAO should support basic CRUD operations:
> - T getById( String id ) - where id is the RDN attribute value
> - Collection<T> getAll()
> - create( T object)
> - update(T object)
> - delete(T object)
> Required parameters, to be added to wizard:
> - Container entry (by default the parent of the selected entry): for read operations this information is used as search base; for write operations this information is used to determine the DN of the entry.
> - Object classes of the LDAP entries (by default the object classes of the selected entry). For read operations this information is used to compose the search filter; for the create operation this information is used to set the object classes of the entry
> - The RDN attribute to use (by default the RDN attribute of the selected entry): this information is used to determine the RDN and DN of the entry
> - Connection parameters like hostname, port, encryption, bind DN, password (for default values this information can be obtained from IEntry.getBrowserConnection().getConnection()
> The new Apache Directory LDAP API should be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.