-
Notifications
You must be signed in to change notification settings - Fork 3
mgc.common
Seppel Hardt edited this page Mar 11, 2019
·
1 revision
de.micromata.mgc.common contains some basic functions, which are commonly used.
MGC uses Maven as build system. If you use MGC in your own project, you have to include the MGC repository in your pom.
<dependencies>
<dependency>
<groupId>de.micromata.mgc</groupId>
<artifactId>de.micromata.mgc.common</artifactId>
<version>${mgc.version}</version>
</dependency>
</dependencies>
Want to read/write fields or invoke methods - if public or not - not dealing with complex Exceptionhandling? PrivateBeanUtils is your friend.
See Matcher Framework (German)
Matchers are framework to create filters to varios objects. The base interface is
de.micromata.genome.util.matcher.Matcher<T>, where T is the object to matched against Matchers can be either created explizit composing in java or via a de.micromata.genome.util.matcher.MatcherFactory<T>. To understand Matchers here some samples.
PrivateBeanUtils.copyInstanceProperties(JpaTriggerJobDO.class, toupdate, jjob,
CommonMatchers.and(FieldMatchers.hasNotModifier(Modifier.STATIC),
FieldMatchers.fieldName("+*,-createdAt,-createdBy,-updateCounter,-pk,-attributes")));