Created
August 13, 2020 17:15
-
-
Save tyagiakhilesh/2c833137ba281aa63b32a7ef21ffa9ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package com.doorapp.listener.persistence; | |
import com.doorapp.bean.es.DeviceUsage; | |
import com.doorapp.bean.es.IIndexable; | |
import com.doorapp.bean.es.Resident; | |
import com.doorapp.entity.Lead; | |
import com.doorapp.entity.PartyRelationship; | |
import com.doorapp.entity.Person; | |
import com.doorapp.entity.Services; | |
import com.doorapp.entity.Visit; | |
import com.fasterxml.jackson.annotation.JsonSubTypes; | |
import com.fasterxml.jackson.annotation.JsonTypeInfo; | |
public final class TypeEntityTuple { | |
private String type; | |
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", include = JsonTypeInfo.As.EXTERNAL_PROPERTY) | |
@JsonSubTypes(value = { | |
@JsonSubTypes.Type(value = Visit.class, name = "Visit"), | |
@JsonSubTypes.Type(value = DeviceUsage.class, name = "DeviceUsage"), | |
@JsonSubTypes.Type(value = Lead.class, name = "Lead"), | |
@JsonSubTypes.Type(value = Person.class, name = "Person"), | |
@JsonSubTypes.Type(value = Resident.class, name = "Resident"), | |
@JsonSubTypes.Type(value = PartyRelationship.class, name = "PartyRelationship"), | |
@JsonSubTypes.Type(value = Services.class, name = "Services") | |
}) | |
private IIndexable data; | |
//<editor-fold desc="Getter/Setter" | |
public String getType() { | |
return type; | |
} | |
public void setType(String type) { | |
this.type = type; | |
} | |
public IIndexable getData() { | |
return data; | |
} | |
public void setData(IIndexable data) { | |
this.data = data; | |
} | |
//</editor-fold> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment