Package com.ebasetech.xi.api
Class SnapshotQuery
java.lang.Object
com.ebasetech.xi.api.SnapshotQuery
public class SnapshotQuery
extends java.lang.Object
A Snapshot query is used to filter snapshots based on the filter information supplied.
Snapshots can be filtered by supplying the following:
- snapshot id - unique identifier of the snapshot
- Created Date - from, before or between two dates
- Expiry Date - from, before or between two dates
- Snapshot fields - list of snapshot fields to match. see
Snapshot.getFields()
- Since:
- 4.4
- See Also:
SnapshotManager.getSnapshots(SnapshotQuery)
-
Constructor Summary
Constructors Constructor Description SnapshotQuery()
-
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getFields()
Returns a list of snapshot fields used to filter a snapshot.java.util.Date
getSearchCreatedDateFrom()
Returns query from creation date.java.util.Date
getSearchCreatedDateTo()
Returns query to creation datejava.util.Date
getSearchExpiryDateFrom()
Returns query from expiry date.java.util.Date
getSearchExpiryDateTo()
Returns query to expiry date.java.lang.String
getSnapshotId()
Returns the snapshot id.void
setFields(java.util.Map<java.lang.String,java.lang.String> snapshotFields)
Sets additional information to filter snapshots.void
setSearchCreatedDateFrom(java.util.Date date)
Query snapshots created starting from this date, used in conjunction withsetSearchCreatedDateTo(Date)
to search between two dates.void
setSearchCreatedDateTo(java.util.Date date)
Query snapshots created up until this date, used in conjunction withsetSearchCreatedDateFrom(Date)
to search between two dates.void
setSearchExpiryDateFrom(java.util.Date date)
Query snapshots which expire starting from this date, used in conjunction withsetSearchExpiryDateTo(Date)
to search between two dates.void
setSearchExpiryDateTo(java.util.Date date)
Query snapshots which expire up until this date, used in conjunction withsetSearchExpiryDateFrom(Date)
to search between two dates.void
setSnapshotId(java.lang.String snapshotId)
Snapshot unique identifierMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SnapshotQuery
public SnapshotQuery()
-
-
Method Details
-
setSnapshotId
public void setSnapshotId(java.lang.String snapshotId)Snapshot unique identifier- Since:
- 4.4
-
getSnapshotId
public java.lang.String getSnapshotId()Returns the snapshot id.null
if not required.- Since:
- 4.4
-
setSearchCreatedDateFrom
public void setSearchCreatedDateFrom(java.util.Date date)Query snapshots created starting from this date, used in conjunction withsetSearchCreatedDateTo(Date)
to search between two dates.- Since:
- 4.4
-
setSearchCreatedDateTo
public void setSearchCreatedDateTo(java.util.Date date)Query snapshots created up until this date, used in conjunction withsetSearchCreatedDateFrom(Date)
to search between two dates.- Since:
- 4.4
-
getSearchCreatedDateFrom
public java.util.Date getSearchCreatedDateFrom()Returns query from creation date.- Since:
- 4.4
- See Also:
setSearchCreatedDateFrom(Date)
-
getSearchCreatedDateTo
public java.util.Date getSearchCreatedDateTo()Returns query to creation date- Since:
- 4.4
- See Also:
setSearchCreatedDateTo(Date)
-
setSearchExpiryDateFrom
public void setSearchExpiryDateFrom(java.util.Date date)Query snapshots which expire starting from this date, used in conjunction withsetSearchExpiryDateTo(Date)
to search between two dates.- Since:
- 4.4
-
setSearchExpiryDateTo
public void setSearchExpiryDateTo(java.util.Date date)Query snapshots which expire up until this date, used in conjunction withsetSearchExpiryDateFrom(Date)
to search between two dates.- Since:
- 4.4
-
getSearchExpiryDateFrom
public java.util.Date getSearchExpiryDateFrom()Returns query from expiry date.- Since:
- 4.4
- See Also:
setSearchExpiryDateFrom(Date)
-
getSearchExpiryDateTo
public java.util.Date getSearchExpiryDateTo()Returns query to expiry date.- Since:
- 4.4
- See Also:
setSearchExpiryDateTo(Date)
-
setFields
public void setFields(java.util.Map<java.lang.String,java.lang.String> snapshotFields)Sets additional information to filter snapshots. This could be a application identifier, user name etc...- Parameters:
snapshotFields
- - key value pairs used to filter a snapshot.- Since:
- 4.4
- See Also:
SnapshotManager.getSnapshots(SnapshotQuery)
-
getFields
public java.util.Map<java.lang.String,java.lang.String> getFields()Returns a list of snapshot fields used to filter a snapshot.
-