@MustImplementEqualsAndHashcode
public interface IDAODataProvider
| Modifier and Type | Method and Description |
|---|---|
void |
fillStringBuilderForSaving(StringBuilder aSB)
Is called to fill the data to be written to the file.
|
Charset |
getCharset() |
com.helger.commons.state.EChange |
initForFirstTimeUsage()
Prepare the data structure for an initial save.
|
boolean |
isContentValidForSaving(String sContent)
Perform an additional check to ensure that only valid data is saved.
|
com.helger.commons.state.EChange |
readFromStream(InputStream aIS)
Initially fill the DAO from an input stream.
|
@Nonnull Charset getCharset()
null.@Nonnull com.helger.commons.state.EChange initForFirstTimeUsage() throws Exception
EChange.CHANGED if reading the document changed the content
and so a call to the save action should be performed. Never
null.Exception - Any error that may occur on initialization.@Nonnull com.helger.commons.state.EChange readFromStream(@Nonnull InputStream aIS) throws Exception
aIS - The input stream to read from. Is never null.EChange.CHANGED if reading the document changed the content
and so a call to the save action should be performed. Never
null.Exception - In case something goes wrong.void fillStringBuilderForSaving(@Nonnull StringBuilder aSB) throws Exception
aSB - The string builder to be filled. Is never null.Exception - In case something goes wrong.boolean isContentValidForSaving(@Nullable String sContent)
fillStringBuilderForSaving(StringBuilder).sContent - The content that would be written to the file.true if the content is valid, false if
the content is invalid and should not be saved.Copyright © 2014–2017 Philip Helger. All rights reserved.