cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AlexKolonitsky <...@git.apache.org>
Subject [GitHub] cayenne pull request: cdbmport: Add advanced filtering into cdbimp...
Date Wed, 24 Sep 2014 17:22:11 GMT
GitHub user AlexKolonitsky opened a pull request:

    https://github.com/apache/cayenne/pull/15

    cdbmport: Add advanced filtering into cdbimport

    Solution description:
    1) Package  "/cayenne-tools/src/main/java/org/apache/cayenne/tools/dbimport/config" is
responsible for loading configuration from different sources (ant, maven, external reversengineering
file) and transform(see FiltersConfigBuilder) into convenient format for DbLoader (see FiltersConfig).
It is mean that FiltersConfig is a key interface in interaction between tools and server modules.
    
    2) FiltersConfig is a map (DbPath -> EntityFilter) 
    DbPath = Catalog/Schema/Table
    EntityFilter = Table/Column/Procedure Filters
    
    3) DbLoader builds DbPath for each object, takes filter for this path (filter can aggregate
a number of defined in config filters, see FiltersConfig.filter(DbPath)), call isInclude in
order to figure out should we include this object or not. DbLoader should interact only with
DbPath, FiltersConfig, EntityFilter and Filter<T> interface.
    
    4) Filter interface was designed in order to encapsulate all filtering logic for each
specific entity and provide flexibility extend/override this mechanism. For each db object
we are calling "isInclude" once and only in one place where filtering applied. 
    Here I have 2 key classes: Filter<T> interface and FiltersFactory.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/AlexKolonitsky/cayenne add-advanced-filtering-into-cdbimport

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/15.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15
    
----
commit 90de78de01b25c2d62bfe7e431e10aa12cb07d15
Author: alexkolonitsky <alex.kolonitsky@gmail.com>
Date:   2014-08-18T11:18:54Z

    CAY-1942 Refactoring of NamedObjectFactory and NamingStrategy
    
    * Change enums first letter to lower case
    * Rename SmartNameGenerator to DefaultNameGenerator; BasicNameGenerator to LegacyNamegenerator,

commit 1454f65c71bd011f93ac7db0d4cddd5e863556e9
Author: alexkolonitsky <alex.kolonitsky@gmail.com>
Date:   2014-08-18T13:45:06Z

    1) add idea project files to git ignore
    2) fix build/documentation generation

commit a71e2aeff164e9fcecc99668483fe33f04a2210b
Author: alexkolonitsky <alex.kolonitsky@gmail.com>
Date:   2014-08-29T07:34:30Z

    Merge remote-tracking branch 'upstream/master'

commit 5438bce8bee873a92c9c33be52db6e313c36c72b
Author: Alex Kolonitsky <alexkolonitsky@alexs-imac.local>
Date:   2014-09-07T14:24:03Z

    Merge remote-tracking branch 'upstream/master'

commit f657579b4c7fb2065f9e6cc61ee681d6aa595b74
Author: alexkolonitsky <alex.kolonitsky@gmail.com>
Date:   2014-09-24T13:43:38Z

    Merge remote-tracking branch 'upstream/master'

commit a46999b6e06074129174014f519bee28c71dacae
Author: alexkolonitsky <alex.kolonitsky@gmail.com>
Date:   2014-09-04T09:52:53Z

    1) create method to concatenate package with name and reuse them everywhere it was done
    2) Introduce NameFilter interface for Tables/Columns/Procedures filtering
    3) gather all loading classes into loader package
    4) add filters/catalog/schema for dbLoaderConfig
    5) add filtering configuration
    6) add filtering into dbLoader
    7) add end-to-end tests for ant
    8) integrate old and new way of configuration

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message