Wraps observable JavaFX properties for the prompt text,
the associated SampleQuery
, and the PromptType
.
Versioning is inherited from BusinessDomainObject
and is automatically refreshed when observed properties change.
The toString()
representation concatenates the names of the
sample query and the prompt type.
- Since:
- 1.0
- Author:
- Felix Seggebäing
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty
<SampleQuery> javafx.beans.property.StringProperty
javafx.beans.property.ObjectProperty
<PromptType> -
Constructor Summary
ConstructorsConstructorDescriptionPrompt()
Creates a newPrompt
with default values.Prompt
(String text, SampleQuery sampleQuery, PromptType type) Creates a newPrompt
with the given values.Prompt
(String text, SampleQuery sampleQuery, PromptType type, Long version) Creates a newPrompt
with the given values and an optional version. -
Method Summary
Modifier and TypeMethodDescriptionGets the value of thesampleQuery
property.getText()
Gets the value of thetext
property.getType()
Gets the value of thetype
property.javafx.beans.property.ObjectProperty
<SampleQuery> void
setSampleQuery
(SampleQuery sampleQuery) Sets the value of thesampleQuery
property.void
Sets the value of thetext
property.void
setType
(PromptType type) Sets the value of thetype
property.javafx.beans.property.StringProperty
toString()
Returns a string representation of this prompt.javafx.beans.property.ObjectProperty
<PromptType> Methods inherited from class de.seggebaeing.sqlanalyzer.logic.bdo.BusinessDomainObject
getVersion, refreshVersion, registerProperties, setVersion
-
Property Details
-
text
public javafx.beans.property.StringProperty textProperty- See Also:
-
sampleQuery
- See Also:
-
type
- See Also:
-
-
Constructor Details
-
Prompt
public Prompt()Creates a newPrompt
with default values.Initializes text as an empty string, sample query and type as
null
, and the version asnull
. -
Prompt
Creates a newPrompt
with the given values.Sets the version to
null
, causing it to be initialized automatically.- Parameters:
text
- non-null prompt textsampleQuery
- optional related sample querytype
- optional prompt type- Throws:
NullPointerException
- iftext
isnull
-
Prompt
Creates a newPrompt
with the given values and an optional version.Initializes all fields and registers property listeners so that changes automatically refresh the version. If
version
isnull
, the version is initialized to the current time.- Parameters:
text
- non-null prompt textsampleQuery
- optional related sample querytype
- optional prompt typeversion
- initial version value, ornull
to auto-generate- Throws:
NullPointerException
- iftext
isnull
-
-
Method Details
-
toString
Returns a string representation of this prompt.Format:
"<sampleQueryName> - <typeName>"
. If either reference isnull
, the string"null"
is used in its place. -
getText
Gets the value of thetext
property.- Property description:
- Returns:
- the value of the
text
property - See Also:
-
textProperty
public javafx.beans.property.StringProperty textProperty()- Returns:
- the
text
property - See Also:
-
getSampleQuery
Gets the value of thesampleQuery
property.- Property description:
- Returns:
- the value of the
sampleQuery
property - See Also:
-
sampleQueryProperty
- Returns:
- the
sampleQuery
property - See Also:
-
getType
Gets the value of thetype
property.- Property description:
- Returns:
- the value of the
type
property - See Also:
-
typeProperty
- Returns:
- the
type
property - See Also:
-
setText
Sets the value of thetext
property.- Property description:
- Parameters:
text
- the value for thetext
property- See Also:
-
setSampleQuery
Sets the value of thesampleQuery
property.- Property description:
- Parameters:
sampleQuery
- the value for thesampleQuery
property- See Also:
-
setType
Sets the value of thetype
property.- Property description:
- Parameters:
type
- the value for thetype
property- See Also:
-