Created
February 28, 2022 20:30
-
-
Save onurcill/b02128948879e63c87c7b52280fda41b to your computer and use it in GitHub Desktop.
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
@RequiredArgsConstructor | |
@Getter | |
@Setter | |
@MappedSuperclass() | |
@SuperBuilder | |
@FilterDef( | |
name = TenantEntity.TENANT_FILTER_NAME, | |
parameters = @ParamDef(name = TenantEntity.TENANT_FILTER_ARGUMENT_NAME, type = TenantEntity.TENANT_FILTER_ARGUMENT_TYPE), | |
defaultCondition = | |
TenantEntity.TENANT_ID_PROPERTY_NAME + "= :" + TenantEntity.TENANT_FILTER_ARGUMENT_NAME) | |
@Filter(name = TenantEntity.TENANT_FILTER_NAME) | |
public class TenantEntity { | |
static final String TENANT_FILTER_NAME = "tenantFilter"; | |
static final String TENANT_ID_PROPERTY_NAME = "tenant_id"; | |
static final String TENANT_FILTER_ARGUMENT_NAME = "tenantId"; | |
static final String TENANT_FILTER_ARGUMENT_TYPE = "string"; | |
@Column(name = TENANT_ID_PROPERTY_NAME, nullable = false) | |
String tenantId; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment