Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
comete
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Libraries
java
comete
Commits
00212696
Commit
00212696
authored
7 months ago
by
Raphael GIRARDOT
Browse files
Options
Downloads
Patches
Plain Diff
New controller BasicTextArrayTargetController (useful for JAVAAPI-646)
parent
07290f1b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
DataConnectionManagement/src/main/java/fr/soleil/data/controller/BasicTextArrayTargetController.java
+49
-0
49 additions, 0 deletions
...oleil/data/controller/BasicTextArrayTargetController.java
with
49 additions
and
0 deletions
DataConnectionManagement/src/main/java/fr/soleil/data/controller/BasicTextArrayTargetController.java
0 → 100644
+
49
−
0
View file @
00212696
/*
* This file is part of DataConnectionManagement.
*
* DataConnectionManagement is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
* General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* DataConnectionManagement is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with DataConnectionManagement. If not,
* see <https://www.gnu.org/licenses/>.
*/
package
fr.soleil.data.controller
;
import
fr.soleil.data.source.AbstractDataSource
;
import
fr.soleil.data.target.ITarget
;
import
fr.soleil.data.target.array.ITextArrayTarget
;
/**
* This is an {@link BasicTargetController} that makes link between {@link String} array
* {@link AbstractDataSource}s and {@link ITextArrayTarget}s
*
* @author Raphaël GIRARDOT
*/
public
class
BasicTextArrayTargetController
extends
BasicTargetController
<
String
[]>
{
@Override
protected
String
[]
generateDefaultValue
()
{
return
new
String
[
0
];
}
@Override
protected
boolean
isInstanceOfU
(
Object
data
)
{
return
((
data
==
null
)
||
(
data
instanceof
String
[]));
}
@Override
protected
void
setDataToTarget
(
ITarget
target
,
String
[]
data
,
AbstractDataSource
<
String
[]>
source
)
{
((
ITextArrayTarget
)
target
).
setStringArray
(
data
);
}
@Override
public
boolean
isCompatibleWith
(
ITarget
target
)
{
return
(
target
instanceof
ITextArrayTarget
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment