-
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.
Foreign key constraints when inserting... need to figure this out
- Loading branch information
1 parent
f9c2e40
commit 5f804cd
Showing
16 changed files
with
156 additions
and
275 deletions.
There are no files selected for viewing
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
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
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
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
52 changes: 1 addition & 51 deletions
52
src/main/java/net/feminaexlux/gallery/struts2/model/ResourceType.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,58 +1,8 @@ | ||
package net.feminaexlux.gallery.struts2.model; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "resource_type") | ||
public class ResourceType { | ||
public static final String ALBUM = "Album"; | ||
public static final String COMIC = "Comic"; | ||
public static final String IMAGE = "Image"; | ||
public static final String NSFW = "Nsfw"; | ||
public static final String TAG = "Tag"; | ||
public static final String ADMIN = "Admin"; | ||
|
||
private String type; | ||
|
||
public ResourceType() { | ||
} | ||
|
||
public ResourceType(String type) { | ||
this.type = type; | ||
} | ||
|
||
@Id | ||
@Column(name = "type", nullable = false, length = 50) | ||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
ResourceType that = (ResourceType) o; | ||
|
||
if (type != null ? !type.equals(that.type) : that.type != null) return false; | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return type != null ? type.hashCode() : 0; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return type; | ||
} | ||
public static final String USER = "User"; | ||
} |
Oops, something went wrong.