ing
This commit is contained in:
@@ -55,4 +55,41 @@ public class MetaIPType {
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public static enum Enum {
|
||||
V4((short) 1), V6((short) 2),;
|
||||
|
||||
private final Short value;
|
||||
|
||||
/**
|
||||
* @param value
|
||||
*/
|
||||
Enum(final Short value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public MetaIPType to() {
|
||||
return new MetaIPType(this.value);
|
||||
}
|
||||
|
||||
public Enum from(MetaIPType metaIPType) {
|
||||
switch (metaIPType.id) {
|
||||
case 2:
|
||||
return V6;
|
||||
|
||||
default:
|
||||
return V4;
|
||||
}
|
||||
}
|
||||
|
||||
public Enum from(String metaIPTypeKey) {
|
||||
switch (metaIPTypeKey) {
|
||||
case "V6":
|
||||
return V6;
|
||||
|
||||
default:
|
||||
return V4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package com.loafle.overflow.model.meta;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user