Skip to content

Instantly share code, notes, and snippets.

Avatar

christophe-dooapp

View GitHub Profile
View gist:8194309
<plugin>
<groupId>com.dooapp</groupId>
<artifactId>spoon-maven-plugin</artifactId>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>com.dooapp</groupId>
<artifactId>fx-spoon</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
View gist:8179945
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>AProject</groupId>
<artifactId>AProject</artifactId>
<version>1.0-SNAPSHOT</version>
View gist:7748173
public class Project{
private final StringProperty name=new SimpleStringProperty();
}
public class Sample{
private final StringProperty name=new SimpleStringProperty();
}
View gist:7661234
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>DSDK-entity</groupId>
<artifactId>DSDK-entity</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
View gist:7566822
package com.dooapp.template.property;
import javafx.beans.property.ObjectProperty;
import spoon.reflect.reference.CtTypeReference;
import spoon.template.Local;
import spoon.template.Parameter;
import spoon.template.Template;
/**
* Main template to handle all getter setter updater and properties into wrappers<br>
View gist:7564476
[INFO] Running spoon with parameters :
[INFO] [-i, /Users/christophedufour/workspace/test-model/src/main/java, -o, /Users/christophedufour/workspace/test-model/target/generated-sources/spoon, --compliance, 6, -p, com.dooapp.processor.wrapper.GenerateMissingWrapperClassProcessor:com.dooapp.processor.wrapper.AddSuperClassOnBeanProcessor:com.dooapp.processor.wrapper.AddSuperClassOnWrapperProcessor:com.dooapp.processor.property.GenerateWrapperMethodsProcessor:com.dooapp.processor.property.GenerateCreateFieldPropertyContent:com.dooapp.processor.collection.GenerateWrapperCollectionMethodsProcessor:com.dooapp.processor.builder.GenerateMissingBuilderClassProcessor:com.dooapp.processor.builder.AddSuperClassOnBuilderProcessor:com.dooapp.processor.builder.GenerateMethodsProcessor, -t, /var/folders/vh/gt6kjhmn2rd9_pnm_gnlrnlr0000gn/T/Spoon2395517295073850970/com/dooapp/template/WrapperConstructorTemplate.java:/var/folders/vh/gt6kjhmn2rd9_pnm_gnlrnlr0000gn/T/Spoon2395517295073850970/com/dooapp/template/property/ReadTempl
View gist:7483037
package com.dooapp.template.builder;
import spoon.template.Local;
import spoon.template.Parameter;
import spoon.template.Template;
public class DefaultConstantTemplate implements Template {
@Parameter()
static String _name_;
@Parameter("_NAME_")
View gist:7482856
package com.dooapp.template.builder;
import spoon.template.Local;
import spoon.template.Parameter;
import spoon.template.Template;
public class DefaultConstantTemplate implements Template {
public static final String DEFAULT__NAME__VALUE = "defaultValue._name_";
@Parameter("_name_")
String __name_;
View gist:6300613
@Entity
public class Person{
@OneToMany(Fetch=FetchType.EAGER)
private List<Child> person;
}
db.selectFrom(PERSON);//select * from Person, Child WHERE Person.id=Child.Person.Id
View gist:6279322
@Table(name="FOO")
public class Bar{
@Column(name="MY_CUSTOM_NAME")
private String name;
}
/*
Table structure :
--------------------
| FOO |
You can’t perform that action at this time.