クラス ContentLoader
java.lang.Object
org.thinkit.framework.content.ContentLoader
public final class ContentLoader extends Object
The class that defines the process of loading the content data based on the
specified content definition.
It provides a load(InputStream, Set)
method to load content data
without conditions, and a load(InputStream, Set, List)
method to
load content data with conditions.
If the value of "conditionId"
defined in the content is an empty
string, the record will be loaded unconditionally. If you have defined a
value for the conditionId of the content, be sure to define a condition for
the content and call load(InputStream, Set, List)
.
If the condition is not specified:
List<Map<String, String>> contents = ContentLoader.load(contentStream, attributes);
If the condition is specified:
List<Map<String, String>> contents = ContentLoader.load(contentStream, attributes, conditions);
- 導入されたバージョン:
- 1.0.0
-
メソッドの概要
修飾子とタイプ メソッド 説明 static List<Map<String,String>>
load(@NonNull InputStream contentStream, @NonNull Set<String> attributes)
Gets each element defined in the content file specified as an argument and return it as List.static List<Map<String,String>>
load(@NonNull InputStream contentStream, @NonNull Set<String> attributes, @NonNull List<Map<String,String>> conditions)
Gets each element defined in the content file specified and return it as a list.
-
メソッドの詳細
-
load
public static List<Map<String,String>> load(@NonNull @NonNull InputStream contentStream, @NonNull @NonNull Set<String> attributes)Gets each element defined in the content file specified as an argument and return it as List.Use this
load(InputStream, Set)
method if there are no fetch conditions in the content definition.Get the content data without conditions:
List<Map<String, String>> contents = ContentLoader.load(contentStream, attributes);
- パラメータ:
contentStream
- The stream of content fileattributes
- The Attribute names to be acquired- 戻り値:
- The List containing the elements retrieved from the content file
- 例外:
NullPointerException
- Ifnull
is passed as an argumentIllegalArgumentException
- If the attribute list is empty
-
load
public static List<Map<String,String>> load(@NonNull @NonNull InputStream contentStream, @NonNull @NonNull Set<String> attributes, @NonNull @NonNull List<Map<String,String>> conditions)Gets each element defined in the content file specified and return it as a list.Use this
load(InputStream, Set, List)
method if there are no acquisition conditions in the content definition.Get the content data with conditions:
List<Map<String, String>> contents = ContentLoader.load(contentStream, attributes, conditions);
- パラメータ:
contentStream
- The stream of content fileattributes
- The Attribute names to be acquiredconditions
- The conditional list to use when getting data from the content file- 戻り値:
- The List containing the elements retrieved from the content file
- 例外:
NullPointerException
- Ifnull
is passed as an argumentIllegalArgumentException
- If the attribute list is empty
-