-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3afd51d
commit cdc7414
Showing
30 changed files
with
1,405 additions
and
1,299 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
package acme.entities.chimpums; | ||
|
||
import java.util.Date; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.OneToOne; | ||
import javax.persistence.Temporal; | ||
import javax.persistence.TemporalType; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Past; | ||
import javax.validation.constraints.Pattern; | ||
|
||
import org.hibernate.validator.constraints.Length; | ||
import org.hibernate.validator.constraints.URL; | ||
|
||
import acme.entities.items.Item; | ||
import acme.framework.datatypes.Money; | ||
import acme.framework.entities.AbstractEntity; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
public class Chimpum extends AbstractEntity{ | ||
|
||
protected static final long serialVersionUID = 1L; | ||
|
||
@NotNull | ||
@Pattern(regexp = "^[A-Z]{3}-[0-9]{2}-[0-9]{2}-[0-9]{2}$") | ||
protected String code; | ||
|
||
@NotNull | ||
@Past | ||
@Temporal(TemporalType.TIMESTAMP) | ||
protected Date creationMoment; | ||
|
||
@NotNull | ||
@Temporal(TemporalType.TIMESTAMP) | ||
protected Date startDate; | ||
|
||
@NotNull | ||
@Temporal(TemporalType.TIMESTAMP) | ||
protected Date endDate; | ||
|
||
@NotBlank | ||
@Length(min=1, max = 100) | ||
protected String title; | ||
|
||
@NotBlank | ||
@Length(min=1, max = 255) | ||
protected String description; | ||
|
||
@NotNull | ||
@Valid | ||
protected Money budget; | ||
|
||
@URL | ||
protected String moreInfo; | ||
|
||
@NotNull | ||
@Valid | ||
@OneToOne(optional = false) | ||
@JoinColumn(unique = true) | ||
protected Item item; | ||
|
||
} | ||
//package acme.entities.chimpums; | ||
// | ||
//import java.util.Date; | ||
// | ||
//import javax.persistence.Entity; | ||
//import javax.persistence.JoinColumn; | ||
//import javax.persistence.OneToOne; | ||
//import javax.persistence.Temporal; | ||
//import javax.persistence.TemporalType; | ||
//import javax.validation.Valid; | ||
//import javax.validation.constraints.NotBlank; | ||
//import javax.validation.constraints.NotNull; | ||
//import javax.validation.constraints.Past; | ||
//import javax.validation.constraints.Pattern; | ||
// | ||
//import org.hibernate.validator.constraints.Length; | ||
//import org.hibernate.validator.constraints.URL; | ||
// | ||
//import acme.entities.items.Item; | ||
//import acme.framework.datatypes.Money; | ||
//import acme.framework.entities.AbstractEntity; | ||
//import lombok.Getter; | ||
//import lombok.Setter; | ||
// | ||
//@Entity | ||
//@Getter | ||
//@Setter | ||
//public class Chimpum extends AbstractEntity{ | ||
// | ||
// protected static final long serialVersionUID = 1L; | ||
// | ||
// @NotNull | ||
// @Pattern(regexp = "^[A-Z]{3}-[0-9]{2}-[0-9]{2}-[0-9]{2}$") | ||
// protected String code; | ||
// | ||
// @NotNull | ||
// @Past | ||
// @Temporal(TemporalType.TIMESTAMP) | ||
// protected Date creationMoment; | ||
// | ||
// @NotNull | ||
// @Temporal(TemporalType.TIMESTAMP) | ||
// protected Date startDate; | ||
// | ||
// @NotNull | ||
// @Temporal(TemporalType.TIMESTAMP) | ||
// protected Date endDate; | ||
// | ||
// @NotBlank | ||
// @Length(min=1, max = 100) | ||
// protected String title; | ||
// | ||
// @NotBlank | ||
// @Length(min=1, max = 255) | ||
// protected String description; | ||
// | ||
// @NotNull | ||
// @Valid | ||
// protected Money budget; | ||
// | ||
// @URL | ||
// protected String moreInfo; | ||
// | ||
// @NotNull | ||
// @Valid | ||
// @OneToOne(optional = false) | ||
// @JoinColumn(unique = true) | ||
// protected Item item; | ||
// | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package acme.entities.sisit; | ||
|
||
import java.util.Date; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.OneToOne; | ||
import javax.persistence.Temporal; | ||
import javax.persistence.TemporalType; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Past; | ||
import javax.validation.constraints.Pattern; | ||
|
||
import org.hibernate.validator.constraints.Length; | ||
import org.hibernate.validator.constraints.URL; | ||
|
||
import acme.entities.items.Item; | ||
import acme.framework.datatypes.Money; | ||
import acme.framework.entities.AbstractEntity; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
public class Sisit extends AbstractEntity{ | ||
|
||
protected static final long serialVersionUID = 1L; | ||
|
||
@NotNull | ||
@Pattern(regexp = "^[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{1,3}$") | ||
protected String code; | ||
|
||
@NotNull | ||
@Past | ||
@Temporal(TemporalType.TIMESTAMP) | ||
protected Date creationMoment; | ||
|
||
@NotBlank | ||
@Length(min=1, max = 100) | ||
protected String name; | ||
|
||
@NotBlank | ||
@Length(min=1, max = 255) | ||
protected String summary; | ||
|
||
@NotNull | ||
@Temporal(TemporalType.TIMESTAMP) | ||
protected Date startDate; | ||
|
||
@NotNull | ||
@Temporal(TemporalType.TIMESTAMP) | ||
protected Date endDate; | ||
|
||
@NotNull | ||
@Valid | ||
protected Money share; | ||
|
||
@URL | ||
protected String moreInfo; | ||
|
||
@NotNull | ||
@Valid | ||
@OneToOne(optional = false) | ||
@JoinColumn(unique = true) | ||
protected Item item; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 39 additions & 39 deletions
78
src/main/java/acme/features/inventor/chimpum/InventorChimpumController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
package acme.features.inventor.chimpum; | ||
|
||
import javax.annotation.PostConstruct; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Controller; | ||
|
||
import acme.entities.chimpums.Chimpum; | ||
import acme.framework.controllers.AbstractController; | ||
import acme.roles.Inventor; | ||
|
||
@Controller | ||
public class InventorChimpumController extends AbstractController<Inventor, Chimpum>{ | ||
|
||
@Autowired | ||
protected InventorChimpumListService listService; | ||
|
||
@Autowired | ||
protected InventorChimpumShowService showService; | ||
|
||
@Autowired | ||
protected InventorChimpumCreateService createService; | ||
|
||
@Autowired | ||
protected InventorChimpumUpdateService updateService; | ||
|
||
@Autowired | ||
protected InventorChimpumDeleteService deleteService; | ||
|
||
@PostConstruct | ||
protected void initialise() { | ||
super.addCommand("show", this.showService); | ||
super.addCommand("list", this.listService); | ||
super.addCommand("create", this.createService); | ||
super.addCommand("update", this.updateService); | ||
super.addCommand("delete", this.deleteService); | ||
} | ||
|
||
} | ||
//package acme.features.inventor.chimpum; | ||
// | ||
//import javax.annotation.PostConstruct; | ||
// | ||
//import org.springframework.beans.factory.annotation.Autowired; | ||
//import org.springframework.stereotype.Controller; | ||
// | ||
//import acme.entities.chimpums.Chimpum; | ||
//import acme.framework.controllers.AbstractController; | ||
//import acme.roles.Inventor; | ||
// | ||
//@Controller | ||
//public class InventorChimpumController extends AbstractController<Inventor, Chimpum>{ | ||
// | ||
// @Autowired | ||
// protected InventorChimpumListService listService; | ||
// | ||
// @Autowired | ||
// protected InventorChimpumShowService showService; | ||
// | ||
// @Autowired | ||
// protected InventorChimpumCreateService createService; | ||
// | ||
// @Autowired | ||
// protected InventorChimpumUpdateService updateService; | ||
// | ||
// @Autowired | ||
// protected InventorChimpumDeleteService deleteService; | ||
// | ||
// @PostConstruct | ||
// protected void initialise() { | ||
// super.addCommand("show", this.showService); | ||
// super.addCommand("list", this.listService); | ||
// super.addCommand("create", this.createService); | ||
// super.addCommand("update", this.updateService); | ||
// super.addCommand("delete", this.deleteService); | ||
// } | ||
// | ||
//} |
Oops, something went wrong.