Skip to content

Commit

Permalink
refactor: add workaround for huangp/entityunit#4
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Jan 21, 2017
1 parent 5ef15e4 commit 33b5461
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions server/zanata-model/src/main/kotlin/org/zanata/model/HLocale.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,24 @@ class HLocale : ModelEntityBase, Serializable, HasUserFriendlyToString {
@get:Type(type = "localeId")
var localeId: LocaleId

var isActive: Boolean = false
// entityunit 0.3 assumes that each field has a property of the same name,
// so we define the "active" field to go with the "isActive" accessor
@JvmField
final var active: Boolean = false
var isActive: Boolean
get() = active
set(value) {
active = value
}

@JvmField
final var enabledByDefault: Boolean = false
var isEnabledByDefault: Boolean
get() = enabledByDefault
set(value) {
enabledByDefault = value
}

var isEnabledByDefault: Boolean = false
var supportedProjects: Set<HProject>? = null
@ManyToMany
@JoinTable(name = "HProject_Locale", joinColumns = arrayOf(JoinColumn(name = "localeId")), inverseJoinColumns = arrayOf(JoinColumn(name = "projectId")))
Expand Down

0 comments on commit 33b5461

Please sign in to comment.